blob: d87d8a55d27fa86decb9e119216e897af1e5c7f7 [file] [log] [blame]
Klaus Schneidere90a3582019-04-03 17:22:39 -07001ndnputchunks
2============
3
4Synopsis
5--------
6
Davide Pesaventof8a14d82021-03-12 00:42:03 -05007**ndnputchunks** [*option*]... *name*
Klaus Schneidere90a3582019-04-03 17:22:39 -07008
9Description
10-----------
11
Davide Pesaventof8a14d82021-03-12 00:42:03 -050012:program:`ndnputchunks` is a producer program that reads a file from the standard input
13and makes it available as NDN Data segments.
Klaus Schneidere90a3582019-04-03 17:22:39 -070014
Davide Pesaventof8a14d82021-03-12 00:42:03 -050015Version and segment number components are appended to the specified *name* as needed,
16according to the `NDN naming conventions`_.
Klaus Schneidere90a3582019-04-03 17:22:39 -070017
Davide Pesaventof8a14d82021-03-12 00:42:03 -050018.. _NDN naming conventions: https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
Klaus Schneidere90a3582019-04-03 17:22:39 -070019
20Options
21-------
22
23.. option:: -h, --help
24
25 Print help and exit.
26
27.. option:: -f, --freshness MILLISECS
28
29 FreshnessPeriod of the published Data packets, in milliseconds. Default = 10000 [ms].
30
Klaus Schneidere90a3582019-04-03 17:22:39 -070031.. option:: -s, --size BYTES
32
33 Maximum chunk size, in bytes. Default = 4400 [bytes].
34
Davide Pesaventof8a14d82021-03-12 00:42:03 -050035.. option:: -N, --naming-convention CONVENTION
36
37 Select the convention used to encode NDN name components. The available choices are:
38
39 * ``marker`` (shorthand: ``m`` or ``1``) for the old marker-based encoding;
40 * ``typed`` (shorthand: ``t`` or ``2``) for the new encoding based on typed name components.
41
42 If this option is not specified, the ndn-cxx library's default is used.
43
Klaus Schneidere90a3582019-04-03 17:22:39 -070044.. option:: -S, --signing-info STRING
45
Davide Pesaventof8a14d82021-03-12 00:42:03 -050046 Specify the parameters used to sign the Data packets. If omitted, the default key
47 of the default identity is used. The general syntax is ``<scheme>:<name>``. The
48 most common supported combinations are as follows:
Klaus Schneidere90a3582019-04-03 17:22:39 -070049
Davide Pesavento7de32c12019-07-26 20:08:21 -040050 * Sign with the default certificate of the default key of an identity: ``id:/<my-identity>``.
51 * Sign with the default certificate of a specific key: ``key:/<my-identity>/ksk-1``.
52 * Sign with a specific certificate: ``cert:/<my-identity>/KEY/ksk-1/ID-CERT/%FD%01``.
53 * Sign with a SHA-256 digest: ``id:/localhost/identity/digest-sha256``. Note that this
54 is only a hash function, not a real signature, but it can significantly speed up
55 packet signing operations.
Klaus Schneidere90a3582019-04-03 17:22:39 -070056
Davide Pesaventof8a14d82021-03-12 00:42:03 -050057.. option:: -p, --print-data-version
58
59 Print version of the published Data to the standard output.
60
Klaus Schneidere90a3582019-04-03 17:22:39 -070061.. option:: -q, --quiet
62
63 Turn off all non-error output.
64
65.. option:: -v, --verbose
66
67 Produce verbose output.
68
69.. option:: -V, --version
70
71 Print program version and exit.
72
Davide Pesaventoa420e972021-02-25 00:56:25 -050073Examples
74--------
Klaus Schneidere90a3582019-04-03 17:22:39 -070075
Davide Pesaventof8a14d82021-03-12 00:42:03 -050076The following command will publish the text of the GPL-3 license under the ``/localhost/demo/gpl3``
Klaus Schneidere90a3582019-04-03 17:22:39 -070077prefix::
78
79 ndnputchunks /localhost/demo/gpl3 < /usr/share/common-licenses/GPL-3
80
Davide Pesaventoa420e972021-02-25 00:56:25 -050081To see the published version, you can run the program with the **-p** option::
Klaus Schneidere90a3582019-04-03 17:22:39 -070082
83 ndnputchunks -p /localhost/demo/gpl3 < /usr/share/common-licenses/GPL-3
84
85This command will print the published version to the standard output.
86
87To publish Data with a specific version, you must append a version component to the end of the
88prefix. The version component must follow the aforementioned NDN naming conventions.
Davide Pesaventof8a14d82021-03-12 00:42:03 -050089For example, the following command will publish version 1615519151142 of ``/localhost/demo/gpl3``
90using the "typed" naming convention::
Klaus Schneidere90a3582019-04-03 17:22:39 -070091
Davide Pesaventof8a14d82021-03-12 00:42:03 -050092 ndnputchunks -Nt /localhost/demo/gpl3/v=1615519151142 < /usr/share/common-licenses/GPL-3
Klaus Schneidere90a3582019-04-03 17:22:39 -070093
Davide Pesaventof8a14d82021-03-12 00:42:03 -050094See Also
95--------
96
97.. target-notes::