include/net/bpf_sk_storage.h
Source file repositories/reference/linux-study-clean/include/net/bpf_sk_storage.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/bpf_sk_storage.h- Extension
.h- Size
- 1780 bytes
- Lines
- 64
- 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/rculist.hlinux/list.hlinux/hash.hlinux/types.hlinux/spinlock.hlinux/bpf.hnet/sock.huapi/linux/sock_diag.huapi/linux/btf.hlinux/bpf_local_storage.h
Detected Declarations
struct sockstruct bpf_local_storage_elemstruct bpf_sk_storage_diagstruct sk_buffstruct nlattrfunction bpf_sk_storage_clonefunction bpf_sk_storage_diag_allocfunction bpf_sk_storage_diag_free
Annotated Snippet
#ifndef _BPF_SK_STORAGE_H
#define _BPF_SK_STORAGE_H
#include <linux/rculist.h>
#include <linux/list.h>
#include <linux/hash.h>
#include <linux/types.h>
#include <linux/spinlock.h>
#include <linux/bpf.h>
#include <net/sock.h>
#include <uapi/linux/sock_diag.h>
#include <uapi/linux/btf.h>
#include <linux/bpf_local_storage.h>
struct sock;
void bpf_sk_storage_free(struct sock *sk);
extern const struct bpf_func_proto bpf_sk_storage_get_proto;
extern const struct bpf_func_proto bpf_sk_storage_delete_proto;
extern const struct bpf_func_proto bpf_sk_storage_get_tracing_proto;
extern const struct bpf_func_proto bpf_sk_storage_delete_tracing_proto;
struct bpf_local_storage_elem;
struct bpf_sk_storage_diag;
struct sk_buff;
struct nlattr;
#ifdef CONFIG_BPF_SYSCALL
int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk);
struct bpf_sk_storage_diag *
bpf_sk_storage_diag_alloc(const struct nlattr *nla_stgs);
void bpf_sk_storage_diag_free(struct bpf_sk_storage_diag *diag);
int bpf_sk_storage_diag_put(struct bpf_sk_storage_diag *diag,
struct sock *sk, struct sk_buff *skb,
int stg_array_type,
unsigned int *res_diag_size);
#else
static inline int bpf_sk_storage_clone(const struct sock *sk,
struct sock *newsk)
{
return 0;
}
static inline struct bpf_sk_storage_diag *
bpf_sk_storage_diag_alloc(const struct nlattr *nla)
{
return NULL;
}
static inline void bpf_sk_storage_diag_free(struct bpf_sk_storage_diag *diag)
{
}
static inline int bpf_sk_storage_diag_put(struct bpf_sk_storage_diag *diag,
struct sock *sk, struct sk_buff *skb,
int stg_array_type,
unsigned int *res_diag_size)
{
return 0;
}
#endif
#endif /* _BPF_SK_STORAGE_H */
Annotation
- Immediate include surface: `linux/rculist.h`, `linux/list.h`, `linux/hash.h`, `linux/types.h`, `linux/spinlock.h`, `linux/bpf.h`, `net/sock.h`, `uapi/linux/sock_diag.h`.
- Detected declarations: `struct sock`, `struct bpf_local_storage_elem`, `struct bpf_sk_storage_diag`, `struct sk_buff`, `struct nlattr`, `function bpf_sk_storage_clone`, `function bpf_sk_storage_diag_alloc`, `function bpf_sk_storage_diag_free`.
- 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.