Module netlink.rt.link

Network interface (link) management.

A netlink.session specialization over the NETLINK_ROUTE protocol: create an instance with netlink.rt.link() to list the kernel's interfaces and set their up state; the underlying socket is closed by close() (or the to-be-closed __close). All methods block and require a sleepable runtime.

See also:

Class link

link:list () Lists all network interfaces from the kernel.
link:new ([o]) Creates a new link object.
link:set (opts) Sets an interface's administrative up state.


Class link

link:list ()
Lists all network interfaces from the kernel.

Returns:

    table list of link tables.
link:new ([o])
Creates a new link object.

Parameters:

  • o table an initial object table. (optional)

Returns:

    link the new link object.

See also:

link:set (opts)
Sets an interface's administrative up state.

Parameters:

  • opts table link parameters: ifindex and up (boolean).

Raises:

on a netlink error.
generated by LDoc 1.5.0 Last updated 2026-09-05 12:27:44