include/net/seg6_hmac.h
Source file repositories/reference/linux-study-clean/include/net/seg6_hmac.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/seg6_hmac.h- Extension
.h- Size
- 1663 bytes
- Lines
- 61
- 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
crypto/sha1.hcrypto/sha2.hnet/flow.hnet/ip6_fib.hnet/sock.hlinux/ip.hlinux/ipv6.hlinux/route.hnet/seg6.hlinux/seg6_hmac.hlinux/rhashtable-types.h
Detected Declarations
struct seg6_hmac_infofunction seg6_hmac_net_initfunction seg6_hmac_net_exit
Annotated Snippet
struct seg6_hmac_info {
struct rhash_head node;
struct rcu_head rcu;
u32 hmackeyid;
/* The raw key, kept only so it can be returned back to userspace */
char secret[SEG6_HMAC_SECRET_LEN];
u8 slen;
u8 alg_id;
/* The prepared key, which the calculations actually use */
union {
struct hmac_sha1_key sha1;
struct hmac_sha256_key sha256;
} key;
};
extern int seg6_hmac_compute(struct seg6_hmac_info *hinfo,
struct ipv6_sr_hdr *hdr, struct in6_addr *saddr,
u8 *output);
extern struct seg6_hmac_info *seg6_hmac_info_lookup(struct net *net, u32 key);
extern int seg6_hmac_info_add(struct net *net, u32 key,
struct seg6_hmac_info *hinfo);
extern int seg6_hmac_info_del(struct net *net, u32 key);
extern int seg6_push_hmac(struct net *net, struct in6_addr *saddr,
struct ipv6_sr_hdr *srh);
extern bool seg6_hmac_validate_skb(struct sk_buff *skb);
#ifdef CONFIG_IPV6_SEG6_HMAC
extern int seg6_hmac_net_init(struct net *net);
extern void seg6_hmac_net_exit(struct net *net);
#else
static inline int seg6_hmac_net_init(struct net *net) { return 0; }
static inline void seg6_hmac_net_exit(struct net *net) {}
#endif
#endif
Annotation
- Immediate include surface: `crypto/sha1.h`, `crypto/sha2.h`, `net/flow.h`, `net/ip6_fib.h`, `net/sock.h`, `linux/ip.h`, `linux/ipv6.h`, `linux/route.h`.
- Detected declarations: `struct seg6_hmac_info`, `function seg6_hmac_net_init`, `function seg6_hmac_net_exit`.
- 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.