⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module netlink

Module netlink 

Source
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§

AddrInfo
IP address entry (serialized in NewAddr responses)
LinkInfo
Network interface information (serialized in NewLink responses)
NetlinkHeader
Fixed-size netlink message header (16 bytes)
NetlinkMessage
Complete netlink message (header + payload)
NetlinkSocket
Netlink socket for message passing between kernel and userland
RouteInfo
Route entry (serialized in NewRoute responses)

Enums§

NetlinkMessageType
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)