ofproto: Define official OpenFlow port number.
authorJustin Pettit <jpettit@nicira.com>
Sat, 31 Aug 2013 00:26:56 +0000 (17:26 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 1 Oct 2013 23:46:39 +0000 (16:46 -0700)
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
include/openflow/openflow-common.h
lib/stream-ssl.c
lib/vconn-active.man
lib/vconn-passive.man
lib/vconn-stream.c
lib/vconn.c
ofproto/connmgr.c
third-party/ofp-tcpdump.patch
utilities/ovs-controller.8.in
vswitchd/vswitch.xml

index 5b0ccc5..45d03ef 100644 (file)
@@ -104,7 +104,8 @@ enum ofp_version {
 #define OFP_MAX_TABLE_NAME_LEN 32
 #define OFP_MAX_PORT_NAME_LEN  16
 
-#define OFP_TCP_PORT  6633
+#define OFP_OLD_PORT  6633
+#define OFP_PORT  6653
 
 #define OFP_ETH_ALEN 6          /* Bytes in an Ethernet address. */
 
index 1a77b79..1e748c0 100644 (file)
@@ -317,7 +317,7 @@ ssl_open(const char *name, char *suffix, struct stream **streamp, uint8_t dscp)
         return error;
     }
 
-    error = inet_open_active(SOCK_STREAM, suffix, OFP_TCP_PORT, &sin, &fd,
+    error = inet_open_active(SOCK_STREAM, suffix, OFP_OLD_PORT, &sin, &fd,
                              dscp);
     if (fd >= 0) {
         int state = error ? STATE_TCP_CONNECTING : STATE_SSL_CONNECTING;
@@ -797,7 +797,7 @@ pssl_open(const char *name OVS_UNUSED, char *suffix, struct pstream **pstreamp,
         return retval;
     }
 
-    fd = inet_open_passive(SOCK_STREAM, suffix, OFP_TCP_PORT, &sin, dscp);
+    fd = inet_open_passive(SOCK_STREAM, suffix, OFP_OLD_PORT, &sin, dscp);
     if (fd < 0) {
         return -fd;
     }
@@ -846,7 +846,7 @@ pssl_accept(struct pstream *pstream, struct stream **new_streamp)
     }
 
     sprintf(name, "ssl:"IP_FMT, IP_ARGS(sin.sin_addr.s_addr));
-    if (sin.sin_port != htons(OFP_TCP_PORT)) {
+    if (sin.sin_port != htons(OFP_OLD_PORT)) {
         sprintf(strchr(name, '\0'), ":%"PRIu16, ntohs(sin.sin_port));
     }
     return new_ssl_stream(name, new_fd, SERVER, STATE_SSL_CONNECTING, &sin,
index be96ca8..bf7aaf7 100644 (file)
@@ -1,13 +1,13 @@
 .IP "\fBssl:\fIip\fR[\fB:\fIport\fR]"
-The specified SSL \fIport\fR (default: 6633) on the host at the given
-\fIip\fR, which must be expressed as an IP address (not a DNS name).
-The \fB\-\-private\-key\fR, \fB\-\-certificate\fR, and
-\fB\-\-ca\-cert\fR options are mandatory when this form is used.
-.
-.IP "\fBtcp:\fIip\fR[\fB:\fIport\fR]"
-The specified TCP \fIport\fR (default: 6633) on the host at the given
-\fIip\fR, which must be expressed as an IP address (not a DNS name).
-.
+.IQ "\fBtcp:\fIip\fR[\fB:\fIport\fR]"
+The specified \fIport\fR on the host at the given \fIip\fR, which must
+be expressed as an IP address (not a DNS name).  For \fBssl\fR, the
+\fB\-\-private\-key\fR, \fB\-\-certificate\fR, and \fB\-\-ca\-cert\fR
+options are mandatory.
+.IP
+If \fIport\fR is not specified, it currently defaults to 6633.  In the
+future, the default will change to 6653, which is the IANA-defined
+value.
 .TP
 \fBunix:\fIfile\fR
 The Unix domain server socket named \fIfile\fR.
index 1edd118..a9efdb3 100644 (file)
@@ -1,16 +1,14 @@
 .IP "\fBpssl:\fR[\fIport\fR][\fB:\fIip\fR]"
-Listens for OpenFlow SSL connections on \fIport\fR (default: 6633).
-The \fB\-\-private\-key\fR, \fB\-\-certificate\fR, and
-\fB\-\-ca\-cert\fR options are mandatory when this form is used.  By
-default, connections are not bound to a particular local IP address,
-but \fIip\fR may be specified to listen only for connections to the
-given \fIip\fR.
-.
-.IP "\fBptcp:\fR[\fIport\fR][\fB:\fIip\fR]"
-Listens for OpenFlow TCP connections on \fIport\fR (default: 6633).
-By default, connections are not bound to a particular local IP
-address, but \fIip\fR may be specified to listen only for connections
-to the given \fIip\fR.
+.IQ "\fBptcp:\fR[\fIport\fR][\fB:\fIip\fR]"
+Listens for OpenFlow connections on \fIport\fR.  By
+default, connections are not bound to a particular local IP address, but
+\fIip\fR may be specified to listen only for connections to the given
+\fIip\fR.  For \fBpssl\fR, the \fB\-\-private\-key\fR,
+\fB\-\-certificate\fR, and \fB\-\-ca\-cert\fR options are mandatory.
+.IP
+If \fIport\fR is not specified, it currently defaults to 6633.  In the
+future, the default will change to 6653, which is the IANA-defined
+value.
 .
 .IP "\fBpunix:\fIfile\fR"
 Listens for OpenFlow connections on the Unix domain server socket
index 23145ea..027f48f 100644 (file)
@@ -82,7 +82,7 @@ vconn_stream_open(const char *name, uint32_t allowed_versions,
     struct stream *stream;
     int error;
 
-    error = stream_open_with_default_port(name, OFP_TCP_PORT, &stream, dscp);
+    error = stream_open_with_default_port(name, OFP_OLD_PORT, &stream, dscp);
     if (!error) {
         error = stream_connect(stream);
         if (!error || error == EAGAIN) {
@@ -315,7 +315,7 @@ pvconn_pstream_listen(const char *name, uint32_t allowed_versions,
     struct pstream *pstream;
     int error;
 
-    error = pstream_open_with_default_port(name, OFP_TCP_PORT,
+    error = pstream_open_with_default_port(name, OFP_OLD_PORT,
                                            &pstream, dscp);
     if (error) {
         return error;
index 8a06485..5708987 100644 (file)
@@ -138,10 +138,10 @@ vconn_usage(bool active, bool passive, bool bootstrap OVS_UNUSED)
     if (active) {
         printf("Active OpenFlow connection methods:\n");
         printf("  tcp:IP[:PORT]           "
-               "PORT (default: %d) at remote IP\n", OFP_TCP_PORT);
+               "PORT (default: %d) at remote IP\n", OFP_OLD_PORT);
 #ifdef HAVE_OPENSSL
         printf("  ssl:IP[:PORT]           "
-               "SSL PORT (default: %d) at remote IP\n", OFP_TCP_PORT);
+               "SSL PORT (default: %d) at remote IP\n", OFP_OLD_PORT);
 #endif
         printf("  unix:FILE               Unix domain socket named FILE\n");
     }
@@ -150,11 +150,11 @@ vconn_usage(bool active, bool passive, bool bootstrap OVS_UNUSED)
         printf("Passive OpenFlow connection methods:\n");
         printf("  ptcp:[PORT][:IP]        "
                "listen to TCP PORT (default: %d) on IP\n",
-               OFP_TCP_PORT);
+               OFP_OLD_PORT);
 #ifdef HAVE_OPENSSL
         printf("  pssl:[PORT][:IP]        "
                "listen for SSL on PORT (default: %d) on IP\n",
-               OFP_TCP_PORT);
+               OFP_OLD_PORT);
 #endif
         printf("  punix:FILE              "
                "listen on Unix domain socket FILE\n");
index 2fd94e2..8a4195d 100644 (file)
@@ -693,7 +693,7 @@ update_in_band_remotes(struct connmgr *mgr)
         }
 
         if (stream_parse_target_with_default_port(target,
-                                                  OFP_TCP_PORT,
+                                                  OFP_OLD_PORT,
                                                   sin)) {
             n_addrs++;
         }
index 5c47061..b1ac9a5 100644 (file)
          else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) {
                  ldp_print(bp, length);
 -        }
-+        } else if (sport == OFP_TCP_PORT || dport == OFP_TCP_PORT) {
++        } else if (sport == OFP_OLD_PORT || dport == OFP_OLD_PORT) {
 +                   openflow_print(bp, length);
 +        }
  
index 162c585..f29de6a 100644 (file)
@@ -148,6 +148,9 @@ To bind locally to port 6633 (the default) and wait for incoming
 connections from OpenFlow switches:
 .IP
 \fB% ovs\-controller ptcp:\fR
+.PP
+In the future, the default port number will change to 6653, which is the
+IANA-defined value.
 .SH "BUGS"
 .PP
 Configuring a Citrix XenServer to connect to a particular controller
index 6fed6eb..c12fd8f 100644 (file)
         <dl>
           <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
           <dd>
-            <p>The specified SSL <var>port</var> (default: 6633) on the host at
-            the given <var>ip</var>, which must be expressed as an IP address
-            (not a DNS name).  The <ref table="Open_vSwitch" column="ssl"/>
-            column in the <ref table="Open_vSwitch"/> table must point to a
-            valid SSL configuration when this form is used.</p>
+            <p>The specified SSL <var>port</var> on the host at the
+            given <var>ip</var>, which must be expressed as an IP
+            address (not a DNS name).  The <ref table="Open_vSwitch"
+            column="ssl"/> column in the <ref table="Open_vSwitch"/>
+            table must point to a valid SSL configuration when this form
+            is used.</p>
+            <p>If <var>port</var> is not specified, it currently
+            defaults to 6633.  In the future, the default will change to
+            6653, which is the IANA-defined value.</p>
             <p>SSL support is an optional feature that is not always built as
             part of Open vSwitch.</p>
           </dd>
           <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
-          <dd>The specified TCP <var>port</var> (default: 6633) on the host at
-          the given <var>ip</var>, which must be expressed as an IP address
-          (not a DNS name).</dd>
+          <dd>
+            <p>The specified TCP <var>port</var> on the host at the
+            given <var>ip</var>, which must be expressed as an IP
+            address (not a DNS name).</p>
+            <p>If <var>port</var> is not specified, it currently
+            defaults to 6633.  In the future, the default will change to
+            6653, which is the IANA-defined value.</p>
+          </dd>
         </dl>
         <p>
           The following connection methods are currently supported for service
         <dl>
           <dt><code>pssl:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
           <dd>
-            <p>
-              Listens for SSL connections on the specified TCP <var>port</var>
-              (default: 6633).  If <var>ip</var>, which must be expressed as an
-              IP address (not a DNS name), is specified, then connections are
-              restricted to the specified local IP address.
-            </p>
-            <p>
-              The <ref table="Open_vSwitch" column="ssl"/> column in the <ref
-              table="Open_vSwitch"/> table must point to a valid SSL
-              configuration when this form is used.
-            </p>
+            <p> Listens for SSL connections on the specified TCP
+            <var>port</var>.  If <var>ip</var>, which must be expressed
+            as an IP address (not a DNS name), is specified, then
+            connections are restricted to the specified local IP
+            address.  The <ref table="Open_vSwitch" column="ssl"/>
+            column in the <ref table="Open_vSwitch"/> table must point
+            to a valid SSL configuration when this form is used.</p>
+            <p>If <var>port</var> is not specified, it currently
+            defaults to 6633.  In the future, the default will change to
+            6653, which is the IANA-defined value.</p>
             <p>SSL support is an optional feature that is not always built as
             part of Open vSwitch.</p>
           </dd>
           <dt><code>ptcp:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
           <dd>
-            Listens for connections on the specified TCP <var>port</var>
-            (default: 6633).  If <var>ip</var>, which must be expressed as an
-            IP address (not a DNS name), is specified, then connections are
-            restricted to the specified local IP address.
+            <p>Listens for connections on the specified TCP
+            <var>port</var>.  If <var>ip</var>, which must be expressed
+            as an IP address (not a DNS name), is specified, then
+            connections are restricted to the specified local IP
+            address.</p>
+            <p>If <var>port</var> is not specified, it currently
+            defaults to 6633.  In the future, the default will change to
+            6653, which is the IANA-defined value.</p>
           </dd>
         </dl>
         <p>When multiple controllers are configured for a single bridge, the