blob: 9d42a7abf0bf76c36abfc23c022d2f76764c69cc [file] [log] [blame]
Junxiao Shi2219a052015-05-28 02:53:48 -07001ndnpeek
2=======
3
Davide Pesavento65d11552019-06-09 19:15:50 -04004Synopsis
5--------
Junxiao Shi2219a052015-05-28 02:53:48 -07006
Davide Pesaventoc214e072019-08-17 01:33:28 -04007**ndnpeek** [-h] [-P] [-f] [-l *lifetime*] [-H *hops*] [-A *parameters*]
8[-p] [-w *timeout*] [-v] [-V] *name*
Junxiao Shi2219a052015-05-28 02:53:48 -07009
10Description
11-----------
12
Davide Pesavento65d11552019-06-09 19:15:50 -040013:program:`ndnpeek` is a simple consumer program that sends one Interest and
14expects one Data packet in response. By default, the full Data packet (in TLV
15format) is written to the standard output.
Junxiao Shi2219a052015-05-28 02:53:48 -070016
Davide Pesavento65d11552019-06-09 19:15:50 -040017*name* is interpreted as the Interest name.
Junxiao Shi2219a052015-05-28 02:53:48 -070018
19Options
20-------
21
Teng Liangd4ab87f2016-03-08 18:50:47 -070022``-h, --help``
23 Print help and exit.
Junxiao Shi2219a052015-05-28 02:53:48 -070024
Junxiao Shib54aabd2018-04-16 19:36:24 +000025``-P, --prefix``
26 If specified, include ``CanBePrefix`` element in the Interest packet.
27
Teng Liangd4ab87f2016-03-08 18:50:47 -070028``-f, --fresh``
Junxiao Shib54aabd2018-04-16 19:36:24 +000029 If specified, include ``MustBeFresh`` element in the Interest packet.
Junxiao Shi2219a052015-05-28 02:53:48 -070030
Junxiao Shifd2d1012022-01-11 18:20:38 +000031``-F, --fwhint <name>``
32 Add a delegation name to the ``ForwardingHint`` of the Interest packet.
33 This option may be repeated to specify multiple delegation names.
Junxiao Shi2219a052015-05-28 02:53:48 -070034
Davide Pesavento65d11552019-06-09 19:15:50 -040035``-l, --lifetime <lifetime>``
Junxiao Shi2219a052015-05-28 02:53:48 -070036 Set ``lifetime`` (in milliseconds) as the ``InterestLifetime``.
37
Davide Pesaventoc214e072019-08-17 01:33:28 -040038``-H, --hop-limit <hops>``
39 Set the Interest's ``HopLimit`` to the specified number of hops.
40
Davide Pesavento96028232019-08-17 01:26:13 -040041``-A, --app-params <parameters>``
42 Set the Interest's ``ApplicationParameters`` from a base64-encoded string.
43
44``--app-params-file <file>``
45 Set the Interest's ``ApplicationParameters`` from the specified file.
46
Teng Liangd4ab87f2016-03-08 18:50:47 -070047``-p, --payload``
Junxiao Shi2219a052015-05-28 02:53:48 -070048 If specified, print the received payload only, not the full packet.
49
Davide Pesavento65d11552019-06-09 19:15:50 -040050``-w, --timeout <timeout>``
51 Quit the program after ``timeout`` milliseconds, even if no reply has been received.
Junxiao Shi2219a052015-05-28 02:53:48 -070052
Teng Liangd4ab87f2016-03-08 18:50:47 -070053``-v, --verbose``
Davide Pesavento65d11552019-06-09 19:15:50 -040054 Turn on verbose output.
Teng Liangd4ab87f2016-03-08 18:50:47 -070055
56``-V, --version``
57 Print version and exit.
58
Davide Pesavento65d11552019-06-09 19:15:50 -040059Exit Status
60-----------
Teng Liangd4ab87f2016-03-08 18:50:47 -070061
620: Success
63
641: An unspecified error occurred
65
662: Malformed command line
67
Davide Pesavento65d11552019-06-09 19:15:50 -0400683: Operation timed out
Teng Liangd4ab87f2016-03-08 18:50:47 -070069
704: Nack received
Junxiao Shi2219a052015-05-28 02:53:48 -070071
Davide Pesaventoa420e972021-02-25 00:56:25 -050072Examples
73--------
Junxiao Shi2219a052015-05-28 02:53:48 -070074
Davide Pesavento96028232019-08-17 01:26:13 -040075Send an Interest for ``/app1/video`` and print the received payload only::
Junxiao Shi2219a052015-05-28 02:53:48 -070076
Davide Pesaventoe75861e2019-07-24 21:55:39 -040077 ndnpeek -p /app1/video
Davide Pesavento96028232019-08-17 01:26:13 -040078
79Send an Interest for ``/app2/foo``, requesting fresh content, with an InterestLifetime
80of 8 seconds, and with the ApplicationParameters containing the ASCII string "hello";
81print the performed operations verbosely but discard the received Data packet::
82
83 ndnpeek -vf -l 8000 -A "aGVsbG8=" /app2/foo >/dev/null