Shared libraries
Masataka Ohta
mohta at necom830.cc.titech.ac.jp
Thu May 9 15:38:13 AEST 1991
In article <1991May8.173813.27064 at batcomputer.tn.cornell.edu>
shore at theory.tn.cornell.edu (Melinda Shore) writes:
>>But hosts with muptiple IP addresses become common with the introduction
>>of DNS.
>Again, it has *absolutely* *nothing* to do with name service.
It dose have.
And shared libraries dose *NOT* help the transition from /etc/hosts to DNS.
Let's see more detailed facts.
With the introduction of DNS, struct hostent, a structure returned by
gethostbyname(), was changed. A new field, h_addr_list, was added and
an old field, h_addr, was replaced by a #define.
Let's see new /usr/include/netdb.h.
: char **h_addr_list; /* list of addresses from name server */
:#define h_addr h_addr_list[0] /* address, for backward compatiblity */
As indicated by the comment, the change was done because a name server
returns multiple IP addresses.
Moreover, as clearly seen, the change dose require recompilation, even
if we want to use old code which dose not support a host with mutiple
IP addresses.
>>"fix the routing code"? Routing code has nothing to do with the problem.
>
>No, but the routing code in this particular driver used ip addresses
>as hash keys. Duh.
Well, perhaps, you are talking about a case of a single network interface
with multiple IP addresses, while we are talking about a single host with
multiple network interfaces and thus with multiple IP addresses.
Masataka Ohta
More information about the Comp.unix.internals
mailing list