Expand description
WireForge Packet — unified packet enum and protocol dispatch.
This crate provides a single Packet enum that can represent any
supported protocol layer, plus helper functions to automatically
dispatch from raw bytes to the correct protocol parser.
Structs§
- Packet
Size Visitor - Visitor that computes the total byte size of a packet and its payload.
- Protocol
Stack Visitor - Visitor that collects the protocol stack as a Vec of human-readable names
(e.g.
["Ethernet", "IPv4", "TCP"]).
Enums§
- Packet
- Unified packet enum covering all supported L2–L4 protocols.
Traits§
- Packet
Visitor - Visitor for type-safe dispatch across all
Packetvariants.
Functions§
- collect_
protocol_ stack - Walk the full protocol stack recursively, collecting names at each layer.
- parse_
ethernet_ frame - Parse an Ethernet frame and dispatch the encapsulated protocol.
- parse_
ipv4_ payload - Dispatch the payload of an IPv4 packet to the correct transport-layer parser.
- parse_
ipv6_ payload - Dispatch the payload of an IPv6 packet (skipping extension headers).