blob: 7fef106c95be6e04e4fd299c0b27803905b7c368 [file] [log] [blame]
Klaus Schneidere90a3582019-04-03 17:22:39 -07001ndnputchunks
2============
3
4Synopsis
5--------
6
7::
8
9 ndnputchunks [options] ndn:/name
10
11Description
12-----------
13
14:program:`ndnputchunks` is a producer program that reads a file from the standard input, and makes it available as NDN Data segments.
15
16It appends version and segment number components to the specified name, according to the `NDN naming conventions`_.
17
18.. _NDN naming conventions: http://named-data.net/publications/techreports/ndn-tr-22-ndn-memo-naming-conventions/
19
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
31.. option:: -p, --print-data-version
32
33 Print version of the published Data to the standard output.
34
35.. option:: -s, --size BYTES
36
37 Maximum chunk size, in bytes. Default = 4400 [bytes].
38
39.. option:: -S, --signing-info STRING
40
41 Signing information. Can be set to "id:/localhost/identity/digest-sha256" in order to speed up signing.
42 However, keep in mind that this only a hash function and not a real signature.
43 Other options are found in the `ndn-cxx documentation for SigningInfo`_.
44
45 .. _ndn-cxx documentation for SigningInfo: https://named-data.net/doc/ndn-cxx/0.6.5/doxygen/d8/dc8/classndn_1_1security_1_1SigningInfo.html#afc960f9f5da5536b958403dc7b701826
46
47.. option:: -q, --quiet
48
49 Turn off all non-error output.
50
51.. option:: -v, --verbose
52
53 Produce verbose output.
54
55.. option:: -V, --version
56
57 Print program version and exit.
58
59
60Examples
61--------
62
63The following command will publish the text of the GPL-3 license under the `/localhost/demo/gpl3`
64prefix::
65
66 ndnputchunks /localhost/demo/gpl3 < /usr/share/common-licenses/GPL-3
67
68To find the published version you have to start ndnputchunks with the `-p` command line option,
69for example::
70
71 ndnputchunks -p /localhost/demo/gpl3 < /usr/share/common-licenses/GPL-3
72
73This command will print the published version to the standard output.
74
75To publish Data with a specific version, you must append a version component to the end of the
76prefix. The version component must follow the aforementioned NDN naming conventions.
77For example, the following command will publish the version `%FD%00%00%01Qc%CF%17v` of the
78`/localhost/demo/gpl3` prefix::
79
80 ndnputchunks /localhost/demo/gpl3/%FD%00%00%01Qc%CF%17v < /usr/share/common-licenses/GPL-3
81
82If the version component is not valid, a new well-formed version will be generated and appended
83to the supplied NDN name.
84
85
86Notes
87-----
88
89.. target-notes::