Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 1 | ndnpeek |
| 2 | ======= |
| 3 | |
| 4 | Usage |
| 5 | ----- |
| 6 | |
| 7 | :: |
| 8 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 9 | ndnpeek [-h] [-f] [-r] [-m min] [-M max] [-l lifetime] [-p] [-w timeout] [-v] [-V] name |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 10 | |
| 11 | Description |
| 12 | ----------- |
| 13 | |
| 14 | ``ndnpeek`` is a simple consumer program that sends one Interest and expects one Data |
| 15 | packet in response. The full Data packet (in TLV format) is written to stdout. The |
| 16 | program terminates with return code 0 if Data arrives, and with return code 1 when timeout |
| 17 | occurs. |
| 18 | |
| 19 | ``name`` is interpreted as the Interest name. |
| 20 | |
| 21 | Options |
| 22 | ------- |
| 23 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 24 | ``-h, --help`` |
| 25 | Print help and exit. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 26 | |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame^] | 27 | ``-P, --prefix`` |
| 28 | If specified, include ``CanBePrefix`` element in the Interest packet. |
| 29 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 30 | ``-f, --fresh`` |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame^] | 31 | If specified, include ``MustBeFresh`` element in the Interest packet. |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 32 | |
Junxiao Shi | b54aabd | 2018-04-16 19:36:24 +0000 | [diff] [blame^] | 33 | ``--link-file [file]`` |
| 34 | 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] | 35 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 36 | ``-l, --lifetime lifetime`` |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 37 | Set ``lifetime`` (in milliseconds) as the ``InterestLifetime``. |
| 38 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 39 | ``-p, --payload`` |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 40 | If specified, print the received payload only, not the full packet. |
| 41 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 42 | ``-w, --timeout timeout`` |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 43 | Timeout after ``timeout`` milliseconds. |
| 44 | |
Teng Liang | d4ab87f | 2016-03-08 18:50:47 -0700 | [diff] [blame] | 45 | ``-v, --verbose`` |
| 46 | If specified, verbose output. |
| 47 | |
| 48 | ``-V, --version`` |
| 49 | Print version and exit. |
| 50 | |
| 51 | Exit Codes |
| 52 | ---------- |
| 53 | |
| 54 | 0: Success |
| 55 | |
| 56 | 1: An unspecified error occurred |
| 57 | |
| 58 | 2: Malformed command line |
| 59 | |
| 60 | 3: Network operation timed out |
| 61 | |
| 62 | 4: Nack received |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 63 | |
| 64 | Examples |
| 65 | -------- |
| 66 | |
| 67 | Send Interest for ``ndn:/app1/video`` and print the received payload only |
| 68 | |
| 69 | :: |
| 70 | |
| 71 | ndnpeek -p ndn:/app1/video |