mirror of https://github.com/mkerrisk/man-pages
packet.7: Fix include file
It looks like most of the socket options from this man pages are not defined in <netpacket/packet.h>. They are defined in <linux/if_packet.h> so we should include that one. Note from mtk: it looks like <netpacket/packet.h> was based on some ancient version of <linux/if_packet.h> that has not been updated. Since linux/if_packet.h is under the "uapi" tree the proposed patch seems the bext fix. Signed-off-by: Sorin Dumitru <sdumitru@ixiacom.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
f36a14687b
commit
eb67122e5f
|
@ -16,7 +16,7 @@ packet \- packet interface on device level
|
||||||
.nf
|
.nf
|
||||||
.B #include <sys/socket.h>
|
.B #include <sys/socket.h>
|
||||||
.br
|
.br
|
||||||
.B #include <netpacket/packet.h>
|
.B #include <linux/if_packet.h>
|
||||||
.br
|
.br
|
||||||
.B #include <net/ethernet.h> /* the L2 protocols */
|
.B #include <net/ethernet.h> /* the L2 protocols */
|
||||||
.sp
|
.sp
|
||||||
|
@ -535,18 +535,6 @@ is a new feature in Linux 2.2.
|
||||||
Earlier Linux versions supported only
|
Earlier Linux versions supported only
|
||||||
.BR SOCK_PACKET .
|
.BR SOCK_PACKET .
|
||||||
.PP
|
.PP
|
||||||
The include file
|
|
||||||
.I <netpacket/packet.h>
|
|
||||||
is present since glibc 2.1.
|
|
||||||
Older systems need:
|
|
||||||
.sp
|
|
||||||
.in +4n
|
|
||||||
.nf
|
|
||||||
#include <asm/types.h>
|
|
||||||
#include <linux/if_packet.h>
|
|
||||||
#include <linux/if_ether.h> /* The L2 protocols */
|
|
||||||
.fi
|
|
||||||
.in
|
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
For portable programs it is suggested to use
|
For portable programs it is suggested to use
|
||||||
.B AF_PACKET
|
.B AF_PACKET
|
||||||
|
|
Loading…
Reference in New Issue