[omniORB] /etc/hosts on Linux

Gregory Giguashvili Gregoryg@ParadigmGeo.com
Mon Jun 17 15:13:01 2002


Hello,

I guess the ultimate solution would be running a script on boot that updates
/etc/hosts or omniORB.cfg files with the parsed output of /sbin/ifconfig
command. I think, this is the most painless aproach to solve this problem
and works 100% time.

It's pity that omniORB doesn't provide the mentioned functionality by
itself. I've come across incorrect /etc/hosts file several times already
only on developer machines. I don't want to think about customer sites... 
Also, not all the network interfaces are usually listed in /etc/hosts file.

Best regards,
Giga

-----Original Message-----
From: bjorn rohde jensen [mailto:shamus@tdcadsl.dk]
Sent: Sunday, June 16, 2002 5:28 PM
To: Gregory Giguashvili
Cc: 'omniorb-list@realvnc.com'
Subject: Re: [omniORB] /etc/hosts on Linux


Hi Gregory,

 I have been experimenting a bit with omniORB4 on my setup, which
sounds somewhat like yours, with an interface configured through
DHCP, one configured staticaly and a loopback interface, and while
omniORB4 does walk through the interfaces, it does not create
multi profile references by default. If you add -ORBendPoint options,
you will however get multi profile references as you can see below.

bin/server -ORBendPoint giop:tcp:: -ORBendPoint giop:tcp:172.22.0.1:
-ORBendPoint giop:tcp:127.0.0.1:

$OMNIORB/bin/catior 
Type ID: "IDL:Server/Factory:1.0"
Profiles:
1. IIOP 1.2 80.62.84.198 33329 "Factory"
            TAG_ORB_TYPE omniORB
            TAG_CODE_SETS char native code set: ISO-8859-1
                          char conversion code set: UTF-8
                          wchar native code set: UTF-16
                          wchar conversion code set: UTF-16
            
            TAG_ALTERNATE_IIOP_ADDRESS 172.22.0.1 33330
            TAG_ALTERNATE_IIOP_ADDRESS 127.0.0.1 33331

The first -ORBendPoint option looks strange, but it ensures, that
the ip address of my first DHCP configured interface is published.
The other interfaces are only published because of their -ORBendPoint
options. You should be able to do, what you want in the case of a single
DHCP and a number of static interfaces using omniORB4 by adding a couple
of lines with endPoints to omniORB.cfg. I do not know, how one could
handle two DHCP interfaces though.

Yours sincerely,

Bjorn