=====================================================================
 README for talk over ipv6


 Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> / USAGI Project

 $USAGI: README.ipv6,v 1.6 2001/02/04 07:48:26 yoshfuji Exp $
=====================================================================

The talk protocol embedges socket address(es) in its control messages.
The ipv6 address is too large to put in it, we cannot use original
talk protocol for ipv6.

--------------
1. Address family

On most systems, AF_xxx is defined as follows.

#define AF_UNSPEC	0
#define AF_LOCAL	1	/* aka AF_UNIX */
#define AF_INET		2

On the other hand, AF_INET6 is different between systems.

On Linux systems,

#define PF_INET6	10
#define AF_INET6	PF_INET6

On Solaris 8 systems,

#define AF_INET6	26

On FreeBSD 4.x systems,

#define AF_INET6	28	/* FreeBSD 4.x */

So, we should define talk address family for talkaddr{}:

#define TF_UNSPEC	__constant_htons(0)
#define TF_INET		__constant_htons(2)
#define TF_INET6	__constant_htons(3)

Note: all the member MUST be set in network-byte-order.

--------------
2. Talk address structure

control packets include talk_addr.
ipv6 address must not be fit, so we must do tricks.

struct talkaddr {
	u_int16_t	ta_family;	/* TF_xxx (network byte order) */
	u_int16_t	ta_port;	/* port number */
	u_int32_t	ta_addr;	/* ipv4 address */
	u_int32_t	ta_junk1;	/* 0; ignored */
	u_int32_t	ta_junk2;	/* 0; ignored */
};

talkaddr_in6 will be used for ipv6 at places where talkaddr is
used for ipv6. 

struct talkaddr_in6 {
	u_int16_t	ta_family;
	u_int16_t	ta_port;
	u_int32_t	ta_zero;
	u_int32_t	ta_junk1
	u_int32_t	ta_junk2;
	struct in6_addr	ta_addr6;
};

struct talkaddr_in6{} does not fit in the control / response packet, so
CTL_MSG and CTL_RESPONSE has been extended.

-------------
3. Compatibility

We will not change the TALK_VERSION because we do not use 
this new format for ipv6 only.

Note: running ipv4 daemon and ipv6 daemon at the same time may cause
      some problems.
