I gathered that there is a new release in pipeline and want to discuss a small<br>issue.<br><br>In configuration.c there is a usage of gethostname<br><br> /* Match my IP address to entry in configuration file */<br>    if( my_name == NULL ){<br>
        gethostname(machine_name,sizeof(machine_name)); <br>        host_ptr = gethostbyname(machine_name);<br><br>But I will argue that the hostname has nothing to do with *interface names*<br><br>Line of reasoning... (There is so many names around in a Unix system!).<br>
<br>First we have the KERNELNAME!<br><br>This is the current compiled kernel running in the system.<br>We get this with uname -a and typicaly gives us key information on the kernel. <br>Linux fs487 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux<br>
<br>Then whe have INTERFACE NAMES!<br><br>A unix system could have a lot of interfaces<br>eth0<br>eth1<br>eth2<br><br>We give them IP-numbers<br><br>ifconfig eth0 inet 123.123.123.123 ...<br>ifconfig eth0:1 inet 234.234.234.234 ...<br>
ifconfig eth1 inet 123.123.123.123 ....<br><br>And so on! To handle this long list of interface id we make a database (DNS) or for convinience<br>make a small database in /etc/hosts. In this database we holds small aliases for the interfaces.<br>
/etc/hosts<br>123.123.123.123    <a href="http://road.to.perdition.org">road.to.perdition.org</a>  perdition<br>234.234.234.234    <a href="http://road.to.paradise.org">road.to.paradise.org</a>  paradise<br><br>Then we have the HOSTNAME<br>
<br>This is the name of the *hardware* on which we are running. This name should NOT! be used in any way in association with the interface names. I know that this is often so - but it should<br>not. <br><br>So I argue that the function *getaddrinfo* should be used instad. Not that the manpage<br>
of this function also mix the terminology &quot;node&quot; and &quot;host&quot; in a confusing manner.<br><br>Cordially yours,<br>Göran Hasse<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br clear="all">
<br>-- <br><a href="mailto:gorhas@gmail.com" target="_blank">gorhas@gmail.com</a><br>Göran Hasse<br>Boo 229<br>715 91  ODENSBACKEN<br>Mob: 070-5530148<br>