Quote:
Originally Posted by bayoulinux
AF_PACKET and PF_PACKET are defined to be the same, as do many (all?) AF_* and PF_* definitions.
|
Yes.
AF_foo means
address family foo, and
PF_foo means
protocol family foo. In Linux, they are always been the same values, I believe.
Traditionally, the
PF_foo constants were used for
socket(), but
AF_foo in the
struct sockaddr structure.
According to
man 2 socket, even the (historical) BSD 4.x manpage states that "The protocol family generally is the same as the address family", and subsequent standards use AF_* everywhere.
Thus, today, there really should be no difference between
AF_foo and
PF_foo.