Documentation ¶
Index ¶
- Constants
- Variables
- func NewInstance(serviceManager *services.ServiceManager, conf any) (services.Runner, error)
- type AddressRange
- type Area
- type AuthType
- type DD
- type Hello
- type Instance
- type Interface
- type LSA
- type LSAMetadata
- type LSAck
- type LSReq
- type LSUpd
- type Neighbor
- type Packet
- type PacketHeader
- type Router
Constants ¶
View Source
const ( InterfacePointToPoint interfaceType = iota InterfaceBroadcast InterfaceNBMA InterfacePointToMultipoint InterfacePointToMultipointBroadcast InterfaceVirtualLink )
Variables ¶
View Source
var ( AllSPFRouters = netip.MustParseAddr("224.0.0.5") AllDRouters = netip.MustParseAddr("224.0.0.6") )
Functions ¶
func NewInstance ¶
Types ¶
type AddressRange ¶
type Area ¶
type Area struct { ID common.AreaID AddressRanges []AddressRange // TODO: LSDB // TODO: ShortestPathTree TransitCapability bool // calculated when ShortestPathTree is calculated ExternalRoutingCapability bool }
type DD ¶
type DD struct {
PacketHeader
}
type Hello ¶
type Hello struct {
PacketHeader
}
type Instance ¶
type Interface ¶
type Interface struct { Type interfaceType State interfaceState Prefix netip.Prefix // IP interface address and IP interface mask AreaID common.AreaID HelloInterval uint16 RouterDeadInterval uint32 InfTransDelay int RouterPriority uint8 HelloTimer *time.Timer WaitTimer *time.Timer Neighbors map[common.RouterID]Neighbor DR Router BDR Router Cost uint16 RxmtInterval int AuType AuthType AuthenticationKey uint64 // contains filtered or unexported fields }
type LSAMetadata ¶
type LSAck ¶
type LSAck struct {
PacketHeader
}
type LSReq ¶
type LSReq struct {
PacketHeader
}
type LSUpd ¶
type LSUpd struct {
PacketHeader
}
type Neighbor ¶
type Neighbor struct { // TODO: InactivityTimer - single shot timer Master bool DDSequenceNumber uint32 LastReceivedDD *DD ID common.RouterID Priority uint8 Addr netip.Addr Options uint8 DesignatedRouter common.RouterID BackupDesignatedRouter common.RouterID // TODO: make a type for these lists? RetransmissionList []*lsaHeader DatabaseSummaryList []*lsaHeader LinkStateRequestList []*lsaHeader // contains filtered or unexported fields }
type PacketHeader ¶
type PacketHeader struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.