[omniORB] FW: /etc/hosts on Linux

Duncan Grisby duncan@grisby.org
Tue Jun 18 11:25:01 2002


On Sunday 16 June, Gregory Giguashvili wrote:

> Can you, please, tell me where you obtain the network interface information
> from? If it's coming from /etc/hosts, then I will have to recreate this file
> on boot every time. Otherwise, I can come up with some other idea...

omniORB 3 obtains the IP address it puts in IORs by calling
gethostname(), and giving the result to gethostbyname(). That's why it
is dependent on /etc/hosts having sensible contents.

omniORB 4 first tries to get the list of addresses with an ioctl()
call, and falls back to the omniORB 3 scheme if that fails. It could
do with some options about what to do when it encounters multiple
addresses -- at the moment it just picks the first non-loopback one;
it should have an option to include all addresses, but it doesn't yet.

Cheers,

Duncan.

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