Skip to main content

Module net

Module net 

Source
Expand description

Network syscall handlers.

Implements the userspace networking interface: send, recv, and info.

Constantsยง

NET_INLINE_BUF_CAPACITY ๐Ÿ”’
Most Ethernet frames, including ICMP echo, fit comfortably under 2 KiB. Keep those on the stack to avoid hot-path heap churn in net send/recv syscalls.

Staticsยง

DHCP_TRACE_LOG_BUDGET ๐Ÿ”’
Budget for logging DHCP trace frames to prevent log spam.
NET_RECV_ERR_LOG_BUDGET ๐Ÿ”’
Budget for logging network receive errors to prevent log spam.
NET_SEND_ERR_LOG_BUDGET ๐Ÿ”’
Budget for logging network send errors to prevent log spam.

Functionsยง

sys_net_info
SYS_NET_INFO : Query network interface information.
sys_net_recv
SYS_NET_RECV : Receive a raw Ethernet frame.
sys_net_send
SYS_NET_SEND : Transmit a raw Ethernet frame.
trace_dhcp_frame ๐Ÿ”’
Parse and log a raw Ethernet frame if it looks like DHCP.