Skip to content
Snippets Groups Projects
netlink.go 801 B
Newer Older
  • Learn to ignore specific revisions
  • 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   int = 255 // according to man ip-route: 255 is reserved fro built-in use
    	RtMain    int = 254 // This is the default table where routes are inserted
    	RtDefault int = 253 // according to man ip-route: 253 is reserved fro built-in use
    	RtUnspec  int = 0   // according to man ip-route: 0 is reserved fro built-in use
    
    
    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
    	RoutingTable   int
    	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
    }