
			  IPv4/IPv6 support in EPIC4

1) Users note.
	EPIC4 has full IPv4 and IPv6 support, now. All functions (including
DCC) are IPv6 ready. DCC via IPv6 has been tested with irssi and EPIC4
clients. Note: DCCv6 isn't standardized yet and may broke other (non IPv6
ready) clients.
	To use IPv6 you must compile EPIC4 with IPv6 ready getaddrinfo()
and getnameinfo() functions. We provide our own IPv4-ONLY versions of these
functions, so if you don't have IPv6 ready getaddrinfo() and getnameinfo()
in your system library, you won't be able to use IPv6. Linux users should
use lastest glibc library (at this moment 2.1.3); BSD users should get
their libc updated by KAME Team (http://www.kame.net) - most of BSD
distribution has this update already in their libraries.
	If EPIC4 is compiled with system getxxxxinfo() functions two new
command line options are available: -4 (use _only_ IPv4) and -6 (use _only_
IPv6) for example if -6 option was specified then DCC connection's
via IPv4 won't work.
	If you want specify ipv6 address of irc server in command line
or in /server command you should enclose it by brackets ie:
,,epic Nickname [3ffe:8010::1]:6667''.
	Two new commands: /DCC4 (tries to use IPv4 in DCC connections),
/DCC6 (tries to use IPv6 in DCC connections) introduced. Currently
implementation of these commands require IPv4 and IPv6 address of local host
(hostname -f) in DNS. This should be changed in future.

2) Developers note.
	Developers should avoid all family dependent functions and structures
such as: struct sockaddr_in, struct in_addr, gethostbyname(), gethostbyaddr(),
inet_addr() etc.
	From now they should use one generic structure: struct sockaddr_storage
and two resolving functions: getaddrinfo() and getnameinfo().
	More information about family independent API in RFC2553 and in
draft-ietf-ipngwg-rfc2553bis-00.txt (ps. if someone wants to use something
from rfc2553bis draft which isn't in RFC2553 should add #ifdef RFC2553BIS
to that code). That rfc defines more functions such as getipnodebyaddr() and
getipnodebyname() but these functions should be trated as obsolete and
shouldn't be used.
	In network.c there are two usefull IPv4/IPv6 functions:
char *sockaddr_to_addr(struct sockaddr *soc, int flags);
    - function returns hostname or IP address dependent
    on flags (flags are passed to getnameinfo() function,
    so check rfc2553 for information about these flags).
		
int sockaddr_to_port(struct sockaddr *soc);
    - function returns port number.
	In DCC via IPv4 we are sending IPv4 address in binary host byte order
form. In case IPv6 we send address in standard colon notation (ie 3ffe:8010::1).
EPIC4 implementation allows receiving (not sending) IPv4 address in standard
dot notation, too.

-- 
  Arkadiusz Miskiewicz <misiek@pld.ORG.PL>
  Polished Linux Distribution Team, PLD GNU/Linux
  http://www.pld.org.pl/

  Latest version of this patch at:
  http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/
	
