Problem:
- Product Name: VisiBroker for C
 - Product Version: 7.0
 - Product Component: Core ORB
 - Platform/OS Version: Unix/Linux
 
How VisiBroker determines IP address from given hostname.
Resolution:
Basically, in a multi-homed machine, which network interface will VisiBroker bind to when you configure this property "vbroker.se.iiop_tp.host=hostname"
 VisiBroker uses the system call getaddrinfo to get all the network addresses bound to the network interfaces. The IP address is mapped from a variety of sources:
- /etc/hosts
 - DNS configured through /etc/resolv.conf
 - NIS
 
getaddrinfo system call has a specific order in which it resolves addresses. It checks the /etc/nsswitch.conf file for the order:
 
 
hosts: files nis dns
 
the setting above indicates the order is /etc/hosts, NIS and DNS.
 
 For /etc/hosts, the first matched hostname's IP address will be used if there are more than one host names matched in it.
 
 Assume contents of /etc/hosts was:
 
127.0.0.1 localhost.localdomain localhost
 #
 123.456.789.1 host_one
 123.456.789.2 host_two
 123.456.789.3 host_three
 #
 987.654.321.1 host_one
 987.654.321.1 host_two
 987.654.321.1 host_three
 #
 ...
 
and if the property "vbroker.se.iiop_tp.host=host_one" set to VisiBroker's server, it will listen on this address: "123.456.789.1" when /etc/nsswitch.conf was set as above.
 
 Author:Naoki Kawasumi
 
#VisiBrokerforC
#VisiBroker
#Security