peek: code modernization and cleanup
Change-Id: I42d706aa02ab03557d708c729f65716c1c2d3494
diff --git a/manpages/ndnpeek.rst b/manpages/ndnpeek.rst
index 7ebbf65..9468889 100644
--- a/manpages/ndnpeek.rst
+++ b/manpages/ndnpeek.rst
@@ -1,22 +1,19 @@
ndnpeek
=======
-Usage
------
+Synopsis
+--------
-::
-
- ndnpeek [-h] [-f] [-r] [-m min] [-M max] [-l lifetime] [-p] [-w timeout] [-v] [-V] name
+**ndnpeek** [-h] [-P] [-f] [-l *lifetime*] [-p] [-w *timeout*] [-v] [-V] *name*
Description
-----------
-``ndnpeek`` is a simple consumer program that sends one Interest and expects one Data
-packet in response. The full Data packet (in TLV format) is written to stdout. The
-program terminates with return code 0 if Data arrives, and with return code 1 when timeout
-occurs.
+:program:`ndnpeek` is a simple consumer program that sends one Interest and
+expects one Data packet in response. By default, the full Data packet (in TLV
+format) is written to the standard output.
-``name`` is interpreted as the Interest name.
+*name* is interpreted as the Interest name.
Options
-------
@@ -30,26 +27,26 @@
``-f, --fresh``
If specified, include ``MustBeFresh`` element in the Interest packet.
-``--link-file [file]``
+``--link-file <file>``
Read Link object from ``file`` and add it as ``ForwardingHint`` to the Interest packet.
-``-l, --lifetime lifetime``
+``-l, --lifetime <lifetime>``
Set ``lifetime`` (in milliseconds) as the ``InterestLifetime``.
``-p, --payload``
If specified, print the received payload only, not the full packet.
-``-w, --timeout timeout``
- Timeout after ``timeout`` milliseconds.
+``-w, --timeout <timeout>``
+ Quit the program after ``timeout`` milliseconds, even if no reply has been received.
``-v, --verbose``
- If specified, verbose output.
+ Turn on verbose output.
``-V, --version``
Print version and exit.
-Exit Codes
-----------
+Exit Status
+-----------
0: Success
@@ -57,15 +54,13 @@
2: Malformed command line
-3: Network operation timed out
+3: Operation timed out
4: Nack received
-Examples
---------
+Example
+-------
-Send Interest for ``ndn:/app1/video`` and print the received payload only
-
-::
+Send Interest for ``/app1/video`` and print the received payload only::
ndnpeek -p ndn:/app1/video