include/net/cipso_ipv4.h
Source file repositories/reference/linux-study-clean/include/net/cipso_ipv4.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/cipso_ipv4.h- Extension
.h- Size
- 7597 bytes
- Lines
- 309
- 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/types.hlinux/rcupdate.hlinux/list.hlinux/net.hlinux/skbuff.hnet/netlabel.hnet/request_sock.hlinux/atomic.hlinux/refcount.hlinux/unaligned.h
Detected Declarations
struct cipso_v4_doistruct cipso_v4_std_map_tblfunction cipso_v4_doi_addfunction cipso_v4_doi_freefunction cipso_v4_doi_removefunction cipso_v4_doi_walkfunction cipso_v4_cache_invalidatefunction cipso_v4_cache_addfunction cipso_v4_errorfunction cipso_v4_getattrfunction cipso_v4_sock_setattrfunction cipso_v4_sock_delattrfunction cipso_v4_req_setattrfunction cipso_v4_req_delattrfunction cipso_v4_skbuff_setattrfunction cipso_v4_skbuff_delattrfunction cipso_v4_skbuff_getattrfunction cipso_v4_validate
Annotated Snippet
struct cipso_v4_doi {
u32 doi;
u32 type;
union {
struct cipso_v4_std_map_tbl *std;
} map;
u8 tags[CIPSO_V4_TAG_MAXCNT];
refcount_t refcount;
struct list_head list;
struct rcu_head rcu;
};
/* Standard CIPSO mapping table */
/* NOTE: the highest order bit (i.e. 0x80000000) is an 'invalid' flag, if the
* bit is set then consider that value as unspecified, meaning the
* mapping for that particular level/category is invalid */
struct cipso_v4_std_map_tbl {
struct {
u32 *cipso;
u32 *local;
u32 cipso_size;
u32 local_size;
} lvl;
struct {
u32 *cipso;
u32 *local;
u32 cipso_size;
u32 local_size;
} cat;
};
/*
* Sysctl Variables
*/
#ifdef CONFIG_NETLABEL
extern int cipso_v4_cache_enabled;
extern int cipso_v4_cache_bucketsize;
extern int cipso_v4_rbm_optfmt;
extern int cipso_v4_rbm_strictvalid;
#endif
/*
* DOI List Functions
*/
#ifdef CONFIG_NETLABEL
int cipso_v4_doi_add(struct cipso_v4_doi *doi_def,
struct netlbl_audit *audit_info);
void cipso_v4_doi_free(struct cipso_v4_doi *doi_def);
int cipso_v4_doi_remove(u32 doi, struct netlbl_audit *audit_info);
struct cipso_v4_doi *cipso_v4_doi_getdef(u32 doi);
void cipso_v4_doi_putdef(struct cipso_v4_doi *doi_def);
int cipso_v4_doi_walk(u32 *skip_cnt,
int (*callback) (struct cipso_v4_doi *doi_def, void *arg),
void *cb_arg);
#else
static inline int cipso_v4_doi_add(struct cipso_v4_doi *doi_def,
struct netlbl_audit *audit_info)
{
return -ENOSYS;
}
static inline void cipso_v4_doi_free(struct cipso_v4_doi *doi_def)
{
return;
}
static inline int cipso_v4_doi_remove(u32 doi,
struct netlbl_audit *audit_info)
{
return 0;
}
static inline struct cipso_v4_doi *cipso_v4_doi_getdef(u32 doi)
{
return NULL;
}
static inline int cipso_v4_doi_walk(u32 *skip_cnt,
int (*callback) (struct cipso_v4_doi *doi_def, void *arg),
void *cb_arg)
{
return 0;
}
#endif /* CONFIG_NETLABEL */
/*
* Label Mapping Cache Functions
Annotation
- Immediate include surface: `linux/types.h`, `linux/rcupdate.h`, `linux/list.h`, `linux/net.h`, `linux/skbuff.h`, `net/netlabel.h`, `net/request_sock.h`, `linux/atomic.h`.
- Detected declarations: `struct cipso_v4_doi`, `struct cipso_v4_std_map_tbl`, `function cipso_v4_doi_add`, `function cipso_v4_doi_free`, `function cipso_v4_doi_remove`, `function cipso_v4_doi_walk`, `function cipso_v4_cache_invalidate`, `function cipso_v4_cache_add`, `function cipso_v4_error`, `function cipso_v4_getattr`.
- 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.