Date: Tue, 30 Apr 1996 13:27:35 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: wollman@lcs.mit.edu (Garrett Wollman) Cc: ilko@oclc.org, freebsd-questions@FreeBSD.org, current@FreeBSD.org Subject: Re: Fix for missing _iso_ntoa? Message-ID: <199604302027.NAA07719@phaeton.artisoft.com> In-Reply-To: <9604301824.AA22862@halloran-eldar.lcs.mit.edu> from "Garrett Wollman" at Apr 30, 96 02:24:50 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > I checked the archive and found out that _iso_ntoa no longer > > exists in stable but was unable to find out how to > > fix this problem. > > Ummm, it no longer exists in -current. It is supposed to exist in > -stable. Perhaps you have spammed your -stable C library with a > -current one. Garrett: what would it take to unify the address manipulation model to a set of common routines? INET has: int inet_aton(char *cp, struct in_addr *pin) unsigned long inet_addr(char *cp) unsigned long inet_network(char *cp) char * inet_ntoa(struct in_addr in) struct in_addr inet_makeaddr(int net, int lna) unsigned long inet_lnaof(struct in_addr in) unsigned long inet_netof(struct in_addr in) and ISO has struct iso_addr * iso_addr(const char *addr) char * iso_ntoa(struct iso_addr *isoa) And XNS has struct ns_addr ns_addr(const char *name) char * ns_ntoa(struct ns_addr addr) And IPX has ... Any chance of evovling a common API model that takes an AF_XXX argument and wrappers the rest of it? I'd be happy to work on the libc dlopen() routines, but you're the networkign guru. Backward compatability could be handled by: static inline char * inet_ntoa( struct in_addr in) { return( xxx_ntoa( AF_INET, (caddr_t)in)); } ...etc. in the header files for the protocol family. Internally, there would be a family cache, which would reflect the contents of a file (in /var/config/networks?) of a format like: # # address handling objects to be mapped by libc # # AF_XXX value resolver object AF_INET 2 /usr/lib/af_inet.so AF_NS 6 /usr/lib/af_ns.so AF_ISO 7 /usr/lib/af_iso.so AF_IPX 23 /usr/lib/af_ipx.so Which would allow (almost) drop-in support of new address families. Maybe /usr/lib/af/* instead, with: 2.inet.so 6.ns.so 7.iso.so 23.ipx.so To make it truly drop-in-able? Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604302027.NAA07719>