server

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetClock added in v0.1.8

func SetClock(c bbclock.Clock)

Types

type Adjacency

type Adjacency struct {
	Name            string
	SystemID        types.SystemID
	Address         ethernet.MACAddr
	InterfaceName   string
	Level           uint8
	Priority        uint8
	IPAddresses     []bnet.IP
	LastStateChange time.Time
	Timeout         time.Time
	Status          uint8
}

type ISISAPIServer

type ISISAPIServer struct {
	api.UnimplementedIsisServiceServer
	// contains filtered or unexported fields
}

func NewISISAPIServer

func NewISISAPIServer(s ISISServer) *ISISAPIServer

NewISISAPIServer creates a new ISIS API Server

func (*ISISAPIServer) GetLSDB

type ISISServer

type ISISServer interface {
	AddInterface(*InterfaceConfig) error
	RemoveInterface(name string) error
	GetInterfaceNames() []string
	Start()
	GetAdjacencies() []*Adjacency
	GetLSDB() []*LSDBEntry
}

ISISServer is generic ISIS server interface

type InterfaceConfig

type InterfaceConfig struct {
	Name         string
	Passive      bool
	PointToPoint bool
	Level1       *InterfaceLevelConfig
	Level2       *InterfaceLevelConfig
}

InterfaceConfig represents a network interfaces ISIS config

type InterfaceLevelConfig

type InterfaceLevelConfig struct {
	HelloInterval uint16
	HoldingTimer  uint16
	Metric        uint32
	Passive       bool
	Priority      uint8
}

InterfaceLevelConfig is the ISIS level config of an interface

type LSDBEntry

type LSDBEntry struct {
	// contains filtered or unexported fields
}

func (*LSDBEntry) GetLSPDU added in v0.1.8

func (l *LSDBEntry) GetLSPDU() *packet.LSPDU

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents an ISIS server

func New

func New(nets []*types.NET, ds device.Updater, lspLifetime uint16) (*Server, error)

New creates a new ISIS server

func (*Server) AddInterface

func (s *Server) AddInterface(cfg *InterfaceConfig) error

AddInterface adds an interface to the ISIS server

func (*Server) GetAdjacencies

func (s *Server) GetAdjacencies() []*Adjacency

func (*Server) GetEthernetInterface added in v0.1.8

func (s *Server) GetEthernetInterface(name string) ethernet.EthernetInterfaceI

func (*Server) GetInterfaceNames

func (s *Server) GetInterfaceNames() []string

GetInterfaceNames gets names of all configured interfaces

func (*Server) GetLSDB

func (s *Server) GetLSDB() []*LSDBEntry

func (*Server) RemoveInterface

func (s *Server) RemoveInterface(name string) error

func (*Server) SetEthernetInterfaceFactory added in v0.1.8

func (s *Server) SetEthernetInterfaceFactory(f ethernet.EthernetInterfaceFactoryI)

func (*Server) SetHostnameFunc added in v0.1.8

func (s *Server) SetHostnameFunc(f func() (string, error))

func (*Server) Start

func (s *Server) Start()

Start starts the ISIS server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址