blob: 46f673793a2bef2f3f5d5990df56aa2237f0b174 [file] [log] [blame]
Jan Engelhardt36f2ead2008-01-20 13:25:08 +00001This module sets the Type of Service field in the IPv4 header (including the
Laurence J. Lanecfb048f2009-08-20 17:14:25 +02002"precedence" bits) or the Priority field in the IPv6 header. Note that TOS
Jan Engelhardt36f2ead2008-01-20 13:25:08 +00003shares the same bits as DSCP and ECN. The TOS target is only valid in the
Jan Engelhardtc6775d62010-07-23 21:23:05 +02004\fBmangle\fP table.
Jan Engelhardt36f2ead2008-01-20 13:25:08 +00005.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +01006\fB\-\-set\-tos\fP \fIvalue\fP[\fB/\fP\fImask\fP]
Jan Engelhardtc6775d62010-07-23 21:23:05 +02007Zeroes out the bits given by \fImask\fP and XORs \fIvalue\fP into the
8TOS/Priority field. If \fImask\fP is omitted, 0xFF is assumed.
Jan Engelhardt36f2ead2008-01-20 13:25:08 +00009.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
Jan Engelhardtc6775d62010-07-23 21:23:05 +020018Binary AND the TOS value with \fIbits\fP. (Mnemonic for \fB\-\-set\-tos
190/\fP\fIinvbits\fP, where \fIinvbits\fP is the binary negation of \fIbits\fP.)
Jan Engelhardt36f2ead2008-01-20 13:25:08 +000020.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010021\fB\-\-or\-tos\fP \fIbits\fP
Jan Engelhardtc6775d62010-07-23 21:23:05 +020022Binary OR the TOS value with \fIbits\fP. (Mnemonic for \fB\-\-set\-tos\fP
23\fIbits\fP\fB/\fP\fIbits\fP.)
Jan Engelhardt36f2ead2008-01-20 13:25:08 +000024.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010025\fB\-\-xor\-tos\fP \fIbits\fP
Jan Engelhardtc6775d62010-07-23 21:23:05 +020026Binary XOR the TOS value with \fIbits\fP. (Mnemonic for \fB\-\-set\-tos\fP
27\fIbits\fP\fB/0\fP.)