ConnmarkTarget¶
- class ConnmarkTarget(*, mark: Optional[int] = None, restore_mark=False)[source]¶
This class provides access to the
CONNMARKtarget- Parameters:
mark – value used to set the ctmark value (associated with a connection)
restore_mark – if
True, copy the connection mark to the packet mark
- get_mark() Optional[int]¶
Returns the mark value set by this target
- get_mask() Optional[int]¶
Returns the mask used by this target
- get_op() Optional[int]¶
Returns the operation
- Return type:
an integer with one of the following values: SET, XSET, AND, OR, XOR, or
None
- mark_iptables_args(args: List[str]) List[str]¶
Converts the op/value/mask to a list of iptables(8) arguments for the MARK target
- parse_op(val: str, field_iter) bool¶
Parse the operation identified by ‘val’