Skip to content

Nftables

NFPROTO_ARP = 3 module-attribute

NFPROTO_BRIDGE = 7 module-attribute

NFPROTO_INET = 1 module-attribute

NFPROTO_IPV4 = 2 module-attribute

NFPROTO_IPV6 = 10 module-attribute

NFPROTO_NETDEV = 5 module-attribute

nftables_table_family = {'inet': NFPROTO_INET, 'ip': NFPROTO_IPV4, 'arp': NFPROTO_ARP, 'netdev': NFPROTO_NETDEV, 'bridge': NFPROTO_BRIDGE, 'ip6': NFPROTO_IPV6} module-attribute

Chain

Bases: NftFields

basechain: Optional[pwndbg.dbg_mod.Value] property

bound: int instance-attribute

flags: int instance-attribute

genmask: int instance-attribute

handle: int instance-attribute

hook: ChainHook = ChainHook(self) instance-attribute

name: str instance-attribute

policy: int property

table: 'Table' property

type: str property

use: int instance-attribute

userdata: bytearray property

__init__(addr)

find(table_family=None, table_name=None, chain_name=None, nsid=None) classmethod

iter_rules()

print(print_nested=True)

ChainHook

Bases: NftFields

dev: str property

devs: List[str] property

hooknum: int instance-attribute

priority: int instance-attribute

__init__(parent)

get_netdevs()

is_netdev()

nested_print(nested=0)

Expr

expr_name: str property

__init__(addr)

print(print_nested=True)

print_expr_iptables(expr_name)

print_expr_nftables(expr_name)

Flowtable

Bases: NftFields

flags: int property

genmask: int instance-attribute

handle: int instance-attribute

hook: FlowtableHook = FlowtableHook(self) instance-attribute

name: str instance-attribute

table: 'Table' property

use: int instance-attribute

__init__(addr)

print(print_nested=True)

FlowtableHook

Bases: NftFields

devs: List[str] property

hooknum: int property

priority: int property

__init__(parent)

nested_print(nested=0)

NftFields

Bases: object

__getattr__(name)

get_hook_list_dev_names(hook_list) classmethod

print_fields(nested=0, keys=None)

Nftables

__init__(addr)

find(nsid=None) classmethod

iter_tables()

print()

Object

Bases: NftFields

genmask: int instance-attribute

handle: int instance-attribute

name: str property

table: 'Table' property

type: int property

use: int instance-attribute

userdata: bytearray property

__init__(addr)

iter_data()

print(print_nested=True)

Rule

Bases: NftFields

handle: int instance-attribute

userdata: bytearray property

__init__(addr, chain)

find(table_name, table_family, chain_name, rule_id, nsid=None) classmethod

iter_exprs()

print(print_nested=True)

Set

Bases: NftFields

dead: int instance-attribute

desc_concat: List[int] property

desc_size: int property

dlen: int instance-attribute

dtype: int instance-attribute

field_count: int instance-attribute

flags: int instance-attribute

gc_int: int instance-attribute

genmask: int instance-attribute

handle: int instance-attribute

klen: int instance-attribute

ktype: int instance-attribute

name: str instance-attribute

nelems: int property

num_exprs: int instance-attribute

objtype: int instance-attribute

policy: int instance-attribute

table: 'Table' property

timeout: int instance-attribute

use: int instance-attribute

userdata: bytearray property

__init__(addr)

iter_elems()

iter_expr()

print(print_nested=True)

Table

Bases: NftFields

family: int instance-attribute

flags: int instance-attribute

genmask: int instance-attribute

handle: int instance-attribute

name: str instance-attribute

nlpid: int instance-attribute

use: int instance-attribute

__init__(addr)

find(table_name=None, table_family=None, nsid=None) classmethod

iter_chains()

iter_flowtables()

iter_objects()

iter_sets()

nested_print(nested=0)

print(print_nested=True)

catch_error(func)

get_init_net_namespace()