Skip to content
Snippets Groups Projects
peer.go 1.16 KiB
Newer Older
  • Learn to ignore specific revisions
  • Oliver Herms's avatar
    Oliver Herms committed
    package config
    
    import (
    
    	bnet "github.com/bio-routing/bio-rd/net"
    
    	"github.com/bio-routing/bio-rd/routingtable"
    
    Oliver Herms's avatar
    Oliver Herms committed
    	"github.com/bio-routing/bio-rd/routingtable/filter"
    
    Daniel Czerwonk's avatar
    Daniel Czerwonk committed
    	"github.com/bio-routing/bio-rd/routingtable/locRIB"
    
    Oliver Herms's avatar
    Oliver Herms committed
    )
    
    
    // Peer defines the configuration for a BGP session
    
    Oliver Herms's avatar
    Oliver Herms committed
    type Peer struct {
    
    	AdminEnabled               bool
    	ReconnectInterval          time.Duration
    	KeepAlive                  time.Duration
    	HoldTime                   time.Duration
    	LocalAddress               bnet.IP
    	PeerAddress                bnet.IP
    	LocalAS                    uint32
    	PeerAS                     uint32
    	Passive                    bool
    	RouterID                   uint32
    	RouteServerClient          bool
    	RouteReflectorClient       bool
    	RouteReflectorClusterID    uint32
    	AdvertiseIPv4MultiProtocol bool
    	IPv4                       *AddressFamilyConfig
    	IPv6                       *AddressFamilyConfig
    
    Daniel Czerwonk's avatar
    Daniel Czerwonk committed
    // AddressFamilyConfig represents all configuration parameters specific for an address family
    
    type AddressFamilyConfig struct {
    	RIB          *locRIB.LocRIB
    	ImportFilter *filter.Filter
    	ExportFilter *filter.Filter
    
    	AddPathSend  routingtable.ClientOptions
    	AddPathRecv  bool
    
    Oliver Herms's avatar
    Oliver Herms committed
    }