summaryrefslogtreecommitdiffstats
path: root/man7/packet.7
diff options
context:
space:
mode:
Diffstat (limited to 'man7/packet.7')
-rw-r--r--man7/packet.754
1 files changed, 27 insertions, 27 deletions
diff --git a/man7/packet.7 b/man7/packet.7
index 513945eff..4e7c6f422 100644
--- a/man7/packet.7
+++ b/man7/packet.7
@@ -46,7 +46,7 @@ If
.I protocol
is set to zero,
no packets are received.
-.BR bind (2)
+.MR bind 2
can optionally be called with a nonzero
.I sll_protocol
to start receiving packets for the protocols specified.
@@ -86,7 +86,7 @@ destination address before they are queued.
By default, all packets of the specified protocol type
are passed to a packet socket.
To get packets only from a specific interface use
-.BR bind (2)
+.MR bind 2
specifying an address in a
.I struct sockaddr_ll
to bind the packet socket to an interface.
@@ -99,16 +99,16 @@ and
.IR sll_ifindex .
.P
The
-.BR connect (2)
+.MR connect 2
operation is not supported on packet sockets.
.P
When the
.B MSG_TRUNC
flag is passed to
-.BR recvmsg (2),
-.BR recv (2),
+.MR recvmsg 2 ,
+.MR recv 2 ,
or
-.BR recvfrom (2),
+.MR recvfrom 2 ,
the real length of the packet on the wire is always returned,
even when it is longer than the buffer.
.SS Address types
@@ -142,7 +142,7 @@ It defaults to the socket's protocol.
.I sll_ifindex
is the interface index of the interface
(see
-.BR netdevice (7));
+.MR netdevice 7 );
0 matches any interface (only permitted for binding).
.I sll_hatype
is an ARP type as defined in the
@@ -186,7 +186,7 @@ and
are set on received packets for your information.
.SS Socket options
Packet socket options are configured by calling
-.BR setsockopt (2)
+.MR setsockopt 2
with level
.BR SOL_PACKET .
.TP
@@ -245,10 +245,10 @@ can be used for the same purpose.
.\" commit 8dc4194474159660d7f37c495e3fc3f10d0db8cc
If this binary option is enabled, the packet socket passes a metadata
structure along with each packet in the
-.BR recvmsg (2)
+.MR recvmsg 2
control field.
The structure can be read with
-.BR cmsg (3).
+.MR cmsg 3 .
It is defined as
.IP
.in +4n
@@ -274,7 +274,7 @@ group.
In this mode, each matching packet is enqueued onto only one
socket in the group.
A socket joins a fanout group by calling
-.BR setsockopt (2)
+.MR setsockopt 2
with level
.B SOL_PACKET
and option
@@ -350,7 +350,7 @@ The format error must be fixed, the associated
reset to
.BR TP_STATUS_SEND_REQUEST ,
and the transmission process restarted via
-.BR send (2).
+.MR send 2 .
However, if
.B PACKET_LOSS
is set, any malformed packet will be skipped, its
@@ -452,7 +452,7 @@ and schedules them for transmission by changing
to
.BR TP_STATUS_SEND_REQUEST .
When packets are ready to be transmitted, the application calls
-.BR send (2)
+.MR send 2
or a variant thereof.
The
.I buf
@@ -460,9 +460,9 @@ and
.I len
fields of this call are ignored.
If an address is passed using
-.BR sendto (2)
+.MR sendto 2
or
-.BR sendmsg (2),
+.MR sendmsg 2 ,
then that overrides the socket default.
On successful transmission, the socket resets
.I tp_status
@@ -504,9 +504,9 @@ variable.
.\" FIXME Document SIOCGSTAMPNS
.P
In addition, all standard ioctls defined in
-.BR netdevice (7)
+.MR netdevice 7
and
-.BR socket (7)
+.MR socket 7
are valid on packet sockets.
.SS Error handling
Packet sockets do no error handling other than errors occurred
@@ -557,7 +557,7 @@ Earlier Linux versions supported only
For portable programs it is suggested to use
.B AF_PACKET
via
-.BR pcap (3);
+.MR pcap 3 ;
although this covers only a subset of the
.B AF_PACKET
features.
@@ -628,7 +628,7 @@ The IEEE 802.2/803.3 LLC handling could be considered as a bug.
.SS MSG_TRUNC issues
The
.B MSG_TRUNC
-.BR recvmsg (2)
+.MR recvmsg 2
extension is an ugly hack and should be replaced by a control message.
There is currently no way to get the original destination address of
packets via
@@ -660,7 +660,7 @@ Possible user solutions are to disable
.B Predictable Network Interface Names
or to rename the interface to a name of at most 13 bytes,
for example using the
-.BR ip (8)
+.MR ip 8
tool.
.SS Documentation issues
Socket filters are not documented.
@@ -669,13 +669,13 @@ Socket filters are not documented.
.\" 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),
-.BR pcap (3),
-.BR capabilities (7),
-.BR ip (7),
-.BR raw (7),
-.BR socket (7),
-.BR ip (8),
+.MR socket 2 ,
+.MR pcap 3 ,
+.MR capabilities 7 ,
+.MR ip 7 ,
+.MR raw 7 ,
+.MR socket 7 ,
+.MR ip 8 ,
.P
RFC\ 894 for the standard IP Ethernet encapsulation.
RFC\ 1700 for the IEEE 802.3 IP encapsulation.