.\" MCAST_JOIN_SOURCE_GROUP (2.4.22 / 2.6)
.\" MCAST_LEAVE_SOURCE_GROUP (2.4.22 / 2.6)
.\" MCAST_MSFILTER (2.4.22 / 2.6)
-.\" IP_MULTICAST_ALL (2.6.31)
-.\" commit f771bef98004d9d141b085d987a77d06669d4f4f
-.\" Author: Nivedita Singhvi <niv@us.ibm.com>
.\" IP_UNICAST_IF (3.4)
.\" commit 76e21053b5bf33a07c76f99d27a74238310e3c71
.\" Author: Erich E. Hoover <ehoover@mines.edu>
.\"
-.TH IP 7 2013-02-12 "Linux" "Linux Programmer's Manual"
+.TH IP 7 2013-09-17 "Linux" "Linux Programmer's Manual"
.SH NAME
ip \- Linux IPv4 protocol implementation
.SH SYNOPSIS
.BR bind (2)
to these sockets.
Note that the raw IPv4 protocol as such has no concept of a
-port, they are only implemented by higher protocols like
+port, they are implemented only by higher protocols like
.BR tcp (7)
and
.BR udp (7).
Unicast addresses specify a single interface of a host,
broadcast addresses specify all hosts on a network and multicast
addresses address all hosts in a multicast group.
-Datagrams to broadcast addresses can be only sent or received when the
+Datagrams to broadcast addresses can be sent or received only when the
.B SO_BROADCAST
socket flag is set.
-In the current implementation, connection-oriented sockets are only allowed
-to use unicast addresses.
+In the current implementation, connection-oriented sockets are allowed
+to use only unicast addresses.
.\" Leave a loophole for XTP @)
Note that the address and the port are always stored in
.I imr_address
is the address of the local interface with which the system
should join the multicast group; if it is equal to
-.B INADDR_ANY
+.BR INADDR_ANY ,
an appropriate interface is chosen by the system.
.I imr_ifindex
is the interface index of the interface that should join/leave the
.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.
+Valid only when the socket has been connected.
Returns an integer.
Only valid as a
.BR getsockopt (2).
that wish to deliberately send probe packets larger than
the observed Path MTU.
.TP
+.BR IP_MULTICAST_ALL " (since Linux 2.6.31)"
+This option can be used to modify the delivery policy of multicast messages
+to sockets bound to the wildcard
+.B INADDR_ANY
+address.
+The argument is a boolean integer (defaults to 1).
+If set to 1,
+the socket will receive messages from all the groups that have been joined
+globally on the whole system.
+Otherwise, it will deliver messages only from
+the groups that have been explicitly joined (for example via the
+.B IP_ADD_MEMBERSHIP
+option) on this particular socket.
+.TP
.BR IP_MULTICAST_IF " (since Linux 1.2)"
Set the local device for a multicast socket.
Argument is an
.I ip_mreqn
or
.I ip_mreq
+.\" net: IP_MULTICAST_IF setsockopt now recognizes struct mreq
+.\" Commit: 3a084ddb4bf299a6e898a9a07c89f3917f0713f7
+(since Linux 3.5)
structure similar to
.BR IP_ADD_MEMBERSHIP .
.IP
.BR IP_NODEFRAG " (since Linux 2.6.36)"
If enabled (argument is nonzero),
the reassembly of outgoing packets is disabled in the netfilter layer.
-This option is only valid for
+This option is valid only for
.B SOCK_RAW
sockets.
The argument is an integer.
.TP
.BR IP_RECVTOS " (since Linux 2.2)"
.\" Precisely: 2.1.68
-If enabled the
+If enabled, the
.B IP_TOS
ancillary message is passed with incoming packets.
It contains a byte which specifies the Type of Service/Precedence
Invalid socket option passed.
.TP
.B ENOTCONN
-The operation is only defined on a connected socket, but the socket wasn't
+The operation is defined only on a connected socket, but the socket wasn't
connected.
.TP
.B EPERM
RFC\ 1122 for the IPv4 host requirements.
RFC\ 1812 for the IPv4 router requirements.
.\" FIXME autobind INADDR REUSEADDR
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.