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 | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 7 | **ndnpoke** [-h] [-f] [-F] [-x *freshness*] [-i *identity*\|\ -D] [-w *timeout*] [-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 |
| 15 | NDN forwarder as "unsolicited Data" if the **-f** 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 | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 23 | ``-f, --force`` |
| 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 | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 41 | ``-V, --version`` |
| 42 | Print version and exit. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 43 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 44 | Exit Status |
| 45 | ----------- |
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 | 0: Success |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 48 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 49 | 1: An unspecified error occurred |
| 50 | |
| 51 | 2: Malformed command line |
| 52 | |
Davide Pesavento | 94dff00 | 2019-07-24 23:35:05 -0400 | [diff] [blame] | 53 | 3: No Interests received before the timeout |
| 54 | |
Davide Pesavento | 87434be | 2019-07-25 19:04:23 -0400 | [diff] [blame] | 55 | 5: Prefix registration failed |
| 56 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 57 | Example |
| 58 | ------- |
| 59 | |
| 60 | Create a Data packet with content ``hello`` and name ``/app/video`` and wait at |
| 61 | most 3 seconds for a matching Interest to arrive:: |
| 62 | |
| 63 | echo "hello" | ndnpoke -w 3000 /app/video |