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
"Returns a default configuration with invalid network/router identifiers, 5-second advertisement sync interval, 30-second router dead interval, and an undefined key chain URI, requiring customization before use."
func (*Config) AdvertisementDataPrefix ¶
Returns the configured advertisement data prefix name used for data packet naming in the NDN network.
func (*Config) AdvertisementSyncActivePrefix ¶
Returns the active name prefix used for advertisement synchronization in the configuration.
func (*Config) AdvertisementSyncInterval ¶
Returns the advertisement synchronization interval as a `time.Duration`, converting the configured millisecond value into the appropriate duration for timing operations.
func (*Config) AdvertisementSyncPassivePrefix ¶
Returns the name of the passive prefix used for advertisement synchronization in the routing protocol.
func (*Config) AdvertisementSyncPrefix ¶
Returns the configured advertisement synchronization prefix name.
func (*Config) MgmtPrefix ¶
Returns the management prefix configured for this instance.
func (*Config) NetworkName ¶
Returns the network name stored in the configuration as an `enc.Name`.
func (*Config) Parse ¶
Parses and validates NDN router configuration parameters, constructs name components for advertisements and data packets, and enforces hierarchical naming constraints between network and router identities.
func (*Config) PrefixTableGroupPrefix ¶
Returns the configured group prefix name used for prefix table synchronization.
func (*Config) RouterDeadInterval ¶
Returns the router dead interval duration as a `time.Duration`, converted from the configured value in milliseconds.
func (*Config) RouterName ¶
Returns the router's name stored in the configuration as an `enc.Name`.
func (*Config) SchemaBytes ¶
Returns the schema bytes associated with the configuration.
func (*Config) TrustAnchorNames ¶
Returns the names of the trust anchors configured in this configuration.