ip.4 (108ad5bd51bf0c2f8ce08a0c1126918984cbf08d) ip.4 (d10910e6cee0dca8be3d5a7fdbe404a15d9e7b52)
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 18 unchanged lines hidden (view full) ---

27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)ip.4 8.2 (Berkeley) 11/30/93
33.\" $FreeBSD$
34.\"
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 18 unchanged lines hidden (view full) ---

27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)ip.4 8.2 (Berkeley) 11/30/93
33.\" $FreeBSD$
34.\"
35.Dd February 13, 2009
35.Dd March 9, 2009
36.Dt IP 4
37.Os
38.Sh NAME
39.Nm ip
40.Nd Internet Protocol
41.Sh SYNOPSIS
42.In sys/types.h
43.In sys/socket.h

--- 417 unchanged lines hidden (view full) ---

461over whether or not subsequent datagrams are looped back:
462.Bd -literal
463u_char loop; /* 0 = disable, 1 = enable (default) */
464setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop));
465.Ed
466.Pp
467This option
468improves performance for applications that may have no more than one
36.Dt IP 4
37.Os
38.Sh NAME
39.Nm ip
40.Nd Internet Protocol
41.Sh SYNOPSIS
42.In sys/types.h
43.In sys/socket.h

--- 417 unchanged lines hidden (view full) ---

461over whether or not subsequent datagrams are looped back:
462.Bd -literal
463u_char loop; /* 0 = disable, 1 = enable (default) */
464setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop));
465.Ed
466.Pp
467This option
468improves performance for applications that may have no more than one
469instance on a single host (such as a router daemon), by eliminating
469instance on a single host (such as a routing daemon), by eliminating
470the overhead of receiving their own transmissions.
471It should generally not
472be used by applications for which there may be more than one instance on a
473single host (such as a conferencing program) or for which the sender does
474not belong to the destination group (such as a time querying program).
475.Pp
470the overhead of receiving their own transmissions.
471It should generally not
472be used by applications for which there may be more than one instance on a
473single host (such as a conferencing program) or for which the sender does
474not belong to the destination group (such as a time querying program).
475.Pp
476The sysctl setting
477.Va net.inet.ip.mcast.loop
478controls the default setting of the
479.Dv IP_MULTICAST_LOOP
480socket option for new sockets.
481.Pp
476A multicast datagram sent with an initial TTL greater than 1 may be delivered
477to the sending host on a different interface from that on which it was sent,
478if the host belongs to the destination group on that other interface.
479The loopback control option has no effect on such delivery.
480.Pp
481A host must become a member of a multicast group before it can receive
482datagrams sent to the group.
483To join a multicast group, use the

--- 161 unchanged lines hidden (view full) ---

645for exclusive-mode group memberships.
646However, both exclusive and inclusive mode memberships
647support the use of the
648.Em full-state API
649documented in RFC 3678.
650For management of source filter lists using this API,
651please refer to
652.Xr sourcefilter 3 .
482A multicast datagram sent with an initial TTL greater than 1 may be delivered
483to the sending host on a different interface from that on which it was sent,
484if the host belongs to the destination group on that other interface.
485The loopback control option has no effect on such delivery.
486.Pp
487A host must become a member of a multicast group before it can receive
488datagrams sent to the group.
489To join a multicast group, use the

--- 161 unchanged lines hidden (view full) ---

651for exclusive-mode group memberships.
652However, both exclusive and inclusive mode memberships
653support the use of the
654.Em full-state API
655documented in RFC 3678.
656For management of source filter lists using this API,
657please refer to
658.Xr sourcefilter 3 .
659.Pp
660The sysctl settings
661.Va net.inet.ip.mcast.maxsocksrc
662and
663.Va net.inet.ip.mcast.maxgrpsrc
664are used to specify an upper limit on the number of per-socket and per-group
665source filter entries which the kernel may allocate.
653.\"-----------------------
654.Ss "Raw IP Sockets"
655.Pp
656Raw
657.Tn IP
658sockets are connectionless,
659and are normally used with the
660.Xr sendto 2

--- 129 unchanged lines hidden (view full) ---

790field was not equal to the length of the datagram written to the socket.
791.El
792.Sh SEE ALSO
793.Xr getsockopt 2 ,
794.Xr recv 2 ,
795.Xr send 2 ,
796.Xr byteorder 3 ,
797.Xr icmp 4 ,
666.\"-----------------------
667.Ss "Raw IP Sockets"
668.Pp
669Raw
670.Tn IP
671sockets are connectionless,
672and are normally used with the
673.Xr sendto 2

--- 129 unchanged lines hidden (view full) ---

803field was not equal to the length of the datagram written to the socket.
804.El
805.Sh SEE ALSO
806.Xr getsockopt 2 ,
807.Xr recv 2 ,
808.Xr send 2 ,
809.Xr byteorder 3 ,
810.Xr icmp 4 ,
811.Xr igmp 4 ,
798.Xr inet 4 ,
799.Xr intro 4 ,
800.Xr multicast 4 ,
801.Xr sourcefilter 3
802.Rs
803.%A D. Thaler
804.%A B. Fenner
805.%A B. Quinn

--- 13 unchanged lines hidden ---
812.Xr inet 4 ,
813.Xr intro 4 ,
814.Xr multicast 4 ,
815.Xr sourcefilter 3
816.Rs
817.%A D. Thaler
818.%A B. Fenner
819.%A B. Quinn

--- 13 unchanged lines hidden ---