blob: 75e1ebfd38866adfe6ef0d77cae1589105d80336 [file] [log] [blame]
Klaus Schneidere90a3582019-04-03 17:22:39 -07001ndnputchunks
2============
3
4Synopsis
5--------
6
Davide Pesavento7de32c12019-07-26 20:08:21 -04007**ndnputchunks** [options] *name*
Klaus Schneidere90a3582019-04-03 17:22:39 -07008
9Description
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
14It 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
18Options
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 Pesavento7de32c12019-07-26 20:08:21 -040039 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 Schneidere90a3582019-04-03 17:22:39 -070042
Davide Pesavento7de32c12019-07-26 20:08:21 -040043 * 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 Schneidere90a3582019-04-03 17:22:39 -070049
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 Pesaventoa420e972021-02-25 00:56:25 -050062Examples
63--------
Klaus Schneidere90a3582019-04-03 17:22:39 -070064
65The following command will publish the text of the GPL-3 license under the `/localhost/demo/gpl3`
66prefix::
67
68 ndnputchunks /localhost/demo/gpl3 < /usr/share/common-licenses/GPL-3
69
Davide Pesaventoa420e972021-02-25 00:56:25 -050070To see the published version, you can run the program with the **-p** option::
Klaus Schneidere90a3582019-04-03 17:22:39 -070071
72 ndnputchunks -p /localhost/demo/gpl3 < /usr/share/common-licenses/GPL-3
73
74This command will print the published version to the standard output.
75
76To publish Data with a specific version, you must append a version component to the end of the
77prefix. The version component must follow the aforementioned NDN naming conventions.
78For 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
83If the version component is not valid, a new well-formed version will be generated and appended
84to the supplied NDN name.