Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 1 | ndnputchunks |
| 2 | ============ |
| 3 | |
| 4 | Synopsis |
| 5 | -------- |
| 6 | |
Davide Pesavento | 7de32c1 | 2019-07-26 20:08:21 -0400 | [diff] [blame] | 7 | **ndnputchunks** [options] *name* |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 8 | |
| 9 | Description |
| 10 | ----------- |
| 11 | |
| 12 | :program:`ndnputchunks` is a producer program that reads a file from the standard input, and makes it available as NDN Data segments. |
| 13 | |
| 14 | It appends version and segment number components to the specified name, according to the `NDN naming conventions`_. |
| 15 | |
| 16 | .. _NDN naming conventions: http://named-data.net/publications/techreports/ndn-tr-22-ndn-memo-naming-conventions/ |
| 17 | |
| 18 | Options |
| 19 | ------- |
| 20 | |
| 21 | .. option:: -h, --help |
| 22 | |
| 23 | Print help and exit. |
| 24 | |
| 25 | .. option:: -f, --freshness MILLISECS |
| 26 | |
| 27 | FreshnessPeriod of the published Data packets, in milliseconds. Default = 10000 [ms]. |
| 28 | |
| 29 | .. option:: -p, --print-data-version |
| 30 | |
| 31 | Print version of the published Data to the standard output. |
| 32 | |
| 33 | .. option:: -s, --size BYTES |
| 34 | |
| 35 | Maximum chunk size, in bytes. Default = 4400 [bytes]. |
| 36 | |
| 37 | .. option:: -S, --signing-info STRING |
| 38 | |
Davide Pesavento | 7de32c1 | 2019-07-26 20:08:21 -0400 | [diff] [blame] | 39 | Specify the parameters used to sign the Data packet. If omitted, the default key of |
| 40 | the default identity is used. The general syntax is ``<scheme>:<name>``. The most |
| 41 | common supported combinations are as follows: |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 42 | |
Davide Pesavento | 7de32c1 | 2019-07-26 20:08:21 -0400 | [diff] [blame] | 43 | * Sign with the default certificate of the default key of an identity: ``id:/<my-identity>``. |
| 44 | * Sign with the default certificate of a specific key: ``key:/<my-identity>/ksk-1``. |
| 45 | * Sign with a specific certificate: ``cert:/<my-identity>/KEY/ksk-1/ID-CERT/%FD%01``. |
| 46 | * Sign with a SHA-256 digest: ``id:/localhost/identity/digest-sha256``. Note that this |
| 47 | is only a hash function, not a real signature, but it can significantly speed up |
| 48 | packet signing operations. |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 49 | |
| 50 | .. option:: -q, --quiet |
| 51 | |
| 52 | Turn off all non-error output. |
| 53 | |
| 54 | .. option:: -v, --verbose |
| 55 | |
| 56 | Produce verbose output. |
| 57 | |
| 58 | .. option:: -V, --version |
| 59 | |
| 60 | Print program version and exit. |
| 61 | |
Davide Pesavento | a420e97 | 2021-02-25 00:56:25 -0500 | [diff] [blame^] | 62 | Examples |
| 63 | -------- |
Klaus Schneider | e90a358 | 2019-04-03 17:22:39 -0700 | [diff] [blame] | 64 | |
| 65 | The following command will publish the text of the GPL-3 license under the `/localhost/demo/gpl3` |
| 66 | prefix:: |
| 67 | |
| 68 | ndnputchunks /localhost/demo/gpl3 < /usr/share/common-licenses/GPL-3 |
| 69 | |
Davide Pesavento | a420e97 | 2021-02-25 00:56:25 -0500 | [diff] [blame^] | 70 | 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] | 71 | |
| 72 | ndnputchunks -p /localhost/demo/gpl3 < /usr/share/common-licenses/GPL-3 |
| 73 | |
| 74 | This command will print the published version to the standard output. |
| 75 | |
| 76 | To publish Data with a specific version, you must append a version component to the end of the |
| 77 | prefix. The version component must follow the aforementioned NDN naming conventions. |
| 78 | For example, the following command will publish the version `%FD%00%00%01Qc%CF%17v` of the |
| 79 | `/localhost/demo/gpl3` prefix:: |
| 80 | |
| 81 | ndnputchunks /localhost/demo/gpl3/%FD%00%00%01Qc%CF%17v < /usr/share/common-licenses/GPL-3 |
| 82 | |
| 83 | If the version component is not valid, a new well-formed version will be generated and appended |
| 84 | to the supplied NDN name. |