libinet6 - plugin library kit for new socket APIs
KAME projecdt
$KAME: README,v 1.3 2000/07/05 08:18:42 itojun Exp $


Introduction
	We have new socket API functions, defined in X/Net and RFC2553,
	namely getaddrinfo(3) and getnameinfo(3).  The functions are
	NOT just for IPv6 support, but for "address family independence".
	By using the functions properly, you can remove address family
	dependencies from your code.  If you write your applications properly
	with these, your code will run just fine on both IPv4 node and
	IPv4/v6 node.

	libinet6 supplies these functions to old platforms, where
	get{addr,name}info are not supplied by default.

	The library SHOULD NOT be installed onto platforms where you already
	have get{addr,name}info, since the platform may have local
	extension to these functions.

	The kit obeys the following documents:
		RFC2553
		draft-ietf-ipngwg-scopedaddr-format-02.txt

Installation
	% ./configure
	% make
	% make install

	With the above steps, you will have the following items:
		/usr/local/lib/libinet6.a - library
		/usr/local/include/addrinfo.h - extra header file 
		/usr/local/include/ifaddrs.h - extra header file (optional)

How to use
	In your source code, add the following sentences:

#include <sys/socket.h>
#ifndef AI_CANONNAME
/* pull RFC2553 extensions to sys/socket.h from /usr/local/include/addrinfo.h */
# include <addrinfo.h>
#endif

	Use getaddrinfo and getnameinfo as necessary.  Try to avoid hardcoding
	AF_INET or AF_INET6.  Do not use sockaddr to allocate regions.
	http://www.kame.net/newsletter/ has some documents on it.

	Compile the source code with the following options:
		-I/usr/local/include -L/usr/local/lib -linet6

	When you migrate to IPv6-ready platforms, you just need to remove
	the above compilation options, and use get{addr,name}info in libc.
	If you use get{addr,name}info properly in your code, your migration
	should be very smooth.

Spec non-conformance
	getaddrinfo is a name resolution function, and it should obey
	whatever records defined in DNS.  However, getaddrinfo in libinet6
	cannot return AAAA records when it was compiled for IPv4-only nodes
	(this is basically because of the lack of sockaddr_in6).

TODO
	- supply declaration for sockaddr_storage
	- autoconf guidelines
