[omniORB] Some questions

Duncan Grisby duncan@grisby.org
Mon, 29 Apr 2002 13:18:47 +0100


On Monday 29 April, jon.kristensen@kongsberg-simrad.com wrote:

> There has been a bug report regarding WSAIoclt - SIO_ADDRESS_LIST_QUERY
> under NT4.0, and the fix is supposed to be using SIO_GET_INTERFACE_LIST
> instead. I got it working, but is this fix going in permanently?

The fix, and the one for the #define typo is now in SourceForge CVS.
See

  http://sourceforge.net/cvs/?group_id=51138

> Also, the code in tcpEndpoint.cc has changed a lot just before the Beta1
> release, and no longer work in my configuration. I do not have a DNS
> running, and  gethostbyname() thus fails. Also, I am a little puzzled by
> the latest changes. I expect the call to
> giopTransportImpl::getInterfaceAddress("giop:tcp") to return a list of IP
> address strings, and do not see why you need to do DNS lookup on these.

gethostbyname() is meant to accept a numerical IP address, and convert
it to a hostent struct, without doing any sort of name lookup. It
seems to work OK on normal Windows. I assume it's an ETS oddity.
Here's the start of the Linux manpage, for example

       The gethostbyname() function returns a structure  of  type
       hostent  for  the  given host name.  Here name is either a
       host name, or an IPv4 address in standard dot notation, or
       an IPv6 address in colon (and possibly dot) notation. (See
       RFC 1884 for the description of IPv6 addresses.)  If  name
       is  an  IPv4  or  IPv6 address, no lookup is performed and
       gethostbyname() simply copies name into the  h_name  field
       and  its struct in_addr equivalent into the h_addr_list[0]
       field of the returned hostent structure.

If it really is an ETS problem, something like the fix you suggested
can go in an ifdef region. I say something like it, because
inet_addr() is supposedly obsolete, replaced by inet_aton()

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --