v0.1 — header-onlyZero-copy packet header views
Zero-copy packet header views
for C++23.
VBVX (VPP Buffer View eXtensions) is a small header-only C++23 library that exposes safe, bounds-checked views over Ethernet, IPv4/v6, TCP/UDP, ICMP and SRv6 — without ever copying the bytes.
#include "vbvx/buffer_view.hxx"
vbvx::BufferView buf(data, len);
if (auto ip = buf.ipv4_header()) {
if (buf.ip_protocol() == vbvx::IpProtocol::TCP) {
if (auto tcp = buf.tcp_header()) {
auto src = tcp->src_port();
auto dst = tcp->dst_port();
}
}
}Language
C++ 23
Layout
Header-only
Targets
L2 · L3 · L4 · SRv6
Tests
GoogleTest
Core features
Designed for the parse path.
Every abstraction is built around the constraints of high-rate packet parsing — predictable, bounds-checked, and free of allocation.
01
Zero-copy views
BufferView/HeaderView wrap raw buffers — no allocation, no indirection.
02
L2/L3/L4 coverage
Ethernet, VLAN, ARP, IPv4/IPv6, TCP, UDP and ICMP, all bounds-checked.
03
SRv6 ready
Segment Routing over IPv6: SRH segment list and TLV iteration.
04
Header-only
Drop in via add_subdirectory or FetchContent — no build artifacts.
05
Endian-aware
Network-order accessors with autoswap helpers for host conversions.
06
Tested
GoogleTest suites cover parsing branches and SRv6 edge cases.