Crate packet_formats

Source
Expand description

Serialization and deserialization of wire formats.

This module provides efficient serialization and deserialization of the various wire formats used by this program. Where possible, it uses lifetimes and immutability to allow for safe zero-copy parsing.

§Endianness

All values exposed or consumed by this crate are in host byte order, so the caller does not need to worry about it. Any necessary conversions are performed under the hood.

Modules§

arp
Parsing and serialization of ARP packets.
error
Custom error types for the packet formats.
ethernet
Parsing and serialization of Ethernet frames.
gmp
Common types and utilities between MLDv2 and IGMPv3.
icmp
Parsing and serialization of Internet Control Message Protocol (ICMP) packets.
igmp
Parsing and serialization of Internet Group Management Protocol (IGMP) packets.
ip
IP protocol types.
ipv4
Parsing and serialization of IPv4 packets.
ipv6
Parsing and serialization of IPv6 packets.
tcp
Parsing and serialization of TCP segments.
testdata
Data for testing parsing and serialization.
testutil
Testing-related utilities.
udp
Parsing and serialization of UDP packets.
utils
Utilities useful when parsing and serializing wire formats.

Macros§

icmpv4_dispatch
Dispatches expressions to the type-safe variants of Icmpv4Packet or Icmpv4PacketRaw.
icmpv6_dispatch
Dispatches expressions to the type-safe variants of Icmpv6Packet or Icmpv6PacketRaw.