include/linux/igmp.h
Source file repositories/reference/linux-study-clean/include/linux/igmp.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/igmp.h- Extension
.h- Size
- 8740 bytes
- Lines
- 297
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/skbuff.hlinux/timer.hlinux/in.hlinux/ip.hlinux/refcount.hlinux/sockptr.huapi/linux/igmp.h
Detected Declarations
struct ip_sf_sockliststruct ip_mc_sockliststruct ip_sf_liststruct ip_mc_listfunction igmpv3_report_hdrfunction igmpv3_query_hdrfunction byfunction igmpv3_mrcfunction igmpv3_qqicfunction igmpv3_exp_field_decodefunction igmpv3_mrtfunction igmpv3_qqifunction ip_mc_may_pullfunction ip_mc_dec_group
Annotated Snippet
struct ip_sf_socklist {
unsigned int sl_max;
unsigned int sl_count;
struct rcu_head rcu;
__be32 sl_addr[] __counted_by(sl_max);
};
#define IP_SFBLOCK 10 /* allocate this many at once */
/* ip_mc_socklist is real list now. Speed is not argument;
this list never used in fast path code
*/
struct ip_mc_socklist {
struct ip_mc_socklist __rcu *next_rcu;
struct ip_mreqn multi;
unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */
struct ip_sf_socklist __rcu *sflist;
struct rcu_head rcu;
};
struct ip_sf_list {
struct ip_sf_list *sf_next;
unsigned long sf_count[2]; /* include/exclude counts */
__be32 sf_inaddr;
unsigned char sf_gsresp; /* include in g & s response? */
unsigned char sf_oldin; /* change state */
unsigned char sf_crcount; /* retrans. left to send */
};
struct ip_mc_list {
struct in_device *interface;
__be32 multiaddr;
unsigned int sfmode;
struct ip_sf_list *sources;
struct ip_sf_list *tomb;
unsigned long sfcount[2];
union {
struct ip_mc_list *next;
struct ip_mc_list __rcu *next_rcu;
};
struct ip_mc_list __rcu *next_hash;
struct timer_list timer;
int users;
refcount_t refcnt;
spinlock_t lock;
char tm_running;
char reporter;
char unsolicit_count;
char loaded;
unsigned char gsquery; /* check source marks? */
unsigned char crcount;
unsigned long mca_cstamp;
unsigned long mca_tstamp;
struct rcu_head rcu;
};
/* RFC3376, relevant sections:
* - 4.1.1. Maximum Response Code
* - 4.1.7. QQIC (Querier's Query Interval Code)
*
* For both MRC and QQIC, values >= 128 use the same floating-point
* encoding as follows:
*
* 0 1 2 3 4 5 6 7
* +-+-+-+-+-+-+-+-+
* |1| exp | mant |
* +-+-+-+-+-+-+-+-+
*/
#define IGMPV3_FP_EXP(value) (((value) >> 4) & 0x07)
#define IGMPV3_FP_MAN(value) ((value) & 0x0f)
/* IGMPv3 floating-point exponential field min threshold */
#define IGMPV3_EXP_MIN_THRESHOLD 128
/* IGMPv3 FP max threshold (mant = 0xF, exp = 7) -> 31744 */
#define IGMPV3_EXP_MAX_THRESHOLD 31744
/* V3 exponential field encoding */
/* IGMPv3 MRC/QQIC 8-bit exponential field encode
*
* RFC3376, 4.1.1 & 4.1.7. defines only the decoding formula:
* MRT/QQI = (mant | 0x10) << (exp + 3)
*
* but does NOT define the encoding procedure. To derive exponent:
*
* For any value of mantissa and exponent, the decoding formula
* indicates that the "hidden bit" (0x10) is shifted 4 bits left
* to sit above the 4-bit mantissa. The RFC again shifts this
* entire block left by (exp + 3) to reconstruct the value.
Annotation
- Immediate include surface: `linux/skbuff.h`, `linux/timer.h`, `linux/in.h`, `linux/ip.h`, `linux/refcount.h`, `linux/sockptr.h`, `uapi/linux/igmp.h`.
- Detected declarations: `struct ip_sf_socklist`, `struct ip_mc_socklist`, `struct ip_sf_list`, `struct ip_mc_list`, `function igmpv3_report_hdr`, `function igmpv3_query_hdr`, `function by`, `function igmpv3_mrc`, `function igmpv3_qqic`, `function igmpv3_exp_field_decode`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.