Skip to main content

Module addr

Module addr 

Source
Expand description

Addresses. Pure parsing - no service, no SDK, and no formatter.

Separate from crate::net for one reason: this is the only part of the network surface a caller feeds UNTRUSTED TEXT to, it is the classic place to be off by one, and it has no dependencies - so it can be unit-tested on the host, where a wrong answer is a failing test rather than a machine quietly talking to the wrong address.

That split is the pattern kernel/src/clock.rs documents: pure logic lives where it can be tested, and the part that talks to a service is exercised on the target.

Structsยง

Ipv4
An IPv4 address.