include/linux/pim.h
Source file repositories/reference/linux-study-clean/include/linux/pim.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/pim.h- Extension
.h- Size
- 2737 bytes
- Lines
- 97
- 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.hasm/byteorder.h
Detected Declarations
struct pimhdrstruct pimreghdrfunction ipmr_pimsm_enabledfunction pim_hdr_versionfunction pim_hdr_typefunction pim_ipv4_all_pim_routers
Annotated Snippet
struct pimhdr {
__u8 type;
__u8 reserved;
__be16 csum;
};
/* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */
struct pimreghdr {
__u8 type;
__u8 reserved;
__be16 csum;
__be32 flags;
};
int pim_rcv_v1(struct sk_buff *skb);
static inline bool ipmr_pimsm_enabled(void)
{
return IS_BUILTIN(CONFIG_IP_PIMSM_V1) || IS_BUILTIN(CONFIG_IP_PIMSM_V2);
}
static inline struct pimhdr *pim_hdr(const struct sk_buff *skb)
{
return (struct pimhdr *)skb_transport_header(skb);
}
static inline u8 pim_hdr_version(const struct pimhdr *pimhdr)
{
return pimhdr->type >> 4;
}
static inline u8 pim_hdr_type(const struct pimhdr *pimhdr)
{
return pimhdr->type & 0xf;
}
/* check if the address is 224.0.0.13, RFC7761 sec 4.3.1 */
static inline bool pim_ipv4_all_pim_routers(__be32 addr)
{
return addr == htonl(0xE000000D);
}
#endif
Annotation
- Immediate include surface: `linux/skbuff.h`, `asm/byteorder.h`.
- Detected declarations: `struct pimhdr`, `struct pimreghdr`, `function ipmr_pimsm_enabled`, `function pim_hdr_version`, `function pim_hdr_type`, `function pim_ipv4_all_pim_routers`.
- 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.