docs: give nfdc examples
refs #4234
Change-Id: Ib8102edfc64f2cc8e822335baaa288b0cec3cf42
diff --git a/docs/manpages/nfdc-face.rst b/docs/manpages/nfdc-face.rst
index 2e21b1e..6fd8779 100644
--- a/docs/manpages/nfdc-face.rst
+++ b/docs/manpages/nfdc-face.rst
@@ -71,7 +71,6 @@
EXIT CODES
----------
-
0: Success
1: An unspecified error occurred
@@ -84,6 +83,32 @@
5: Ambiguous: multiple matching faces are found (**nfdc face destroy** only)
+EXAMPLES
+--------
+nfdc face list
+ List all faces.
+
+nfdc face list scheme udp4
+ List all UDP-over-IPv4 faces.
+
+nfdc face show id 300
+ Show information about the face whose FaceId is 300.
+
+nfdc face create remote udp://router.example.net
+ Create a face with the specified remote FaceUri, keeping all other settings at their defaults.
+
+nfdc face create remote ether://[08:00:27:01:01:01] local dev://eth2 persistency permanent
+ Create a face with the specified remote FaceUri, local FaceUri, and persistency.
+
+nfdc face create remote udp://router.example.net reliability on
+ Create a face with the specified remote FaceUri and enable NDNLP reliability.
+
+nfdc face destroy 300
+ Destroy the face whose FaceId is 300.
+
+nfdc face destroy udp4://192.0.2.1:6363
+ Destroy the face whose remote FaceUri is "udp4://192.0.2.1:6363".
+
SEE ALSO
--------
nfd(1), nfdc(1)
diff --git a/docs/manpages/nfdc-route.rst b/docs/manpages/nfdc-route.rst
index 8ae5bc6..cbaf2bf 100644
--- a/docs/manpages/nfdc-route.rst
+++ b/docs/manpages/nfdc-route.rst
@@ -67,7 +67,6 @@
EXIT CODES
----------
-
0: Success
1: An unspecified error occurred
@@ -82,6 +81,29 @@
6: Route not found (**nfdc route list** and **nfdc route show** only)
+EXAMPLES
+--------
+nfdc route list
+ List all routes.
+
+nfdc route list nexthop 300
+ List routes whose nexthop is face 300.
+
+nfdc route list origin static
+ List static routes.
+
+nfdc route show prefix /localhost/nfd
+ List routes with name prefix "/localhost/nfd".
+
+nfdc route add prefix /ndn nexthop 300 cost 100
+ Add a route with prefix "/ndn" toward face 300, with administrative cost 100.
+
+nfdc route add prefix / nexthop udp://router.example.net
+ Add a route with prefix "/" toward a face with the specified remote FaceUri.
+
+nfdc route remove prefix /ndn nexthop 300 origin static
+ Remove the route whose prefix is "/ndn", nexthop is face 300, and origin is "static".
+
SEE ALSO
--------
nfd(1), nfdc(1)
diff --git a/docs/manpages/nfdc-strategy.rst b/docs/manpages/nfdc-strategy.rst
index 6a1e592..20e33f1 100644
--- a/docs/manpages/nfdc-strategy.rst
+++ b/docs/manpages/nfdc-strategy.rst
@@ -44,7 +44,6 @@
EXIT CODES
----------
-
0: Success
1: An unspecified error occurred
@@ -53,6 +52,23 @@
7: Strategy not found (**nfdc strategy set** only)
+EXAMPLES
+--------
+nfdc strategy list
+ List all configured strategy choices.
+
+nfdc strategy show prefix /localhost/ping/1
+ Identify which strategy will handle Interests named "/localhost/ping/1".
+
+nfdc strategy set prefix / strategy /localhost/nfd/strategy/best-route
+ Set the default strategy to best-route, latest version.
+
+nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/multicast/%FD%01
+ Set the strategy of the "/ndn" prefix to multicast, version 1.
+
+nfdc strategy unset prefix /ndn
+ Clear the strategy choice for the "/ndn" prefix.
+
SEE ALSO
--------
nfd(1), nfdc(1)
diff --git a/docs/manpages/nfdc.rst b/docs/manpages/nfdc.rst
index 79140d6..17824b8 100644
--- a/docs/manpages/nfdc.rst
+++ b/docs/manpages/nfdc.rst
@@ -33,15 +33,11 @@
EXAMPLES
--------
-Print a list of all subcommands:
-::
+nfdc
+ List all subcommands.
- $ nfdc
-
-Show how to use ``nfdc face create`` command:
-::
-
- $ nfdc help face create
+nfdc help face create
+ Show how to use the ``nfdc face create`` subcommand.
SEE ALSO
--------