Documentation ¶
Overview ¶
Package fibdef declares common data structures for FIB.
Index ¶
Constants ¶
View Source
const ( MinCapacity = 1<<8 - 1 MaxCapacity = 1<<31 - 1 DefaultCapacity = 1<<16 - 1 MinStartDepth = 2 MaxStartDepth = 17 DefaultStartDepth = 8 )
Limits and defaults.
View Source
const ( // MaxNameLength is the maximum TLV-LENGTH of a FIB entry name. MaxNameLength = 494 // MaxNexthops is the maximum number of nexthops in a FIB entry. MaxNexthops = 8 // ScratchSize is the size of strategy scratch area. ScratchSize = 96 )
Variables ¶
View Source
var ( ErrNameTooLong = errors.New("FIB entry name too long") ErrNexthops = errors.New("number of nexthops out of range") ErrStrategy = errors.New("missing strategy") )
Errors.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Capacity int `json:"capacity,omitempty"` // Capacity. NBuckets int `json:"nBuckets,omitempty"` // Hashtable buckets. StartDepth int `json:"startDepth,omitempty"` // 'M' in 2-stage LPM algorithm. }
Config contains FIB configuration.
type EntryCounters ¶
type EntryCounters struct { NRxInterests uint64 `json:"nRxInterests"` NRxData uint64 `json:"nRxData"` NRxNacks uint64 `json:"nRxNacks"` NTxInterests uint64 `json:"nTxInterests"` }
EntryCounters contains entry counters.
func (EntryCounters) String ¶
func (cnt EntryCounters) String() string
type RealUpdate ¶
type RealUpdate struct { EntryBody Name ndn.Name Action UpdateAction WithVirt *VirtUpdate }
RealUpdate represents a real entry update command.
type Update ¶
type Update interface { Real() *RealUpdate Virt() *VirtUpdate Commit() Revert() }
Update represents a tree update command.
type UpdateAction ¶
type UpdateAction int
UpdateAction indicates entry update action.
const ( ActInsert UpdateAction = iota ActReplace ActErase )
UpdateAction values.
type VirtUpdate ¶
type VirtUpdate struct { Name ndn.Name Action UpdateAction HasReal bool Height int }
VirtUpdate represents a virtual entry update command.
Click to show internal directories.
Click to hide internal directories.