Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- func (c *Config) AdvertisementDataPrefix() enc.Name
- func (c *Config) AdvertisementSyncActivePrefix() enc.Name
- func (c *Config) AdvertisementSyncInterval() time.Duration
- func (c *Config) AdvertisementSyncPassivePrefix() enc.Name
- func (c *Config) AdvertisementSyncPrefix() enc.Name
- func (c *Config) MgmtPrefix() enc.Name
- func (c *Config) NetworkName() enc.Name
- func (c *Config) Parse() (err error)
- func (c *Config) PrefixTableGroupPrefix() enc.Name
- func (c *Config) RouterDeadInterval() time.Duration
- func (c *Config) RouterName() enc.Name
- func (c *Config) SchemaBytes() []byte
- func (c *Config) TrustAnchorNames() []enc.Name
- type Neighbor
Constants ¶
const CostInfinity = uint64(16)
CostInfinity is the maximum cost to a router.
const CostPfxInfinity = uint64(0xFFFFFFFF)
CostPfxInfinity is the maximum cost to a name prefix.
const NlsrOrigin = uint64(mgmt.RouteOriginNLSR)
NlsrOrigin is the origin to use for local registration.
Variables ¶
var MulticastStrategy = enc.LOCALHOST. Append(enc.NewGenericComponent("nfd")). Append(enc.NewGenericComponent("strategy")). Append(enc.NewGenericComponent("multicast"))
var SchemaBytes []byte
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Network should be the same for all routers in the network.
Network string `json:"network"`
// Router should be unique for each router in the network.
Router string `json:"router"`
// Period of sending Advertisement Sync Interests.
AdvertisementSyncInterval_ms uint64 `json:"advertise_interval"`
// Time after which a neighbor is considered dead.
RouterDeadInterval_ms uint64 `json:"router_dead_interval"`
// URI specifying KeyChain location.
KeyChainUri string `json:"keychain"`
// List of trust anchor full names.
TrustAnchors []string `json:"trust_anchors"`
// List of permanent neighbors.
Neighbors []Neighbor `json:"neighbors"`
// contains filtered or unexported fields
}
func DefaultConfig ¶
func DefaultConfig() *Config
(AI GENERATED DESCRIPTION): Creates a default `Config` instance with empty network and router fields, preset advertisement sync and router‑dead intervals, and an undefined key‑chain URI.
func (*Config) AdvertisementDataPrefix ¶
(AI GENERATED DESCRIPTION): Retrieves the configured advertisement data prefix (enc.Name) from the Config instance.
func (*Config) AdvertisementSyncActivePrefix ¶
(AI GENERATED DESCRIPTION): Retrieves the configured advertisement sync active prefix (an `enc.Name`) from the `Config` instance.
func (*Config) AdvertisementSyncInterval ¶
(AI GENERATED DESCRIPTION): Returns the advertisement synchronization interval from the configuration, converting the stored millisecond value into a `time.Duration`.
func (*Config) AdvertisementSyncPassivePrefix ¶
(AI GENERATED DESCRIPTION): Returns the Name of the prefix used for passive advertisement synchronization.
func (*Config) AdvertisementSyncPrefix ¶
(AI GENERATED DESCRIPTION): Retrieves and returns the advertisement sync prefix stored in the configuration as an `enc.Name`.
func (*Config) MgmtPrefix ¶ added in v1.4.3
(AI GENERATED DESCRIPTION): Returns the management prefix stored in the Config object.
func (*Config) NetworkName ¶
(AI GENERATED DESCRIPTION): Retrieves and returns the network name stored in the configuration.
func (*Config) Parse ¶
(AI GENERATED DESCRIPTION): Parses and validates the NLSR configuration, converting string fields into `enc.Name` objects, enforcing network‑router relationship and timing constraints, and computing the internal name prefixes used for advertisement sync, data, and prefix sync.
func (*Config) PrefixTableGroupPrefix ¶ added in v1.5.2
(AI GENERATED DESCRIPTION): Retrieves the prefix table group prefix stored in the configuration.
func (*Config) RouterDeadInterval ¶
(AI GENERATED DESCRIPTION): Returns the router dead interval configured in milliseconds, converting the `RouterDeadInterval_ms` field to a `time.Duration`.
func (*Config) RouterName ¶
(AI GENERATED DESCRIPTION): Returns the router name (enc.Name) stored in the Config instance.
func (*Config) SchemaBytes ¶ added in v1.4.3
(AI GENERATED DESCRIPTION): Returns the raw byte slice representing the configuration schema.
func (*Config) TrustAnchorNames ¶ added in v1.4.3
(AI GENERATED DESCRIPTION): Returns the slice of trust‑anchor names stored in the Config.