net6emu r1 ============ net6emu is a small library designed to ease the development of IPv6-capable network applications. It does so by making sure that the protocol-independent functions getaddrinfo() and getnameinfo() and their associated helper functions, structures and constants are available. This code is based on the OpenBSD compatibility library from portable OpenSSH, but contains significant improvements. It is distributed under a BSD-style license. Usage for Developers ---------------------- To use net6emu in your program, copy net6emu* into your source tree. Add #include "net6emu.h" to your source files _after_ the include lines for the standard socket headers. Add net6emu.c to your build system (i.e. Makefile or similar). Tell your users to run net6emuconf before they compile your application, or integrate the process into your build system, too. See NetStrain's Makefile for an example. DO NOT include net6emuconf.h or net6emuconf.log in your distribution. They are generated, system-specific files. In your program, you can now safely use the following constants, types and functions: AF_UNSPEC, AF_INET, AF_INET6 PF_UNSPEC, PF_INET, PF_INET6 AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST NI_MAXHOST, NI_MAXSERV NI_NUMERICHOST, NI_NUMERICSERV, NI_NOFQDN, NI_NAMEREQD, NI_DGRAM struct sockaddr_storage struct addrinfo getaddrinfo(), gai_strerror(), freeaddrinfo() getnameinfo() Note that struct sockaddr_in6 is not included in the list. You're supposed to use getaddrinfo() and getnameinfo() to translate between strings and opaque sockaddr's. Usage for Users ----------------- Before you compile a program that uses net6emu, you must run net6emuconf to probe your system and create a net6emuconf.h to control inclusion of the various emulation parts. EOF