From 510aef98a56cdbfdb147f78b05d7554bb91770a9 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Mon, 2 Jun 2008 12:48:48 +0200 Subject: manpages: consistent syntax In the manpages, bold is used to denote characters the user has to enter verbatim, italic denotes placeholders and non-highlighted pieces are used as a structure: "[]" specifying an optional part, "{}" a mandatory part, with "|" used for alternations. The "!" for negation is better supported before the option than after it, too. The patch makes a few files consistent with this style already used in manpages. --- extensions/libxt_tcp.man | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'extensions/libxt_tcp.man') diff --git a/extensions/libxt_tcp.man b/extensions/libxt_tcp.man index cfafc9e0..b087fc9e 100644 --- a/extensions/libxt_tcp.man +++ b/extensions/libxt_tcp.man @@ -1,11 +1,10 @@ These extensions can be used if `--protocol tcp' is specified. It provides the following options: .TP -.BR "--source-port " "[!] \fIport\fP[:\fIport\fP]" +[\fB!\fP] \fB--source-port\fP,\fB--sport\fP \fIport\fP[\fB:\fP\fIport\fP] Source port or port range specification. This can either be a service name or a port number. An inclusive range can also be specified, -using the format -.IR port : port . +using the format \fIport\fP\fB:\fP\fIport\fP. If the first port is omitted, "0" is assumed; if the last is omitted, "65535" is assumed. If the second port greater then the first they will be swapped. @@ -13,15 +12,15 @@ The flag .B --sport is a convenient alias for this option. .TP -.BR "--destination-port " "[!] \fIport\fP[:\fIport\fP]" +[\fB!\fP] \fB--destination-port\fP,\fB--dport\fP \fIport\fP[\fB,\fP\fIport\fP] Destination port or port range specification. The flag .B --dport is a convenient alias for this option. .TP -.BR "--tcp-flags " "[!] \fImask\fP \fIcomp\fP" -Match when the TCP flags are as specified. The first argument is the +[\fB!\fP] \fB--tcp-flags\fP \fImask\fP \fIcomp\fP +Match when the TCP flags are as specified. The first argument \fImask\fP is the flags which we should examine, written as a comma-separated list, and -the second argument is a comma-separated list of flags which must be +the second argument \fIcomp\fP is a comma-separated list of flags which must be set. Flags are: .BR "SYN ACK FIN RST URG PSH ALL NONE" . Hence the command @@ -31,7 +30,7 @@ Hence the command will only match packets with the SYN flag set, and the ACK, FIN and RST flags unset. .TP -.B "[!] --syn" +[\fB!\fP] \fB--syn\fP Only match TCP packets with the SYN bit set and the ACK,RST and FIN bits cleared. Such packets are used to request TCP connection initiation; for example, blocking such packets coming in an interface will prevent @@ -41,5 +40,5 @@ It is equivalent to \fB--tcp-flags SYN,RST,ACK,FIN SYN\fP. If the "!" flag precedes the "--syn", the sense of the option is inverted. .TP -.BR "--tcp-option " "[!] \fInumber\fP" +[\fB!\fP] \fB--tcp-option\fP \fInumber\fP Match if TCP option set. -- cgit v1.2.3