summaryrefslogtreecommitdiffstats
path: root/man7/raw.7
diff options
context:
space:
mode:
Diffstat (limited to 'man7/raw.7')
-rw-r--r--man7/raw.741
1 files changed, 21 insertions, 20 deletions
diff --git a/man7/raw.7 b/man7/raw.7
index 12ccd8fdf..deb8fd8df 100644
--- a/man7/raw.7
+++ b/man7/raw.7
@@ -38,7 +38,7 @@ see the IANA list of assigned protocol numbers at
.UR http://www.iana.org/assignments/protocol\-numbers/
.UE
and
-.BR getprotobyname (3).
+.MR getprotobyname 3 .
.P
A protocol of
.B IPPROTO_RAW
@@ -75,9 +75,9 @@ are ignored.
If
.B IP_HDRINCL
isn't set, then IP header options can be set on raw sockets with
-.BR setsockopt (2);
+.MR setsockopt 2 ;
see
-.BR ip (7)
+.MR ip 7
for more information.
.P
Starting with Linux 2.2, all IP header fields and options can be set using
@@ -90,13 +90,14 @@ been bound to its protocol before it is passed to other protocol handlers
(e.g., kernel protocol modules).
.SS Address format
For sending and receiving datagrams
-.RB ( sendto (2),
-.BR recvfrom (2),
+\%(\c
+.MR sendto 2 ,
+.MR recvfrom 2 ,
and similar),
raw sockets use the standard
.I sockaddr_in
address structure defined in
-.BR ip (7).
+.MR ip 7 .
The
.I sin_port
field could be used to specify the IP protocol number,
@@ -108,9 +109,9 @@ For incoming packets,
is set to zero.
.SS Socket options
Raw socket options can be set with
-.BR setsockopt (2)
+.MR setsockopt 2
and read with
-.BR getsockopt (2)
+.MR getsockopt 2
by passing the
.B IPPROTO_RAW
.\" Or SOL_RAW on Linux
@@ -125,7 +126,7 @@ should be filtered out.
The default is to filter no ICMP messages.
.P
In addition, all
-.BR ip (7)
+.MR ip 7
.B IPPROTO_IP
socket options valid for datagram sockets are supported.
.SS Error handling
@@ -196,7 +197,7 @@ Path MTU discovery can be also turned off using the
socket option or the
.I /proc/sys/net/ipv4/ip_no_pmtu_disc
file, see
-.BR ip (7)
+.MR ip 7
for details.
When turned off, raw sockets will fragment outgoing packets
that exceed the interface MTU.
@@ -204,19 +205,19 @@ However, disabling it is not recommended
for performance and reliability reasons.
.P
A raw socket can be bound to a specific local address using the
-.BR bind (2)
+.MR bind 2
call.
If it isn't bound, all packets with the specified IP protocol are received.
In addition, a raw socket can be bound to a specific network device using
.BR SO_BINDTODEVICE ;
see
-.BR socket (7).
+.MR socket 7 .
.P
An
.B IPPROTO_RAW
socket is send only.
If you really want to receive all IP packets, use a
-.BR packet (7)
+.MR packet 7
socket with the
.B ETH_P_IP
protocol.
@@ -227,7 +228,7 @@ If you want to receive all ICMP packets for a datagram socket,
it is often better to use
.B IP_RECVERR
on that particular socket; see
-.BR ip (7).
+.MR ip 7 .
.P
Raw sockets may tap all IP protocols in Linux, even
protocols like ICMP or TCP which have a protocol module in the kernel.
@@ -262,16 +263,16 @@ Setting the IP protocol for sending in
got lost in Linux 2.2.
The protocol that the socket was bound to or that
was specified in the initial
-.BR socket (2)
+.MR socket 2
call is always used.
.\" .SH AUTHORS
.\" This man page was written by Andi Kleen.
.SH SEE ALSO
-.BR recvmsg (2),
-.BR sendmsg (2),
-.BR capabilities (7),
-.BR ip (7),
-.BR socket (7)
+.MR recvmsg 2 ,
+.MR sendmsg 2 ,
+.MR capabilities 7 ,
+.MR ip 7 ,
+.MR socket 7
.P
.B RFC\ 1191
for path MTU discovery.