Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 1 | ndnpoke |
| 2 | ======= |
| 3 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 4 | Synopsis |
| 5 | -------- |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 6 | |
Davide Pesavento | 6929b43 | 2021-01-26 17:07:58 -0500 | [diff] [blame] | 7 | **ndnpoke** [-h] [-f *freshness*] [-F] [-S *info*] [-u\|\ -w *timeout*] [-v] [-V] *name* |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 8 | |
| 9 | Description |
| 10 | ----------- |
| 11 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 12 | :program:`ndnpoke` is a simple producer program that reads a payload from the standard |
| 13 | input and publishes it as a single Data packet. The Data packet is either sent as a |
| 14 | response to an incoming Interest matching *name*, or immediately pushed to the local |
Davide Pesavento | 6a1396e | 2019-07-26 15:03:28 -0400 | [diff] [blame] | 15 | NDN forwarder as "unsolicited Data" if the **-u** flag is specified. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 16 | |
| 17 | Options |
| 18 | ------- |
| 19 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 20 | ``-h, --help`` |
| 21 | Print help and exit. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 22 | |
Davide Pesavento | 6929b43 | 2021-01-26 17:07:58 -0500 | [diff] [blame] | 23 | ``-f, --freshness <freshness>`` |
Davide Pesavento | 814ad34 | 2021-01-26 14:36:11 -0500 | [diff] [blame] | 24 | Set ``freshness`` (in milliseconds) as the ``FreshnessPeriod``. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 25 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 26 | ``-F, --final`` |
| 27 | Set the ``FinalBlockId`` to the last component of *name*. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 28 | |
Davide Pesavento | 7de32c1 | 2019-07-26 20:08:21 -0400 | [diff] [blame] | 29 | ``-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 Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 33 | |
Davide Pesavento | 7de32c1 | 2019-07-26 20:08:21 -0400 | [diff] [blame] | 34 | * 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 Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 40 | |
Davide Pesavento | 814ad34 | 2021-01-26 14:36:11 -0500 | [diff] [blame] | 41 | ``-u, --unsolicited`` |
| 42 | Send the Data packet without waiting for an incoming Interest. |
| 43 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 44 | ``-w, --timeout <timeout>`` |
| 45 | Quit the program after ``timeout`` milliseconds, even if no Interest has been received. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 46 | |
Davide Pesavento | b3ae634 | 2019-07-25 21:07:16 -0400 | [diff] [blame] | 47 | ``-v, --verbose`` |
| 48 | Turn on verbose output. |
| 49 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 50 | ``-V, --version`` |
| 51 | Print version and exit. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 52 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 53 | Exit Status |
| 54 | ----------- |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 55 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 56 | 0: Success |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 57 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 58 | 1: An unspecified error occurred |
| 59 | |
| 60 | 2: Malformed command line |
| 61 | |
Davide Pesavento | 94dff00 | 2019-07-24 23:35:05 -0400 | [diff] [blame] | 62 | 3: No Interests received before the timeout |
| 63 | |
Davide Pesavento | 87434be | 2019-07-25 19:04:23 -0400 | [diff] [blame] | 64 | 5: Prefix registration failed |
| 65 | |
Davide Pesavento | a420e97 | 2021-02-25 00:56:25 -0500 | [diff] [blame^] | 66 | Examples |
| 67 | -------- |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 68 | |
| 69 | Create a Data packet with content ``hello`` and name ``/app/video`` and wait at |
| 70 | most 3 seconds for a matching Interest to arrive:: |
| 71 | |
| 72 | echo "hello" | ndnpoke -w 3000 /app/video |