blob: 39af9742ba3e0b1eac8345923a91f47646d9a2d0 [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 Pesavento6929b432021-01-26 17:07:58 -05007**ndnpoke** [-h] [-f *freshness*] [-F] [-S *info*] [-u\|\ -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 Pesavento6929b432021-01-26 17:07:58 -050023``-f, --freshness <freshness>``
Davide Pesavento814ad342021-01-26 14:36:11 -050024 Set ``freshness`` (in milliseconds) as the ``FreshnessPeriod``.
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 Pesavento7de32c12019-07-26 20:08:21 -040029``-S, --signing-info <info>``
30 Specify the parameters used to sign the Data packet. If omitted, the default key of
31 the default identity is used. The general syntax is ``<scheme>:<name>``. The most
32 common supported combinations are as follows:
Junxiao Shi2219a052015-05-28 02:53:48 -070033
Davide Pesavento7de32c12019-07-26 20:08:21 -040034 * Sign with the default certificate of the default key of an identity: ``id:/<my-identity>``.
35 * Sign with the default certificate of a specific key: ``key:/<my-identity>/ksk-1``.
36 * Sign with a specific certificate: ``cert:/<my-identity>/KEY/ksk-1/ID-CERT/%FD%01``.
37 * Sign with a SHA-256 digest: ``id:/localhost/identity/digest-sha256``. Note that this
38 is only a hash function, not a real signature, but it can significantly speed up
39 packet signing operations.
Junxiao Shi2219a052015-05-28 02:53:48 -070040
Davide Pesavento814ad342021-01-26 14:36:11 -050041``-u, --unsolicited``
42 Send the Data packet without waiting for an incoming Interest.
43
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