Features

Everything in views, nothing in copies.

VBVX models on-wire packet headers as typed views over the original buffer. You only pay for what you read; no parsing pass allocates, copies, or owns memory.

Abstractions

BufferView

Parses offsets and exposes header views and helper accessors (ether_type(), l3_offset(), l4_offset()).

HeaderView<H>

Lightweight wrapper around const H* with a .copy() helper when a local value is needed.

FlagsView / ConstFlagsView

Zero-copy chainable views for bitmask enums; opt-in via enable_bitmask_operators.

vbvx/* POD headers

Packed header structs with compile-time checks for layout and alignment.

Coverage

L2

Ethernet, VLAN, ARP.

L3

IPv4 and IPv6, with extension-header awareness.

L4

TCP, UDP, ICMP.

SRv6

Segment Routing over IPv6 — SRH segment list and TLV parsing.

Engineering

Header-only

Vendor it via add_subdirectory or pull with FetchContent.

C++23

Modern, constexpr-friendly, [[gnu::packed]] headers with alignof == 1.

Endian-aware

On-wire fields stay network order; autoswap helpers convert to host order.

Tested

GoogleTest suites covering parsing branches and SRv6 edge cases.