aboutsummaryrefslogtreecommitdiffstats
path: root/man7/raw.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2007-05-19 04:30:20 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2007-05-19 04:30:20 +0000
commit2b2581ee37f080c0a95d20aedecd5cb04e81ef4a (patch)
tree4ce1a3bcc3cd8793e50f48abba8eab04c8e7ea07 /man7/raw.7
parent2dd578fd5b80cbfe5892b200633aa1442c4ac674 (diff)
downloadman-pages-2b2581ee37f080c0a95d20aedecd5cb04e81ef4a.tar.gz
Fix inconsistencies in order of .SH sections
Diffstat (limited to 'man7/raw.7')
-rw-r--r--man7/raw.7115
1 files changed, 58 insertions, 57 deletions
diff --git a/man7/raw.7 b/man7/raw.7
index b4b3779fb4..e0cb4f3b2d 100644
--- a/man7/raw.7
+++ b/man7/raw.7
@@ -6,6 +6,7 @@
.\" and in case of nontrivial modification author and date
.\" of the modification is added to the header.
.\" $Id: raw.7,v 1.6 1999/06/05 10:32:08 freitag Exp $
+.\" FIXME Section titles and orderings in this page are very inconsistent
.TH RAW 7 1998-10-02 "Linux" "Linux Programmer's Manual"
.SH NAME
raw, SOCK_RAW \- Linux IPv4 raw sockets
@@ -86,7 +87,7 @@ protocols or protocols with no user interface (like ICMP).
When a packet is received, it is passed to any raw sockets which have
been bound to its protocol before it is passed to other protocol handlers
(e.g. kernel protocol modules).
-.SH "ADDRESS FORMAT"
+.SS Address Format
Raw sockets use the standard
.I sockaddr_in
address structure defined in
@@ -102,7 +103,7 @@ is set to the protocol of the packet.
See the
.I <netinet/in.h>
include file for valid IP protocols.
-.SH "SOCKET OPTIONS"
+.SS Socket Options
Raw socket options can be set with
.BR setsockopt (2)
and read with
@@ -124,6 +125,61 @@ In addition all
.BR ip (7)
.B IPPROTO_IP
socket options valid for datagram sockets are supported.
+.SS Error Handling
+Errors originating from the network are only passed to the user when the
+socket is connected or the
+.B IP_RECVERR
+flag is enabled.
+For connected sockets only
+.B EMSGSIZE
+and
+.B EPROTO
+are passed for compatibility.
+With
+.B IP_RECVERR
+all network errors are saved in the error queue.
+.SH ERRORS
+.TP
+.B EMSGSIZE
+Packet too big.
+Either Path MTU Discovery is enabled (the
+.B IP_MTU_DISCOVER
+socket flag) or the packet size exceeds the maximum allowed IPv4
+packet size of 64KB.
+.TP
+.B EACCES
+User tried to send to a broadcast address without having the
+broadcast flag set on the socket.
+.TP
+.B EPROTO
+An ICMP error has arrived reporting a parameter problem.
+.TP
+.B EFAULT
+An invalid memory address was supplied.
+.TP
+.B EOPNOTSUPP
+Invalid flag has been passed to a socket call (like
+.BR MSG_OOB ).
+.TP
+.B EINVAL
+Invalid argument.
+.TP
+.B EPERM
+The user doesn't have permission to open raw sockets.
+Only processes with a effective user ID of 0 or the
+.B CAP_NET_RAW
+attribute may do that.
+.SH VERSIONS
+.B IP_RECVERR
+and
+.B ICMP_FILTER
+are new in Linux 2.2.
+They are Linux extensions and should not be used in portable programs.
+
+Linux 2.0 enabled some bug-to-bug compatibility with BSD in the
+raw socket code when the
+SO_BSDCOMPAT socket option was set \(em since Linux 2.2,
+this option no longer has that effect.
.SH NOTES
By default raw sockets do path MTU (Maximum Transmission Unit) discovery.
This means the kernel
@@ -189,61 +245,6 @@ Sending on raw sockets should take the IP protocol from
this ability was lost in Linux 2.2.
The workaround is to use
.BR IP_HDRINCL .
-.SH "ERROR HANDLING"
-Errors originating from the network are only passed to the user when the
-socket is connected or the
-.B IP_RECVERR
-flag is enabled.
-For connected sockets only
-.B EMSGSIZE
-and
-.B EPROTO
-are passed for compatibility.
-With
-.B IP_RECVERR
-all network errors are saved in the error queue.
-.SH ERRORS
-.TP
-.B EMSGSIZE
-Packet too big.
-Either Path MTU Discovery is enabled (the
-.B IP_MTU_DISCOVER
-socket flag) or the packet size exceeds the maximum allowed IPv4
-packet size of 64KB.
-.TP
-.B EACCES
-User tried to send to a broadcast address without having the
-broadcast flag set on the socket.
-.TP
-.B EPROTO
-An ICMP error has arrived reporting a parameter problem.
-.TP
-.B EFAULT
-An invalid memory address was supplied.
-.TP
-.B EOPNOTSUPP
-Invalid flag has been passed to a socket call (like
-.BR MSG_OOB ).
-.TP
-.B EINVAL
-Invalid argument.
-.TP
-.B EPERM
-The user doesn't have permission to open raw sockets.
-Only processes with a effective user ID of 0 or the
-.B CAP_NET_RAW
-attribute may do that.
-.SH VERSIONS
-.B IP_RECVERR
-and
-.B ICMP_FILTER
-are new in Linux 2.2.
-They are Linux extensions and should not be used in portable programs.
-
-Linux 2.0 enabled some bug-to-bug compatibility with BSD in the
-raw socket code when the
-SO_BSDCOMPAT socket option was set \(em since Linux 2.2,
-this option no longer has that effect.
.SH BUGS
Transparent proxy extensions are not described.