Michael Schuster wrote:
> In the userland components, we currently encode the IP version we're using
> as either AF_INET or AF_INET6 (as defined in sys/socket.h), whereas the
> kernel module (common/inet/ilb/ilb.c) uses IPPROTO_IP and IPPROTO_IPV6
> (netinet/in.h).
We have used this convention since the prototype. It is
always the protocol number of layer 3. Is there a need
to change this usage? If we really want to use "IP version"
instead of protocol number, I guess we should use 4 or 6
(IPV4_VERSION or IPV6_VERSION).
I believe when we use the address family notation, AF_INET/
INET6, we mean more than just the protocol number of layer
3. For example, an AF_INET6 socket can use both IPv4 and
IPv6 address. In ILB, we need to specify in a rule which
layer 3 protocol to match in an incoming packet. Hence the
natural choice is the protocol number.
So either we use the protocol number or the version number,
but not the address family.
--
K. Poon.
kacheong.poon at sun.com