inet6(4):
The behavior of AF_INET6 TCP/UDP socket is documented in RFC 2553.
Basically, it says the following:
o A specific bind to an AF_INET6 socket (bind(2) with address
specified) should accept IPv6 traffic to that address only.
o If a wildcard bind is performed on an AF_INET6 socket (bind(2) to
IPv6 address ::), and there is no wildcard bind AF_INET socket on
that TCP/UDP port, IPv6 traffic as well as IPv4 traffic should be
routed to that AF_INET6 socket. IPv4 traffic should be seen as if it
came from IPv6 address like ::ffff:10.1.1.1. This is called IPv4
mapped address.
o If there are both wildcard bind AF_INET socket and wildcard bind
AF_INET6 socket on one TCP/UDP port, they should behave separately.
IPv4 traffic should be routed to AF_INET socket and IPv6 should be
routed to AF_INET6 socket.
However, RFC 2553 does not define the constraint between the order of
bind(2), nor how IPv4 TCP/UDP port numbers and IPv6 TCP/UDP port numbers
relate to each other (should they be integrated or separated).
i personally cannot see where in 2553 it is describing this stuff in
relation to AF_INET6. can anyone match the bullet points above with the
relevant parts of 2553?
jmc