Jan Engelhardt | f4b737f | 2008-01-20 13:31:13 +0000 | [diff] [blame] | 1 | This target is used to set the Netfilter mark value associated with the packet. |
| 2 | The target can only be used in the \fBmangle\fR table. It can, for example, be |
| 3 | used in conjunction with routing based on fwmark (needs iproute2). |
| 4 | .TP |
Jan Engelhardt | fea74bf | 2009-01-12 04:53:18 +0100 | [diff] [blame] | 5 | \fB\-\-set\-xmark\fP \fIvalue\fP[\fB/\fP\fImask\fP] |
Jan Engelhardt | f4b737f | 2008-01-20 13:31:13 +0000 | [diff] [blame] | 6 | Zeroes out the bits given by \fImask\fR and XORs \fIvalue\fR into the packet |
| 7 | mark ("nfmark"). If \fImask\fR is omitted, 0xFFFFFFFF is assumed. |
| 8 | .TP |
Jan Engelhardt | fea74bf | 2009-01-12 04:53:18 +0100 | [diff] [blame] | 9 | \fB\-\-set\-mark\fP \fIvalue\fP[\fB/\fP\fImask\fP] |
Jan Engelhardt | f4b737f | 2008-01-20 13:31:13 +0000 | [diff] [blame] | 10 | Zeroes out the bits given by \fImask\fR and ORs \fIvalue\fR into the packet |
| 11 | mark. If \fImask\fR is omitted, 0xFFFFFFFF is assumed. |
| 12 | .PP |
| 13 | The following mnemonics are available: |
| 14 | .TP |
Jan Engelhardt | fea74bf | 2009-01-12 04:53:18 +0100 | [diff] [blame] | 15 | \fB\-\-and\-mark\fP \fIbits\fP |
| 16 | Binary AND the nfmark with \fIbits\fR. (Mnemonic for \fB\-\-set\-xmark |
Jan Engelhardt | f4b737f | 2008-01-20 13:31:13 +0000 | [diff] [blame] | 17 | 0/\fR\fIinvbits\fR, where \fIinvbits\fR is the binary negation of \fIbits\fR.) |
| 18 | .TP |
Jan Engelhardt | fea74bf | 2009-01-12 04:53:18 +0100 | [diff] [blame] | 19 | \fB\-\-or\-mark\fP \fIbits\fP |
| 20 | Binary OR the nfmark with \fIbits\fR. (Mnemonic for \fB\-\-set\-xmark\fP |
Jan Engelhardt | f4b737f | 2008-01-20 13:31:13 +0000 | [diff] [blame] | 21 | \fIbits\fR\fB/\fR\fIbits\fR.) |
| 22 | .TP |
Jan Engelhardt | fea74bf | 2009-01-12 04:53:18 +0100 | [diff] [blame] | 23 | \fB\-\-xor\-mark\fP \fIbits\fP |
| 24 | Binary XOR the nfmark with \fIbits\fR. (Mnemonic for \fB\-\-set\-xmark\fP |
Jan Engelhardt | f4b737f | 2008-01-20 13:31:13 +0000 | [diff] [blame] | 25 | \fIbits\fR\fB/0\fR.) |