From 603280480adac3ff698db538d26966ecfb46d499 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Thu, 26 Jun 2014 14:22:45 +0200 Subject: [orber] Update documentation and fix testcase for IPv4/IPv6 --- lib/orber/doc/src/ch_naming_service.xml | 41 ++++++++++++++++++--------------- lib/orber/doc/src/corba.xml | 11 ++++++--- lib/orber/doc/src/orber.xml | 9 +++++--- lib/orber/src/orber_socket.erl | 1 + lib/orber/test/orber_test_lib.erl | 8 +++---- 5 files changed, 41 insertions(+), 29 deletions(-) (limited to 'lib') 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

The notation of this scheme is similar to the more well known URL HTTP, and the full corbaloc BNF is:

= "corbaloc:"["/"] - = [","]* - = | - = | - = ":" - = rir - = - = ":" - = - = | ":" - = ":" - = "iiop" - = [":"] - = DNS-style Host Name | ip_address - = ".""@" | empty_string - = number - = number - = number - = for example NameService + = "corbaloc:"["/"] + = [","]* + = | + = | + = ":" + = rir + = + = ":" + = + = | ":" + = ":" + = "iiop" + = [":"] + = | | "[""]" + = ".""@" | empty_string + = number + = number + = number + = string + = string + = string + = for example NameService ]]>

The corbaloc scheme consists of 3 parts:

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:

This function returns the object reference for the object id asked for. The remote modifier string has the following format: - "iiop://host:port".

+ "iiop://"<host>":"<port> where <host> = <DNS hostname> | + <IPv4 address> | "["<IPv6 address>"]". +

The configuration context is used to override the global SSL client side configuration.

@@ -322,8 +324,11 @@ Example: ObjectId = string() -

This function returns a list of allowed object id's. The remote modifier - string has the following format: "iiop://host:port".

+

This function returns a list of allowed object id's. + The remote modifier string has the following format: + "iiop://"<host>":"<port> where <host> = <DNS hostname> | + <IPv4 address> | "["<IPv6 address>"]". +

The configuration context is used to override the global SSL client side configuration.

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 @@ Type = normal | ssl Port = integer() > 0 ConfigurationParameters = [{Key, Value}] - Key = flags | iiop_in_connection_timeout | iiop_max_fragments | iiop_max_in_requests | interceptors | iiop_port | iiop_ssl_port | ssl_server_options - Value = as described in the User's Guide + Key = flags | ip_family | iiop_in_connection_timeout | iiop_max_fragments | iiop_max_in_requests | interceptors | iiop_port | iiop_ssl_port | ssl_server_options + Value = as described in the User's Guide or below Result = {ok, Ref} | {error, Reason} | {'EXCEPTION', #'BAD_PARAM'{}} Ref = #Ref Reason = string() @@ -383,6 +383,9 @@ flags - currently it is only possible to override the global setting for the Use Current Interface in IOR and Exclude CodeSet Component flags. + ip_family - can be set to inet or inet6 and is + used to get a listen interface that uses another IP version than the default + set with flags at startup. iiop_port - requires that Use Current Interface in IOR is activated and the supplied Type is normal. If so, exported IOR:s will contain the IIOP port defined by this configuration @@ -390,7 +393,7 @@ iiop_ssl_port - almost equivalent to iiop_port. The difference is that Type shall be ssl and that exported IOR:s will contain the IIOP via SSL port defined by this configuration - parameter. + parameter.

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 inet 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. %%------------------------------------------------------------ -- cgit v1.2.3