Expand description
Netlink-style interface for userland-kernel network configuration IPC
Provides a message-passing mechanism between userland network daemons (such as the NetworkManager shim) and the kernel network stack. Messages use an integer-based serialization format suitable for no-std environments.
§Message Format
Each netlink message is serialized as a fixed-size header followed by a variable-length payload:
+--------+--------+--------+--------+--------+--------+--...--+
| type | flags | seq | pid | length | payload |
| u16 | u16 | u32 | u32 | u32 | [u8; length] |
+--------+--------+--------+--------+--------+--...--+§Supported Operations
- Link management: bring interfaces up/down, query link state
- Address management: add/remove IPv4/IPv6 addresses
- Route management: add/remove routes, set default gateway
- Device enumeration: list interfaces and their properties
Modules§
- flags
- Message flags (bitmask)
Structs§
- Addr
Info - IP address entry (serialized in NewAddr responses)
- Link
Info - Network interface information (serialized in NewLink responses)
- Netlink
Header - Fixed-size netlink message header (16 bytes)
- Netlink
Message - Complete netlink message (header + payload)
- Netlink
Socket - Netlink socket for message passing between kernel and userland
- Route
Info - Route entry (serialized in NewRoute responses)
Enums§
- Netlink
Message Type - Netlink message type codes
Functions§
- init
- Initialize the netlink subsystem
- netlink_
close - Close a netlink socket
- netlink_
open - Open a new netlink socket
- netlink_
recv - Receive a netlink message (kernel -> userland)
- netlink_
send - Send a netlink message (userland -> kernel)