blob: 83abfeba15bd37a02b1d5da107322f386e2e0425 [file] [log] [blame]
Junxiao Shi2219a052015-05-28 02:53:48 -07001ndnpoke
2=======
3
Davide Pesaventoe75861e2019-07-24 21:55:39 -04004Synopsis
5--------
Junxiao Shi2219a052015-05-28 02:53:48 -07006
Davide Pesavento7de32c12019-07-26 20:08:21 -04007**ndnpoke** [-h] [-u] [-F] [-x *freshness*] [-S *info*] [-w *timeout*] [-v] [-V] *name*
Junxiao Shi2219a052015-05-28 02:53:48 -07008
9Description
10-----------
11
Davide Pesaventoe75861e2019-07-24 21:55:39 -040012:program:`ndnpoke` is a simple producer program that reads a payload from the standard
13input and publishes it as a single Data packet. The Data packet is either sent as a
14response to an incoming Interest matching *name*, or immediately pushed to the local
Davide Pesavento6a1396e2019-07-26 15:03:28 -040015NDN forwarder as "unsolicited Data" if the **-u** flag is specified.
Junxiao Shi2219a052015-05-28 02:53:48 -070016
17Options
18-------
19
Davide Pesaventoe75861e2019-07-24 21:55:39 -040020``-h, --help``
21 Print help and exit.
Junxiao Shi2219a052015-05-28 02:53:48 -070022
Davide Pesavento6a1396e2019-07-26 15:03:28 -040023``-u, --unsolicited``
Davide Pesaventoe75861e2019-07-24 21:55:39 -040024 Send the Data packet without waiting for an incoming Interest.
Junxiao Shi2219a052015-05-28 02:53:48 -070025
Davide Pesaventoe75861e2019-07-24 21:55:39 -040026``-F, --final``
27 Set the ``FinalBlockId`` to the last component of *name*.
Junxiao Shi2219a052015-05-28 02:53:48 -070028
Davide Pesaventoe75861e2019-07-24 21:55:39 -040029``-x, --freshness <freshness>``
30 Set ``freshness`` (in milliseconds) as the ``FreshnessPeriod``.
Junxiao Shi2219a052015-05-28 02:53:48 -070031
Davide Pesavento7de32c12019-07-26 20:08:21 -040032``-S, --signing-info <info>``
33 Specify the parameters used to sign the Data packet. If omitted, the default key of
34 the default identity is used. The general syntax is ``<scheme>:<name>``. The most
35 common supported combinations are as follows:
Junxiao Shi2219a052015-05-28 02:53:48 -070036
Davide Pesavento7de32c12019-07-26 20:08:21 -040037 * Sign with the default certificate of the default key of an identity: ``id:/<my-identity>``.
38 * Sign with the default certificate of a specific key: ``key:/<my-identity>/ksk-1``.
39 * Sign with a specific certificate: ``cert:/<my-identity>/KEY/ksk-1/ID-CERT/%FD%01``.
40 * Sign with a SHA-256 digest: ``id:/localhost/identity/digest-sha256``. Note that this
41 is only a hash function, not a real signature, but it can significantly speed up
42 packet signing operations.
Junxiao Shi2219a052015-05-28 02:53:48 -070043
Davide Pesaventoe75861e2019-07-24 21:55:39 -040044``-w, --timeout <timeout>``
45 Quit the program after ``timeout`` milliseconds, even if no Interest has been received.
Junxiao Shi2219a052015-05-28 02:53:48 -070046
Davide Pesaventob3ae6342019-07-25 21:07:16 -040047``-v, --verbose``
48 Turn on verbose output.
49
Davide Pesaventoe75861e2019-07-24 21:55:39 -040050``-V, --version``
51 Print version and exit.
Junxiao Shi2219a052015-05-28 02:53:48 -070052
Davide Pesaventoe75861e2019-07-24 21:55:39 -040053Exit Status
54-----------
Junxiao Shi2219a052015-05-28 02:53:48 -070055
Davide Pesaventoe75861e2019-07-24 21:55:39 -0400560: Success
Junxiao Shi2219a052015-05-28 02:53:48 -070057
Davide Pesaventoe75861e2019-07-24 21:55:39 -0400581: An unspecified error occurred
59
602: Malformed command line
61
Davide Pesavento94dff002019-07-24 23:35:05 -0400623: No Interests received before the timeout
63
Davide Pesavento87434be2019-07-25 19:04:23 -0400645: Prefix registration failed
65
Davide Pesaventoe75861e2019-07-24 21:55:39 -040066Example
67-------
68
69Create a Data packet with content ``hello`` and name ``/app/video`` and wait at
70most 3 seconds for a matching Interest to arrive::
71
72 echo "hello" | ndnpoke -w 3000 /app/video