std1.0.0-beta-7 SafeC docs

Module net::ethernet

#include <std/net/ethernet.h> source

Ethernet Layer Parse and build Ethernet II frames. Freestanding-safe.

Structs

EthernetHdr

Functions

eth_parseParse Ethernet header from packet (returns 0 on success, -1 if too short).
eth_buildWrite Ethernet header into packet at offset 0; sets pkt.len to ETH_HDR_LEN.

Macros

ETH_TYPE_IPV4
ETH_TYPE_ARP
ETH_TYPE_IPV6
ETH_HDR_LEN6 dst + 6 src + 2 ethertype