std1.0.0-beta-7 SafeC docs

Module net::ipv4

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

IPv4 Layer Parse, build, and checksum IPv4 headers. Freestanding-safe.

Structs

Ipv4Hdr

Functions

ip_checksumCompute Internet checksum over len bytes starting at data.
ipv4_parseParse IPv4 header from pkt at byte offset offset. Returns 0 on success, -1 on truncation or bad version.
ipv4_buildWrite IPv4 header into pkt at byte offset offset (pkt must have capacity). Computes and fills checksum. Returns byte offset of first payload byte.

Macros

IPV4_HDR_LENminimum (no options)
IP_PROTO_ICMP
IP_PROTO_TCP
IP_PROTO_UDP