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 | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 7 | **ndnpeek** [-h] [-P] [-f] [-l *lifetime*] [-p] [-w *timeout*] [-v] [-V] *name* |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 8 | |
| 9 | Description |
| 10 | ----------- |
| 11 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 12 | :program:`ndnpeek` is a simple consumer program that sends one Interest and |
| 13 | expects one Data packet in response. By default, the full Data packet (in TLV |
| 14 | format) is written to the standard output. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 15 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 16 | *name* is interpreted as the Interest name. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 17 | |
| 18 | Options |
| 19 | ------- |
| 20 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 21 | ``-h, --help`` |
| 22 | Print help and exit. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 23 | |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 24 | ``-P, --prefix`` |
| 25 | If specified, include ``CanBePrefix`` element in the Interest packet. |
| 26 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 27 | ``-f, --fresh`` |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 28 | If specified, include ``MustBeFresh`` element in the Interest packet. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 29 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 30 | ``--link-file <file>`` |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame] | 31 | 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] | 32 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 33 | ``-l, --lifetime <lifetime>`` |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 34 | Set ``lifetime`` (in milliseconds) as the ``InterestLifetime``. |
| 35 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 36 | ``-p, --payload`` |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 37 | If specified, print the received payload only, not the full packet. |
| 38 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 39 | ``-w, --timeout <timeout>`` |
| 40 | 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] | 41 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 42 | ``-v, --verbose`` |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 43 | Turn on verbose output. |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 44 | |
| 45 | ``-V, --version`` |
| 46 | Print version and exit. |
| 47 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 48 | Exit Status |
| 49 | ----------- |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 50 | |
| 51 | 0: Success |
| 52 | |
| 53 | 1: An unspecified error occurred |
| 54 | |
| 55 | 2: Malformed command line |
| 56 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 57 | 3: Operation timed out |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 58 | |
| 59 | 4: Nack received |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 60 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 61 | Example |
| 62 | ------- |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 63 | |
Davide Pesavento | 65d1155 | 2019-06-09 19:15:50 -0400 | [diff] [blame] | 64 | Send Interest for ``/app1/video`` and print the received payload only:: |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 65 | |
Davide Pesavento | e75861e | 2019-07-24 21:55:39 -0400 | [diff] [blame] | 66 | ndnpeek -p /app1/video |