freebsd-skq/sys/netinet
bms ffd77d9ba5 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
..
libalias o Kill EOLWS while I'm here. 2007-04-30 20:26:11 +00:00
accf_data.c
accf_http.c
icmp6.h - Disabled responding to NI queries from a global address by default as 2007-05-17 21:20:24 +00:00
icmp_var.h
if_atm.c Add newline to debuging printf. 2005-08-26 15:27:18 +00:00
if_atm.h
if_ether.c Move universally to ANSI C function declarations, with relatively 2007-05-10 15:58:48 +00:00
if_ether.h Add CARP (Common Address Redundancy Protocol), which allows multiple 2005-02-22 13:04:05 +00:00
igmp_var.h Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
igmp.c Improve style(9) conformance of igmp.c. 2006-12-04 00:41:48 +00:00
igmp.h Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
in_cksum.c Move universally to ANSI C function declarations, with relatively 2007-05-10 15:58:48 +00:00
in_gif.c Move universally to ANSI C function declarations, with relatively 2007-05-10 15:58:48 +00:00
in_gif.h
in_mcast.c Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
in_pcb.c Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
in_pcb.h Reduce network stack oddness: implement .pru_sockaddr and .pru_peeraddr 2007-05-11 10:20:51 +00:00
in_proto.c Build PIM by default as part of the IPv4 multicast forwarding path. 2007-02-10 13:59:13 +00:00
in_rmx.c Move universally to ANSI C function declarations, with relatively 2007-05-10 15:58:48 +00:00
in_systm.h
in_var.h Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
in.c Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
in.h Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
ip6.h move RFC3542 related definitions into ip6.h. 2005-07-20 10:30:52 +00:00
ip_carp.c Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
ip_carp.h Make sure that carp_header is 36 bytes long 2006-12-01 18:37:41 +00:00
ip_divert.c Reduce network stack oddness: implement .pru_sockaddr and .pru_peeraddr 2007-05-11 10:20:51 +00:00
ip_divert.h
ip_dummynet.c Move universally to ANSI C function declarations, with relatively 2007-05-10 15:58:48 +00:00
ip_dummynet.h When sending a packet from dummynet, indicate that we're forwarding 2006-02-14 06:36:39 +00:00
ip_ecn.c Move universally to ANSI C function declarations, with relatively 2007-05-10 15:58:48 +00:00
ip_ecn.h
ip_encap.c Move universally to ANSI C function declarations, with relatively 2007-05-10 15:58:48 +00:00
ip_encap.h
ip_fastfwd.c In IPv4 fast forwarding path, send ICMP unreachable messages for 2007-03-18 23:05:20 +00:00
ip_fw2.c Move universally to ANSI C function declarations, with relatively 2007-05-10 15:58:48 +00:00
ip_fw_pfil.c Summer of Code 2005: improve libalias - part 2 of 2 2006-12-29 21:59:17 +00:00
ip_fw.h Add support for filtering on Routing Header Type 0 and 2007-05-04 11:15:41 +00:00
ip_gre.c Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
ip_gre.h Fix stack corruptions on amd64. 2006-01-21 10:44:34 +00:00
ip_icmp.c Move universally to ANSI C function declarations, with relatively 2007-05-10 15:58:48 +00:00
ip_icmp.h Pass icmp_error() the MTU argument directly instead of 2005-05-04 13:09:19 +00:00
ip_id.c Minor white space and style cleanups. 2007-05-11 11:05:30 +00:00
ip_input.c Remove leading spaces before tabs spotted thanks to silby using 2007-05-16 20:46:58 +00:00
ip_ipsec.c Move universally to ANSI C function declarations, with relatively 2007-05-10 15:58:48 +00:00
ip_ipsec.h Move the IPSEC related code blocks to their own file to unclutter 2006-02-01 13:55:03 +00:00
ip_mroute.c Move universally to ANSI C function declarations, with relatively 2007-05-10 15:58:48 +00:00
ip_mroute.h Store the cached route in vifp in the normal send_packet() case. 2007-02-08 23:05:08 +00:00
ip_options.c Normalize style a bit: reduce pseudo-randomness of comment layout and 2007-05-11 10:48:30 +00:00
ip_options.h Normalize style a bit: reduce pseudo-randomness of comment layout and 2007-05-11 10:48:30 +00:00
ip_output.c Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
ip_var.h Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
ip.h White space and style cleanup. 2007-05-11 11:00:48 +00:00
ipprotosw.h
pim_var.h Remove public declarations of variables that were forgotten when they were 2005-08-10 07:10:02 +00:00
pim.h
raw_ip.c Eliminate now-unused SUSER_ALLOWJAIL arguments to priv_check_cred(); in 2007-06-12 00:12:01 +00:00
sctp_asconf.c - RTO was not being initialized to 0, thus the rtt calculation 2007-06-08 10:57:11 +00:00
sctp_asconf.h - Copyright change, cisco's silly tool wants it to say: 2007-05-08 17:01:12 +00:00
sctp_auth.c - fix send_failed notification contents 2007-06-09 13:46:57 +00:00
sctp_auth.h - fix send_failed notification contents 2007-06-09 13:46:57 +00:00
sctp_bsd_addr.c - Fix a memory overwrite when the mapping array 2007-05-30 17:39:45 +00:00
sctp_bsd_addr.h - Fixes so we won't try to start a timer when we 2007-05-29 09:29:03 +00:00
sctp_constants.h - Restructure so bindx functions are not done inline to socket option 2007-06-12 11:21:00 +00:00
sctp_crc32.c - Copyright change, cisco's silly tool wants it to say: 2007-05-08 17:01:12 +00:00
sctp_crc32.h - Copyright change, cisco's silly tool wants it to say: 2007-05-08 17:01:12 +00:00
sctp_header.h - Restructure so bindx functions are not done inline to socket option 2007-06-12 11:21:00 +00:00
sctp_indata.c - fix initial pcb vrf setting when the initial vrf is not the 2007-06-02 11:05:08 +00:00
sctp_indata.h - Copyright change, cisco's silly tool wants it to say: 2007-05-08 17:01:12 +00:00
sctp_input.c - Restructure so bindx functions are not done inline to socket option 2007-06-12 11:21:00 +00:00
sctp_input.h - Take out the broken table-id concept. Panda Routers have a M-VRF 2007-06-01 11:19:54 +00:00
sctp_lock_bsd.h - Fixes so we won't try to start a timer when we 2007-05-29 09:29:03 +00:00
sctp_os_bsd.h - Restructure so bindx functions are not done inline to socket option 2007-06-12 11:21:00 +00:00
sctp_os.h - Copyright change, cisco's silly tool wants it to say: 2007-05-08 17:01:12 +00:00
sctp_output.c - Restructure so bindx functions are not done inline to socket option 2007-06-12 11:21:00 +00:00
sctp_output.h - Take out the broken table-id concept. Panda Routers have a M-VRF 2007-06-01 11:19:54 +00:00
sctp_pcb.c Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
sctp_pcb.h - fix initial pcb vrf setting when the initial vrf is not the 2007-06-02 11:05:08 +00:00
sctp_peeloff.c - fixed autclose to not allow setting on 1-2-1 model. 2007-05-28 11:17:24 +00:00
sctp_peeloff.h - Copyright change, cisco's silly tool wants it to say: 2007-05-08 17:01:12 +00:00
sctp_structs.h - Take out the broken table-id concept. Panda Routers have a M-VRF 2007-06-01 11:19:54 +00:00
sctp_sysctl.c - Fixes a case where doing a sysctl would leave locks held 2007-06-06 00:40:41 +00:00
sctp_sysctl.h - Copyright change, cisco's silly tool wants it to say: 2007-05-08 17:01:12 +00:00
sctp_timer.c - Take out the broken table-id concept. Panda Routers have a M-VRF 2007-06-01 11:19:54 +00:00
sctp_timer.h - RTO was not being initialized to 0, thus the rtt calculation 2007-06-08 10:57:11 +00:00
sctp_uio.h - fix send_failed notification contents 2007-06-09 13:46:57 +00:00
sctp_usrreq.c - Restructure so bindx functions are not done inline to socket option 2007-06-12 11:21:00 +00:00
sctp_var.h - Copyright change, cisco's silly tool wants it to say: 2007-05-08 17:01:12 +00:00
sctp.h - Restructure so bindx functions are not done inline to socket option 2007-06-12 11:21:00 +00:00
sctputil.c - Restructure so bindx functions are not done inline to socket option 2007-06-12 11:21:00 +00:00
sctputil.h - Restructure so bindx functions are not done inline to socket option 2007-06-12 11:21:00 +00:00
tcp_debug.c Rather than selectively zeroing fields in the tcp_debug structure 2007-05-07 14:05:23 +00:00
tcp_debug.h o Use a define for a buffer size. 2007-03-24 22:15:02 +00:00
tcp_fsm.h Minor white space/style normalization. 2007-05-11 10:50:31 +00:00
tcp_hostcache.c Replace a constant with an already defined symbolic name for it. 2007-06-08 13:43:28 +00:00
tcp_input.c Fix a case in tcp_do_segment() where tcp_update_sack_list() would 2007-06-10 21:07:21 +00:00
tcp_output.c Make the handling of the tcp window explicit for the SYN_SENT case 2007-06-09 21:19:12 +00:00
tcp_reass.c Complete the (mechanical) move of the TCP reassembly and timewait 2007-05-13 22:16:13 +00:00
tcp_sack.c Coalesce two identical UCB licenses into a single license instance with 2007-05-11 11:21:43 +00:00
tcp_seq.h Remove T/TCP RFC1644 Connection Count comparison macros. They are no longer 2006-06-18 14:24:12 +00:00
tcp_subr.c Eliminate now-unused SUSER_ALLOWJAIL arguments to priv_check_cred(); in 2007-06-12 00:12:01 +00:00
tcp_syncache.c Correctly print SEQ and IRS in the corresponding log message in 2007-06-06 22:10:12 +00:00
tcp_timer.c Handle a race condition on >2 core machines in tcp_timer() when 2007-06-09 17:49:39 +00:00
tcp_timer.h Remove now unused stuff forgotten in the previous commit. 2007-05-16 17:55:22 +00:00
tcp_timewait.c Despite several examples in the kernel, the third argument of 2007-06-04 18:25:08 +00:00
tcp_usrreq.c (1) In tcp_usrclosed(), tp can never become NULL, so don't test for NULL 2007-05-31 12:06:02 +00:00
tcp_var.h Refactor and rewrite in parts the SYN handling code on listen sockets 2007-05-28 11:03:53 +00:00
tcp.h The printf %b list in PRINT_TH_FLAGS has to be in octal numbering. 2007-05-25 21:28:49 +00:00
tcpip.h
udp_usrreq.c Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
udp_var.h Import rewrite of IPv4 socket multicast layer to support source-specific 2007-06-12 16:24:56 +00:00
udp.h Gratuitous UDP restyling toward style(9) in 7.x. 2007-02-20 10:13:11 +00:00