Module ip

Module ip 

Source
Expand description

IP connectivity codecs (PROP_IPV4_*, PROP_IPV6_*, PROP_IP_*).

The structures of docs/protocol/src/ulcp-ip.md: family readiness, the per-family configuration, the addresses in effect, and the resolvers.

The usability predicates here are the boundary the whole subsystem is defined on. FamilyState::Ready means a usable address, a static configuration is validated against the same rule, and the two are the same function so that they cannot drift: a device that accepted a static address it would then refuse to call ready would be unreachable and say it was fine.

Structs§

V4Address
PROP_IPV4_ADDRESS: what the interface holds.
V4Config
PROP_IPV4_CONFIG.
V6Config
PROP_IPV6_CONFIG: as V4Config with 16-octet addresses.

Enums§

FamilyState
Readiness of one address family, shared by PROP_IPV4_STATE and PROP_IPV6_STATE.
IpError
Decode or well-formedness failure.
Method
How a family gets its address.
V6Item
One item of PROP_IPV6_ADDRESSES.
V6ItemKind
Item kinds of PROP_IPV6_ADDRESSES.

Constants§

V4_ADDRESS_LEN
Encoded length of a V4Address. The property is empty when the family is not ready.
V4_CONFIG_STATIC_LEN
Encoded length of a static V4Config; the other methods encode as one octet.
V6_ADDRESS_ITEM_LEN
Encoded length of a V6Item::Address.
V6_CONFIG_STATIC_LEN
Encoded length of a static V6Config.
V6_ROUTER_ITEM_LEN
Encoded length of a V6Item::Router.

Functions§

ipv4_gateway_is_valid
Whether an IPv4 gateway is acceptable: all-zero for “no default route”, or a usable host address.
ipv4_is_usable_host
Whether an IPv4 address is a usable host address: unicast, and not link-local.
ipv6_gateway_is_valid
Whether an IPv6 gateway is acceptable.
ipv6_is_link_local
Whether an IPv6 address is link-local (fe80::/10).
ipv6_is_usable_host
Whether an IPv6 address is a usable host address: unicast, and not link-local.
resolver_is_valid
Whether one PROP_IP_DNS item is acceptable.