mirror of https://github.com/mkerrisk/man-pages
ip.7: Added kernel version numbers for IP_* socket options
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
21ba63ee0e
commit
02f6363733
56
man7/ip.7
56
man7/ip.7
|
@ -6,7 +6,7 @@
|
|||
.\" and in case of nontrivial modification author and date
|
||||
.\" of the modification is added to the header.
|
||||
.\" $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
|
||||
ip \- Linux IPv4 protocol implementation
|
||||
.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.
|
||||
.\" FIXME has someone verified that 2.1 is really 1812 compliant?
|
||||
.PP
|
||||
The programming interface is BSD sockets compatible.
|
||||
The programming interface is BSD-sockets compatible.
|
||||
For more information on sockets, see
|
||||
.BR socket (7).
|
||||
.PP
|
||||
|
@ -154,6 +154,7 @@ or set using the
|
|||
.BR inet_makeaddr (3)
|
||||
library functions or directly with the name resolver (see
|
||||
.BR gethostbyname (3)).
|
||||
|
||||
IPv4 addresses are divided into unicast, broadcast
|
||||
and multicast addresses.
|
||||
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
|
||||
.\"
|
||||
.TP
|
||||
.B IP_ADD_MEMBERSHIP
|
||||
.B IP_ADD_MEMBERSHIP " (since Linux 1.2)"
|
||||
Join a multicast group.
|
||||
Argument is an
|
||||
.I ip_mreqn
|
||||
|
@ -248,7 +249,7 @@ Only valid as a
|
|||
.BR setsockopt (2).
|
||||
.\"
|
||||
.TP
|
||||
.B IP_DROP_MEMBERSHIP
|
||||
.BR IP_DROP_MEMBERSHIP " (since Linux 1.2)"
|
||||
Leave a multicast group.
|
||||
Argument is an
|
||||
.I ip_mreqn
|
||||
|
@ -257,7 +258,7 @@ or
|
|||
structure similar to
|
||||
.BR IP_ADD_MEMBERSHIP .
|
||||
.TP
|
||||
.B IP_HDRINCL
|
||||
.BR IP_HDRINCL " (since Linux 2.0)"
|
||||
If enabled,
|
||||
the user supplies an IP header in front of the user data.
|
||||
Only valid for
|
||||
|
@ -273,14 +274,16 @@ and
|
|||
.B IP_TOS
|
||||
are ignored.
|
||||
.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.
|
||||
Only valid when the socket has been connected.
|
||||
Returns an integer.
|
||||
Only valid as a
|
||||
.BR getsockopt (2).
|
||||
.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.
|
||||
When enabled, Linux will perform Path MTU Discovery
|
||||
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
|
||||
the observed Path MTU.
|
||||
.TP
|
||||
.B IP_MULTICAST_IF
|
||||
.BR IP_MULTICAST_IF " (since Linux 1.2)"
|
||||
Set the local device for a multicast socket.
|
||||
Argument is an
|
||||
.I ip_mreqn
|
||||
|
@ -369,11 +372,11 @@ When an invalid socket option is passed,
|
|||
.B ENOPROTOOPT
|
||||
is returned.
|
||||
.TP
|
||||
.B IP_MULTICAST_LOOP
|
||||
.BR IP_MULTICAST_LOOP " (since Linux 1.2)"
|
||||
Sets or reads a boolean integer argument that determines whether
|
||||
sent multicast packets should be looped back to the local sockets.
|
||||
.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
|
||||
socket.
|
||||
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.
|
||||
Argument is an integer.
|
||||
.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.
|
||||
The arguments are a pointer to a memory buffer containing the options
|
||||
and the option length.
|
||||
|
@ -409,7 +413,8 @@ with
|
|||
.B IP_OPTIONS
|
||||
puts the current IP options used for sending into the supplied buffer.
|
||||
.TP
|
||||
.B IP_PKTINFO
|
||||
.BR IP_PKTINFO " (since Linux 2.2)"
|
||||
.\" Precisely: 2.1.68
|
||||
Pass an
|
||||
.B IP_PKTINFO
|
||||
ancillary message that contains a
|
||||
|
@ -459,7 +464,8 @@ index overwrites
|
|||
.I ipi_spec_dst
|
||||
for the routing table lookup.
|
||||
.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.
|
||||
When enabled on a datagram socket, all
|
||||
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
|
||||
defaults to off.
|
||||
.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
|
||||
.B IP_OPTIONS
|
||||
control message.
|
||||
|
@ -606,7 +613,8 @@ Not supported for
|
|||
.B SOCK_STREAM
|
||||
sockets.
|
||||
.TP
|
||||
.B IP_RECVTOS
|
||||
.BR IP_RECVTOS " (since Linux 2.2)"
|
||||
.\" Precisely: 2.1.68
|
||||
If enabled the
|
||||
.B IP_TOS
|
||||
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.
|
||||
Expects a boolean integer flag.
|
||||
.TP
|
||||
.B IP_RECVTTL
|
||||
.BR IP_RECVTTL " (since Linux 2.2)"
|
||||
.\" Precisely: 2.1.68
|
||||
When this flag is set, pass a
|
||||
.B IP_TTL
|
||||
control message with the time to live
|
||||
|
@ -623,13 +632,15 @@ Not supported for
|
|||
.B SOCK_STREAM
|
||||
sockets.
|
||||
.TP
|
||||
.B IP_RETOPTS
|
||||
.BR IP_RETOPTS " (since Linux 2.2)"
|
||||
.\" Precisely: 2.1.15
|
||||
Identical to
|
||||
.BR IP_RECVOPTS ,
|
||||
but returns raw unprocessed options with timestamp and route record
|
||||
options not filled in for this hop.
|
||||
.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
|
||||
IP Router Alert option set to this socket.
|
||||
Only valid for raw sockets.
|
||||
|
@ -640,7 +651,7 @@ Socket binding is ignored,
|
|||
such packets are only filtered by protocol.
|
||||
Expects an integer flag.
|
||||
.TP
|
||||
.B IP_TOS
|
||||
.BR IP_TOS " (since Linux 1.0)"
|
||||
Set or receive the Type-Of-Service (TOS) field that is sent
|
||||
with every IP packet originating from this socket.
|
||||
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
|
||||
.BR socket (7)).
|
||||
.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
|
||||
sent from this socket.
|
||||
.SS /proc interfaces
|
||||
|
@ -736,7 +747,7 @@ This is useful for dialup interface with changing IP addresses.
|
|||
.TP
|
||||
.IR ip_forward " (Boolean; default: disabled; since Linux 1.2)"
|
||||
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
|
||||
.IR ip_local_port_range " (since Linux 2.2)"
|
||||
|
@ -911,8 +922,7 @@ and
|
|||
.B IP_RECVERR
|
||||
and
|
||||
.B IP_ROUTER_ALERT
|
||||
are new options in Linux 2.2.
|
||||
They are also all Linux-specific and should not be used in
|
||||
are Linux-specific and should not be used in
|
||||
programs intended to be portable.
|
||||
.PP
|
||||
.\" FIXME
|
||||
|
|
Loading…
Reference in New Issue