Module netlink.rt.route
Kernel routing table interface.
A netlink.session specialization over the
NETLINK_ROUTE protocol: create an instance with netlink.rt.route(), then
add, delete and list routes; the underlying socket is closed by close()
(or the to-be-closed __close). All methods block and require a sleepable
runtime.
See also:
Class route
| route:add (opts) | Adds a route to the kernel routing table. |
| route:del (opts) | Deletes a route from the kernel routing table. |
| route:list ([family=AF_UNSPEC]) | Lists all routes from the kernel routing tables. |
| route:new ([o]) | Creates a new route object. |
Class route
- route:add (opts)
-
Adds a route to the kernel routing table.
Parameters:
- route:del (opts)
-
Deletes a route from the kernel routing table.
Parameters:
- route:list ([family=AF_UNSPEC])
-
Lists all routes from the kernel routing tables.
Parameters:
- family integer address family. (default AF_UNSPEC)
Returns:
-
table
list of route tables.
- route:new ([o])
-
Creates a new route object.
Parameters:
- o table an initial object table. (optional)
Returns:
-
route
the new route object.
See also: