]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man7/ip.7
err.3: EXAMPLES: use EXIT_FAILURE rather than 1 as exit status
[thirdparty/man-pages.git] / man7 / ip.7
index b988094e9e51dee5e1673211ca3b03ea9201b75e..06f47715e6d8939336bc58976d48affff795c580 100644 (file)
--- a/man7/ip.7
+++ b/man7/ip.7
@@ -45,7 +45,7 @@
 .\"        commit 76e21053b5bf33a07c76f99d27a74238310e3c71
 .\"        Author: Erich E. Hoover <ehoover@mines.edu>
 .\"
-.TH IP  7 2017-09-15 "Linux" "Linux Programmer's Manual"
+.TH IP  7 2019-03-06 "Linux" "Linux Programmer's Manual"
 .SH NAME
 ip \- Linux IPv4 protocol implementation
 .SH SYNOPSIS
@@ -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
@@ -336,7 +352,7 @@ The
 structure is similar to
 .I ip_mreqn
 described under
-.BR IP_ADD_MEMBERSIP .
+.BR IP_ADD_MEMBERSHIP .
 The
 .I imr_multiaddr
 field contains the address of the multicast group the application
@@ -874,7 +890,7 @@ Expects a boolean integer flag.
 When this flag is set, pass a
 .B IP_TTL
 control message with the time-to-live
-field of the received packet as a byte.
+field of the received packet as a 32 bit integer.
 Not supported for
 .B SOCK_STREAM
 sockets.
@@ -1274,7 +1290,8 @@ level.
 .B INADDR_ANY
 (0.0.0.0) and
 .B INADDR_BROADCAST
-(255.255.255.255) are byte-order-neutral. That means
+(255.255.255.255) are byte-order-neutral.
+ This means
 .BR htonl (3)
 has no effect on them.
 .SS Compatibility
@@ -1325,6 +1342,7 @@ does not work in some 2.2 kernels.
 .BR capabilities (7),
 .BR icmp (7),
 .BR ipv6 (7),
+.BR netdevice (7),
 .BR netlink (7),
 .BR raw (7),
 .BR socket (7),
@@ -1332,6 +1350,9 @@ does not work in some 2.2 kernels.
 .BR udp (7),
 .BR ip (8)
 .PP
+The kernel source file
+.IR Documentation/networking/ip-sysctl.txt .
+.PP
 RFC\ 791 for the original IP specification.
 RFC\ 1122 for the IPv4 host requirements.
 RFC\ 1812 for the IPv4 router requirements.