aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/igmp_var.h
Commit message (Collapse)AuthorAgeFilesLines
* igmp: convert igmpstat to use PCPU countersMitchell Horne2020-11-081-2/+7
| | | | | | | | | | | | | | | | | | | | Currently there is no locking done to protect this structure. It is likely okay due to the low-volume nature of IGMP, but allows for the possibility of underflow. This appears to be one of the only holdouts of the conversion to counter(9) which was done for most protocol stat structures around 2013. This also updates the visibility of this stats structure so that it can be consumed from elsewhere in the kernel, consistent with the vast majority of VNET_PCPUSTAT structures. Reviewed by: kp Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27023 Notes: svn path=/head/; revision=367493
* Separate list manipulation locking from state change in multicastStephen Hurd2018-05-021-1/+0
| | | | | | | | | | | | | | Multicast incorrectly calls in to drivers with a mutex held causing drivers to have to go through all manner of contortions to use a non sleepable lock. Serialize multicast updates instead. Submitted by: mmacy <mmacy@mattmacy.io> Reviewed by: shurd, sbruno Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D14969 Notes: svn path=/head/; revision=333175
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* - Rename 'struct igmp_ifinfo' into 'struct igmp_ifsoftc', since it reallyGleb Smirnoff2015-02-191-35/+46
| | | | | | | | | | | | | | | | represents a context. - Preserve name 'struct igmp_ifinfo' for a new structure, that will be stable API between userland and kernel. - Make sysctl_igmp_ifinfo() return the new 'struct igmp_ifinfo', instead of old one, which had a bunch of internal kernel structures in it. - Move all above declarations from in_var.h to igmp_var.h, since they are private to IGMP code. Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=279026
* Merge 'struct ip6protosw' and 'struct protosw' into one. Now we haveKevin Lo2014-08-081-1/+1
| | | | | | | | | | only one protocol switch structure that is shared between ipv4 and ipv6. Phabric: D476 Reviewed by: jhb Notes: svn path=/head/; revision=269699
* Remove more constants related to static sysctl nodes. The MAXID constantsJohn Baldwin2014-02-251-2/+1
| | | | | | | | | | | were primarily used to size the sysctl name list macros that were removed in r254295. A few other constants either did not have an associated sysctl node, or the associated node used OID_AUTO instead. PR: ports/184525 (exp-run) Notes: svn path=/head/; revision=262489
* Remove most of the remaining sysctl name list macros. They were onlyJohn Baldwin2013-08-261-4/+0
| | | | | | | | | | | ever intended for use in sysctl(8) and it has not used them for many years. Reviewed by: bde Tested by: exp-run by bdrewery Notes: svn path=/head/; revision=254925
* Update stats in struct igmpstat using two new macros:Robert Watson2009-04-121-0/+5
| | | | | | | | | | | | IGMPSTAT_ADD() and IGMPSTAT_INC(), rather than directly manipulating the fields of the structure. This will make it easier to change the implementation of these statistics, such as using per-CPU versions of the data structures. MFC after: 3 days Notes: svn path=/head/; revision=190965
* Merge IGMPv3 and Source-Specific Multicast (SSM) to the FreeBSDBruce M Simpson2009-03-091-68/+129
| | | | | | | | | | | | | | IPv4 stack. Diffs are minimized against p4. PCS has been used for some protocol verification, more widespread testing of recorded sources in Group-and-Source queries is needed. sizeof(struct igmpstat) has changed. __FreeBSD_version is bumped to 800070. Notes: svn path=/head/; revision=189592
* Import rewrite of IPv4 socket multicast layer to support source-specificBruce M Simpson2007-06-121-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=170613
* /* -> /*- for license, minor formatting changesWarner Losh2005-01-071-1/+1
| | | | Notes: svn path=/head/; revision=139823
* Remove advertising clause from University of California Regent'sWarner Losh2004-04-071-4/+0
| | | | | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson Notes: svn path=/head/; revision=128019
* Remove __P.Alfred Perlstein2002-03-191-6/+6
| | | | Notes: svn path=/head/; revision=92723
* Patches from Keiichi SHIMA <keiichi@iij.ad.jp>Julian Elischer2001-09-031-1/+1
| | | | | | | | | to make ip use the standard protosw structure again. Obtained from: Well, KAME I guess. Notes: svn path=/head/; revision=82884
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-291-1/+1
| | | | | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come. Notes: svn path=/head/; revision=55205
* IPSEC support in the kernel.Yoshinobu Inoue1999-12-221-1/+1
| | | | | | | | | | | pr_input() routines prototype is also changed to support IPSEC and IPV6 chained protocol headers. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project Notes: svn path=/head/; revision=55009
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Move kernel-only declaration inside #ifdef KERNEL section.Garrett Wollman1999-03-061-7/+5
| | | | Notes: svn path=/head/; revision=44511
* * Change sysctl from using linker_set to construct its tree using SLISTs.Doug Rabson1999-02-161-1/+3
| | | | | | | | | | | | | This makes it possible to change the sysctl tree at runtime. * Change KLD to find and register any sysctl nodes contained in the loaded file and to unregister them when the file is unloaded. Reviewed by: Archie Cobbs <archie@whistle.com>, Peter Wemm <peter@netplex.com.au> (well they looked at it anyway) Notes: svn path=/head/; revision=44078
* Some staticized variables were still declared to be extern.Bruce Evans1997-09-071-3/+1
| | | | Notes: svn path=/head/; revision=29179
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* IGMPv2 routines rewritten, to be more compact and to fully complyBill Fenner1996-03-141-2/+22
| | | | | | | with the IGMPv2 Internet Draft (including Router Alert IP option) Notes: svn path=/head/; revision=14622
* Fix a bunch of spelling errors in the comment fields ofMike Pritchard1996-01-301-2/+2
| | | | | | | a bunch of system include files. Notes: svn path=/head/; revision=13765
* New style sysctl & staticize alot of stuff.Poul-Henning Kamp1995-11-141-2/+1
| | | | Notes: svn path=/head/; revision=12296
* Kernel side of 3.5 multicast routing code, based on work by Bill FennerGarrett Wollman1995-06-131-11/+11
| | | | | | | | and other work done here. The LKM support is probably broken, but it still compiles and will be fixed later. Notes: svn path=/head/; revision=9209
* Add lots of useful MIB variables and a few not-so-useful ones forGarrett Wollman1995-02-161-1/+15
| | | | | | | completeness. Notes: svn path=/head/; revision=6472
* Initial get-the-easy-case-working upgrade of the multicast codeGarrett Wollman1994-09-061-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to something more recent than the ancient 1.2 release contained in 4.4. This code has the following advantages as compared to previous versions (culled from the README file for the SunOS release): - True multicast delivery - Configurable rate-limiting of forwarded multicast traffic on each physical interface or tunnel, using a token-bucket limiter. - Simplistic classification of packets for prioritized dropping. - Administrative scoping of multicast address ranges. - Faster detection of hosts leaving groups. - Support for multicast traceroute (code not yet available). - Support for RSVP, the Resource Reservation Protocol. What still needs to be done: - The multicast forwarder needs testing. - The multicast routing daemon needs to be ported. - Network interface drivers need to have the `#ifdef MULTICAST' goop ripped out of them. - The IGMP code should probably be bogon-tested. Some notes about the porting process: In some cases, the Berkeley people decided to incorporate functionality from later releases of the multicast code, but then had to do things differently. As a result, if you look at Deering's patches, and then look at our code, it is not always obvious whether the patch even applies. Let the reader beware. I ran ip_mroute.c through several passes of `unifdef' to get rid of useless grot, and to permanently enable the RSVP support, which we will include as standard. Ported by: Garrett Wollman Submitted by: Steve Deering and Ajit Thyagarajan (among others) Notes: svn path=/head/; revision=2531
* Made idempotent.Paul Richards1994-08-211-1/+6
| | | | | | | Submitted by: Paul Notes: svn path=/head/; revision=2169
* Added $Id$David Greenman1994-08-021-0/+1
| | | | Notes: svn path=/head/; revision=1817
* BSD 4.4 Lite Kernel SourcesRodney W. Grimes1994-05-241-0/+85
Notes: svn path=/head/; revision=1541