aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2014-06-26 14:22:45 +0200
committerLars Thorsen <[email protected]>2014-06-26 14:22:45 +0200
commit603280480adac3ff698db538d26966ecfb46d499 (patch)
tree3855c8157f122612ffb895a2c028ec1c6583c3d4 /lib
parent9d2abccb228e8288633d392240519138740d41e6 (diff)
downloadotp-603280480adac3ff698db538d26966ecfb46d499.tar.gz
otp-603280480adac3ff698db538d26966ecfb46d499.tar.bz2
otp-603280480adac3ff698db538d26966ecfb46d499.zip
[orber] Update documentation and fix testcase for IPv4/IPv6
Diffstat (limited to 'lib')
-rw-r--r--lib/orber/doc/src/ch_naming_service.xml41
-rw-r--r--lib/orber/doc/src/corba.xml11
-rw-r--r--lib/orber/doc/src/orber.xml9
-rw-r--r--lib/orber/src/orber_socket.erl1
-rw-r--r--lib/orber/test/orber_test_lib.erl8
5 files changed, 41 insertions, 29 deletions
diff --git a/lib/orber/doc/src/ch_naming_service.xml b/lib/orber/doc/src/ch_naming_service.xml
index b735629a14..e355db2edb 100644
--- a/lib/orber/doc/src/ch_naming_service.xml
+++ b/lib/orber/doc/src/ch_naming_service.xml
@@ -273,25 +273,28 @@ lists:foreach(fun({{Id, Kind},BindingType}) -> case BindingType of
<p>The notation of this scheme is similar to the more well known URL <c>HTTP</c>, and
the full <c>corbaloc</c> BNF is:</p>
<code type="none"><![CDATA[
-<corbaloc> = "corbaloc:"<obj_addr_list>["/"<key_string>]
-<obj_addr_list> = [<obj_addr>","]*<obj_addr>
-<obj_addr> = <prot_addr> | <future_prot_addr>
-<prot_addr> = <rir_prot_addr> | <iiop_prot_addr>
-<rir_prot_addr> = <rir_prot_token>":"
-<rir_prot_token> = rir
-<future_prot_addr> = <future_prot_id><future_prot_addr>
-<future_prot_id> = <future_prot_token>":"
-<iiop_prot_addr> = <iiop_id><iiop_addr>
-<iiop_id> = <iiop_default> | <iiop_prot_token>":"
-<iiop_default> = ":"
-<iiop_prot_token> = "iiop"
-<iiop_addr> = <version><host>[":"<port>]
-<host> = DNS-style Host Name | ip_address
-<version> = <major>"."<minor>"@" | empty_string
-<port> = number
-<major> = number
-<minor> = number
-<key_string> = for example NameService
+<corbaloc> = "corbaloc:"<obj_addr_list>["/"<key_string>]
+<obj_addr_list> = [<obj_addr>","]*<obj_addr>
+<obj_addr> = <prot_addr> | <future_prot_addr>
+<prot_addr> = <rir_prot_addr> | <iiop_prot_addr>
+<rir_prot_addr> = <rir_prot_token>":"
+<rir_prot_token> = rir
+<future_prot_addr> = <future_prot_id><future_prot_addr>
+<future_prot_id> = <future_prot_token>":"
+<iiop_prot_addr> = <iiop_id><iiop_addr>
+<iiop_id> = <iiop_default> | <iiop_prot_token>":"
+<iiop_default> = ":"
+<iiop_prot_token> = "iiop"
+<iiop_addr> = <version><host>[":"<port>]
+<host> = <DNS-style Host Name> | <ip_v4_address> | "["<ip_v6_address>"]"
+<version> = <major>"."<minor>"@" | empty_string
+<port> = number
+<major> = number
+<minor> = number
+<DNS-style Host Name> = string
+<ip_v4_address> = string
+<ip_v6_address> = string
+<key_string> = for example NameService
]]></code>
<p>The <c>corbaloc</c> scheme consists of 3 parts:</p>
<list type="bulleted">
diff --git a/lib/orber/doc/src/corba.xml b/lib/orber/doc/src/corba.xml
index 004c7fb9b0..685b497e09 100644
--- a/lib/orber/doc/src/corba.xml
+++ b/lib/orber/doc/src/corba.xml
@@ -294,7 +294,9 @@ Example:
<p>This function returns the object reference for the object id asked
for.
The remote modifier string has the following format:
- <c>"iiop://host:port"</c>.</p>
+ <c>"iiop://"&lt;host&gt;":"&lt;port&gt;</c> where <c>&lt;host&gt; = &lt;DNS hostname&gt; |
+ &lt;IPv4 address&gt; | "["&lt;IPv6 address&gt;"]"</c>.
+ </p>
<p>The <em>configuration</em> context is used to override the global
SSL client side
<seealso marker="ch_install#config">configuration</seealso>.</p>
@@ -322,8 +324,11 @@ Example:
<v>ObjectId = string()</v>
</type>
<desc>
- <p>This function returns a list of allowed object id's. The remote modifier
- string has the following format: <c>"iiop://host:port"</c>.</p>
+ <p>This function returns a list of allowed object id's.
+ The remote modifier string has the following format:
+ <c>"iiop://"&lt;host&gt;":"&lt;port&gt;</c> where <c>&lt;host&gt; = &lt;DNS hostname&gt; |
+ &lt;IPv4 address&gt; | "["&lt;IPv6 address&gt;"]"</c>.
+ </p>
<p>The <em>configuration</em> context is used to override the global
SSL client side
<seealso marker="ch_install#config">configuration</seealso>.</p>
diff --git a/lib/orber/doc/src/orber.xml b/lib/orber/doc/src/orber.xml
index 16781059c7..a182a56972 100644
--- a/lib/orber/doc/src/orber.xml
+++ b/lib/orber/doc/src/orber.xml
@@ -356,8 +356,8 @@
<v>Type = normal | ssl</v>
<v>Port = integer() > 0</v>
<v>ConfigurationParameters = [{Key, Value}]</v>
- <v>Key = flags | iiop_in_connection_timeout | iiop_max_fragments | iiop_max_in_requests | interceptors | iiop_port | iiop_ssl_port | ssl_server_options</v>
- <v>Value = as described in the User's Guide</v>
+ <v>Key = flags | ip_family | iiop_in_connection_timeout | iiop_max_fragments | iiop_max_in_requests | interceptors | iiop_port | iiop_ssl_port | ssl_server_options</v>
+ <v>Value = as described in the User's Guide or below</v>
<v>Result = {ok, Ref} | {error, Reason} | {'EXCEPTION', #'BAD_PARAM'{}}</v>
<v>Ref = #Ref</v>
<v>Reason = string()</v>
@@ -383,6 +383,9 @@
<item><em>flags</em> - currently it is only possible to override the global
setting for the <c>Use Current Interface in IOR</c> and
<c>Exclude CodeSet Component</c> flags.</item>
+ <item><em>ip_family</em> - can be set to <c>inet</c> or <c>inet6</c> and is
+ used to get a listen interface that uses another IP version than the default
+ set with flags at startup.</item>
<item><em>iiop_port</em> - requires that <c>Use Current Interface in IOR</c>
is activated and the supplied <c>Type</c> is <c>normal</c>. If so,
exported IOR:s will contain the IIOP port defined by this configuration
@@ -390,7 +393,7 @@
<item><em>iiop_ssl_port</em> - almost equivalent to <c>iiop_port</c>.
The difference is that <c>Type</c> shall be <c>ssl</c> and that
exported IOR:s will contain the IIOP via SSL port defined by this configuration
- parameter.</item>
+ parameter.</item>
</list>
<p>If it is not possible to add a listener based on the supplied interface
and port, the error message is one of the ones described in <c>inet</c>
diff --git a/lib/orber/src/orber_socket.erl b/lib/orber/src/orber_socket.erl
index 5c79100b94..c8d2f0636b 100644
--- a/lib/orber/src/orber_socket.erl
+++ b/lib/orber/src/orber_socket.erl
@@ -208,6 +208,7 @@ listen(normal, Port, Options, Exception) ->
Options4 = [binary, {packet,cdr}, {keepalive, Keepalive},
{reuseaddr,true}, {backlog, Backlog} |
Options3],
+
case catch gen_tcp:listen(Port, Options4) of
{ok, ListenSocket} ->
{ok, ListenSocket, check_port(Port, normal, ListenSocket)};
diff --git a/lib/orber/test/orber_test_lib.erl b/lib/orber/test/orber_test_lib.erl
index 6824d25aef..46ed26f210 100644
--- a/lib/orber/test/orber_test_lib.erl
+++ b/lib/orber/test/orber_test_lib.erl
@@ -166,7 +166,7 @@ get_host(Family) ->
{6, _, _} when Family == inet ->
"127.0.0.1";
{6, _, _} ->
- "0:0:0:0:0:FFFF:7F00:0001";
+ "0:0:0:0:0:0:0:0001";
_ ->
[IP] = ?match([_], orber:host()),
IP
@@ -192,16 +192,16 @@ get_loopback_interface(Family) ->
{6, _, _} when Family == inet ->
"127.0.0.2";
{6, _, _} ->
- "0:0:0:0:0:FFFF:7F00:0002";
+ "0:0:0:0:0:0:0:0002";
_ when Family == inet ->
"127.0.0.1";
_ ->
- "0:0:0:0:0:FFFF:7F00:0001"
+ "0:0:0:0:0:0:0:0001"
end;
_ when Family == inet ->
"127.0.0.1";
_ ->
- "0:0:0:0:0:FFFF:7F00:0001"
+ "0:0:0:0:0:0:0:0001"
end.
%%------------------------------------------------------------