blob: a42a73dd21844b060aaec618f1ead3be58715b00 [file] [log] [blame]
Jan Engelhardt36f2ead2008-01-20 13:25:08 +00001This module sets the Type of Service field in the IPv4 header (including the
2'precedence' bits) or the Priority field in the IPv6 header. Note that TOS
3shares the same bits as DSCP and ECN. The TOS target is only valid in the
4\fBmangle\fR table.
5.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +01006\fB\-\-set\-tos\fP \fIvalue\fP[\fB/\fP\fImask\fP]
Jan Engelhardt36f2ead2008-01-20 13:25:08 +00007Zeroes out the bits given by \fImask\fR and XORs \fIvalue\fR into the
8TOS/Priority field. If \fImask\fR is omitted, 0xFF is assumed.
9.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010010\fB\-\-set\-tos\fP \fIsymbol\fP
Jan Engelhardt36f2ead2008-01-20 13:25:08 +000011You can specify a symbolic name when using the TOS target for IPv4. It implies
12a mask of 0xFF. The list of recognized TOS names can be obtained by calling
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010013iptables with \fB\-j TOS \-h\fP.
Jan Engelhardt36f2ead2008-01-20 13:25:08 +000014.PP
15The following mnemonics are available:
16.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010017\fB\-\-and\-tos\fP \fIbits\fP
18Binary AND the TOS value with \fIbits\fR. (Mnemonic for \fB\-\-set\-tos
Jan Engelhardt36f2ead2008-01-20 13:25:08 +0000190/\fR\fIinvbits\fR, where \fIinvbits\fR is the binary negation of \fIbits\fR.)
20.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010021\fB\-\-or\-tos\fP \fIbits\fP
22Binary OR the TOS value with \fIbits\fR. (Mnemonic for \fB\-\-set\-tos\fP
Jan Engelhardt36f2ead2008-01-20 13:25:08 +000023\fIbits\fR\fB/\fR\fIbits\fR.)
24.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010025\fB\-\-xor\-tos\fP \fIbits\fP
26Binary XOR the TOS value with \fIbits\fR. (Mnemonic for \fB\-\-set\-tos\fP
Jan Engelhardt36f2ead2008-01-20 13:25:08 +000027\fIbits\fR\fB/0\fR.)