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