net/ipv6/ila/ila.h
Source file repositories/reference/linux-study-clean/net/ipv6/ila/ila.h
File Facts
- System
- Linux kernel
- Corpus path
net/ipv6/ila/ila.h- Extension
.h- Size
- 2807 bytes
- Lines
- 127
- 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
linux/errno.hlinux/ip.hlinux/kernel.hlinux/module.hlinux/socket.hlinux/skbuff.hlinux/types.hnet/checksum.hnet/genetlink.hnet/ip.hnet/protocol.huapi/linux/ila.h
Detected Declarations
struct ila_locatorstruct ila_identifierstruct ila_addrstruct ila_paramsstruct ila_netfunction compute_csum_diff8function ila_csum_neutral_set
Annotated Snippet
struct ila_locator {
union {
__u8 v8[8];
__be16 v16[4];
__be32 v32[2];
__be64 v64;
};
};
struct ila_identifier {
union {
struct {
#if defined(__LITTLE_ENDIAN_BITFIELD)
u8 __space:4;
u8 csum_neutral:1;
u8 type:3;
#elif defined(__BIG_ENDIAN_BITFIELD)
u8 type:3;
u8 csum_neutral:1;
u8 __space:4;
#else
#error "Adjust your <asm/byteorder.h> defines"
#endif
u8 __space2[7];
};
__u8 v8[8];
__be16 v16[4];
__be32 v32[2];
__be64 v64;
};
};
#define CSUM_NEUTRAL_FLAG htonl(0x10000000)
struct ila_addr {
union {
struct in6_addr addr;
struct {
struct ila_locator loc;
struct ila_identifier ident;
};
};
};
static inline struct ila_addr *ila_a2i(struct in6_addr *addr)
{
return (struct ila_addr *)addr;
}
struct ila_params {
struct ila_locator locator;
struct ila_locator locator_match;
__wsum csum_diff;
u8 csum_mode;
u8 ident_type;
};
static inline __wsum compute_csum_diff8(const __be32 *from, const __be32 *to)
{
__be32 diff[] = {
~from[0], ~from[1], to[0], to[1],
};
return csum_partial(diff, sizeof(diff), 0);
}
static inline bool ila_csum_neutral_set(struct ila_identifier ident)
{
return !!(ident.csum_neutral);
}
void ila_update_ipv6_locator(struct sk_buff *skb, struct ila_params *p,
bool set_csum_neutral);
void ila_init_saved_csum(struct ila_params *p);
struct ila_net {
struct {
struct rhashtable rhash_table;
spinlock_t *locks; /* Bucket locks for entry manipulation */
unsigned int locks_mask;
bool hooks_registered;
} xlat;
};
int ila_lwt_init(void);
void ila_lwt_fini(void);
int ila_xlat_init_net(struct net *net);
void ila_xlat_pre_exit_net(struct net *net);
Annotation
- Immediate include surface: `linux/errno.h`, `linux/ip.h`, `linux/kernel.h`, `linux/module.h`, `linux/socket.h`, `linux/skbuff.h`, `linux/types.h`, `net/checksum.h`.
- Detected declarations: `struct ila_locator`, `struct ila_identifier`, `struct ila_addr`, `struct ila_params`, `struct ila_net`, `function compute_csum_diff8`, `function ila_csum_neutral_set`.
- 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.