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:
ifindexandup(boolean).
Raises:
on a netlink error. - opts
table
link parameters: