ovsdb: Define official port number.
authorJustin Pettit <jpettit@nicira.com>
Sat, 31 Aug 2013 00:20:29 +0000 (17:20 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 1 Oct 2013 23:21:41 +0000 (16:21 -0700)
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/jsonrpc.c
lib/jsonrpc.h
ovsdb/SPECS
vswitchd/bridge.c
vswitchd/vswitch.xml

index b43b044..cef96a9 100644 (file)
@@ -63,7 +63,7 @@ static void jsonrpc_error(struct jsonrpc *, int error);
 int
 jsonrpc_stream_open(const char *name, struct stream **streamp, uint8_t dscp)
 {
-    return stream_open_with_default_port(name, JSONRPC_TCP_PORT,
+    return stream_open_with_default_port(name, OVSDB_OLD_PORT,
                                          streamp, dscp);
 }
 
@@ -72,7 +72,7 @@ jsonrpc_stream_open(const char *name, struct stream **streamp, uint8_t dscp)
 int
 jsonrpc_pstream_open(const char *name, struct pstream **pstreamp, uint8_t dscp)
 {
-    return pstream_open_with_default_port(name, JSONRPC_TCP_PORT,
+    return pstream_open_with_default_port(name, OVSDB_OLD_PORT,
                                           pstreamp, dscp);
 }
 
index 2c691cf..5397200 100644 (file)
@@ -32,11 +32,14 @@ struct stream;
 \f
 /* API for a JSON-RPC stream. */
 
-/* Default port number.
+/* Default port numbers.
  *
- * There is nothing standard about this port number.  It is simply what
- * we have chosen. */
-#define JSONRPC_TCP_PORT 6632
+ * OVSDB_OLD_PORT defines the original port number used by OVS.
+ * OVSDB_PORT defines the official port number assigned by IANA.  By
+ * default, we still uses OVSDB_OLD_PORT, but we present a warning that
+ * that will change. */
+#define OVSDB_OLD_PORT 6632
+#define OVSDB_PORT 6640
 
 int jsonrpc_stream_open(const char *name, struct stream **, uint8_t dscp);
 int jsonrpc_pstream_open(const char *name, struct pstream **, uint8_t dscp);
index 5bdb974..5656b9d 100644 (file)
@@ -316,7 +316,9 @@ over HTTP, for these reasons:
 
     * The JSON-RPC specification for HTTP transport is incomplete.
 
-We are using TCP port 6632 for the database JSON-RPC connection.
+We are currently using TCP port 6632 for the database JSON-RPC
+connection, but future versions will switch to using IANA-assigned TCP
+port 6640.
 
 The database wire protocol consists of the following JSON-RPC methods:
 
index 423da10..ec3633c 100644 (file)
@@ -474,7 +474,7 @@ collect_in_band_managers(const struct ovsrec_open_vswitch *ovs_cfg,
             struct sockaddr_in *sin = &managers[n_managers];
 
             if (stream_parse_target_with_default_port(target,
-                                                      JSONRPC_TCP_PORT,
+                                                      OVSDB_OLD_PORT,
                                                       sin)) {
                 n_managers++;
             }
index 5fd5b3b..6fed6eb 100644 (file)
           <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
           <dd>
             <p>
-              The specified SSL <var>port</var> (default: 6632) 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.
+              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>
-              SSL support is an optional feature that is not always built as
-              part of Open vSwitch.
+              If <var>port</var> is not specified, it currently defaults
+              to 6632.  In the future, the default will change to 6640,
+              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: 6632) on the host at
-            the given <var>ip</var>, which must be expressed as an IP address
-            (not a DNS name).
+            <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 6632.  In the future, the default will change to 6640,
+              which is the IANA-defined value.
+            </p>
           </dd>
           <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: 6632).  Specify 0 for <var>port</var> to have the
-              kernel automatically choose an available port.  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
+              Listens for SSL connections on the specified TCP
+              <var>port</var>.  Specify 0 for <var>port</var> to have
+              the kernel automatically choose an available port.  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 6632.  In the future, the default will change to 6640,
+              which is the IANA-defined value.
+            </p>
             <p>
               SSL support is an optional feature that is not always built as
               part of Open vSwitch.
           </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: 6632).  Specify 0 for <var>port</var> to have the kernel
-            automatically choose an available port.  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>.  Specify 0 for <var>port</var> to have
+              the kernel automatically choose an available port.  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 6632.  In the future, the default will change to 6640,
+              which is the IANA-defined value.
+            </p>
           </dd>
         </dl>
         <p>When multiple managers are configured, the <ref column="target"/>