Class: FIB

FIB

new FIB({@link)

Forwarding Interest Base
Parameters:
Name Type Description
{@link NameTree} nameTree the nameTree to build the FIB on.
Source:

Methods

<private, static> installNDN(NDN)

Install ndn-lib into the FIB scope. only necessary if you require("ndn-Classes/src/DataStructures/FIB.js"), done for you if require("ndn-Classes").FIB
Parameters:
Name Type Description
NDN Object ndn-js library as exported by npm
Source:

addEntry(prefix, nextHops) → {this}

Add a FIBEntry
Parameters:
Name Type Description
prefix String the nameSpace for the fibEntry
nextHops Number | Number_Array | nextHop | nextHop_Array the nextHop info for the fibEntry
Source:
Returns:
FIB for chaining
Type
this

findAllFibEntries(prefix) → {Object}

Return an Iterator that progressively returns longest prefix FIBEntries with 1 or more nextHops
Parameters:
Name Type Description
prefix Object the ndn.Name object representing the prefix
Source:
Returns:
Iterator object with .next() and .hasNext = Boolean
Type
Object

findAllNextHops(prefix, excludingFaceID) → {Number}

Convenience method to get a faceFlag representing all nextHop faces for all prefixes of a given prefix
Parameters:
Name Type Argument Description
prefix Object | String ndn.Name Object or NDN URI string to lookup
excludingFaceID Number <optional>
faceID to exclude from results
Source:
Returns:
- a faceFlag for use with Interfaces.dispatch
Type
Number

lookup(prefix) → {FIBEntry}

find the exact match fibEntry for a given prefix, creating it if not found
Parameters:
Name Type Description
prefix Object the ndn.Name object representing the prefix
Source:
Returns:
Type
FIBEntry