blob: 3735337682516ef7aa56fbd0526e959083d5bf46 [file] [log] [blame]
Junxiao Shi2219a052015-05-28 02:53:48 -07001ndnpeek
2=======
3
4Usage
5-----
6
7::
8
Teng Liangd4ab87f2016-03-08 18:50:47 -07009 ndnpeek [-h] [-f] [-r] [-m min] [-M max] [-l lifetime] [-p] [-w timeout] [-v] [-V] name
Junxiao Shi2219a052015-05-28 02:53:48 -070010
11Description
12-----------
13
14``ndnpeek`` is a simple consumer program that sends one Interest and expects one Data
15packet in response. The full Data packet (in TLV format) is written to stdout. The
16program terminates with return code 0 if Data arrives, and with return code 1 when timeout
17occurs.
18
19``name`` is interpreted as the Interest name.
20
21Options
22-------
23
Teng Liangd4ab87f2016-03-08 18:50:47 -070024``-h, --help``
25 Print help and exit.
Junxiao Shi2219a052015-05-28 02:53:48 -070026
Teng Liangd4ab87f2016-03-08 18:50:47 -070027``-f, --fresh``
Junxiao Shi2219a052015-05-28 02:53:48 -070028 If specified, set ``MustBeFresh`` selector in the Interest packet.
29
Teng Liangd4ab87f2016-03-08 18:50:47 -070030``-r, --rightmost``
Junxiao Shi2219a052015-05-28 02:53:48 -070031 Set ``ChildSelector=1`` (the rightmost child) selector.
32
Teng Liangd4ab87f2016-03-08 18:50:47 -070033``-m, --minsuffix min``
Junxiao Shi2219a052015-05-28 02:53:48 -070034 Set ``min`` as the ``MinSuffixComponents`` selector.
35
Teng Liangd4ab87f2016-03-08 18:50:47 -070036``-M, --maxsuffix max``
Junxiao Shi2219a052015-05-28 02:53:48 -070037 Set ``max`` as the ``MaxSuffixComponents`` selector.
38
Teng Liangd4ab87f2016-03-08 18:50:47 -070039``-l, --lifetime lifetime``
Junxiao Shi2219a052015-05-28 02:53:48 -070040 Set ``lifetime`` (in milliseconds) as the ``InterestLifetime``.
41
Teng Liangd4ab87f2016-03-08 18:50:47 -070042``-p, --payload``
Junxiao Shi2219a052015-05-28 02:53:48 -070043 If specified, print the received payload only, not the full packet.
44
Teng Liangd4ab87f2016-03-08 18:50:47 -070045``-w, --timeout timeout``
Junxiao Shi2219a052015-05-28 02:53:48 -070046 Timeout after ``timeout`` milliseconds.
47
Teng Liangd4ab87f2016-03-08 18:50:47 -070048``-v, --verbose``
49 If specified, verbose output.
50
51``-V, --version``
52 Print version and exit.
53
54Exit Codes
55----------
56
570: Success
58
591: An unspecified error occurred
60
612: Malformed command line
62
633: Network operation timed out
64
654: Nack received
Junxiao Shi2219a052015-05-28 02:53:48 -070066
67Examples
68--------
69
70Send Interest for ``ndn:/app1/video`` and print the received payload only
71
72::
73
74 ndnpeek -p ndn:/app1/video