7.2 Records

Every network a joined interface has been identified on gets a record, Machine\System\Network\Networks\<id>. Records are never deleted by netd.

7.2.1 What netd writes #

On every identification (§7.1), netd creates the record if it is missing and writes these values under its Status subkey, each only when it differs from what is there:

ValueTypeContent
KindREG_SZthe interface kind it was seen on
ServerREG_SZthe DHCPv4 server; removed when there is none
GatewayREG_SZthe lease's gateway; removed when there is none
RouterREG_SZthe IPv6 default router; removed when there is none
PrefixesREG_MULTI_SZthe subnet and the autoconfigured prefixes, CIDR form
DnsServersREG_MULTI_SZthe DNS servers offered, either family
LastSeenREG_SZthe wall-clock time of the identification, in Unix seconds
LastInterfaceREG_SZthe kernel name of the interface it was seen on

LastSeen is rewritten on every pass that identifies the network, so a record's Status changes whenever netd runs a pass on a link that is on it.

Status is created with the descriptor O:SYG:SYD:P(A;;KA;;;SY)(A;;KR;;;WD): SYSTEM has full control and Everyone has read access. It is protected, so the hive root's inheritable grants do not reach it, and a hand edit is refused rather than silently reverted at the next pass. The descriptor is set only when netd creates the key; a Status key that already exists keeps whatever descriptor it has.

7.2.2 What the operator writes #

On the record itself, not under Status:

ValueRead asMeaning
NameREG_SZ, empty is unsetthe Network.Name fact
TrustREG_SZ, empty is unsetthe Network.Trust fact
RequestedAddressREG_SZ, an IPv4 addressthe address the next DHCPv4 client asks for first (§5.7); netd writes it too

Name and Trust are read at every identification, so an edit reaches the interface layer on the pass that follows the registry write (§2.3). They are opaque: netd compares nothing about them and gives them no vocabulary.

The kernel reads Name and Trust itself, from the record that an interface's Status Network names (PKM §6.5).

Edit this page