Documentation ¶
Index ¶
- Variables
- func DeleteIfaceAndAssociatedRoutes(iface string, tableID int) error
- func DeleteXfrmRules() error
- func GetDefaultGatewayInterface() (*net.Interface, error)
- func NewTableRule(tableID int) *netlink.Rule
- type Adapter
- func (a *Adapter) AddDestinationRoutes(destIPs []net.IPNet, gwIP, srcIP net.IP, linkIndex, tableID int) error
- func (a *Adapter) AddrAddIfNotPresent(link netlink.Link, addr *netlink.Addr) error
- func (a *Adapter) DeleteDestinationRoutes(destIPs []net.IPNet, linkIndex, tableID int) error
- func (a *Adapter) RouteAddOrReplace(route *netlink.Route) error
- func (a *Adapter) RuleAddIfNotPresent(rule *netlink.Rule) error
- func (a *Adapter) RuleDelIfPresent(rule *netlink.Rule) error
- type Basic
- type Interface
Constants ¶
This section is empty.
Variables ¶
View Source
var NewFunc func() Interface
Functions ¶
func DeleteIfaceAndAssociatedRoutes ¶ added in v0.12.0
func DeleteXfrmRules ¶ added in v0.12.0
func DeleteXfrmRules() error
func GetDefaultGatewayInterface ¶ added in v0.12.0
func NewTableRule ¶ added in v0.13.0
Types ¶
type Adapter ¶ added in v0.13.0
type Adapter struct {
Basic
}
func (*Adapter) AddDestinationRoutes ¶ added in v0.13.0
func (*Adapter) AddrAddIfNotPresent ¶ added in v0.13.0
func (*Adapter) DeleteDestinationRoutes ¶ added in v0.13.0
func (*Adapter) RouteAddOrReplace ¶ added in v0.13.0
func (*Adapter) RuleAddIfNotPresent ¶ added in v0.13.0
type Basic ¶ added in v0.13.0
type Basic interface { LinkAdd(link netlink.Link) error LinkDel(link netlink.Link) error LinkByName(name string) (netlink.Link, error) LinkSetUp(link netlink.Link) error AddrAdd(link netlink.Link, addr *netlink.Addr) error AddrDel(link netlink.Link, addr *netlink.Addr) error AddrList(link netlink.Link, family int) ([]netlink.Addr, error) AddrSubscribe(addrCh chan netlink.AddrUpdate, doneCh chan struct{}) error NeighAppend(neigh *netlink.Neigh) error NeighDel(neigh *netlink.Neigh) error RouteAdd(route *netlink.Route) error RouteDel(route *netlink.Route) error RouteGet(destination net.IP) ([]netlink.Route, error) RouteList(link netlink.Link, family int) ([]netlink.Route, error) FlushRouteTable(tableID int) error RuleAdd(rule *netlink.Rule) error RuleDel(rule *netlink.Rule) error RuleList(family int) ([]netlink.Rule, error) XfrmPolicyAdd(policy *netlink.XfrmPolicy) error XfrmPolicyDel(policy *netlink.XfrmPolicy) error XfrmPolicyList(family int) ([]netlink.XfrmPolicy, error) EnableLooseModeReversePathFilter(interfaceName string) error EnsureLooseModeIsConfigured(interfaceName string) error EnableForwarding(interfaceName string) error GetReversePathFilter(interfaceName string) ([]byte, error) ConfigureTCPMTUProbe(mtuProbe, baseMss string) error }
type Interface ¶
type Interface interface { Basic AddrAddIfNotPresent(link netlink.Link, addr *netlink.Addr) error RuleAddIfNotPresent(rule *netlink.Rule) error RuleDelIfPresent(rule *netlink.Rule) error RouteAddOrReplace(route *netlink.Route) error AddDestinationRoutes(destIPs []net.IPNet, gwIP, srcIP net.IP, linkIndex, tableID int) error DeleteDestinationRoutes(destIPs []net.IPNet, linkIndex, tableID int) error }
Click to show internal directories.
Click to hide internal directories.