route

package
v1.16.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 11 Imported by: 39

Documentation

Overview

Package route provides the Cilium specific abstraction and useful helpers to manage network routes

Index

Constants

View Source
const (
	// RouteReplaceMaxTries is the number of attempts the route will be
	// attempted to be added or updated in case the kernel returns an error
	RouteReplaceMaxTries = 10

	// RouteReplaceRetryInterval is the interval in which
	// RouteReplaceMaxTries attempts are attempted
	RouteReplaceRetryInterval = 100 * time.Millisecond

	// RTN_LOCAL is a route type used to indicate packet should be "routed"
	// locally and passed up the stack. Is used by IPSec to force encrypted
	// packets to pass through XFRM layer.
	RTN_LOCAL = 0x2

	// MainTable is Linux's default routing table
	MainTable = 254

	// EncryptRouteProtocol for Encryption specific routes
	EncryptRouteProtocol = 192
)

Variables

This section is empty.

Functions

func Delete

func Delete(route Route) error

Delete deletes a Linux route. An error is returned if the route does not exist or if the route could not be deleted.

func DeleteRouteTable

func DeleteRouteTable(table, family int) error

func DeleteRule

func DeleteRule(family int, spec Rule) error

DeleteRule delete a mark based rule from the routing table.

func ListRules

func ListRules(family int, filter *