nfdc

package
v0.0.0-...-d1ba03b Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmds

func Cmds() []*cobra.Command

Constructs a list of Cobra commands for managing Named Data Networking (NDN) components such as faces, routes, and strategies via the command line.

Types

type Tool

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

func (*Tool) ExecCmd

func (t *Tool) ExecCmd(_ *cobra.Command, mod string, cmd string, args []string, defaults []string)

Executes an NDN management command with specified module, command, and arguments, merging default values with user-provided key-value parameters and outputting the structured response.

func (*Tool) ExecCsInfo

func (t *Tool) ExecCsInfo(_ *cobra.Command, args []string)

Fetches and prints content store (CS) status information, including capacity, admission/serve flags, and hit/miss statistics, from an NDN network using a status dataset query.

func (*Tool) ExecFaceList

func (t *Tool) ExecFaceList(_ *cobra.Command, args []string)

Fetches and displays detailed status information for all network faces, including identifiers, connection details, congestion metrics, MTU, packet counters, and persistence flags in a human-readable format.

func (*Tool) ExecFibList

func (t *Tool) ExecFibList(_ *cobra.Command, args []string)

Fetches and displays the current Forwarding Information Base (FIB) entries from an NDN daemon, listing each entry's name along with next-hop face IDs and their associated costs.

func (*Tool) ExecRouteList

func (t *Tool) ExecRouteList(_ *cobra.Command, args []string)

Lists all routes in the Routing Information Base (RIB) of an NDN node, displaying each route's prefix, next hop, origin, cost, flags, and expiration time in a human-readable format.

func (*Tool) ExecStatusGeneral

func (t *Tool) ExecStatusGeneral(_ *cobra.Command, args []string)

Fetches and displays general status information from an NFD (Named Data Forwarding Daemon) instance, including version, uptime, and counts of entries in data structures like the name tree, FIB, PIT, and statistics on Interest/Data/NACK traffic.

func (*Tool) ExecStrategyList

func (t *Tool) ExecStrategyList(_ *cobra.Command, args []string)

Fetches and prints the list of configured strategy choices (prefix-to-strategy mappings) from the NDN network's status dataset.

func (*Tool) Prefix

func (t *Tool) Prefix() enc.Name

Constructs and returns an NDN Name representing the localhost NFD prefix by combining the localhost component and a generic "nfd" component.

func (*Tool) Start

func (t *Tool) Start()

Initializes and starts the tool's engine if not already running, using a default face, and exits on failure.

func (*Tool) Stop

func (t *Tool) Stop()

Stops the engine associated with the tool.

Jump to

Keyboard shortcuts

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