AddressTypeMatch¶
Example:
>>> from linuxnet.iptables import AddressTypeMatch
>>> m = AddressTypeMatch()
>>> m.dst_addr_type().equals('BROADCAST').limit_iface_out().equals()
<linuxnet.iptables.matches.addrtypematch.AddressTypeMatch object at 0x7fea365ca278>
>>> m.to_iptables_args()
['-m', 'addrtype', '--dst-type', 'BROADCAST', '--limit-iface-out']
>>> print(m.dst_addr_type().get_value())
BROADCAST
- class AddressTypeMatch[source]¶
Match against the address type
- src_addr_type() GenericCriterion[source]¶
Compare with the source address type.
The comparison value is a string and should be one of the address type values listed in the documentation of the addrtype module in iptables(8)
- dst_addr_type() GenericCriterion[source]¶
Compare with the destination address type
The comparison value is a string and should be one of the address type values listed in the documentation of the addrtype module in iptables(8)
- limit_iface_in() BooleanCriterion[source]¶
Address checking limited to the interface that the packet came from.
This criterion does not support negation. Invocation of the
BooleanCriterion.not_equals()method will raise anIptablesError
- limit_iface_out() BooleanCriterion[source]¶
Address checking limited to the interface that the packet is going out from.
This criterion does not support negation. Invocation of the
BooleanCriterion.not_equals()method will raise anIptablesError