blob: 7ebbf65917b669d8633e8c84cff33d5ff89c8802 [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
Junxiao Shib54aabd2018-04-16 19:36:24 +000027``-P, --prefix``
28 If specified, include ``CanBePrefix`` element in the Interest packet.
29
Teng Liangd4ab87f2016-03-08 18:50:47 -070030``-f, --fresh``
Junxiao Shib54aabd2018-04-16 19:36:24 +000031 If specified, include ``MustBeFresh`` element in the Interest packet.
Junxiao Shi2219a052015-05-28 02:53:48 -070032
Junxiao Shib54aabd2018-04-16 19:36:24 +000033``--link-file [file]``
34 Read Link object from ``file`` and add it as ``ForwardingHint`` to the Interest packet.
Junxiao Shi2219a052015-05-28 02:53:48 -070035
Teng Liangd4ab87f2016-03-08 18:50:47 -070036``-l, --lifetime lifetime``
Junxiao Shi2219a052015-05-28 02:53:48 -070037 Set ``lifetime`` (in milliseconds) as the ``InterestLifetime``.
38
Teng Liangd4ab87f2016-03-08 18:50:47 -070039``-p, --payload``
Junxiao Shi2219a052015-05-28 02:53:48 -070040 If specified, print the received payload only, not the full packet.
41
Teng Liangd4ab87f2016-03-08 18:50:47 -070042``-w, --timeout timeout``
Junxiao Shi2219a052015-05-28 02:53:48 -070043 Timeout after ``timeout`` milliseconds.
44
Teng Liangd4ab87f2016-03-08 18:50:47 -070045``-v, --verbose``
46 If specified, verbose output.
47
48``-V, --version``
49 Print version and exit.
50
51Exit Codes
52----------
53
540: Success
55
561: An unspecified error occurred
57
582: Malformed command line
59
603: Network operation timed out
61
624: Nack received
Junxiao Shi2219a052015-05-28 02:53:48 -070063
64Examples
65--------
66
67Send Interest for ``ndn:/app1/video`` and print the received payload only
68
69::
70
71 ndnpeek -p ndn:/app1/video