#
# USAGI Linux IPv6 Stack Implementation Notes
#
# $USAGI: IMPLEMENTATION,v 1.2.2.2 2001/12/30 19:19:03 mk Exp $
#

1. bind(2)

Behavior of the bind(2) system call of the original Linux is strange
(rather buggy...).  We have re-implemented logic of the bind(2) behavior.

 - we allow SO_REUSEPORT-like behavior only for multicast addresses.
   Otherwise later socket should have at least one different attribute in
   the (local-addr, local-port, remote-addr, remote-port) set.
 - device specific bind(2) vs wildcard bind(2) conflict with each other 
   without SO_REUSEADDR.
 - IPv6 wildcard bind(2) and IPv4 wildcard bind(2) conflict with each
   other by default, as original linux does.  If you set IPV6_V6ONLY
   socket option (will be defined in successor of RFC2553), they can
   co-exist.
 - SO_REUSEADDR and/or IPV6_V6ONLY are not effective unless the
   later socket was created by the same owner (uid).

In summary:
	Existing socket NEW     Normal  REUSE_ADDR      
	================================================
	(*,p,*,*)       (*,p)   NG      NG              
	                (A,p)   NG      OK              
	------------------------------------------------
	(A,p,*,*)       (*,p)   NG      OK              
	                (A,p)   NG      NG              
	                (B,p)   OK      OK              
	------------------------------------------------
	(A,p,X,q)       (*,p)   NG      OK              
	                (A,p)   NG      OK              
	                (B,p)   OK      OK              
	================================================
	(*6,p,*,*)      (*6,p)  NG      NG              
	                (*4,p)  NG/OK   NG/OK           
	                (A6,p)  NG      OK              
	                (A4,p)  NG/OK   OK              
	(*4,p,*,*)      (*6,p)  NG/OK   NG/OK           
	                (*4,p)  NG      NG              
	                (A6,p)  NG/OK   OK              
	                (A4,p)  NG      OK              
	================================================
	Notation
	*6	: wildcard ipv6 address (::)
	*4	: wildcard ipv4 address (0.0.0.0)
	A,X	: specific address
	NG/OK	: conflict without IPV6_V6ONLY socket option.
		  do not coflict with IPV6_V6ONLY socket option.
[EOD]
