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 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 31 | ``--link-file <file>`` |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 32 | Read Link object from ``file`` and add it as ``ForwardingHint`` to the Interest packet. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 33 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 34 | ``-l, --lifetime <lifetime>`` |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 35 | Set ``lifetime`` (in milliseconds) as the ``InterestLifetime``. |
| 36 | |
Davide Pesavento | c214e07 | 2019-08-17 01:33:28 -0400 | [diff] [blame^] | 37 | ``-H, --hop-limit <hops>`` |
| 38 | Set the Interest's ``HopLimit`` to the specified number of hops. |
| 39 | |
Davide Pesavento | 9602823 | 2019-08-17 01:26:13 -0400 | [diff] [blame] | 40 | ``-A, --app-params <parameters>`` |
| 41 | Set the Interest's ``ApplicationParameters`` from a base64-encoded string. |
| 42 | |
| 43 | ``--app-params-file <file>`` |
| 44 | Set the Interest's ``ApplicationParameters`` from the specified file. |
| 45 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 46 | ``-p, --payload`` |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 47 | If specified, print the received payload only, not the full packet. |
| 48 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 49 | ``-w, --timeout <timeout>`` |
| 50 | 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] | 51 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 52 | ``-v, --verbose`` |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 53 | Turn on verbose output. |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 54 | |
| 55 | ``-V, --version`` |
| 56 | Print version and exit. |
| 57 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 58 | Exit Status |
| 59 | ----------- |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 60 | |
| 61 | 0: Success |
| 62 | |
| 63 | 1: An unspecified error occurred |
| 64 | |
| 65 | 2: Malformed command line |
| 66 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 67 | 3: Operation timed out |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 68 | |
| 69 | 4: Nack received |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 70 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 71 | Example |
| 72 | ------- |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 73 | |
Davide Pesavento | 9602823 | 2019-08-17 01:26:13 -0400 | [diff] [blame] | 74 | Send an Interest for ``/app1/video`` and print the received payload only:: |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 75 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 76 | ndnpeek -p /app1/video |
Davide Pesavento | 9602823 | 2019-08-17 01:26:13 -0400 | [diff] [blame] | 77 | |
| 78 | Send an Interest for ``/app2/foo``, requesting fresh content, with an InterestLifetime |
| 79 | of 8 seconds, and with the ApplicationParameters containing the ASCII string "hello"; |
| 80 | print the performed operations verbosely but discard the received Data packet:: |
| 81 | |
| 82 | ndnpeek -vf -l 8000 -A "aGVsbG8=" /app2/foo >/dev/null |