blob: 0c3eb81aa0234180f6e6959ebb22e724f0f671a8 [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
Davide Pesavento65d11552019-06-09 19:15:50 -040031``--link-file <file>``
Junxiao Shib54aabd2018-04-16 19:36:24 +000032 Read Link object from ``file`` and add it as ``ForwardingHint`` to the Interest packet.
Junxiao Shi2219a052015-05-28 02:53:48 -070033
Davide Pesavento65d11552019-06-09 19:15:50 -040034``-l, --lifetime <lifetime>``
Junxiao Shi2219a052015-05-28 02:53:48 -070035 Set ``lifetime`` (in milliseconds) as the ``InterestLifetime``.
36
Davide Pesaventoc214e072019-08-17 01:33:28 -040037``-H, --hop-limit <hops>``
38 Set the Interest's ``HopLimit`` to the specified number of hops.
39
Davide Pesavento96028232019-08-17 01:26:13 -040040``-A, --app-params <parameters>``
41 Set the Interest's ``ApplicationParameters`` from a base64-encoded string.
42
43``--app-params-file <file>``
44 Set the Interest's ``ApplicationParameters`` from the specified file.
45
Teng Liangd4ab87f2016-03-08 18:50:47 -070046``-p, --payload``
Junxiao Shi2219a052015-05-28 02:53:48 -070047 If specified, print the received payload only, not the full packet.
48
Davide Pesavento65d11552019-06-09 19:15:50 -040049``-w, --timeout <timeout>``
50 Quit the program after ``timeout`` milliseconds, even if no reply has been received.
Junxiao Shi2219a052015-05-28 02:53:48 -070051
Teng Liangd4ab87f2016-03-08 18:50:47 -070052``-v, --verbose``
Davide Pesavento65d11552019-06-09 19:15:50 -040053 Turn on verbose output.
Teng Liangd4ab87f2016-03-08 18:50:47 -070054
55``-V, --version``
56 Print version and exit.
57
Davide Pesavento65d11552019-06-09 19:15:50 -040058Exit Status
59-----------
Teng Liangd4ab87f2016-03-08 18:50:47 -070060
610: Success
62
631: An unspecified error occurred
64
652: Malformed command line
66
Davide Pesavento65d11552019-06-09 19:15:50 -0400673: Operation timed out
Teng Liangd4ab87f2016-03-08 18:50:47 -070068
694: Nack received
Junxiao Shi2219a052015-05-28 02:53:48 -070070
Davide Pesavento65d11552019-06-09 19:15:50 -040071Example
72-------
Junxiao Shi2219a052015-05-28 02:53:48 -070073
Davide Pesavento96028232019-08-17 01:26:13 -040074Send an Interest for ``/app1/video`` and print the received payload only::
Junxiao Shi2219a052015-05-28 02:53:48 -070075
Davide Pesaventoe75861e2019-07-24 21:55:39 -040076 ndnpeek -p /app1/video
Davide Pesavento96028232019-08-17 01:26:13 -040077
78Send an Interest for ``/app2/foo``, requesting fresh content, with an InterestLifetime
79of 8 seconds, and with the ApplicationParameters containing the ASCII string "hello";
80print the performed operations verbosely but discard the received Data packet::
81
82 ndnpeek -vf -l 8000 -A "aGVsbG8=" /app2/foo >/dev/null