wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
Loading...
Searching...
No Matches
xdpmac Struct Reference

Fixed-capacity ip -> mac cache. More...

#include <xdpmac.h>

Data Fields

u32 ip [XDPMAC_CAP]
 IPv4 key, network byte order; valid if used.
u8 mac [XDPMAC_CAP][6]
 Ethernet MAC learned for ip.
u8 used [XDPMAC_CAP]
 1 if the slot holds an entry
u32 clock
 next round-robin eviction victim

Detailed Description

Fixed-capacity ip -> mac cache.

Full and seeing a new ip, it evicts slots round-robin (clock walks 0..CAP-1 and wraps), so the oldest entry goes first. Zero-init via xdpmac_init().


The documentation for this struct was generated from the following file: