ip.7: Added kernel version numbers for IP_* socket options

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2008-11-24 10:28:30 -05:00
parent 21ba63ee0e
commit 02f6363733
1 changed files with 33 additions and 23 deletions

View File

@ -6,7 +6,7 @@
.\" and in case of nontrivial modification author and date .\" and in case of nontrivial modification author and date
.\" of the modification is added to the header. .\" of the modification is added to the header.
.\" $Id: ip.7,v 1.19 2000/12/20 18:10:31 ak Exp $ .\" $Id: ip.7,v 1.19 2000/12/20 18:10:31 ak Exp $
.TH IP 7 2008-11-21 "Linux" "Linux Programmer's Manual" .TH IP 7 2008-11-24 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
ip \- Linux IPv4 protocol implementation ip \- Linux IPv4 protocol implementation
.SH SYNOPSIS .SH SYNOPSIS
@ -31,7 +31,7 @@ contains a level 2 multicasting implementation conforming to RFC\ 1112.
It also contains an IP router including a packet filter. It also contains an IP router including a packet filter.
.\" FIXME has someone verified that 2.1 is really 1812 compliant? .\" FIXME has someone verified that 2.1 is really 1812 compliant?
.PP .PP
The programming interface is BSD sockets compatible. The programming interface is BSD-sockets compatible.
For more information on sockets, see For more information on sockets, see
.BR socket (7). .BR socket (7).
.PP .PP
@ -154,6 +154,7 @@ or set using the
.BR inet_makeaddr (3) .BR inet_makeaddr (3)
library functions or directly with the name resolver (see library functions or directly with the name resolver (see
.BR gethostbyname (3)). .BR gethostbyname (3)).
IPv4 addresses are divided into unicast, broadcast IPv4 addresses are divided into unicast, broadcast
and multicast addresses. and multicast addresses.
Unicast addresses specify a single interface of a host, Unicast addresses specify a single interface of a host,
@ -199,7 +200,7 @@ A boolean integer flag is zero when it is false, otherwise true.
.\" FIXME Document IP_FREEBIND .\" FIXME Document IP_FREEBIND
.\" .\"
.TP .TP
.B IP_ADD_MEMBERSHIP .B IP_ADD_MEMBERSHIP " (since Linux 1.2)"
Join a multicast group. Join a multicast group.
Argument is an Argument is an
.I ip_mreqn .I ip_mreqn
@ -248,7 +249,7 @@ Only valid as a
.BR setsockopt (2). .BR setsockopt (2).
.\" .\"
.TP .TP
.B IP_DROP_MEMBERSHIP .BR IP_DROP_MEMBERSHIP " (since Linux 1.2)"
Leave a multicast group. Leave a multicast group.
Argument is an Argument is an
.I ip_mreqn .I ip_mreqn
@ -257,7 +258,7 @@ or
structure similar to structure similar to
.BR IP_ADD_MEMBERSHIP . .BR IP_ADD_MEMBERSHIP .
.TP .TP
.B IP_HDRINCL .BR IP_HDRINCL " (since Linux 2.0)"
If enabled, If enabled,
the user supplies an IP header in front of the user data. the user supplies an IP header in front of the user data.
Only valid for Only valid for
@ -273,14 +274,16 @@ and
.B IP_TOS .B IP_TOS
are ignored. are ignored.
.TP .TP
.B IP_MTU .BR IP_MTU " (since Linux 2.2)"
.\" Precisely: 2.1.124
Retrieve the current known path MTU of the current socket. Retrieve the current known path MTU of the current socket.
Only valid when the socket has been connected. Only valid when the socket has been connected.
Returns an integer. Returns an integer.
Only valid as a Only valid as a
.BR getsockopt (2). .BR getsockopt (2).
.TP .TP
.B IP_MTU_DISCOVER .BR IP_MTU_DISCOVER " (since Linux 2.2)"
.\" Precisely: 2.1.124
Sets or receives the Path MTU Discovery setting for a socket. Sets or receives the Path MTU Discovery setting for a socket.
When enabled, Linux will perform Path MTU Discovery When enabled, Linux will perform Path MTU Discovery
as defined in RFC\ 1191 as defined in RFC\ 1191
@ -356,7 +359,7 @@ This is also particularly useful for diagnostic tools such as
that wish to deliberately send probe packets larger than that wish to deliberately send probe packets larger than
the observed Path MTU. the observed Path MTU.
.TP .TP
.B IP_MULTICAST_IF .BR IP_MULTICAST_IF " (since Linux 1.2)"
Set the local device for a multicast socket. Set the local device for a multicast socket.
Argument is an Argument is an
.I ip_mreqn .I ip_mreqn
@ -369,11 +372,11 @@ When an invalid socket option is passed,
.B ENOPROTOOPT .B ENOPROTOOPT
is returned. is returned.
.TP .TP
.B IP_MULTICAST_LOOP .BR IP_MULTICAST_LOOP " (since Linux 1.2)"
Sets or reads a boolean integer argument that determines whether Sets or reads a boolean integer argument that determines whether
sent multicast packets should be looped back to the local sockets. sent multicast packets should be looped back to the local sockets.
.TP .TP
.B IP_MULTICAST_TTL .BR IP_MULTICAST_TTL " (since Linux 1.2)"
Set or read the time-to-live value of outgoing multicast packets for this Set or read the time-to-live value of outgoing multicast packets for this
socket. socket.
It is very important for multicast packets to set the smallest TTL possible. It is very important for multicast packets to set the smallest TTL possible.
@ -381,7 +384,8 @@ The default is 1 which means that multicast packets don't leave the local
network unless the user program explicitly requests it. network unless the user program explicitly requests it.
Argument is an integer. Argument is an integer.
.TP .TP
.B IP_OPTIONS .BR IP_OPTIONS " (since Linux 2.0)"
.\" Precisely: 1.3.30
Sets or get the IP options to be sent with every packet from this socket. Sets or get the IP options to be sent with every packet from this socket.
The arguments are a pointer to a memory buffer containing the options The arguments are a pointer to a memory buffer containing the options
and the option length. and the option length.
@ -409,7 +413,8 @@ with
.B IP_OPTIONS .B IP_OPTIONS
puts the current IP options used for sending into the supplied buffer. puts the current IP options used for sending into the supplied buffer.
.TP .TP
.B IP_PKTINFO .BR IP_PKTINFO " (since Linux 2.2)"
.\" Precisely: 2.1.68
Pass an Pass an
.B IP_PKTINFO .B IP_PKTINFO
ancillary message that contains a ancillary message that contains a
@ -459,7 +464,8 @@ index overwrites
.I ipi_spec_dst .I ipi_spec_dst
for the routing table lookup. for the routing table lookup.
.TP .TP
.BR IP_RECVERR " (defined in \fI<linux/errqueue.h>\fP)" .BR IP_RECVERR " (defined in \fI<linux/errqueue.h>\fP; since Linux 2.2)"
.\" Precisely: 2.1.15
Enable extended reliable error message passing. Enable extended reliable error message passing.
When enabled on a datagram socket, all When enabled on a datagram socket, all
generated errors will be queued in a per-socket error queue. generated errors will be queued in a per-socket error queue.
@ -596,7 +602,8 @@ It sets or retrieves an integer boolean flag.
.B IP_RECVERR .B IP_RECVERR
defaults to off. defaults to off.
.TP .TP
.B IP_RECVOPTS .BR IP_RECVOPTS " (since Linux 2.2)"
.\" Precisely: 2.1.15
Pass all incoming IP options to the user in a Pass all incoming IP options to the user in a
.B IP_OPTIONS .B IP_OPTIONS
control message. control message.
@ -606,7 +613,8 @@ Not supported for
.B SOCK_STREAM .B SOCK_STREAM
sockets. sockets.
.TP .TP
.B IP_RECVTOS .BR IP_RECVTOS " (since Linux 2.2)"
.\" Precisely: 2.1.68
If enabled the If enabled the
.B IP_TOS .B IP_TOS
ancillary message is passed with incoming packets. ancillary message is passed with incoming packets.
@ -614,7 +622,8 @@ It contains a byte which specifies the Type of Service/Precedence
field of the packet header. field of the packet header.
Expects a boolean integer flag. Expects a boolean integer flag.
.TP .TP
.B IP_RECVTTL .BR IP_RECVTTL " (since Linux 2.2)"
.\" Precisely: 2.1.68
When this flag is set, pass a When this flag is set, pass a
.B IP_TTL .B IP_TTL
control message with the time to live control message with the time to live
@ -623,13 +632,15 @@ Not supported for
.B SOCK_STREAM .B SOCK_STREAM
sockets. sockets.
.TP .TP
.B IP_RETOPTS .BR IP_RETOPTS " (since Linux 2.2)"
.\" Precisely: 2.1.15
Identical to Identical to
.BR IP_RECVOPTS , .BR IP_RECVOPTS ,
but returns raw unprocessed options with timestamp and route record but returns raw unprocessed options with timestamp and route record
options not filled in for this hop. options not filled in for this hop.
.TP .TP
.B IP_ROUTER_ALERT .BR IP_ROUTER_ALERT " (since Linux 2.2)"
.\" Precisely: 2.1.68
Pass all to-be forwarded packets with the Pass all to-be forwarded packets with the
IP Router Alert option set to this socket. IP Router Alert option set to this socket.
Only valid for raw sockets. Only valid for raw sockets.
@ -640,7 +651,7 @@ Socket binding is ignored,
such packets are only filtered by protocol. such packets are only filtered by protocol.
Expects an integer flag. Expects an integer flag.
.TP .TP
.B IP_TOS .BR IP_TOS " (since Linux 1.0)"
Set or receive the Type-Of-Service (TOS) field that is sent Set or receive the Type-Of-Service (TOS) field that is sent
with every IP packet originating from this socket. with every IP packet originating from this socket.
It is used to prioritize packets on the network. It is used to prioritize packets on the network.
@ -669,7 +680,7 @@ The priority can also be set in a protocol independent way by the
socket option (see socket option (see
.BR socket (7)). .BR socket (7)).
.TP .TP
.B IP_TTL .BR IP_TTL " (since Linux 1.0)"
Set or retrieve the current time-to-live field that is used in every packet Set or retrieve the current time-to-live field that is used in every packet
sent from this socket. sent from this socket.
.SS /proc interfaces .SS /proc interfaces
@ -736,7 +747,7 @@ This is useful for dialup interface with changing IP addresses.
.TP .TP
.IR ip_forward " (Boolean; default: disabled; since Linux 1.2)" .IR ip_forward " (Boolean; default: disabled; since Linux 1.2)"
Enable IP forwarding with a boolean flag. Enable IP forwarding with a boolean flag.
IP forwarding can be also set on a per interface basis. IP forwarding can be also set on a per-interface basis.
.\" .\"
.TP .TP
.IR ip_local_port_range " (since Linux 2.2)" .IR ip_local_port_range " (since Linux 2.2)"
@ -911,8 +922,7 @@ and
.B IP_RECVERR .B IP_RECVERR
and and
.B IP_ROUTER_ALERT .B IP_ROUTER_ALERT
are new options in Linux 2.2. are Linux-specific and should not be used in
They are also all Linux-specific and should not be used in
programs intended to be portable. programs intended to be portable.
.PP .PP
.\" FIXME .\" FIXME