public class NFD extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_TIMEOUT |
static int |
OK_STATUS |
| Constructor and Description |
|---|
NFD() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addNextHop(net.named_data.jndn.Face forwarder,
int faceId,
net.named_data.jndn.Name prefix)
Helper method to register a new face on the forwarder; as mentioned at
http://named-data.net/doc/NFD/current/manpages/nfdc.html,
this is more for debugging; use 'register' instead
|
static int |
createFace(net.named_data.jndn.Face forwarder,
String uri)
Create a new face on the given forwarder.
|
static void |
destroyFace(net.named_data.jndn.Face forwarder,
int faceId)
Destroy a face on given forwarder.
|
static void |
disableLocalControlHeader(net.named_data.jndn.Face forwarder,
LocalControlHeader header)
Disable a local control feature on the given forwarder.
|
static void |
enableLocalControlHeader(net.named_data.jndn.Face forwarder,
LocalControlHeader header)
Enable a local control feature on the given forwarder.
|
static List<FaceStatus> |
getFaceList(net.named_data.jndn.Face forwarder)
Retrieve a list of faces and their status from the given forwarder; calls
/localhost/nfd/faces/list which requires a local Face (all non-local
packets are dropped)
|
static List<FibEntry> |
getFibList(net.named_data.jndn.Face forwarder)
Retrieve a list of FIB entries and their NextHopRecords from the given
forwarder; calls /localhost/nfd/fib/list which requires a local Face (all
non-local packets are dropped).
|
static ForwarderStatus |
getForwarderStatus(net.named_data.jndn.Face forwarder)
Retrieve the status of the given forwarder; calls /localhost/nfd/status
which requires a local Face (all non-local packets are dropped)
|
static List<RibEntry> |
getRouteList(net.named_data.jndn.Face forwarder)
Retrieve a list of routing entries from the RIB; calls
/localhost/nfd/rib/list which requires a local Face (all non-local packets
are dropped).
|
static boolean |
ping(net.named_data.jndn.Face face,
net.named_data.jndn.Name name)
Request a name on an existing face to verify the forwarder is working and
responding to requests.
|
static boolean |
pingLocal(net.named_data.jndn.Face face)
Ping a forwarder on an existing face to verify that the forwarder is
working and responding to requests; this version sends a discovery packet
to /localhost/nfd which should always respond if the requestor is on the
same machine as the NDN forwarding daemon.
|
static void |
register(net.named_data.jndn.Face forwarder,
net.named_data.jndn.ControlParameters controlParameters)
Register a route on the forwarder; see
http://named-data.net/doc/NFD/current/manpages/nfdc.html
for command-line usage and
http://redmine.named-data.net/projects/nfd/wiki/RibMgmt
for protocol documentation.
|
static void |
register(net.named_data.jndn.Face forwarder,
int faceId,
net.named_data.jndn.Name route,
int cost)
Register a route on a forwarder; this will not create a new face since it
is provided a faceId.
|
static void |
register(net.named_data.jndn.Face forwarder,
String uri,
net.named_data.jndn.Name route,
int cost)
Register a route on a forwarder; this will create a new face on the
forwarder to the given URI/route pair.
|
static net.named_data.jndn.Data |
retrieveDataSet(net.named_data.jndn.Face forwarder,
net.named_data.jndn.Name datasetName)
Build an interest to retrieve a segmented data set from the NFD; for
details on the DataSet, see
http://redmine.named-data.net/projects/nfd/wiki/StatusDataset
|
static ControlResponse |
sendCommand(net.named_data.jndn.Face forwarder,
net.named_data.jndn.Interest interest)
Send an interest as a command to the forwarder; this method will convert
the interest to a command interest and block until a response is received
from the forwarder.
|
static void |
setStrategy(net.named_data.jndn.Face forwarder,
net.named_data.jndn.Name prefix,
net.named_data.jndn.Name strategy)
Set a strategy on the forwarder; see
http://named-data.net/doc/NFD/current/manpages/nfdc.html
for command-line usage and
http://redmine.named-data.net/projects/nfd/wiki/StrategyChoice
for protocol documentation.
|
static void |
unregister(net.named_data.jndn.Face forwarder,
net.named_data.jndn.ControlParameters controlParameters)
Unregister a route on a forwarder; see
http://named-data.net/doc/NFD/current/manpages/nfdc.html
for command-line usage and
http://redmine.named-data.net/projects/nfd/wiki/RibMgmt
for protocol documentation.
|
static void |
unregister(net.named_data.jndn.Face forwarder,
net.named_data.jndn.Name route)
Unregister a route on a forwarder; see
http://named-data.net/doc/NFD/current/manpages/nfdc.html
for command-line usage and
http://redmine.named-data.net/projects/nfd/wiki/RibMgmt
for protocol documentation.
|
static void |
unregister(net.named_data.jndn.Face forwarder,
net.named_data.jndn.Name route,
int faceId)
Unregister a route on a forwarder; see
http://named-data.net/doc/NFD/current/manpages/nfdc.html
for command-line usage and
http://redmine.named-data.net/projects/nfd/wiki/RibMgmt
for protocol documentation.
|
static void |
unregister(net.named_data.jndn.Face forwarder,
net.named_data.jndn.Name route,
String uri)
Unregister a route on a forwarder; see
http://named-data.net/doc/NFD/current/manpages/nfdc.html
for command-line usage and
http://redmine.named-data.net/projects/nfd/wiki/RibMgmt
for protocol documentation.
|
public static final long DEFAULT_TIMEOUT
public static final int OK_STATUS
public static boolean pingLocal(net.named_data.jndn.Face face)
face - only a localhost Facepublic static boolean ping(net.named_data.jndn.Face face,
net.named_data.jndn.Name name)
face - name - public static ForwarderStatus getForwarderStatus(net.named_data.jndn.Face forwarder) throws Exception
forwarder - only a localhost FaceExceptionpublic static List<FaceStatus> getFaceList(net.named_data.jndn.Face forwarder) throws Exception
forwarder - only a localhost FaceExceptionpublic static List<FibEntry> getFibList(net.named_data.jndn.Face forwarder) throws Exception
forwarder - only a localhost FaceExceptionpublic static List<RibEntry> getRouteList(net.named_data.jndn.Face forwarder) throws Exception
forwarder - only a localhost FaceExceptionpublic static void addNextHop(net.named_data.jndn.Face forwarder,
int faceId,
net.named_data.jndn.Name prefix)
throws Exception
forwarder - only a localhost FacefaceId - prefix - Exceptionpublic static int createFace(net.named_data.jndn.Face forwarder,
String uri)
throws Exception
forwarder - only a localhost Faceuri - Exceptionpublic static void destroyFace(net.named_data.jndn.Face forwarder,
int faceId)
throws Exception
forwarder - only a localhost FacefaceId - Exceptionpublic static void enableLocalControlHeader(net.named_data.jndn.Face forwarder,
LocalControlHeader header)
throws Exception
forwarder - header - Exceptionpublic static void disableLocalControlHeader(net.named_data.jndn.Face forwarder,
LocalControlHeader header)
throws Exception
forwarder - header - Exceptionpublic static void register(net.named_data.jndn.Face forwarder,
net.named_data.jndn.ControlParameters controlParameters)
throws Exception
forwarder - only a localhost FacecontrolParameters - Exceptionpublic static void register(net.named_data.jndn.Face forwarder,
String uri,
net.named_data.jndn.Name route,
int cost)
throws Exception
forwarder - only a localhost Faceuri - cost - route - Exceptionpublic static void register(net.named_data.jndn.Face forwarder,
int faceId,
net.named_data.jndn.Name route,
int cost)
throws Exception
forwarder - only a localhost FacefaceId - route - cost - Exceptionpublic static void unregister(net.named_data.jndn.Face forwarder,
net.named_data.jndn.ControlParameters controlParameters)
throws Exception
forwarder - controlParameters - Exceptionpublic static void unregister(net.named_data.jndn.Face forwarder,
net.named_data.jndn.Name route)
throws Exception
forwarder - route - Exceptionpublic static void unregister(net.named_data.jndn.Face forwarder,
net.named_data.jndn.Name route,
int faceId)
throws Exception
forwarder - route - faceId - Exceptionpublic static void unregister(net.named_data.jndn.Face forwarder,
net.named_data.jndn.Name route,
String uri)
throws Exception
forwarder - route - uri - Exceptionpublic static void setStrategy(net.named_data.jndn.Face forwarder,
net.named_data.jndn.Name prefix,
net.named_data.jndn.Name strategy)
throws Exception
forwarder - only a localhost Faceprefix - strategy - Exceptionpublic static net.named_data.jndn.Data retrieveDataSet(net.named_data.jndn.Face forwarder,
net.named_data.jndn.Name datasetName)
throws IOException,
ManagementException
forwarder - datasetName - IOExceptionManagementExceptionpublic static ControlResponse sendCommand(net.named_data.jndn.Face forwarder, net.named_data.jndn.Interest interest) throws IOException, net.named_data.jndn.encoding.EncodingException, ManagementException
forwarder - only a localhost Face, command signing info must be setinterest - As described at
http://redmine.named-data.net/projects/nfd/wiki/ControlCommand,
the requested interest must have encoded ControlParameters appended to the
interest nameIOExceptionnet.named_data.jndn.encoding.EncodingExceptionManagementExceptionCopyright © 2015. All rights reserved.