Skip to content

Commit 543b152

Browse files
committed
docs: reformat man pages to improve consistency and readability
Change-Id: I4f9afbc73c365dfa31eb6cd1e4a48368b6a9064f
1 parent 89c22ed commit 543b152

16 files changed

+433
-288
lines changed

docs/conf.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,24 @@ def addExtensionIfExists(extension: str):
7575
# One entry per manual page. List of tuples
7676
# (source start file, name, description, authors, manual section).
7777
man_pages = [
78-
('manpages/nfd', 'nfd', 'the Named Data Networking Forwarding Daemon', [], 1),
79-
('manpages/nfdc', 'nfdc', 'interact with NFD management from the command line', [], 1),
80-
('manpages/nfdc-status', 'nfdc-status', 'show NFD status', [], 1),
78+
('manpages/nfd', 'nfd', 'Named Data Networking Forwarding Daemon', [], 1),
79+
('manpages/nfdc', 'nfdc', 'manage a running NFD from the command line', [], 1),
80+
('manpages/nfdc-status', 'nfdc-status', 'show NFD\'s status', [], 1),
8181
('manpages/nfdc-face', 'nfdc-face', 'show and manipulate NFD\'s faces', [], 1),
8282
('manpages/nfdc-route', 'nfdc-route', 'show and manipulate NFD\'s routes', [], 1),
8383
('manpages/nfdc-cs', 'nfdc-cs', 'show and manipulate NFD\'s Content Store', [], 1),
8484
('manpages/nfdc-strategy', 'nfdc-strategy', 'show and manipulate NFD\'s strategy choices', [], 1),
8585
('manpages/nfd-status', 'nfd-status', 'show a comprehensive report of NFD\'s status', [], 1),
86-
('manpages/nfd-status-http-server', 'nfd-status-http-server', 'NFD status HTTP server', [], 1),
87-
('manpages/ndn-autoconfig-server', 'ndn-autoconfig-server', 'auto-configuration server for NDN', [], 1),
88-
('manpages/ndn-autoconfig', 'ndn-autoconfig', 'auto-configuration client for NDN', [], 1),
89-
('manpages/ndn-autoconfig.conf', 'ndn-autoconfig.conf', 'configuration file for ndn-autoconfig', [], 5),
90-
('manpages/nfd-autoreg', 'nfd-autoreg', 'NFD automatic prefix registration daemon', [], 1),
91-
('manpages/nfd-asf-strategy', 'nfd-asf-strategy', 'NFD ASF strategy', [], 7),
86+
('manpages/nfd-status-http-server', 'nfd-status-http-server', 'NFD status HTTP server', [], 1),
87+
('manpages/nfd-autoreg', 'nfd-autoreg', 'NFD automatic prefix registration daemon', [], 1),
88+
('manpages/ndn-autoconfig', 'ndn-autoconfig', 'auto-configuration client for NDN', [], 1),
89+
('manpages/ndn-autoconfig-server', 'ndn-autoconfig-server', 'auto-configuration server for NDN', [], 1),
90+
('manpages/ndn-autoconfig.conf', 'ndn-autoconfig.conf', 'configuration file for ndn-autoconfig', [], 5),
91+
('manpages/nfd-asf-strategy', 'nfd-asf-strategy', 'NFD ASF strategy', [], 7),
9292
]
9393

94+
man_show_urls = True
95+
9496

9597
# -- Misc options ------------------------------------------------------------
9698

docs/manpages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Man pages
1515
manpages/nfd-status
1616
manpages/nfd-status-http-server
1717
schema
18+
manpages/nfd-autoreg
1819
manpages/ndn-autoconfig
1920
manpages/ndn-autoconfig.conf
2021
manpages/ndn-autoconfig-server
2122
local-prefix-discovery
22-
manpages/nfd-autoreg

docs/manpages/ndn-autoconfig-server.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,20 @@ this block is the ``Uri`` for the HUB, preferably a UDP tunnel.
3434
``-V``
3535
Print version number and exit.
3636

37-
Exit status
37+
Exit Status
3838
-----------
3939

40-
0: No error.
40+
0
41+
No error.
4142

42-
1: An unspecified error occurred.
43+
1
44+
An unspecified error occurred.
4345

44-
2: Malformed command line, e.g., invalid, missing, or unknown argument.
46+
2
47+
Malformed command line, e.g., invalid, missing, or unknown argument.
4548

46-
4: Insufficient privileges.
49+
4
50+
Insufficient privileges.
4751

4852
Examples
4953
--------
@@ -54,7 +58,7 @@ Examples
5458

5559
ndn-autoconfig-server -p /ndn/edu/ucla tcp://spurs.cs.ucla.edu
5660

57-
See also
61+
See Also
5862
--------
5963

60-
:ref:`ndn-autoconfig`
64+
:manpage:`ndn-autoconfig(1)`

docs/manpages/ndn-autoconfig.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,23 @@ Send a DNS query to find home hub.
172172
If this query is answered, connect to the home hub and terminate auto-discovery.
173173
Otherwise, the auto-discovery fails.
174174

175-
Exit status
175+
Exit Status
176176
-----------
177177

178-
0: No error.
178+
0
179+
No error.
179180

180-
1: An unspecified error occurred.
181+
1
182+
An unspecified error occurred.
181183

182-
2: Malformed command line, e.g., invalid, missing, or unknown argument.
184+
2
185+
Malformed command line, e.g., invalid, missing, or unknown argument.
183186

184-
4: Insufficient privileges.
187+
4
188+
Insufficient privileges.
185189

186-
See also
190+
See Also
187191
--------
188192

189-
:ref:`ndn-autoconfig-server`, :doc:`ndn-autoconfig.conf`
193+
:manpage:`ndn-autoconfig-server(1)`,
194+
:doc:`ndn-autoconfig.conf`

docs/manpages/nfd-asf-strategy.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Synopsis
55
--------
66

77
**nfdc strategy set** **prefix** *NAME* **strategy**
8-
/localhost/nfd/strategy/asf[/v=4][/**probing-interval**\ ~\ *INTERVAL*][/**max-timeouts**\ ~\ *TIMEOUTS*]
8+
/localhost/nfd/strategy/asf[/v=5][/**probing-interval**\ ~\ *INTERVAL*][/**max-timeouts**\ ~\ *TIMEOUTS*]
99

1010
Description
1111
-----------
@@ -17,14 +17,14 @@ next hops to learn their RTTs.
1717
Options
1818
-------
1919

20-
.. option:: probing-interval
20+
.. option:: probing-interval <INTERVAL>
2121

2222
This optional parameter tells ASF how often to send a probe to determine
2323
alternative paths. The value is specified in milliseconds (non-negative
2424
integer). Smaller values will result in higher overhead but faster reaction.
2525
The default value is 1 minute and the minimum value is 1 second.
2626

27-
.. option:: max-timeouts
27+
.. option:: max-timeouts <TIMEOUTS>
2828

2929
This optional parameter makes ASF switch to another appropriate face (if available)
3030
after it has encountered the specified number of timeouts. The value is a positive
@@ -36,24 +36,24 @@ Options
3636
Examples
3737
--------
3838

39-
nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf
39+
``nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf``
4040
Use the default values for all parameters.
4141

42-
nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/v=4/probing-interval~30000
42+
``nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/v=5/probing-interval~30000``
4343
Set the probing interval to 30 seconds.
4444

45-
nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/v=4/max-timeouts~5
45+
``nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/v=5/max-timeouts~5``
4646
Set the maximum number of timeouts to 5.
4747

48-
nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/v=4/probing-interval~30000/max-timeouts~2
48+
``nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/v=5/probing-interval~30000/max-timeouts~2``
4949
Set the probing interval to 30 seconds and the maximum number of timeouts to 2.
5050

51-
nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/v=4/retx-suppression-multiplier~2.5/probing-interval~45000
51+
``nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/asf/v=5/retx-suppression-multiplier~2.5/probing-interval~45000``
5252
Set the retransmission suppression multiplier to 2.5 and the probing interval
5353
to 45 seconds. See :manpage:`nfdc-strategy(1)` for more information on the
5454
retransmission suppression parameters.
5555

56-
See also
56+
See Also
5757
--------
5858

59-
nfdc(1), nfdc-strategy(1)
59+
:manpage:`nfdc-strategy(1)`

docs/manpages/nfd-autoreg.rst

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,66 +4,78 @@ nfd-autoreg
44
Synopsis
55
--------
66

7-
**nfd-autoreg** --prefix=</autoreg/prefix> [--prefix=</another/prefix>]...
7+
| **nfd-autoreg** [**-i**\|\ **\--prefix** *prefix*]... [**-a**\|\ **\--all-faces-prefix** *prefix*]...
8+
| [**-b**\|\ **\--blacklist** *network*]... [**-w**\|\ **\--whitelist** *network*]... \
9+
[**-c**\|\ **\--cost** *cost*]
10+
| **nfd-autoreg** **-h**\|\ **\--help**
11+
| **nfd-autoreg** **-V**\|\ **\--version**
812
913
Description
1014
-----------
1115

12-
``nfd-autoreg`` is a daemon application that automatically registers the specified
16+
:program:`nfd-autoreg` is a daemon application that automatically registers the specified
1317
prefix(es) when new on-demand faces are created (i.e., when a new UDP face is created as
1418
the result of an incoming packet or when a new TCP face is created as the result of an
1519
incoming connection).
1620

1721
Options
1822
-------
1923

20-
``-i`` or ``--prefix``
21-
Prefix that should be automatically registered when a new remote face is created.
22-
Can be repeated multiple times to specify additional prefixes.
24+
.. option:: -i <prefix>, --prefix <prefix>
2325

24-
``-c`` or ``--cost``
25-
RIB cost to be assigned to auto-registered prefixes. If not specified, default cost
26-
is set to 255.
26+
Prefix that should be automatically registered when a new remote face is created.
27+
Can be repeated multiple times to specify additional prefixes.
2728

28-
``-w`` or ``--whitelist``
29-
Whitelisted network, e.g., 192.168.2.0/24 or ::1/128. Can be repeated multiple times
30-
to specify multiple whitelisted networks.
29+
.. option:: -b <network>, --blacklist <network>
3130

32-
Prefix(es) will be auto-registered only when remote IP address is within the specified
33-
range(s), except blacklist ranges.
31+
Blacklisted network, e.g., 192.168.2.32/30 or ::1/128. Can be repeated multiple times
32+
to specify multiple blacklisted networks.
3433

35-
Default: 0.0.0.0/0 and ::/0
34+
The prefixes will be auto-registered only when the remote IP address is NOT inside the
35+
specified range(s), but is inside the range defined by the whitelist(s), if any.
3636

37-
``-b`` or ``--blacklist``
38-
Blacklisted network, e.g., 192.168.2.32/30 or ::1/128. Can be repeated multiple times
39-
to specify multiple blacklisted networks.
37+
Default: none.
4038

41-
Prefix(es) will be auto-registered only when remote IP address in **NOT** within the
42-
specified range(s), but is within the range define by the whitelist(s).
39+
.. option:: -w <network>, --whitelist <network>
4340

44-
Default: none
41+
Whitelisted network, e.g., 192.168.2.0/24 or ::1/128. Can be repeated multiple times
42+
to specify multiple whitelisted networks.
4543

46-
``-h`` or ``--help``
47-
Print help message and exit.
44+
The prefixes will be auto-registered only when the remote IP address is inside the
45+
specified range(s), excluding any blacklisted range(s).
4846

49-
``-V`` or ``--version``
50-
Show version information and exit.
47+
Default: 0.0.0.0/0 and ::/0.
5148

52-
Exit status
49+
.. option:: -c <cost>, --cost <cost>
50+
51+
RIB cost to assign to auto-registered prefixes. If not specified, the cost is set to 255.
52+
53+
.. option:: -h, --help
54+
55+
Print help message and exit.
56+
57+
.. option:: -V, --version
58+
59+
Show version information and exit.
60+
61+
Exit Status
5362
-----------
5463

55-
0: No error.
64+
0
65+
No error.
5666

57-
1: An unspecified error occurred.
67+
1
68+
An unspecified error occurred.
5869

59-
2: Malformed command line, e.g., invalid, missing, or unknown argument.
70+
2
71+
Malformed command line, e.g., invalid, missing, or unknown argument.
6072

61-
4: Insufficient privileges.
73+
4
74+
Insufficient privileges.
6275

6376
Examples
6477
--------
6578

66-
Auto-register two prefixes for any newly created on-demand face, except those that has
67-
source IP address in ``10.0.0.0/8`` network::
68-
69-
nfd-autoreg --prefix=/app1/video --prefix=/app2/pictures -b 10.0.0.0/8
79+
``nfd-autoreg -i /app1/video -i /app2/pictures -b 10.0.0.0/8``
80+
Auto-register two prefixes for any newly created on-demand faces, except those that
81+
have their remote IP address in the 10.0.0.0/8 network.

docs/manpages/nfd-status-http-server.rst

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,52 @@ nfd-status-http-server
44
Synopsis
55
--------
66

7-
**nfd-status-http-server** [**-h**] [**-a** *IPADDR*] [**-p** *PORT*] [**-r**] [**-v**]
7+
| **nfd-status-http-server** [**-a**\|\ **\--address** *address*] [**-p**\|\ **\--port** *port*] \
8+
[**-f**\|\ **\--workdir** *dir*] [**-r**\|\ **\--robots**] [**-v**\|\ **\--verbose**]
9+
| **nfd-status-http-server** **-h**\|\ **\--help**
10+
| **nfd-status-http-server** **-V**\|\ **\--version**
811
912
Description
1013
-----------
1114

12-
``nfd-status-http-server`` is a daemon that enables the retrieval of NFD's status over HTTP.
15+
:program:`nfd-status-http-server` is a daemon that enables the retrieval of NFD's status over HTTP.
1316

1417
Options
1518
-------
1619

17-
``-h``
18-
Show help message and exit.
20+
.. option:: -a <address>, --address <address>
1921

20-
``-a <IPADDR>``
21-
HTTP server IP address (default is 127.0.0.1).
22+
HTTP server IP address (default is 127.0.0.1).
2223

23-
``-p <PORT>``
24-
HTTP server port number (default is 6380).
24+
.. option:: -p <port>, --port <port>
2525

26-
``-r``
27-
Enable HTTP robots to crawl (disabled by default).
26+
HTTP server port number (default is 6380).
2827

29-
``-v``
30-
Verbose mode.
28+
.. option:: -f <dir>, --workdir <dir>
3129

32-
Examples
33-
--------
30+
Set the server's working directory.
31+
32+
.. option:: -r, --robots
33+
34+
Enable HTTP robots to crawl (disabled by default).
35+
36+
.. option:: -v, --verbose
37+
38+
Enable verbose mode.
3439

35-
Start NFD's HTTP status server on all IPv4 interfaces, port 80 (requires root)::
40+
.. option:: -h, --help
3641

37-
nfd-status-http-server -a 0.0.0.0 -p 80
42+
Print help message and exit.
43+
44+
.. option:: -V, --version
45+
46+
Show version information and exit.
47+
48+
Examples
49+
--------
3850

39-
Start NFD's HTTP status server on all IPv6 interfaces, port 8000::
51+
``nfd-status-http-server -a 0.0.0.0 -p 80``
52+
Start NFD's HTTP status server on all IPv4 interfaces, port 80 (requires privileges).
4053

41-
nfd-status-http-server -a :: -p 8000
54+
``nfd-status-http-server -a :: -p 8000``
55+
Start NFD's HTTP status server on all IPv6 interfaces, port 8000.

docs/manpages/nfd-status.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
nfd-status
22
==========
33

4-
SYNOPSIS
4+
Synopsis
55
--------
6-
| nfd-status
76

8-
DESCRIPTION
7+
**nfd-status**
8+
9+
Description
910
-----------
10-
**nfd-status** is an alias of **nfdc status report**, which prints a comprehensive report of NFD status.
1111

12-
SEE ALSO
12+
:program:`nfd-status` is an alias of **nfdc status report**,
13+
which prints a comprehensive report of NFD status.
14+
15+
See Also
1316
--------
14-
nfdc-status(1)
17+
18+
:manpage:`nfdc-status(1)`

0 commit comments

Comments
 (0)