Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!kddlab!cs.titech!titccy.cc.titech!necom830!mohta From: mohta@necom830.cc.titech.ac.jp (Masataka Ohta) Newsgroups: comp.unix.internals Subject: Re: Shared libraries Message-ID: <166@titccy.cc.titech.ac.jp> Date: 9 May 91 05:38:13 GMT References: <161@titccy.cc.titech.ac.jp> <1991May7.145228.423@batcomputer.tn.cornell.edu> <163@titccy.cc.titech.ac.jp> <1991May8.173813.27064@batcomputer.tn.cornell.edu> Sender: news@titccy.cc.titech.ac.jp Organization: Tokyo Institute of Technology Lines: 40 In article <1991May8.173813.27064@batcomputer.tn.cornell.edu> shore@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