blob: fe7b41a1e4d2beb8d7e64201548ed34b729b9462 [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
Teng Liang799390a2016-03-12 23:14:29 -070054``--link-file [file]``
55 Read Link object from ``file`` and add it to the expressed Interest.
56
Teng Liangd4ab87f2016-03-08 18:50:47 -070057Exit Codes
58----------
59
600: Success
61
621: An unspecified error occurred
63
642: Malformed command line
65
663: Network operation timed out
67
684: Nack received
Junxiao Shi2219a052015-05-28 02:53:48 -070069
70Examples
71--------
72
73Send Interest for ``ndn:/app1/video`` and print the received payload only
74
75::
76
77 ndnpeek -p ndn:/app1/video