29void xdpmac_init(
xdpmac* c);
34void xdpmac_learn(
xdpmac* c,
u32 ip_be,
const u8 mac[6]);
38int xdpmac_lookup(
const xdpmac* c,
u32 ip_be,
u8 mac_out[6]);
Fixed-capacity ip -> mac cache.
Definition xdpmac.h:17
u32 ip[XDPMAC_CAP]
IPv4 key, network byte order; valid if used.
Definition xdpmac.h:19
u32 clock
next round-robin eviction victim
Definition xdpmac.h:25
u8 used[XDPMAC_CAP]
1 if the slot holds an entry
Definition xdpmac.h:23
u8 mac[XDPMAC_CAP][6]
Ethernet MAC learned for ip.
Definition xdpmac.h:21
unsigned int u32
unsigned 32-bit integer
Definition types.h:15
unsigned char u8
unsigned 8-bit integer / byte
Definition types.h:18