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 | 6a1396e | 2019-07-26 15:03:28 -0400 | [diff] [blame] | 7 | **ndnpoke** [-h] [-u] [-F] [-x *freshness*] [-i *identity*\|\ -D] [-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 | 6a1396e | 2019-07-26 15:03:28 -0400 | [diff] [blame] | 23 | ``-u, --unsolicited`` |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 24 | Send the Data packet without waiting for an incoming Interest. |
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 | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 29 | ``-x, --freshness <freshness>`` |
| 30 | Set ``freshness`` (in milliseconds) as the ``FreshnessPeriod``. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 31 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 32 | ``-i, --identity <identity>`` |
| 33 | Use ``identity`` to sign the Data packet. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 34 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 35 | ``-D, --digest`` |
| 36 | Use ``DigestSha256`` signature type instead of the default ``SignatureSha256WithRsa``. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 37 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 38 | ``-w, --timeout <timeout>`` |
| 39 | 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] | 40 | |
Davide Pesavento | b3ae634 | 2019-07-25 21:07:16 -0400 | [diff] [blame] | 41 | ``-v, --verbose`` |
| 42 | Turn on verbose output. |
| 43 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 44 | ``-V, --version`` |
| 45 | Print version and exit. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 46 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 47 | Exit Status |
| 48 | ----------- |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 49 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 50 | 0: Success |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 51 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 52 | 1: An unspecified error occurred |
| 53 | |
| 54 | 2: Malformed command line |
| 55 | |
Davide Pesavento | 94dff00 | 2019-07-24 23:35:05 -0400 | [diff] [blame] | 56 | 3: No Interests received before the timeout |
| 57 | |
Davide Pesavento | 87434be | 2019-07-25 19:04:23 -0400 | [diff] [blame] | 58 | 5: Prefix registration failed |
| 59 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 60 | Example |
| 61 | ------- |
| 62 | |
| 63 | Create a Data packet with content ``hello`` and name ``/app/video`` and wait at |
| 64 | most 3 seconds for a matching Interest to arrive:: |
| 65 | |
| 66 | echo "hello" | ndnpoke -w 3000 /app/video |