Skip to content
Snippets Groups Projects
netlink.go 816 B
Newer Older
cedi's avatar
cedi committed
package config

import (
	"time"

	"github.com/bio-routing/bio-rd/routingtable/filter"
)

cedi's avatar
cedi committed
// Constants for default routing tables in the Linux Kernel
cedi's avatar
cedi committed
const (
cedi's avatar
cedi committed
	RtLocal   uint32 = 255 // according to man ip-route: 255 is reserved for built-in use
	RtMain    uint32 = 254 // This is the default table where routes are inserted
	RtDefault uint32 = 253 // according to man ip-route: 253 is reserved for built-in use
	RtUnspec  uint32 = 0   // according to man ip-route: 0 is reserved for built-in use
cedi's avatar
cedi committed

cedi's avatar
cedi committed
)

cedi's avatar
cedi committed
// Netlink holds the configuration of the Netlink protocol
cedi's avatar
cedi committed
type Netlink struct {
	HoldTime       time.Duration
	UpdateInterval time.Duration
cedi's avatar
cedi committed
	RoutingTable   uint32
cedi's avatar
cedi committed
	ImportFilter   *filter.Filter // Which routes are imported from the Kernel
cedi's avatar
cedi committed
	ExportFilter   *filter.Filter // Which routes are exported to the Kernel
cedi's avatar
cedi committed
}