aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2020-04-23 11:12:05 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-04-23 11:13:26 +0200
commitd8833593c704fffec95ad513c5282337aa4f2d3a (patch)
tree2bde24cedcbdb01382f38eec6e99f7e96a393876
parentc5885e4fffbfb028045d9e4a714c371e1f710d15 (diff)
downloadman-pages-d8833593c704fffec95ad513c5282337aa4f2d3a.tar.gz
ip.7: Note a few more valid 'protocol' values
See https://bugzilla.kernel.org/show_bug.cgi?id=204981 Reported-by: Martin Doucha <mdoucha@suse.cz> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man7/ip.738
1 files changed, 27 insertions, 11 deletions
diff --git a/man7/ip.7 b/man7/ip.7
index 59f05ae377..2ea454748b 100644
--- a/man7/ip.7
+++ b/man7/ip.7
@@ -78,28 +78,44 @@ An IP socket is created using
.PP
socket(AF_INET, socket_type, protocol);
.PP
-Valid socket types are
+Valid socket types include
.B SOCK_STREAM
-to open a
-.BR tcp (7)
-socket,
+to open a stream socket,
.B SOCK_DGRAM
-to open a
-.BR udp (7)
-socket, or
+to open a datagram socket, and
.B SOCK_RAW
to open a
.BR raw (7)
socket to access the IP protocol directly.
+.PP
.I protocol
is the IP protocol in the IP header to be received or sent.
-The only valid values for
+Valid values for
.I protocol
-are 0 and
+include:
+.IP \(bu 2
+0 and
.B IPPROTO_TCP
-for TCP sockets, and 0 and
+for
+.BR tcp (7)
+stream sockets;
+.IP \(bu
+0 and
.B IPPROTO_UDP
-for UDP sockets.
+for
+.BR udp (7)
+datagram sockets;
+.IP \(bu
+.B IPPROTO_SCTP
+for
+.BR sctp (7)
+stream sockets; and
+.IP \(bu
+.B IPPROTO_UDPLITE
+for
+.BR udplite (7)
+datagram sockets.
+.PP
For
.B SOCK_RAW
you may specify a valid IANA IP protocol defined in