403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/ynl/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/ynl/nftables.rst
.. LINENO 2

.. SPDX-License-Identifier: GPL-2.0
.. NOTE: This document was auto-generated.


.. _netlink-nftables:


=========================================
Family ``nftables`` netlink specification
=========================================


.. contents:: :depth: 3


-------
Summary
-------


Netfilter nftables configuration over netlink.

----------
Operations
----------


.. LINENO 1148

.. _nftables-operation-batch-begin:

batch-begin
===========
Start a batch of operations

:attribute-set: :ref:`nftables-attribute-set-batch-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1153

    **request**
        :attributes: [``genid``]

    **reply**
        :attributes: [``genid``]



.. LINENO 1162

.. _nftables-operation-batch-end:

batch-end
=========
Finish a batch of operations

:attribute-set: :ref:`nftables-attribute-set-batch-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1167

    **request**
        :attributes: [``genid``]



.. LINENO 1172

.. _nftables-operation-newtable:

newtable
========
Create a new table.

:attribute-set: :ref:`nftables-attribute-set-table-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1177

    **request**
        :attributes: [``name``]



.. LINENO 1182

.. _nftables-operation-gettable:

gettable
========
Get / dump tables.

:attribute-set: :ref:`nftables-attribute-set-table-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1187

    **request**
        :attributes: [``name``]

    **reply**
        :attributes: [``name``]



.. LINENO 1196

.. _nftables-operation-deltable:

deltable
========
Delete an existing table.

:attribute-set: :ref:`nftables-attribute-set-table-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1201

    **request**
        :attributes: [``name``]



.. LINENO 1206

.. _nftables-operation-destroytable:

destroytable
============
Delete an existing table with destroy semantics (ignoring ENOENT errors).

:attribute-set: :ref:`nftables-attribute-set-table-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1211

    **request**
        :attributes: [``name``]



.. LINENO 1216

.. _nftables-operation-newchain:

newchain
========
Create a new chain.

:attribute-set: :ref:`nftables-attribute-set-chain-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1221

    **request**
        :attributes: [``name``]



.. LINENO 1226

.. _nftables-operation-getchain:

getchain
========
Get / dump chains.

:attribute-set: :ref:`nftables-attribute-set-chain-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1231

    **request**
        :attributes: [``name``]

    **reply**
        :attributes: [``name``]



.. LINENO 1240

.. _nftables-operation-delchain:

delchain
========
Delete an existing chain.

:attribute-set: :ref:`nftables-attribute-set-chain-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1245

    **request**
        :attributes: [``name``]



.. LINENO 1250

.. _nftables-operation-destroychain:

destroychain
============
Delete an existing chain with destroy semantics (ignoring ENOENT errors).

:attribute-set: :ref:`nftables-attribute-set-chain-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1255

    **request**
        :attributes: [``name``]



.. LINENO 1260

.. _nftables-operation-newrule:

newrule
=======
Create a new rule.

:attribute-set: :ref:`nftables-attribute-set-rule-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1265

    **request**
        :attributes: [``name``]



.. LINENO 1270

.. _nftables-operation-getrule:

getrule
=======
Get / dump rules.

:attribute-set: :ref:`nftables-attribute-set-rule-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1275

    **request**
        :attributes: [``name``]

    **reply**
        :attributes: [``name``]



.. LINENO 1284

.. _nftables-operation-getrule-reset:

getrule-reset
=============
Get / dump rules and reset stateful expressions.

:attribute-set: :ref:`nftables-attribute-set-rule-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1289

    **request**
        :attributes: [``name``]

    **reply**
        :attributes: [``name``]



.. LINENO 1298

.. _nftables-operation-delrule:

delrule
=======
Delete an existing rule.

:attribute-set: :ref:`nftables-attribute-set-rule-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1303

    **request**
        :attributes: [``name``]



.. LINENO 1308

.. _nftables-operation-destroyrule:

destroyrule
===========
Delete an existing rule with destroy semantics (ignoring ENOENT errors).

:attribute-set: :ref:`nftables-attribute-set-rule-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1313

    **request**
        :attributes: [``name``]



.. LINENO 1318

.. _nftables-operation-newset:

newset
======
Create a new set.

:attribute-set: :ref:`nftables-attribute-set-set-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1323

    **request**
        :attributes: [``name``]



.. LINENO 1328

.. _nftables-operation-getset:

getset
======
Get / dump sets.

:attribute-set: :ref:`nftables-attribute-set-set-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1333

    **request**
        :attributes: [``name``]

    **reply**
        :attributes: [``name``]



.. LINENO 1342

.. _nftables-operation-delset:

delset
======
Delete an existing set.

:attribute-set: :ref:`nftables-attribute-set-set-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1347

    **request**
        :attributes: [``name``]



.. LINENO 1352

.. _nftables-operation-destroyset:

destroyset
==========
Delete an existing set with destroy semantics (ignoring ENOENT errors).

:attribute-set: :ref:`nftables-attribute-set-set-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1357

    **request**
        :attributes: [``name``]



.. LINENO 1362

.. _nftables-operation-newsetelem:

newsetelem
==========
Create a new set element.

:attribute-set: :ref:`nftables-attribute-set-setelem-list-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1367

    **request**
        :attributes: [``name``]



.. LINENO 1372

.. _nftables-operation-getsetelem:

getsetelem
==========
Get / dump set elements.

:attribute-set: :ref:`nftables-attribute-set-setelem-list-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1377

    **request**
        :attributes: [``name``]

    **reply**
        :attributes: [``name``]



.. LINENO 1386

.. _nftables-operation-getsetelem-reset:

getsetelem-reset
================
Get / dump set elements and reset stateful expressions.

:attribute-set: :ref:`nftables-attribute-set-setelem-list-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1391

    **request**
        :attributes: [``name``]

    **reply**
        :attributes: [``name``]



.. LINENO 1400

.. _nftables-operation-delsetelem:

delsetelem
==========
Delete an existing set element.

:attribute-set: :ref:`nftables-attribute-set-setelem-list-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1405

    **request**
        :attributes: [``name``]



.. LINENO 1410

.. _nftables-operation-destroysetelem:

destroysetelem
==============
Delete an existing set element with destroy semantics.

:attribute-set: :ref:`nftables-attribute-set-setelem-list-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1415

    **request**
        :attributes: [``name``]



.. LINENO 1420

.. _nftables-operation-getgen:

getgen
======
Get / dump rule-set generation.

:attribute-set: :ref:`nftables-attribute-set-gen-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1425

    **request**
        :attributes: [``name``]

    **reply**
        :attributes: [``name``]



.. LINENO 1434

.. _nftables-operation-newobj:

newobj
======
Create a new stateful object.

:attribute-set: :ref:`nftables-attribute-set-obj-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1439

    **request**
        :attributes: [``name``]



.. LINENO 1444

.. _nftables-operation-getobj:

getobj
======
Get / dump stateful objects.

:attribute-set: :ref:`nftables-attribute-set-obj-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1449

    **request**
        :attributes: [``name``]

    **reply**
        :attributes: [``name``]



.. LINENO 1458

.. _nftables-operation-delobj:

delobj
======
Delete an existing stateful object.

:attribute-set: :ref:`nftables-attribute-set-obj-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1463

    **request**
        :attributes: [``name``]



.. LINENO 1468

.. _nftables-operation-destroyobj:

destroyobj
==========
Delete an existing stateful object with destroy semantics.

:attribute-set: :ref:`nftables-attribute-set-obj-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1473

    **request**
        :attributes: [``name``]



.. LINENO 1478

.. _nftables-operation-newflowtable:

newflowtable
============
Create a new flow table.

:attribute-set: :ref:`nftables-attribute-set-flowtable-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1483

    **request**
        :attributes: [``name``]



.. LINENO 1488

.. _nftables-operation-getflowtable:

getflowtable
============
Get / dump flow tables.

:attribute-set: :ref:`nftables-attribute-set-flowtable-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1493

    **request**
        :attributes: [``name``]

    **reply**
        :attributes: [``name``]



.. LINENO 1502

.. _nftables-operation-delflowtable:

delflowtable
============
Delete an existing flow table.

:attribute-set: :ref:`nftables-attribute-set-flowtable-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1507

    **request**
        :attributes: [``name``]



.. LINENO 1512

.. _nftables-operation-destroyflowtable:

destroyflowtable
================
Delete an existing flow table with destroy semantics.

:attribute-set: :ref:`nftables-attribute-set-flowtable-attrs`
:fixed-header: :ref:`nftables-definition-nfgenmsg`
:do:
.. LINENO 1517

    **request**
        :attributes: [``name``]




----------------
Multicast groups
----------------


- mgmt

-----------
Definitions
-----------


.. LINENO 11

.. _nftables-definition-nfgenmsg:

nfgenmsg
========
:type: struct


:members:
    :nfgen-family (``u8``): 
    :version (``u8``): 
    :res-id (``u16``): 


.. LINENO 25

.. _nftables-definition-meta-keys:

meta-keys
=========
:type: enum


:entries:
    - ``len``
    - ``protocol``
    - ``priority``
    - ``mark``
    - ``iif``
    - ``oif``
    - ``iifname``
    - ``oifname``
    - ``iftype``
    - ``oiftype``
    - ``skuid``
    - ``skgid``
    - ``nftrace``
    - ``rtclassid``
    - ``secmark``
    - ``nfproto``
    - ``l4-proto``
    - ``bri-iifname``
    - ``bri-oifname``
    - ``pkttype``
    - ``cpu``
    - ``iifgroup``
    - ``oifgroup``
    - ``cgroup``
    - ``prandom``
    - ``secpath``
    - ``iifkind``
    - ``oifkind``
    - ``bri-iifpvid``
    - ``bri-iifvproto``
    - ``time-ns``
    - ``time-day``
    - ``time-hour``
    - ``sdif``
    - ``sdifname``
    - ``bri-broute``


.. LINENO 65

.. _nftables-definition-bitwise-ops:

bitwise-ops
===========
:type: enum


:entries:
    - ``bool``
    - ``lshift``
    - ``rshift``


.. LINENO 72

.. _nftables-definition-cmp-ops:

cmp-ops
=======
:type: enum


:entries:
    - ``eq``
    - ``neq``
    - ``lt``
    - ``lte``
    - ``gt``
    - ``gte``


.. LINENO 82

.. _nftables-definition-object-type:

object-type
===========
:type: enum


:entries:
    - ``unspec``
    - ``counter``
    - ``quota``
    - ``ct-helper``
    - ``limit``
    - ``connlimit``
    - ``tunnel``
    - ``ct-timeout``
    - ``secmark``
    - ``ct-expect``
    - ``synproxy``


.. LINENO 97

.. _nftables-definition-nat-range-flags:

nat-range-flags
===============
:type: flags


:entries:
    - ``map-ips``
    - ``proto-specified``
    - ``proto-random``
    - ``persistent``
    - ``proto-random-fully``
    - ``proto-offset``
    - ``netmap``


.. LINENO 108

.. _nftables-definition-table-flags:

table-flags
===========
:type: flags


:entries:
    - ``dormant``
    - ``owner``
    - ``persist``


.. LINENO 115

.. _nftables-definition-chain-flags:

chain-flags
===========
:type: flags


:entries:
    - ``base``
    - ``hw-offload``
    - ``binding``


.. LINENO 122

.. _nftables-definition-set-flags:

set-flags
=========
:type: flags


:entries:
    - ``anonymous``
    - ``constant``
    - ``interval``
    - ``map``
    - ``timeout``
    - ``eval``
    - ``object``
    - ``concat``
    - ``expr``


.. LINENO 135

.. _nftables-definition-lookup-flags:

lookup-flags
============
:type: flags


:entries:
    - ``invert``


.. LINENO 140

.. _nftables-definition-ct-keys:

ct-keys
=======
:type: enum


:entries:
    - ``state``
    - ``direction``
    - ``status``
    - ``mark``
    - ``secmark``
    - ``expiration``
    - ``helper``
    - ``l3protocol``
    - ``src``
    - ``dst``
    - ``protocol``
    - ``proto-src``
    - ``proto-dst``
    - ``labels``
    - ``pkts``
    - ``bytes``
    - ``avgpkt``
    - ``zone``
    - ``eventmask``
    - ``src-ip``
    - ``dst-ip``
    - ``src-ip6``
    - ``dst-ip6``
    - ``ct-id``


.. LINENO 168

.. _nftables-definition-ct-direction:

ct-direction
============
:type: enum


:entries:
    - ``original``
    - ``reply``


.. LINENO 174

.. _nftables-definition-quota-flags:

quota-flags
===========
:type: flags


:entries:
    - ``invert``
    - ``depleted``


.. LINENO 180

.. _nftables-definition-verdict-code:

verdict-code
============
:type: enum


:entries:
    :continue: 
    :break: 
    :jump: 
    :goto: 
    :return: 
    :drop: 
    :accept: 
    :stolen: 
    :queue: 
    :repeat: 


.. LINENO 204

.. _nftables-definition-fib-result:

fib-result
==========
:type: enum


:entries:
    - ``oif``
    - ``oifname``
    - ``addrtype``


.. LINENO 211

.. _nftables-definition-fib-flags:

fib-flags
=========
:type: flags


:entries:
    - ``saddr``
    - ``daddr``
    - ``mark``
    - ``iif``
    - ``oif``
    - ``present``


.. LINENO 221

.. _nftables-definition-reject-types:

reject-types
============
:type: enum


:entries:
    - ``icmp-unreach``
    - ``tcp-rst``
    - ``icmpx-unreach``



--------------
Attribute sets
--------------


.. _nftables-attribute-set-empty-attrs:

empty-attrs
===========
.. LINENO 233

name (``string``)
~~~~~~~~~~~~~~~~~


.. _nftables-attribute-set-batch-attrs:

batch-attrs
===========
.. LINENO 239

genid (``u32``)
~~~~~~~~~~~~~~~
:byte-order: big-endian


.. _nftables-attribute-set-table-attrs:

table-attrs
===========
.. LINENO 246

name (``string``)
~~~~~~~~~~~~~~~~~
:doc: name of the table


.. LINENO 250

flags (``u32``)
~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: bitmask of flags
:enum: :ref:`nftables-definition-table-flags`
:enum-as-flags: True


.. LINENO 257

use (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian
:doc: number of chains in this table


.. LINENO 262

handle (``u64``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: numeric handle of the table


.. LINENO 267

userdata (``binary``)
~~~~~~~~~~~~~~~~~~~~~
:doc: user data


.. _nftables-attribute-set-chain-attrs:

chain-attrs
===========
.. LINENO 274

table (``string``)
~~~~~~~~~~~~~~~~~~
:doc: name of the table containing the chain


.. LINENO 278

handle (``u64``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: numeric handle of the chain


.. LINENO 283

name (``string``)
~~~~~~~~~~~~~~~~~
:doc: name of the chain


.. LINENO 287

hook (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-nft-hook-attrs`
:doc: hook specification for basechains


.. LINENO 292

policy (``u32``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: numeric policy of the chain


.. LINENO 297

use (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian
:doc: number of references to this chain


.. LINENO 302

type (``string``)
~~~~~~~~~~~~~~~~~
:doc: type name of the chain


.. LINENO 306

counters (``nest``)
~~~~~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-nft-counter-attrs`
:doc: counter specification of the chain


.. LINENO 311

flags (``u32``)
~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: chain flags
:enum: :ref:`nftables-definition-chain-flags`
:enum-as-flags: True


.. LINENO 318

id (``u32``)
~~~~~~~~~~~~
:byte-order: big-endian
:doc: uniquely identifies a chain in a transaction


.. LINENO 323

userdata (``binary``)
~~~~~~~~~~~~~~~~~~~~~
:doc: user data


.. _nftables-attribute-set-counter-attrs:

counter-attrs
=============
.. LINENO 330

bytes (``u64``)
~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 334

packets (``u64``)
~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 338

pad (``pad``)
~~~~~~~~~~~~~


.. _nftables-attribute-set-nft-hook-attrs:

nft-hook-attrs
==============
.. LINENO 344

num (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 348

priority (``s32``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 352

dev (``string``)
~~~~~~~~~~~~~~~~
:doc: net device name


.. LINENO 356

devs (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-hook-dev-attrs`
:doc: list of net devices


.. _nftables-attribute-set-hook-dev-attrs:

hook-dev-attrs
==============
.. LINENO 364

name (``string``)
~~~~~~~~~~~~~~~~~
:multi-attr: True


.. _nftables-attribute-set-nft-counter-attrs:

nft-counter-attrs
=================
.. LINENO 371

bytes (``u64``)
~~~~~~~~~~~~~~~


.. LINENO 374

packets (``u64``)
~~~~~~~~~~~~~~~~~


.. _nftables-attribute-set-rule-attrs:

rule-attrs
==========
.. LINENO 380

table (``string``)
~~~~~~~~~~~~~~~~~~
:doc: name of the table containing the rule


.. LINENO 384

chain (``string``)
~~~~~~~~~~~~~~~~~~
:doc: name of the chain containing the rule


.. LINENO 388

handle (``u64``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: numeric handle of the rule


.. LINENO 393

expressions (``nest``)
~~~~~~~~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-expr-list-attrs`
:doc: list of expressions


.. LINENO 398

compat (``nest``)
~~~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-rule-compat-attrs`
:doc: compatibility specifications of the rule


.. LINENO 403

position (``u64``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: numeric handle of the previous rule


.. LINENO 408

userdata (``binary``)
~~~~~~~~~~~~~~~~~~~~~
:doc: user data


.. LINENO 412

id (``u32``)
~~~~~~~~~~~~
:doc: uniquely identifies a rule in a transaction


.. LINENO 416

position-id (``u32``)
~~~~~~~~~~~~~~~~~~~~~
:doc: transaction unique identifier of the previous rule


.. LINENO 420

chain-id (``u32``)
~~~~~~~~~~~~~~~~~~
:doc: add the rule to chain by ID, alternative to chain name


.. _nftables-attribute-set-expr-list-attrs:

expr-list-attrs
===============
.. LINENO 427

elem (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-expr-attrs`
:multi-attr: True


.. _nftables-attribute-set-expr-attrs:

expr-attrs
==========
.. LINENO 435

name (``string``)
~~~~~~~~~~~~~~~~~
:doc: name of the expression type


.. LINENO 439

data (``sub-message``)
~~~~~~~~~~~~~~~~~~~~~~
:sub-message: :ref:`nftables-sub-message-expr-ops`
:selector: name
:doc: type specific data


.. _nftables-attribute-set-rule-compat-attrs:

rule-compat-attrs
=================
.. LINENO 448

proto (``binary``)
~~~~~~~~~~~~~~~~~~
:doc: numeric value of the handled protocol


.. LINENO 452

flags (``binary``)
~~~~~~~~~~~~~~~~~~
:doc: bitmask of flags


.. _nftables-attribute-set-set-attrs:

set-attrs
=========
.. LINENO 459

table (``string``)
~~~~~~~~~~~~~~~~~~
:doc: table name


.. LINENO 463

name (``string``)
~~~~~~~~~~~~~~~~~
:doc: set name


.. LINENO 467

flags (``u32``)
~~~~~~~~~~~~~~~
:enum: :ref:`nftables-definition-set-flags`
:byte-order: big-endian
:doc: bitmask of enum nft_set_flags


.. LINENO 473

key-type (``u32``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: key data type, informational purpose only


.. LINENO 478

key-len (``u32``)
~~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: key data length


.. LINENO 483

data-type (``u32``)
~~~~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: mapping data type


.. LINENO 488

data-len (``u32``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: mapping data length


.. LINENO 493

policy (``u32``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: selection policy


.. LINENO 498

desc (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-set-desc-attrs`
:doc: set description


.. LINENO 503

id (``u32``)
~~~~~~~~~~~~
:doc: uniquely identifies a set in a transaction


.. LINENO 507

timeout (``u64``)
~~~~~~~~~~~~~~~~~
:doc: default timeout value


.. LINENO 511

gc-interval (``u32``)
~~~~~~~~~~~~~~~~~~~~~
:doc: garbage collection interval


.. LINENO 515

userdata (``binary``)
~~~~~~~~~~~~~~~~~~~~~
:doc: user data


.. LINENO 519

pad (``pad``)
~~~~~~~~~~~~~


.. LINENO 522

obj-type (``u32``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: stateful object type


.. LINENO 527

handle (``u64``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: set handle


.. LINENO 532

expr (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-expr-attrs`
:doc: set expression
:multi-attr: True


.. LINENO 538

expressions (``nest``)
~~~~~~~~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-set-list-attrs`
:doc: list of expressions


.. _nftables-attribute-set-set-desc-attrs:

set-desc-attrs
==============
.. LINENO 546

size (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: number of elements in set


.. LINENO 551

concat (``nest``)
~~~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-set-desc-concat-attrs`
:doc: description of field concatenation
:multi-attr: True


.. _nftables-attribute-set-set-desc-concat-attrs:

set-desc-concat-attrs
=====================
.. LINENO 560

elem (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-set-field-attrs`


.. _nftables-attribute-set-set-field-attrs:

set-field-attrs
===============
.. LINENO 567

len (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian


.. _nftables-attribute-set-set-list-attrs:

set-list-attrs
==============
.. LINENO 574

elem (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-expr-attrs`
:multi-attr: True


.. _nftables-attribute-set-setelem-attrs:

setelem-attrs
=============
.. LINENO 582

key (``nest``)
~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-data-attrs`
:doc: key value


.. LINENO 587

data (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-data-attrs`
:doc: data value of mapping


.. LINENO 592

flags (``binary``)
~~~~~~~~~~~~~~~~~~
:doc: bitmask of nft_set_elem_flags


.. LINENO 596

timeout (``u64``)
~~~~~~~~~~~~~~~~~
:doc: timeout value


.. LINENO 600

expiration (``u64``)
~~~~~~~~~~~~~~~~~~~~
:doc: expiration time


.. LINENO 604

userdata (``binary``)
~~~~~~~~~~~~~~~~~~~~~
:doc: user data


.. LINENO 608

expr (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-expr-attrs`
:doc: expression


.. LINENO 613

objref (``string``)
~~~~~~~~~~~~~~~~~~~
:doc: stateful object reference


.. LINENO 617

key-end (``nest``)
~~~~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-data-attrs`
:doc: closing key value


.. LINENO 622

expressions (``nest``)
~~~~~~~~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-expr-list-attrs`
:doc: list of expressions


.. _nftables-attribute-set-setelem-list-elem-attrs:

setelem-list-elem-attrs
=======================
.. LINENO 630

elem (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-setelem-attrs`
:multi-attr: True


.. _nftables-attribute-set-setelem-list-attrs:

setelem-list-attrs
==================
.. LINENO 638

table (``string``)
~~~~~~~~~~~~~~~~~~


.. LINENO 641

set (``string``)
~~~~~~~~~~~~~~~~


.. LINENO 644

elements (``nest``)
~~~~~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-setelem-list-elem-attrs`


.. LINENO 648

set-id (``u32``)
~~~~~~~~~~~~~~~~


.. _nftables-attribute-set-gen-attrs:

gen-attrs
=========
.. LINENO 654

id (``u32``)
~~~~~~~~~~~~
:byte-order: big-endian
:doc: ruleset generation id


.. LINENO 659

proc-pid (``u32``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 663

proc-name (``string``)
~~~~~~~~~~~~~~~~~~~~~~


.. _nftables-attribute-set-obj-attrs:

obj-attrs
=========
.. LINENO 669

table (``string``)
~~~~~~~~~~~~~~~~~~
:doc: name of the table containing the expression


.. LINENO 673

name (``string``)
~~~~~~~~~~~~~~~~~
:doc: name of this expression type


.. LINENO 677

type (``u32``)
~~~~~~~~~~~~~~
:enum: :ref:`nftables-definition-object-type`
:byte-order: big-endian
:doc: stateful object type


.. LINENO 683

data (``sub-message``)
~~~~~~~~~~~~~~~~~~~~~~
:sub-message: :ref:`nftables-sub-message-obj-data`
:selector: type
:doc: stateful object data


.. LINENO 689

use (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian
:doc: number of references to this expression


.. LINENO 694

handle (``u64``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: object handle


.. LINENO 699

pad (``pad``)
~~~~~~~~~~~~~


.. LINENO 702

userdata (``binary``)
~~~~~~~~~~~~~~~~~~~~~
:doc: user data


.. _nftables-attribute-set-quota-attrs:

quota-attrs
===========
.. LINENO 709

bytes (``u64``)
~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 713

flags (``u32``)
~~~~~~~~~~~~~~~
:byte-order: big-endian
:enum: :ref:`nftables-definition-quota-flags`


.. LINENO 718

pad (``pad``)
~~~~~~~~~~~~~


.. LINENO 721

consumed (``u64``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. _nftables-attribute-set-flowtable-attrs:

flowtable-attrs
===============
.. LINENO 728

table (``string``)
~~~~~~~~~~~~~~~~~~


.. LINENO 731

name (``string``)
~~~~~~~~~~~~~~~~~


.. LINENO 734

hook (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-flowtable-hook-attrs`


.. LINENO 738

use (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 742

handle (``u64``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 746

pad (``pad``)
~~~~~~~~~~~~~


.. LINENO 749

flags (``u32``)
~~~~~~~~~~~~~~~
:byte-order: big-endian


.. _nftables-attribute-set-flowtable-hook-attrs:

flowtable-hook-attrs
====================
.. LINENO 756

num (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 760

priority (``u32``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 764

devs (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-hook-dev-attrs`


.. _nftables-attribute-set-expr-bitwise-attrs:

expr-bitwise-attrs
==================
.. LINENO 771

sreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 775

dreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 779

len (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 783

mask (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-data-attrs`


.. LINENO 787

xor (``nest``)
~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-data-attrs`


.. LINENO 791

op (``u32``)
~~~~~~~~~~~~
:byte-order: big-endian
:enum: :ref:`nftables-definition-bitwise-ops`


.. LINENO 796

data (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-data-attrs`


.. _nftables-attribute-set-expr-cmp-attrs:

expr-cmp-attrs
==============
.. LINENO 803

sreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 807

op (``u32``)
~~~~~~~~~~~~
:byte-order: big-endian
:enum: :ref:`nftables-definition-cmp-ops`


.. LINENO 812

data (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-data-attrs`


.. _nftables-attribute-set-data-attrs:

data-attrs
==========
.. LINENO 819

value (``binary``)
~~~~~~~~~~~~~~~~~~


.. LINENO 823

verdict (``nest``)
~~~~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-verdict-attrs`


.. _nftables-attribute-set-verdict-attrs:

verdict-attrs
=============
.. LINENO 830

code (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian
:enum: :ref:`nftables-definition-verdict-code`


.. LINENO 835

chain (``string``)
~~~~~~~~~~~~~~~~~~


.. LINENO 838

chain-id (``u32``)
~~~~~~~~~~~~~~~~~~


.. _nftables-attribute-set-expr-counter-attrs:

expr-counter-attrs
==================
.. LINENO 844

bytes (``u64``)
~~~~~~~~~~~~~~~
:doc: Number of bytes


.. LINENO 848

packets (``u64``)
~~~~~~~~~~~~~~~~~
:doc: Number of packets


.. LINENO 852

pad (``pad``)
~~~~~~~~~~~~~


.. _nftables-attribute-set-expr-fib-attrs:

expr-fib-attrs
==============
.. LINENO 858

dreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 862

result (``u32``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian
:enum: :ref:`nftables-definition-fib-result`


.. LINENO 867

flags (``u32``)
~~~~~~~~~~~~~~~
:byte-order: big-endian
:enum: :ref:`nftables-definition-fib-flags`


.. _nftables-attribute-set-expr-ct-attrs:

expr-ct-attrs
=============
.. LINENO 875

dreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 879

key (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian
:enum: :ref:`nftables-definition-ct-keys`


.. LINENO 884

direction (``u8``)
~~~~~~~~~~~~~~~~~~
:enum: :ref:`nftables-definition-ct-direction`


.. LINENO 888

sreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. _nftables-attribute-set-expr-flow-offload-attrs:

expr-flow-offload-attrs
=======================
.. LINENO 895

name (``string``)
~~~~~~~~~~~~~~~~~
:doc: Flow offload table name


.. _nftables-attribute-set-expr-immediate-attrs:

expr-immediate-attrs
====================
.. LINENO 902

dreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 906

data (``nest``)
~~~~~~~~~~~~~~~
:nested-attributes: :ref:`nftables-attribute-set-data-attrs`


.. _nftables-attribute-set-expr-lookup-attrs:

expr-lookup-attrs
=================
.. LINENO 913

set (``string``)
~~~~~~~~~~~~~~~~
:doc: Name of set to use


.. LINENO 917

set id (``u32``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: ID of set to use


.. LINENO 922

sreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 926

dreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 930

flags (``u32``)
~~~~~~~~~~~~~~~
:byte-order: big-endian
:enum: :ref:`nftables-definition-lookup-flags`


.. _nftables-attribute-set-expr-meta-attrs:

expr-meta-attrs
===============
.. LINENO 938

dreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 942

key (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian
:enum: :ref:`nftables-definition-meta-keys`


.. LINENO 947

sreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. _nftables-attribute-set-expr-nat-attrs:

expr-nat-attrs
==============
.. LINENO 954

type (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 958

family (``u32``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 962

reg-addr-min (``u32``)
~~~~~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 966

reg-addr-max (``u32``)
~~~~~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 970

reg-proto-min (``u32``)
~~~~~~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 974

reg-proto-max (``u32``)
~~~~~~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 978

flags (``u32``)
~~~~~~~~~~~~~~~
:byte-order: big-endian
:enum: :ref:`nftables-definition-nat-range-flags`
:enum-as-flags: True


.. _nftables-attribute-set-expr-payload-attrs:

expr-payload-attrs
==================
.. LINENO 987

dreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 991

base (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 995

offset (``u32``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 999

len (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 1003

sreg (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 1007

csum-type (``u32``)
~~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 1011

csum-offset (``u32``)
~~~~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 1015

csum-flags (``u32``)
~~~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. _nftables-attribute-set-expr-reject-attrs:

expr-reject-attrs
=================
.. LINENO 1022

type (``u32``)
~~~~~~~~~~~~~~
:byte-order: big-endian
:enum: :ref:`nftables-definition-reject-types`


.. LINENO 1027

icmp-code (``u8``)
~~~~~~~~~~~~~~~~~~


.. _nftables-attribute-set-expr-target-attrs:

expr-target-attrs
=================
.. LINENO 1033

name (``string``)
~~~~~~~~~~~~~~~~~


.. LINENO 1036

rev (``u32``)
~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 1040

info (``binary``)
~~~~~~~~~~~~~~~~~


.. _nftables-attribute-set-expr-tproxy-attrs:

expr-tproxy-attrs
=================
.. LINENO 1046

family (``u32``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 1050

reg-addr (``u32``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 1054

reg-port (``u32``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. _nftables-attribute-set-expr-objref-attrs:

expr-objref-attrs
=================
.. LINENO 1061

imm-type (``u32``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 1065

imm-name (``string``)
~~~~~~~~~~~~~~~~~~~~~
:doc: object name


.. LINENO 1069

set-sreg (``u32``)
~~~~~~~~~~~~~~~~~~
:byte-order: big-endian


.. LINENO 1073

set-name (``string``)
~~~~~~~~~~~~~~~~~~~~~
:doc: name of object map


.. LINENO 1077

set-id (``u32``)
~~~~~~~~~~~~~~~~
:byte-order: big-endian
:doc: id of object map



------------
Sub-messages
------------


.. _nftables-sub-message-expr-ops:

expr-ops
========
- **bitwise**
    :attribute-set: :ref:`nftables-attribute-set-expr-bitwise-attrs`


- **cmp**
    :attribute-set: :ref:`nftables-attribute-set-expr-cmp-attrs`


- **counter**
    :attribute-set: :ref:`nftables-attribute-set-expr-counter-attrs`


- **ct**
    :attribute-set: :ref:`nftables-attribute-set-expr-ct-attrs`


- **fib**
    :attribute-set: :ref:`nftables-attribute-set-expr-fib-attrs`


- **flow_offload**
    :attribute-set: :ref:`nftables-attribute-set-expr-flow-offload-attrs`


- **immediate**
    :attribute-set: :ref:`nftables-attribute-set-expr-immediate-attrs`


- **lookup**
    :attribute-set: :ref:`nftables-attribute-set-expr-lookup-attrs`


- **meta**
    :attribute-set: :ref:`nftables-attribute-set-expr-meta-attrs`


- **nat**
    :attribute-set: :ref:`nftables-attribute-set-expr-nat-attrs`


- **objref**
    :attribute-set: :ref:`nftables-attribute-set-expr-objref-attrs`


- **payload**
    :attribute-set: :ref:`nftables-attribute-set-expr-payload-attrs`


- **quota**
    :attribute-set: :ref:`nftables-attribute-set-quota-attrs`


- **reject**
    :attribute-set: :ref:`nftables-attribute-set-expr-reject-attrs`


- **target**
    :attribute-set: :ref:`nftables-attribute-set-expr-target-attrs`


- **tproxy**
    :attribute-set: :ref:`nftables-attribute-set-expr-tproxy-attrs`


.. _nftables-sub-message-obj-data:

obj-data
========
- **counter**
    :attribute-set: :ref:`nftables-attribute-set-counter-attrs`


- **quota**
    :attribute-set: :ref:`nftables-attribute-set-quota-attrs`


Youez - 2016 - github.com/yon3zu
LinuXploit