Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 1 | ndnpeek |
| 2 | ======= |
| 3 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 4 | Synopsis |
| 5 | -------- |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 6 | |
Davide Pesavento | c214e07 | 2019-08-17 01:33:28 -0400 | [diff] [blame] | 7 | **ndnpeek** [-h] [-P] [-f] [-l *lifetime*] [-H *hops*] [-A *parameters*] |
| 8 | [-p] [-w *timeout*] [-v] [-V] *name* |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 9 | |
| 10 | Description |
| 11 | ----------- |
| 12 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 13 | :program:`ndnpeek` is a simple consumer program that sends one Interest and |
| 14 | expects one Data packet in response. By default, the full Data packet (in TLV |
| 15 | format) is written to the standard output. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 16 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 17 | *name* is interpreted as the Interest name. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 18 | |
| 19 | Options |
| 20 | ------- |
| 21 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 22 | ``-h, --help`` |
| 23 | Print help and exit. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 24 | |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 25 | ``-P, --prefix`` |
| 26 | If specified, include ``CanBePrefix`` element in the Interest packet. |
| 27 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 28 | ``-f, --fresh`` |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 29 | If specified, include ``MustBeFresh`` element in the Interest packet. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 30 | |
Junxiao Shi | fd2d101 | 2022-01-11 18:20:38 +0000 | [diff] [blame] | 31 | ``-F, --fwhint <name>`` |
| 32 | Add a delegation name to the ``ForwardingHint`` of the Interest packet. |
| 33 | This option may be repeated to specify multiple delegation names. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 34 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 35 | ``-l, --lifetime <lifetime>`` |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 36 | Set ``lifetime`` (in milliseconds) as the ``InterestLifetime``. |
| 37 | |
Davide Pesavento | c214e07 | 2019-08-17 01:33:28 -0400 | [diff] [blame] | 38 | ``-H, --hop-limit <hops>`` |
| 39 | Set the Interest's ``HopLimit`` to the specified number of hops. |
| 40 | |
Davide Pesavento | 9602823 | 2019-08-17 01:26:13 -0400 | [diff] [blame] | 41 | ``-A, --app-params <parameters>`` |
| 42 | Set the Interest's ``ApplicationParameters`` from a base64-encoded string. |
| 43 | |
| 44 | ``--app-params-file <file>`` |
| 45 | Set the Interest's ``ApplicationParameters`` from the specified file. |
| 46 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 47 | ``-p, --payload`` |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 48 | If specified, print the received payload only, not the full packet. |
| 49 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 50 | ``-w, --timeout <timeout>`` |
| 51 | Quit the program after ``timeout`` milliseconds, even if no reply has been received. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 52 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 53 | ``-v, --verbose`` |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 54 | Turn on verbose output. |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 55 | |
| 56 | ``-V, --version`` |
| 57 | Print version and exit. |
| 58 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 59 | Exit Status |
| 60 | ----------- |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 61 | |
| 62 | 0: Success |
| 63 | |
| 64 | 1: An unspecified error occurred |
| 65 | |
| 66 | 2: Malformed command line |
| 67 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 68 | 3: Operation timed out |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 69 | |
| 70 | 4: Nack received |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 71 | |
Davide Pesavento | a420e97 | 2021-02-25 00:56:25 -0500 | [diff] [blame] | 72 | Examples |
| 73 | -------- |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 74 | |
Davide Pesavento | 9602823 | 2019-08-17 01:26:13 -0400 | [diff] [blame] | 75 | Send an Interest for ``/app1/video`` and print the received payload only:: |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 76 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 77 | ndnpeek -p /app1/video |
Davide Pesavento | 9602823 | 2019-08-17 01:26:13 -0400 | [diff] [blame] | 78 | |
| 79 | Send an Interest for ``/app2/foo``, requesting fresh content, with an InterestLifetime |
| 80 | of 8 seconds, and with the ApplicationParameters containing the ASCII string "hello"; |
| 81 | print the performed operations verbosely but discard the received Data packet:: |
| 82 | |
| 83 | ndnpeek -vf -l 8000 -A "aGVsbG8=" /app2/foo >/dev/null |