Registry / networking / etherparse

etherparse

JSON →
library0.20.0rscratesunverified

A library for parsing and writing Ethernet II, IPv4, IPv6, UDP, TCP, and other packet-based protocols.

# Cargo.toml [dependencies] etherparse = "0.20.0"
INSTALL
IMPORT
SIG · ETHERPARSE
E
etherparse
networkingrustv0.20.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Ethernet2Header
use etherparse::Ethernet2Header;

Parse an Ethernet II header from raw bytes

use etherparse::Ethernet2Header; let bytes = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x08, 0x00]; let (header, _) = Ethernet2Header::from_slice(&bytes).unwrap(); println!("EtherType: {}", header.ether_type);
Debug
Known issues
gotchaPacket parsing may fail if data is malformed or incomplete
fix
Ensure complete packet data is provided; handle errors gracefully
affects: >=0.20.0
Upgrade
Version history
0.20.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
etherparse — cargo add etherparse · libregistry