Bruce M Simpson 71498f308b Import rewrite of IPv4 socket multicast layer to support source-specific
and protocol-independent host mode multicast. The code is written to
accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work.

This change only pertains to FreeBSD's use as a multicast end-station and
does not concern multicast routing; for an IGMPv3/MLDv2 router
implementation, consider the XORP project.

The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6,
which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html

Summary
 * IPv4 multicast socket processing is now moved out of ip_output.c
   into a new module, in_mcast.c.
 * The in_mcast.c module implements the IPv4 legacy any-source API in
   terms of the protocol-independent source-specific API.
 * Source filters are lazy allocated as the common case does not use them.
   They are part of per inpcb state and are covered by the inpcb lock.
 * struct ip_mreqn is now supported to allow applications to specify
   multicast joins by interface index in the legacy IPv4 any-source API.
 * In UDP, an incoming multicast datagram only requires that the source
   port matches the 4-tuple if the socket was already bound by source port.
   An unbound socket SHOULD be able to receive multicasts sent from an
   ephemeral source port.
 * The UDP socket multicast filter mode defaults to exclusive, that is,
   sources present in the per-socket list will be blocked from delivery.
 * The RFC 3678 userland functions have been added to libc: setsourcefilter,
   getsourcefilter, setipv4sourcefilter, getipv4sourcefilter.
 * Definitions for IGMPv3 are merged but not yet used.
 * struct sockaddr_storage is now referenced from <netinet/in.h>. It
   is therefore defined there if not already declared in the same way
   as for the C99 types.
 * The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF
   which are then interpreted as interface indexes) is now deprecated.
 * A patch for the Rhyolite.com routed in the FreeBSD base system
   is available in the -net archives. This only affects individuals
   running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces.
 * Make IPv6 detach path similar to IPv4's in code flow; functionally same.
 * Bump __FreeBSD_version to 700048; see UPDATING.

This work was financially supported by another FreeBSD committer.

Obtained from:  p4://bms_netdev
Submitted by:   Wilbert de Graaf (original work)
Reviewed by:    rwatson (locking), silence from fenner,
		net@ (but with encouragement)
2007-06-12 16:24:56 +00:00
..
2007-02-03 20:02:29 +00:00
2006-12-14 17:03:46 +00:00
2006-12-14 11:57:39 +00:00
2006-09-30 15:14:49 +00:00
2006-09-18 15:24:20 +00:00
2006-06-18 09:53:00 +00:00
2006-09-18 15:24:20 +00:00
2006-02-17 06:29:51 +00:00
2007-06-12 02:19:11 +00:00
2006-06-18 09:53:00 +00:00
2006-09-30 15:14:49 +00:00
2006-06-18 14:45:28 +00:00
2005-02-09 18:07:17 +00:00
2006-09-18 15:24:20 +00:00
2005-01-15 12:49:11 +00:00
2006-09-18 15:24:20 +00:00
2006-12-14 16:40:57 +00:00
2006-12-14 16:40:57 +00:00
2007-02-03 19:29:31 +00:00
2007-02-09 18:26:13 +00:00
2006-06-18 14:12:27 +00:00
2005-11-18 10:56:28 +00:00
2006-04-14 09:20:25 +00:00
2005-01-21 08:36:40 +00:00
2005-10-07 02:32:16 +00:00
2005-01-21 20:51:09 +00:00
2005-10-07 02:32:16 +00:00
2005-01-13 16:37:26 +00:00
2006-09-18 15:24:20 +00:00
2005-10-07 02:32:16 +00:00
2007-03-16 16:07:49 +00:00
2005-02-13 22:25:33 +00:00
2006-09-18 15:24:20 +00:00
2006-03-20 17:10:09 +00:00
2005-02-13 22:25:33 +00:00
2004-12-21 01:09:34 +00:00
2005-10-07 02:32:16 +00:00
2007-02-09 20:39:14 +00:00
2006-06-18 09:53:00 +00:00
2006-12-14 16:40:57 +00:00
2005-01-21 08:36:40 +00:00
2006-12-14 16:40:57 +00:00
2005-10-07 02:32:16 +00:00
2005-11-18 10:56:28 +00:00
2006-01-10 18:55:24 +00:00
2005-02-13 23:45:54 +00:00
2007-06-04 16:59:11 +00:00
2006-09-30 15:14:49 +00:00
2006-10-09 12:50:16 +00:00
2005-07-26 18:14:22 +00:00
2005-01-21 08:36:40 +00:00
2006-09-18 15:24:20 +00:00
2007-02-12 03:26:22 +00:00
2005-05-05 12:03:36 +00:00
2005-02-13 23:45:54 +00:00
2007-04-03 14:36:18 +00:00
2005-01-21 08:36:40 +00:00
2006-12-14 16:40:57 +00:00
2005-02-13 23:45:54 +00:00
2006-12-14 16:40:57 +00:00
2005-02-13 22:25:33 +00:00
2006-09-29 16:16:41 +00:00
2006-10-16 07:56:36 +00:00
2006-12-14 16:40:57 +00:00
2006-11-05 08:55:21 +00:00
2006-09-18 15:24:20 +00:00
2007-04-24 07:10:10 +00:00
2005-10-07 02:32:16 +00:00
2006-12-14 16:40:57 +00:00
2005-02-15 09:27:00 +00:00
2005-02-05 13:52:21 +00:00
2005-02-05 13:52:21 +00:00
2005-01-12 10:14:43 +00:00
2005-01-21 20:50:39 +00:00
2005-02-05 13:52:21 +00:00
2005-11-18 10:56:28 +00:00
2007-06-05 01:10:47 +00:00
2007-05-12 15:33:18 +00:00
2005-01-21 08:36:40 +00:00
2005-01-21 08:36:40 +00:00
2006-09-30 15:14:49 +00:00
2007-01-30 08:17:45 +00:00
2007-03-11 15:20:04 +00:00
2006-06-18 09:53:00 +00:00
2006-06-18 09:53:00 +00:00
2007-06-12 02:19:56 +00:00
2006-09-30 15:14:49 +00:00
2007-05-30 09:05:49 +00:00
2005-01-21 08:36:40 +00:00
2007-05-22 18:14:35 +00:00
2007-01-30 20:22:07 +00:00
2005-01-12 10:14:43 +00:00
2006-08-04 18:28:57 +00:00
2005-01-21 08:36:40 +00:00
2005-01-21 08:36:40 +00:00
2005-01-21 08:36:40 +00:00
2005-11-18 10:56:28 +00:00
2005-02-07 08:17:51 +00:00
2005-01-21 08:36:40 +00:00
2005-01-21 08:36:40 +00:00
2006-07-01 17:59:13 +00:00
2006-02-20 07:54:16 +00:00
2006-10-22 16:21:55 +00:00
2005-01-21 08:36:40 +00:00
2007-03-02 12:55:24 +00:00
2005-02-03 13:33:34 +00:00
2005-01-21 10:48:35 +00:00
2006-12-14 16:40:57 +00:00
2005-06-16 18:46:17 +00:00
2005-01-21 08:36:40 +00:00
2005-01-27 10:30:53 +00:00
2006-06-18 09:53:00 +00:00
2006-02-13 21:34:19 +00:00
2005-02-15 09:27:00 +00:00
2005-11-18 10:56:28 +00:00
2005-11-18 10:56:28 +00:00
2007-04-07 14:36:18 +00:00
2005-02-09 18:07:17 +00:00
2007-02-12 21:30:34 +00:00
2007-04-06 14:25:14 +00:00
2007-02-23 16:50:17 +00:00
2005-01-21 08:36:40 +00:00
2007-02-03 19:29:31 +00:00
2006-09-18 15:24:20 +00:00
2004-11-04 08:29:28 +00:00
2006-09-30 15:14:49 +00:00
2005-10-07 02:32:16 +00:00
2005-02-13 22:25:33 +00:00
2007-04-21 00:05:35 +00:00
2007-06-05 01:10:47 +00:00
2005-01-21 20:50:39 +00:00
2006-09-18 15:24:20 +00:00
2005-10-07 02:32:16 +00:00
2007-05-12 06:33:52 +00:00
2006-12-14 16:40:57 +00:00
2006-01-09 12:51:45 +00:00
2007-02-17 11:31:58 +00:00
2007-05-12 06:41:41 +00:00
2005-01-21 08:36:40 +00:00
2005-11-11 09:57:32 +00:00
2005-02-13 22:25:33 +00:00
2005-02-09 18:07:17 +00:00
2006-06-18 09:53:00 +00:00
2006-06-18 09:53:00 +00:00
2006-04-11 15:30:13 +00:00
2006-12-14 16:40:57 +00:00
2007-03-19 18:27:00 +00:00
2005-01-21 08:36:40 +00:00
2007-04-03 18:57:09 +00:00
2005-02-13 22:25:33 +00:00
2005-10-07 02:32:16 +00:00
2005-10-07 02:32:16 +00:00
2005-02-13 22:25:33 +00:00
2007-02-04 16:59:50 +00:00
2007-05-09 20:05:43 +00:00
2005-10-07 02:32:16 +00:00
2005-11-18 10:56:28 +00:00
2007-02-09 20:53:19 +00:00
2006-09-18 15:24:20 +00:00
2006-11-22 21:30:02 +00:00
2006-12-14 16:40:57 +00:00
2006-11-18 08:07:43 +00:00
2006-11-22 21:30:02 +00:00
2007-02-03 19:29:31 +00:00
2006-11-22 21:30:02 +00:00
2005-02-13 22:25:33 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2005-04-20 07:33:09 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2006-11-27 18:37:45 +00:00
2005-12-21 08:23:04 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2006-11-22 21:30:02 +00:00
2006-02-13 21:34:19 +00:00
2007-02-21 10:00:09 +00:00
2007-05-09 09:02:11 +00:00
2005-01-21 08:36:40 +00:00
2007-03-29 10:11:22 +00:00
2005-10-07 02:32:16 +00:00
2005-06-15 19:29:03 +00:00
2007-06-06 07:58:03 +00:00
2005-11-18 10:56:28 +00:00