include/net/if_inet6.h
Source file repositories/reference/linux-study-clean/include/net/if_inet6.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/if_inet6.h- Extension
.h- Size
- 6775 bytes
- Lines
- 277
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
net/snmp.hlinux/ipv6.hlinux/refcount.h
Detected Declarations
struct inet6_ifaddrstruct ip6_sf_sockliststruct ipv6_mc_sockliststruct ip6_sf_liststruct ifmcaddr6struct ipv6_ac_sockliststruct ifacaddr6struct ipv6_devstatstruct inet6_devfunction ipv6_eth_mc_mapfunction ipv6_arcnet_mc_mapfunction ipv6_ib_mc_mapfunction ipv6_ipgre_mc_map
Annotated Snippet
struct inet6_ifaddr {
struct in6_addr addr;
__u32 prefix_len;
__u32 rt_priority;
/* In seconds, relative to tstamp. Expiry is at tstamp + HZ * lft. */
__u32 valid_lft;
__u32 prefered_lft;
refcount_t refcnt;
spinlock_t lock;
int state;
__u32 flags;
__u8 dad_probes;
__u8 stable_privacy_retry;
__u16 scope;
__u64 dad_nonce;
unsigned long cstamp; /* created timestamp */
unsigned long tstamp; /* updated timestamp */
struct delayed_work dad_work;
struct inet6_dev *idev;
struct fib6_info *rt;
struct hlist_node addr_lst;
struct list_head if_list;
/*
* Used to safely traverse idev->addr_list in process context
* if the idev->lock needed to protect idev->addr_list cannot be held.
* In that case, add the items to this list temporarily and iterate
* without holding idev->lock.
* See addrconf_ifdown and dev_forward_change.
*/
struct list_head if_list_aux;
struct list_head tmp_list;
struct inet6_ifaddr *ifpub;
int regen_count;
bool tokenized;
u8 ifa_proto;
struct rcu_head rcu;
struct in6_addr peer_addr;
};
struct ip6_sf_socklist {
unsigned int sl_max;
unsigned int sl_count;
struct rcu_head rcu;
struct in6_addr sl_addr[] __counted_by(sl_max);
};
#define IP6_SFBLOCK 10 /* allocate this many at once */
struct ipv6_mc_socklist {
struct in6_addr addr;
int ifindex;
unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */
struct ipv6_mc_socklist __rcu *next;
struct ip6_sf_socklist __rcu *sflist;
struct rcu_head rcu;
};
struct ip6_sf_list {
struct ip6_sf_list __rcu *sf_next;
struct in6_addr sf_addr;
unsigned long sf_count[2]; /* include/exclude counts */
unsigned char sf_gsresp; /* include in g & s response? */
unsigned char sf_oldin; /* change state */
unsigned char sf_crcount; /* retrans. left to send */
struct rcu_head rcu;
};
#define MAF_TIMER_RUNNING 0x01
#define MAF_LAST_REPORTER 0x02
#define MAF_LOADED 0x04
#define MAF_NOREPORT 0x08
#define MAF_GSQUERY 0x10
struct ifmcaddr6 {
struct in6_addr mca_addr;
struct inet6_dev *idev;
struct ifmcaddr6 __rcu *next;
struct ip6_sf_list __rcu *mca_sources;
Annotation
- Immediate include surface: `net/snmp.h`, `linux/ipv6.h`, `linux/refcount.h`.
- Detected declarations: `struct inet6_ifaddr`, `struct ip6_sf_socklist`, `struct ipv6_mc_socklist`, `struct ip6_sf_list`, `struct ifmcaddr6`, `struct ipv6_ac_socklist`, `struct ifacaddr6`, `struct ipv6_devstat`, `struct inet6_dev`, `function ipv6_eth_mc_map`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- 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.