public final class Nfdc extends Object
Modifier and Type | Method and Description |
---|---|
static int |
createFace(net.named_data.jndn.Face face,
String uri)
Create a new face on the given forwarder.
|
static void |
destroyFace(net.named_data.jndn.Face face,
int faceId)
Destroy a face on given forwarder.
|
static void |
disableLocalControlHeader(net.named_data.jndn.Face face,
LocalControlHeader header)
Disable a local control feature on the given forwarder.
|
static void |
enableLocalControlHeader(net.named_data.jndn.Face face,
LocalControlHeader header)
Enable a local control feature on the given forwarder.
|
static List<ChannelStatus> |
getChannelStatusList(net.named_data.jndn.Face face)
Retrieve the list of channel status entries from the NFD; calls
/localhost/nfd/faces/channels which requires a local Face (all non-local packets
are dropped).
|
static List<FaceStatus> |
getFaceList(net.named_data.jndn.Face face)
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 face)
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 face)
Retrieve the status of the given forwarder; calls /localhost/nfd/status/general
which requires a local Face (all non-local packets are dropped).
|
static net.named_data.jndn.KeyLocator |
getKeyLocator(net.named_data.jndn.Face face)
Retrieve the
KeyLocator for an NFD. |
static List<RibEntry> |
getRouteList(net.named_data.jndn.Face face)
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 List<StrategyChoice> |
getStrategyList(net.named_data.jndn.Face face)
Retrieve the list of strategy choice entries from the NFD; calls
/localhost/nfd/rib/list which requires a local Face (all non-local packets
are dropped).
|
static void |
register(net.named_data.jndn.Face face,
net.named_data.jndn.ControlParameters controlParameters)
Register a route on the forwarder.
|
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 face,
net.named_data.jndn.Name route,
int cost)
Register a route on a forwarder; this will create a new face on the
forwarder towards the face (e.g., self registration).
|
static void |
register(net.named_data.jndn.Face face,
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 void |
setStrategy(net.named_data.jndn.Face face,
net.named_data.jndn.Name prefix,
net.named_data.jndn.Name strategy)
Set a strategy on the forwarder
Ensure the forwarding face is on the local machine (management requests are to /localhost/...) and that command
signing has been set up using forwarder.setCommandSigningInfo().
|
static void |
unregister(net.named_data.jndn.Face face,
net.named_data.jndn.ControlParameters controlParameters)
Unregister a route on a forwarder
Ensure the forwarding face is on the local machine (management requests are to /localhost/...) and that command
signing has been set up (e.g.
|
static void |
unregister(net.named_data.jndn.Face face,
net.named_data.jndn.Name route)
Unregister a route on a forwarder.
|
static void |
unregister(net.named_data.jndn.Face face,
net.named_data.jndn.Name route,
int faceId)
Unregister a route on a forwarder; see
Ensure the forwarding face is on the local machine (management requests are to /localhost/...) and that command
signing has been set up (e.g.
|
static void |
unregister(net.named_data.jndn.Face face,
net.named_data.jndn.Name route,
String uri)
Unregister a route on a forwarder
Ensure the forwarding face is on the local machine (management requests are to /localhost/...) and that command
signing has been set up using forwarder.setCommandSigningInfo().
|
static void |
unsetStrategy(net.named_data.jndn.Face face,
net.named_data.jndn.Name prefix)
Set a strategy on the forwarder; see
setStrategy(net.named_data.jndn.Face, net.named_data.jndn.Name, net.named_data.jndn.Name)
for more information. |
public static ForwarderStatus getForwarderStatus(net.named_data.jndn.Face face) throws ManagementException
face
- only a localhost FaceManagementException
- if the network request failed or the returned status could not be decodedpublic static List<FaceStatus> getFaceList(net.named_data.jndn.Face face) throws ManagementException
face
- only a localhost FaceManagementException
- if the network request failed or if the NFD rejected the requestpublic static List<FibEntry> getFibList(net.named_data.jndn.Face face) throws ManagementException
face
- only a localhost FaceManagementException
- if the network request failed or if the NFD rejected the requestpublic static List<RibEntry> getRouteList(net.named_data.jndn.Face face) throws ManagementException
face
- only a localhost FaceManagementException
- if the network request failed or if the NFD rejected the requestpublic static List<StrategyChoice> getStrategyList(net.named_data.jndn.Face face) throws ManagementException
face
- only a localhost FaceManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static List<ChannelStatus> getChannelStatusList(net.named_data.jndn.Face face) throws ManagementException
face
- only a localhost FaceManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static net.named_data.jndn.KeyLocator getKeyLocator(net.named_data.jndn.Face face) throws ManagementException
KeyLocator
for an NFD.face
- only a localhost Face
KeyLocator
of the NFD's keyManagementException
- if the network request failed, if the NFD rejected the request, or no
KeyLocator was foundpublic static int createFace(net.named_data.jndn.Face face, String uri) throws ManagementException
face
- only a localhost Face
uri
- a string like "tcp4://host.name.com" (see nfd-status channels
for more protocol options)ManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void destroyFace(net.named_data.jndn.Face face, int faceId) throws ManagementException
face
- only a localhost Face
faceId
- the ID of the face to destroyManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void enableLocalControlHeader(net.named_data.jndn.Face face, LocalControlHeader header) throws ManagementException
face
- only a localhost Face
header
- the control feature to enableManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void disableLocalControlHeader(net.named_data.jndn.Face face, LocalControlHeader header) throws ManagementException
face
- only a localhost Face
header
- the control feature to disableManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void register(net.named_data.jndn.Face face, net.named_data.jndn.ControlParameters controlParameters) throws ManagementException
face
- only a localhost Face
controlParameters
- the ControlParameters
command optionsManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void register(net.named_data.jndn.Face face, net.named_data.jndn.Name route, int cost) throws ManagementException
face
- only a localhost Face
route
- the Name
prefix of the routecost
- the numeric cost of forwarding along the routeManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void register(net.named_data.jndn.Face face, String uri, net.named_data.jndn.Name route, int cost) throws ManagementException
face
- only a localhost Face
uri
- the URI (e.g. "tcp4://10.10.2.2:6363") of the remote node; note
that this must be one of the canonical forms described in the wiki
(http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#TCP) for NFD to
accept the registration--otherwise you will see 400 errorsroute
- the Name
prefix of the routecost
- the numeric cost of forwarding along the routeManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void register(net.named_data.jndn.Face forwarder, int faceId, net.named_data.jndn.Name route, int cost) throws ManagementException
forwarder
- only a localhost Face
faceId
- the ID of the Face
to assign to the routeroute
- the Name
prefix of the routecost
- the numeric cost of forwarding along the routeManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void unregister(net.named_data.jndn.Face face, net.named_data.jndn.ControlParameters controlParameters) throws ManagementException
face
- only a localhost Face
controlParameters
- the ControlParameters
command optionsManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void unregister(net.named_data.jndn.Face face, net.named_data.jndn.Name route) throws ManagementException
face
- only a localhost Face
route
- the Name
prefix of the routeManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void unregister(net.named_data.jndn.Face face, net.named_data.jndn.Name route, int faceId) throws ManagementException
face
- only a localhost Face
route
- the Name
prefix of the routefaceId
- the specific ID of the face to remove (more than one face can
be registered to a route)ManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void unregister(net.named_data.jndn.Face face, net.named_data.jndn.Name route, String uri) throws ManagementException
face
- only a localhost Face
route
- the Name
prefix of the routeuri
- the URI (e.g. "tcp4://some.host.com") of the remote node (more
than one face can be registered to a route)ManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void setStrategy(net.named_data.jndn.Face face, net.named_data.jndn.Name prefix, net.named_data.jndn.Name strategy) throws ManagementException
face
- only a localhost Face
prefix
- the Name
prefixstrategy
- the Name
of the strategy to set, e.g.
/localhost/nfd/strategy/broadcastManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestpublic static void unsetStrategy(net.named_data.jndn.Face face, net.named_data.jndn.Name prefix) throws ManagementException
setStrategy(net.named_data.jndn.Face, net.named_data.jndn.Name, net.named_data.jndn.Name)
for more information. Ensure the forwarding face is on the local machine
(management requests are to /localhost/...) and that command signing has
been set up (e.g. forwarder.setCommandSigningInfo()).face
- only a localhost Face
prefix
- the Name
prefixManagementException
- if the network request failed, the NFD response could not be decoded, or
the NFD rejected the requestCopyright © 2016. All rights reserved.