Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 1 | ndnputchunks |
| 2 | ============ |
| 3 | |
| 4 | Synopsis |
| 5 | -------- |
| 6 | |
Davide Pesavento | f8a14d8 | 2021-03-12 00:42:03 -0500 | [diff] [blame] | 7 | **ndnputchunks** [*option*]... *name* |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 8 | |
| 9 | Description |
| 10 | ----------- |
| 11 | |
Davide Pesavento | f8a14d8 | 2021-03-12 00:42:03 -0500 | [diff] [blame] | 12 | :program:`ndnputchunks` is a producer program that reads a file from the standard input |
| 13 | and makes it available as NDN Data segments. |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 14 | |
Davide Pesavento | f8a14d8 | 2021-03-12 00:42:03 -0500 | [diff] [blame] | 15 | Version and segment number components are appended to the specified *name* as needed, |
| 16 | according to the `NDN naming conventions`_. |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 17 | |
Davide Pesavento | db9613e | 2023-01-20 20:52:21 -0500 | [diff] [blame^] | 18 | .. _NDN naming conventions: https://named-data.net/publications/techreports/ndn-tr-22-3-ndn-memo-naming-conventions/ |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 19 | |
| 20 | Options |
| 21 | ------- |
| 22 | |
| 23 | .. option:: -h, --help |
| 24 | |
| 25 | Print help and exit. |
| 26 | |
| 27 | .. option:: -f, --freshness MILLISECS |
| 28 | |
Davide Pesavento | 7c4246c | 2021-03-12 01:35:22 -0500 | [diff] [blame] | 29 | FreshnessPeriod of the published Data packets, in milliseconds. |
| 30 | The default is 10000 (10 seconds). |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 31 | |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 32 | .. option:: -s, --size BYTES |
| 33 | |
Davide Pesavento | 7c4246c | 2021-03-12 01:35:22 -0500 | [diff] [blame] | 34 | Maximum chunk size, in bytes. The default is 8000 bytes. |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 35 | |
Davide Pesavento | f8a14d8 | 2021-03-12 00:42:03 -0500 | [diff] [blame] | 36 | .. option:: -N, --naming-convention CONVENTION |
| 37 | |
| 38 | Select the convention used to encode NDN name components. The available choices are: |
| 39 | |
| 40 | * ``marker`` (shorthand: ``m`` or ``1``) for the old marker-based encoding; |
| 41 | * ``typed`` (shorthand: ``t`` or ``2``) for the new encoding based on typed name components. |
| 42 | |
| 43 | If this option is not specified, the ndn-cxx library's default is used. |
| 44 | |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 45 | .. option:: -S, --signing-info STRING |
| 46 | |
Davide Pesavento | f8a14d8 | 2021-03-12 00:42:03 -0500 | [diff] [blame] | 47 | Specify the parameters used to sign the Data packets. If omitted, the default key |
| 48 | of the default identity is used. The general syntax is ``<scheme>:<name>``. The |
| 49 | most common supported combinations are as follows: |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 50 | |
Davide Pesavento | 7de32c1 | 2019-07-26 20:08:21 -0400 | [diff] [blame] | 51 | * Sign with the default certificate of the default key of an identity: ``id:/<my-identity>``. |
| 52 | * Sign with the default certificate of a specific key: ``key:/<my-identity>/ksk-1``. |
Eric Newberry | a209f67 | 2021-03-26 10:52:09 -0700 | [diff] [blame] | 53 | * Sign with a specific certificate: ``cert:/<my-identity>/KEY/ksk-1/ID-CERT/v=1``. |
Davide Pesavento | 7de32c1 | 2019-07-26 20:08:21 -0400 | [diff] [blame] | 54 | * Sign with a SHA-256 digest: ``id:/localhost/identity/digest-sha256``. Note that this |
| 55 | is only a hash function, not a real signature, but it can significantly speed up |
| 56 | packet signing operations. |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 57 | |
Davide Pesavento | f8a14d8 | 2021-03-12 00:42:03 -0500 | [diff] [blame] | 58 | .. option:: -p, --print-data-version |
| 59 | |
| 60 | Print version of the published Data to the standard output. |
| 61 | |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 62 | .. option:: -q, --quiet |
| 63 | |
| 64 | Turn off all non-error output. |
| 65 | |
| 66 | .. option:: -v, --verbose |
| 67 | |
| 68 | Produce verbose output. |
| 69 | |
| 70 | .. option:: -V, --version |
| 71 | |
| 72 | Print program version and exit. |
| 73 | |
Davide Pesavento | a420e97 | 2021-02-25 00:56:25 -0500 | [diff] [blame] | 74 | Examples |
| 75 | -------- |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 76 | |
Davide Pesavento | f8a14d8 | 2021-03-12 00:42:03 -0500 | [diff] [blame] | 77 | The following command will publish the text of the GPL-3 license under the ``/localhost/demo/gpl3`` |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 78 | prefix:: |
| 79 | |
| 80 | ndnputchunks /localhost/demo/gpl3 < /usr/share/common-licenses/GPL-3 |
| 81 | |
Davide Pesavento | a420e97 | 2021-02-25 00:56:25 -0500 | [diff] [blame] | 82 | To see the published version, you can run the program with the **-p** option:: |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 83 | |
| 84 | ndnputchunks -p /localhost/demo/gpl3 < /usr/share/common-licenses/GPL-3 |
| 85 | |
| 86 | This command will print the published version to the standard output. |
| 87 | |
| 88 | To publish Data with a specific version, you must append a version component to the end of the |
| 89 | prefix. The version component must follow the aforementioned NDN naming conventions. |
Davide Pesavento | f8a14d8 | 2021-03-12 00:42:03 -0500 | [diff] [blame] | 90 | For example, the following command will publish version 1615519151142 of ``/localhost/demo/gpl3`` |
| 91 | using the "typed" naming convention:: |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 92 | |
Davide Pesavento | f8a14d8 | 2021-03-12 00:42:03 -0500 | [diff] [blame] | 93 | ndnputchunks -Nt /localhost/demo/gpl3/v=1615519151142 < /usr/share/common-licenses/GPL-3 |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 94 | |
Davide Pesavento | f8a14d8 | 2021-03-12 00:42:03 -0500 | [diff] [blame] | 95 | See Also |
| 96 | -------- |
| 97 | |
| 98 | .. target-notes:: |