server

package
v0.0.0-...-246b716 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_PATH_METRIC   = 0xfe000000
	ZERO_AGE_LIFETIME = time.Minute * 1
)
View Source
const (
	SPF_ID_TYPE_NODE spfIdType
	SPF_ID_TYPE_IPV4
	SPF_ID_TYPE_IPV6
)
View Source
const SPF_ID_KEY_LENGTH = 18

Variables

View Source
var ISIS_LEVEL_ALL = []IsisLevel{ISIS_LEVEL_1, ISIS_LEVEL_2}

Functions

func NewSpfDistance

func NewSpfDistance(internal, external uint32) *spfDistance

func NewSpfIdIpv4

func NewSpfIdIpv4(prefixAddress uint32, prefixLength uint8) *spfId

func NewSpfIdIpv6

func NewSpfIdIpv6(prefixAddress [4]uint32, prefixLength uint8) *spfId

func NewSpfIdNode

func NewSpfIdNode(nodeId [packet.NEIGHBOUR_ID_LENGTH]byte) *spfId

func NewSpfTriple

func NewSpfTriple(id *spfId, distance *spfDistance) *spfTriple

func NewSpfTriples

func NewSpfTriples() *spfTriples

func SetsockoptAttachFilter

func SetsockoptAttachFilter(fd, level, opt int, bpf *SockFprog) (err error)

func SetsockoptPacketMreq

func SetsockoptPacketMreq(fd, level, opt int, mreq *PacketMreq) (err error)

Types

type AdjType

type AdjType uint8
const (
	ADJ_TYPE_LEVEL1_LAN AdjType
	ADJ_TYPE_LEVEL2_LAN
	ADJ_TYPE_P2P
)

func (AdjType) String

func (adjType AdjType) String() string

type AdjUsage

type AdjUsage uint8
const (
	ADJ_USAGE_NONE AdjUsage
	ADJ_USAGE_LEVEL1
	ADJ_USAGE_LEVEL2
	ADJ_USAGE_LEVEL1AND2
)

func (AdjUsage) String

func (adjUsage AdjUsage) String() string

type Adjacency

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

func NewAdjacency

func NewAdjacency(circuit *Circuit) (*Adjacency, error)

type ApiServer

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

func NewApiServer

func NewApiServer(i *IsisServer, g *grpc.Server, hosts string) *ApiServer

func (*ApiServer) AdjacencyGet

func (*ApiServer) AdjacencyMonitor

func (*ApiServer) DbLsGet

func (*ApiServer) DbLsMonitor

func (*ApiServer) DbRiGet

func (*ApiServer) DbRiMonitor

func (*ApiServer) Disable

func (*ApiServer) Enable

func (*ApiServer) Exit

func (s *ApiServer) Exit()

func (*ApiServer) InterfaceDisable

func (*ApiServer) InterfaceEnable

func (*ApiServer) Serve

func (s *ApiServer) Serve(wg *sync.WaitGroup)

type Circuit

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

func NewCircuit

func NewCircuit(isis *IsisServer, ifKernel *kernel.Interface, ifConfig *config.Interface) *Circuit

func (*Circuit) Exit

func (circuit *Circuit) Exit()

func (*Circuit) Serve

func (circuit *Circuit) Serve()

func (*Circuit) SetActive

func (circuit *Circuit) SetActive()

func (*Circuit) SetDisable

func (circuit *Circuit) SetDisable()

func (*Circuit) SetEnable

func (circuit *Circuit) SetEnable()

func (*Circuit) SetPassive

func (circuit *Circuit) SetPassive()

type CircuitChMsg

type CircuitChMsg uint8
const (
	CIRCUIT_CH_MSG_START CircuitChMsg
	CIRCUIT_CH_MSG_STOP
	CIRCUIT_CH_MSG_EXIT
)

type CircuitChState

type CircuitChState uint8
const (
	CIRCUIT_CH_STATE_RUNNING CircuitChState
	CIRCUIT_CH_STATE_SUSPENDED
)

type DecisionChMsg

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

func (*DecisionChMsg) String

func (msg *DecisionChMsg) String() string

type DecisionChMsgType

type DecisionChMsgType uint8
const (
	DECISION_CH_MSG_TYPE_DO DecisionChMsgType
	DECISION_CH_MSG_TYPE_EXIT
)

func (DecisionChMsgType) String

func (msgType DecisionChMsgType) String() string

type Ipv4Nh

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

type Ipv4Reachabilities

type Ipv4Reachabilities []*Ipv4Reachability

func (Ipv4Reachabilities) Len

func (rs Ipv4Reachabilities) Len() int

func (Ipv4Reachabilities) Less

func (rs Ipv4Reachabilities) Less(i, j int) bool

func (Ipv4Reachabilities) Swap

func (rs Ipv4Reachabilities) Swap(i, j int)

type Ipv4Reachability

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

type Ipv4Ri

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

type Ipv6Nh

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

type Ipv6Reachabilities

type Ipv6Reachabilities []*Ipv6Reachability

func (Ipv6Reachabilities) Len

func (rs Ipv6Reachabilities) Len() int

func (Ipv6Reachabilities) Less

func (rs Ipv6Reachabilities) Less(i, j int) bool

func (Ipv6Reachabilities) Swap

func (rs Ipv6Reachabilities) Swap(i, j int)

type Ipv6Reachability

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

type Ipv6Ri

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

type IsReachabilities

type IsReachabilities []*IsReachability

func (IsReachabilities) Len

func (rs IsReachabilities) Len() int

func (IsReachabilities) Less

func (rs IsReachabilities) Less(i, j int) bool

func (IsReachabilities) Swap

func (rs IsReachabilities) Swap(i, j int)

type IsReachability

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

type IsisChMsg

type IsisChMsg uint8
const (
	ISIS_CH_MSG_EXIT IsisChMsg
)

type IsisLevel

type IsisLevel uint8
const (
	ISIS_LEVEL_1 IsisLevel = iota
	ISIS_LEVEL_2
	ISIS_LEVEL_NUM
)

func (IsisLevel) String

func (level IsisLevel) String() string

func (IsisLevel) String2

func (level IsisLevel) String2() string

type IsisServer

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

func NewIsisServer

func NewIsisServer(configFile, configType string) *IsisServer

func (*IsisServer) Exit

func (isis *IsisServer) Exit()

func (*IsisServer) Serve

func (isis *IsisServer) Serve(wg *sync.WaitGroup)

func (*IsisServer) SetDisable

func (isis *IsisServer) SetDisable()

func (*IsisServer) SetEnable

func (isis *IsisServer) SetEnable()

type Ls

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

func NewLs

func NewLs(pdu *packet.LsPdu, origin bool, generated *time.Time) (*Ls, error)

type Lss

type Lss []*Ls

func (Lss) Len

func (lss Lss) Len() int

func (Lss) Less

func (lss Lss) Less(i, j int) bool

func (Lss) Swap

func (lss Lss) Swap(i, j int)

type P2pIihAction

type P2pIihAction uint8
const (
	P2P_IIH_ACTION_NONE P2pIihAction
	P2P_IIH_ACTION_UP
	P2P_IIH_ACTION_DOWN
	P2P_IIH_ACTION_ACCEPT
	P2P_IIH_ACTION_REJECT
)

type PacketMreq

type PacketMreq struct {
	Ifindex int32
	Type    uint16
	ALen    uint16
	Address [8]byte
}

type Reachabilities

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

func NewReachabilities

func NewReachabilities() *Reachabilities

type SockFilter

type SockFilter struct {
	Code uint16
	Jt   uint8
	Jf   uint8
	K    uint32
}

type SockFprog

type SockFprog struct {
	Len    uint16
	Filter *SockFilter
}

type SpfIdKeys

type SpfIdKeys [][SPF_ID_KEY_LENGTH]byte

func (SpfIdKeys) Len

func (keys SpfIdKeys) Len() int

func (SpfIdKeys) Less

func (keys SpfIdKeys) Less(i, j int) bool

func (SpfIdKeys) Swap

func (keys SpfIdKeys) Swap(i, j int)

type UpdateChMsg

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

func (*UpdateChMsg) String

func (msg *UpdateChMsg) String() string

type UpdateChMsgType

type UpdateChMsgType uint8
const (
	UPDATE_CH_MSG_TYPE_CONFIG_CHANGED UpdateChMsgType
	UPDATE_CH_MSG_TYPE_KERNEL_CHANGED
	UPDATE_CH_MSG_TYPE_ISIS_ENABLE
	UPDATE_CH_MSG_TYPE_ISIS_DISABLE
	UPDATE_CH_MSG_TYPE_CIRCUIT_ENABLE
	UPDATE_CH_MSG_TYPE_CIRCUIT_DISABLE
	UPDATE_CH_MSG_TYPE_ADJACENCY_UP
	UPDATE_CH_MSG_TYPE_ADJACENCY_DOWN
	UPDATE_CH_MSG_TYPE_LSDB_CHANGED
	UPDATE_CH_MSG_TYPE_EXIT
)

func (UpdateChMsgType) String

func (msgType UpdateChMsgType) String() string

Jump to

Keyboard shortcuts

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