tools/testing/selftests/bpf/progs/test_cls_redirect.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/progs/test_cls_redirect.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/progs/test_cls_redirect.h- Extension
.h- Size
- 1498 bytes
- Lines
- 64
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
stdbool.hstddef.hstdint.hstring.hlinux/if_ether.hlinux/in.hlinux/ip.hlinux/ipv6.hnetinet/udp.h
Detected Declarations
struct gre_base_hdrstruct guehdrstruct unigue
Annotated Snippet
struct gre_base_hdr {
uint16_t flags;
uint16_t protocol;
} __attribute__((packed));
struct guehdr {
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
uint8_t hlen : 5, control : 1, variant : 2;
#else
uint8_t variant : 2, control : 1, hlen : 5;
#endif
uint8_t proto_ctype;
uint16_t flags;
};
struct unigue {
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
uint8_t _r : 2, last_hop_gre : 1, forward_syn : 1, version : 4;
#else
uint8_t version : 4, forward_syn : 1, last_hop_gre : 1, _r : 2;
#endif
uint8_t reserved;
uint8_t next_hop;
uint8_t hop_count;
// Next hops go here
} __attribute__((packed));
typedef struct {
struct ethhdr eth;
struct iphdr ip;
struct gre_base_hdr gre;
} __attribute__((packed)) encap_gre_t;
typedef struct {
struct ethhdr eth;
struct iphdr ip;
struct udphdr udp;
struct guehdr gue;
struct unigue unigue;
} __attribute__((packed)) encap_headers_t;
Annotation
- Immediate include surface: `stdbool.h`, `stddef.h`, `stdint.h`, `string.h`, `linux/if_ether.h`, `linux/in.h`, `linux/ip.h`, `linux/ipv6.h`.
- Detected declarations: `struct gre_base_hdr`, `struct guehdr`, `struct unigue`.
- Atlas domain: Support Tooling And Documentation / tools.
- 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.