Expand description
Ethernet frame parsing and construction
Implements IEEE 802.3 Ethernet frame handling for the network stack. Supports parsing incoming frames and constructing outgoing frames with proper MAC addressing and EtherType identification.
Structs§
- Ethernet
Frame - Parsed Ethernet frame
Constants§
- ETHERNET_
HEADER_ SIZE - Ethernet frame header size: dst(6) + src(6) + ethertype(2) = 14 bytes
- ETHERNET_
MAX_ PAYLOAD - Maximum Ethernet frame payload (standard MTU)
- ETHERNET_
MIN_ PAYLOAD - Minimum Ethernet frame payload (excluding header)
- ETHERTYPE_
ARP - ETHERTYPE_
IPV4 - EtherType constants
- ETHERTYPE_
IPV6
Functions§
- construct_
frame - Construct an Ethernet frame from components.
- dispatch_
frame - Dispatch a received Ethernet frame to the appropriate protocol handler.
- is_
broadcast - Check if a MAC address is a broadcast address (FF:FF:FF:FF:FF:FF)
- is_
for_ us - Check if a MAC address matches or is broadcast or is IPv6 multicast
- is_
ipv6_ multicast - Check if a MAC address is an IPv6 multicast address (33:33:xx:xx:xx:xx)
- parse_
frame - Parse an Ethernet frame from raw bytes.