tools/testing/selftests/net/ioam6_parser.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/ioam6_parser.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/ioam6_parser.c- Extension
.c- Size
- 26708 bytes
- Lines
- 1102
- 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
arpa/inet.herrno.hlimits.hlinux/const.hlinux/if_ether.hlinux/ioam6.hlinux/ipv6.hstdbool.hstdlib.hstring.hunistd.h
Detected Declarations
struct ioam_configfunction check_headerfunction check_datafunction check_ioam_tracefunction str2idfunction ipv6_addr_equalfunction get_u32function get_u16function get_u8function main
Annotated Snippet
struct ioam_config {
__u32 id;
__u64 wide;
__u16 ingr_id;
__u16 egr_id;
__u32 ingr_wide;
__u32 egr_wide;
__u32 ns_data;
__u64 ns_wide;
__u32 sc_id;
__u8 hlim;
char *sc_data;
};
/*
* Be careful if you modify structs below - everything MUST be kept synchronized
* with configurations inside ioam6.sh and always reflect the same.
*/
static struct ioam_config node1 = {
.id = 1,
.wide = 11111111,
.ingr_id = 0xffff, /* default value */
.egr_id = 101,
.ingr_wide = 0xffffffff, /* default value */
.egr_wide = 101101,
.ns_data = 0xdeadbeef,
.ns_wide = 0xcafec0caf00dc0de,
.sc_id = 777,
.sc_data = "something that will be 4n-aligned",
.hlim = 64,
};
static struct ioam_config node2 = {
.id = 2,
.wide = 22222222,
.ingr_id = 201,
.egr_id = 202,
.ingr_wide = 201201,
.egr_wide = 202202,
.ns_data = 0xffffffff, /* default value */
.ns_wide = 0xffffffffffffffff, /* default value */
.sc_id = 0xffffff, /* default value */
.sc_data = NULL,
.hlim = 63,
};
enum {
/**********
* OUTPUT *
**********/
__TEST_OUT_MIN,
TEST_OUT_UNDEF_NS,
TEST_OUT_NO_ROOM,
TEST_OUT_NO_ROOM_OSS,
TEST_OUT_BIT0,
TEST_OUT_BIT1,
TEST_OUT_BIT2,
TEST_OUT_BIT3,
TEST_OUT_BIT4,
TEST_OUT_BIT5,
TEST_OUT_BIT6,
TEST_OUT_BIT7,
TEST_OUT_BIT8,
TEST_OUT_BIT9,
TEST_OUT_BIT10,
TEST_OUT_BIT11,
TEST_OUT_BIT22,
TEST_OUT_SIZE4,
TEST_OUT_SIZE8,
TEST_OUT_SIZE12,
TEST_OUT_SIZE16,
TEST_OUT_SIZE20,
TEST_OUT_SIZE24,
TEST_OUT_SIZE28,
TEST_OUT_SIZE32,
TEST_OUT_SIZE36,
TEST_OUT_SIZE40,
TEST_OUT_SIZE44,
TEST_OUT_SIZE48,
TEST_OUT_SIZE52,
TEST_OUT_SIZE56,
TEST_OUT_SIZE60,
TEST_OUT_SIZE64,
TEST_OUT_SIZE68,
TEST_OUT_SIZE72,
TEST_OUT_SIZE76,
TEST_OUT_SIZE80,
TEST_OUT_SIZE84,
Annotation
- Immediate include surface: `arpa/inet.h`, `errno.h`, `limits.h`, `linux/const.h`, `linux/if_ether.h`, `linux/ioam6.h`, `linux/ipv6.h`, `stdbool.h`.
- Detected declarations: `struct ioam_config`, `function check_header`, `function check_data`, `function check_ioam_trace`, `function str2id`, `function ipv6_addr_equal`, `function get_u32`, `function get_u16`, `function get_u8`, `function main`.
- 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.