Documentation ¶
Overview ¶
Package netlink provides router implementation that uses netlink.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Retriever ¶
type Retriever struct{}
Retriever is a routes.GatewayRetriever implementation that is using netlink
func (Retriever) Retrieve ¶
Retrieve a gateway to a given address while ignoring the given routing table. The mechanism for determining a gateway:
- All routes are queried in the system;
- Routes are filtered so they contain only those routes which contain the subnet;
- Filtered routes are sorted in priority order as it would be on route selection for a packet;
- All rules are listed and ordered by priority by default;
- Routes are re-ordered by the ip rule that applies to the route. Routes for which same route can be applied, maintain the same order as defined in 3;
- First route in the list is chosen as the best match and used to determine a gateway.
Click to show internal directories.
Click to hide internal directories.