blob: bebfbd1445f79df45b8ddc6197ad20ea06314cc8 [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 Pesavento96028232019-08-17 01:26:13 -04007**ndnpeek** [-h] [-P] [-f] [-l *lifetime*] [-A *parameters*] [-p] [-w *timeout*] [-v] [-V] *name*
Junxiao Shi2219a052015-05-28 02:53:48 -07008
9Description
10-----------
11
Davide Pesavento65d11552019-06-09 19:15:50 -040012:program:`ndnpeek` is a simple consumer program that sends one Interest and
13expects one Data packet in response. By default, the full Data packet (in TLV
14format) is written to the standard output.
Junxiao Shi2219a052015-05-28 02:53:48 -070015
Davide Pesavento65d11552019-06-09 19:15:50 -040016*name* is interpreted as the Interest name.
Junxiao Shi2219a052015-05-28 02:53:48 -070017
18Options
19-------
20
Teng Liangd4ab87f2016-03-08 18:50:47 -070021``-h, --help``
22 Print help and exit.
Junxiao Shi2219a052015-05-28 02:53:48 -070023
Junxiao Shib54aabd2018-04-16 19:36:24 +000024``-P, --prefix``
25 If specified, include ``CanBePrefix`` element in the Interest packet.
26
Teng Liangd4ab87f2016-03-08 18:50:47 -070027``-f, --fresh``
Junxiao Shib54aabd2018-04-16 19:36:24 +000028 If specified, include ``MustBeFresh`` element in the Interest packet.
Junxiao Shi2219a052015-05-28 02:53:48 -070029
Davide Pesavento65d11552019-06-09 19:15:50 -040030``--link-file <file>``
Junxiao Shib54aabd2018-04-16 19:36:24 +000031 Read Link object from ``file`` and add it as ``ForwardingHint`` to the Interest packet.
Junxiao Shi2219a052015-05-28 02:53:48 -070032
Davide Pesavento65d11552019-06-09 19:15:50 -040033``-l, --lifetime <lifetime>``
Junxiao Shi2219a052015-05-28 02:53:48 -070034 Set ``lifetime`` (in milliseconds) as the ``InterestLifetime``.
35
Davide Pesavento96028232019-08-17 01:26:13 -040036``-A, --app-params <parameters>``
37 Set the Interest's ``ApplicationParameters`` from a base64-encoded string.
38
39``--app-params-file <file>``
40 Set the Interest's ``ApplicationParameters`` from the specified file.
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
Davide Pesavento65d11552019-06-09 19:15:50 -040045``-w, --timeout <timeout>``
46 Quit the program after ``timeout`` milliseconds, even if no reply has been received.
Junxiao Shi2219a052015-05-28 02:53:48 -070047
Teng Liangd4ab87f2016-03-08 18:50:47 -070048``-v, --verbose``
Davide Pesavento65d11552019-06-09 19:15:50 -040049 Turn on verbose output.
Teng Liangd4ab87f2016-03-08 18:50:47 -070050
51``-V, --version``
52 Print version and exit.
53
Davide Pesavento65d11552019-06-09 19:15:50 -040054Exit Status
55-----------
Teng Liangd4ab87f2016-03-08 18:50:47 -070056
570: Success
58
591: An unspecified error occurred
60
612: Malformed command line
62
Davide Pesavento65d11552019-06-09 19:15:50 -0400633: Operation timed out
Teng Liangd4ab87f2016-03-08 18:50:47 -070064
654: Nack received
Junxiao Shi2219a052015-05-28 02:53:48 -070066
Davide Pesavento65d11552019-06-09 19:15:50 -040067Example
68-------
Junxiao Shi2219a052015-05-28 02:53:48 -070069
Davide Pesavento96028232019-08-17 01:26:13 -040070Send an Interest for ``/app1/video`` and print the received payload only::
Junxiao Shi2219a052015-05-28 02:53:48 -070071
Davide Pesaventoe75861e2019-07-24 21:55:39 -040072 ndnpeek -p /app1/video
Davide Pesavento96028232019-08-17 01:26:13 -040073
74Send an Interest for ``/app2/foo``, requesting fresh content, with an InterestLifetime
75of 8 seconds, and with the ApplicationParameters containing the ASCII string "hello";
76print the performed operations verbosely but discard the received Data packet::
77
78 ndnpeek -vf -l 8000 -A "aGVsbG8=" /app2/foo >/dev/null