aboutsummaryrefslogtreecommitdiffstats
path: root/man7/packet.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2008-08-08 16:47:53 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2008-08-08 16:47:53 +0000
commitd4c8c97c312455631c0c22151ad19b98c2eee3fd (patch)
tree783a3dd69217af76d40f61c3858ab676e0ab71ce /man7/packet.7
parent77117f4fc55addbb657d1c87e2f86911d7e432c9 (diff)
downloadman-pages-d4c8c97c312455631c0c22151ad19b98c2eee3fd.tar.gz
s/PF_/AF_/ for socket family constants. Reasons: the AF_ and
PF_ constants have always had the same values; there never has been a protocol family that had more than one address family, and POSIX.1-2001 only specifies the AF_* constants.
Diffstat (limited to 'man7/packet.7')
-rw-r--r--man7/packet.718
1 files changed, 9 insertions, 9 deletions
diff --git a/man7/packet.7 b/man7/packet.7
index 787ac7c373..e55c7bd5cc 100644
--- a/man7/packet.7
+++ b/man7/packet.7
@@ -4,9 +4,9 @@
.\" and in case of nontrivial modification author and date
.\" of the modification is added to the header.
.\" $Id: packet.7,v 1.13 2000/08/14 08:03:45 ak Exp $
-.TH PACKET 7 1999-04-29 "Linux" "Linux Programmer's Manual"
+.TH PACKET 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.SH NAME
-packet, PF_PACKET \- packet interface on device level.
+packet, AF_PACKET \- packet interface on device level.
.SH SYNOPSIS
.nf
.B #include <sys/socket.h>
@@ -15,7 +15,7 @@ packet, PF_PACKET \- packet interface on device level.
.br
.B #include <net/ethernet.h> /* the L2 protocols */
.sp
-.BI "packet_socket = socket(PF_PACKET, int " socket_type ", int "protocol );
+.BI "packet_socket = socket(AF_PACKET, int " socket_type ", int "protocol );
.fi
.SH DESCRIPTION
Packet sockets are used to receive or send raw packets at the device driver
@@ -64,7 +64,7 @@ destination address.
Some device drivers always add other headers.
.B SOCK_RAW
is similar to but not compatible with the obsolete
-.B PF_INET/SOCK_PACKET
+.B AF_INET/SOCK_PACKET
of Linux 2.0.
.B SOCK_DGRAM
@@ -274,7 +274,7 @@ User has insufficient privileges to carry out this operation.
In addition other errors may be generated by the low-level driver.
.SH VERSIONS
-.B PF_PACKET
+.B AF_PACKET
is a new feature in Linux 2.2.
Earlier Linux versions supported only
.BR SOCK_PACKET .
@@ -293,11 +293,11 @@ Older systems need:
.in
.SH NOTES
For portable programs it is suggested to use
-.B PF_PACKET
+.B AF_PACKET
via
.BR pcap (3);
although this only covers a subset of the
-.B PF_PACKET
+.B AF_PACKET
features.
The
@@ -324,7 +324,7 @@ encapsulation with the protocol filled in.
Packet sockets are not subject to the input or output firewall chains.
.SS Compatibility
In Linux 2.0, the only way to get a packet socket was by calling
-.BI "socket(PF_INET, SOCK_PACKET, " protocol )\fR.
+.BI "socket(AF_INET, SOCK_PACKET, " protocol )\fR.
This is still supported but strongly deprecated.
The main difference between the two methods is that
.B SOCK_PACKET
@@ -383,7 +383,7 @@ packets via
.BR SOCK_DGRAM .
.\" .SH CREDITS
.\" This man page was written by Andi Kleen with help from Matthew Wilcox.
-.\" PF_PACKET in Linux 2.2 was implemented
+.\" AF_PACKET in Linux 2.2 was implemented
.\" by Alexey Kuznetsov, based on code by Alan Cox and others.
.SH "SEE ALSO"
.BR socket (2),