Jan Engelhardt | 36f2ead | 2008-01-20 13:25:08 +0000 | [diff] [blame] | 1 | This module sets the Type of Service field in the IPv4 header (including the |
Laurence J. Lane | cfb048f | 2009-08-20 17:14:25 +0200 | [diff] [blame] | 2 | "precedence" bits) or the Priority field in the IPv6 header. Note that TOS |
Jan Engelhardt | 36f2ead | 2008-01-20 13:25:08 +0000 | [diff] [blame] | 3 | shares the same bits as DSCP and ECN. The TOS target is only valid in the |
Jan Engelhardt | c6775d6 | 2010-07-23 21:23:05 +0200 | [diff] [blame] | 4 | \fBmangle\fP table. |
Jan Engelhardt | 36f2ead | 2008-01-20 13:25:08 +0000 | [diff] [blame] | 5 | .TP |
Jan Engelhardt | fea74bf | 2009-01-12 04:53:18 +0100 | [diff] [blame] | 6 | \fB\-\-set\-tos\fP \fIvalue\fP[\fB/\fP\fImask\fP] |
Jan Engelhardt | c6775d6 | 2010-07-23 21:23:05 +0200 | [diff] [blame] | 7 | Zeroes out the bits given by \fImask\fP and XORs \fIvalue\fP into the |
| 8 | TOS/Priority field. If \fImask\fP is omitted, 0xFF is assumed. |
Jan Engelhardt | 36f2ead | 2008-01-20 13:25:08 +0000 | [diff] [blame] | 9 | .TP |
Jan Engelhardt | fea74bf | 2009-01-12 04:53:18 +0100 | [diff] [blame] | 10 | \fB\-\-set\-tos\fP \fIsymbol\fP |
Jan Engelhardt | 36f2ead | 2008-01-20 13:25:08 +0000 | [diff] [blame] | 11 | You can specify a symbolic name when using the TOS target for IPv4. It implies |
| 12 | a mask of 0xFF. The list of recognized TOS names can be obtained by calling |
Jan Engelhardt | fea74bf | 2009-01-12 04:53:18 +0100 | [diff] [blame] | 13 | iptables with \fB\-j TOS \-h\fP. |
Jan Engelhardt | 36f2ead | 2008-01-20 13:25:08 +0000 | [diff] [blame] | 14 | .PP |
| 15 | The following mnemonics are available: |
| 16 | .TP |
Jan Engelhardt | fea74bf | 2009-01-12 04:53:18 +0100 | [diff] [blame] | 17 | \fB\-\-and\-tos\fP \fIbits\fP |
Jan Engelhardt | c6775d6 | 2010-07-23 21:23:05 +0200 | [diff] [blame] | 18 | Binary AND the TOS value with \fIbits\fP. (Mnemonic for \fB\-\-set\-tos |
| 19 | 0/\fP\fIinvbits\fP, where \fIinvbits\fP is the binary negation of \fIbits\fP.) |
Jan Engelhardt | 36f2ead | 2008-01-20 13:25:08 +0000 | [diff] [blame] | 20 | .TP |
Jan Engelhardt | fea74bf | 2009-01-12 04:53:18 +0100 | [diff] [blame] | 21 | \fB\-\-or\-tos\fP \fIbits\fP |
Jan Engelhardt | c6775d6 | 2010-07-23 21:23:05 +0200 | [diff] [blame] | 22 | Binary OR the TOS value with \fIbits\fP. (Mnemonic for \fB\-\-set\-tos\fP |
| 23 | \fIbits\fP\fB/\fP\fIbits\fP.) |
Jan Engelhardt | 36f2ead | 2008-01-20 13:25:08 +0000 | [diff] [blame] | 24 | .TP |
Jan Engelhardt | fea74bf | 2009-01-12 04:53:18 +0100 | [diff] [blame] | 25 | \fB\-\-xor\-tos\fP \fIbits\fP |
Jan Engelhardt | c6775d6 | 2010-07-23 21:23:05 +0200 | [diff] [blame] | 26 | Binary XOR the TOS value with \fIbits\fP. (Mnemonic for \fB\-\-set\-tos\fP |
| 27 | \fIbits\fP\fB/0\fP.) |