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


========================================
Family ``rt-rule`` netlink specification
========================================


.. contents:: :depth: 3


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


FIB rule management over rtnetlink.

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


.. _rt-rule-operation-newrule:

newrule
=======
Add new FIB rule

:attribute-set: :ref:`rt-rule-attribute-set-fib-rule-attrs`
:do:
    **request**
        :attributes: [``iifname``, ``oifname``, ``priority``, ``fwmark``, ``flow``, ``tun-id``, ``fwmask``, ``table``, ``suppress-prefixlen``, ``suppress-ifgroup``, ``goto``, ``l3mdev``, ``uid-range``, ``protocol``, ``ip-proto``, ``sport-range``, ``dport-range``, ``dscp``, ``flowlabel``, ``flowlabel-mask``]



.. _rt-rule-operation-newrule-ntf:

newrule-ntf
===========
Notify a rule creation

:value: 32
:notify: newrule


.. _rt-rule-operation-delrule:

delrule
=======
Remove an existing FIB rule

:attribute-set: :ref:`rt-rule-attribute-set-fib-rule-attrs`
:do:
    **request**
        :attributes: [``iifname``, ``oifname``, ``priority``, ``fwmark``, ``flow``, ``tun-id``, ``fwmask``, ``table``, ``suppress-prefixlen``, ``suppress-ifgroup``, ``goto``, ``l3mdev``, ``uid-range``, ``protocol``, ``ip-proto``, ``sport-range``, ``dport-range``, ``dscp``, ``flowlabel``, ``flowlabel-mask``]



.. _rt-rule-operation-delrule-ntf:

delrule-ntf
===========
Notify a rule deletion

:value: 33
:notify: delrule


.. _rt-rule-operation-getrule:

getrule
=======
Dump all FIB rules

:attribute-set: :ref:`rt-rule-attribute-set-fib-rule-attrs`
:dump:
    **request**


    **reply**
        :attributes: [``iifname``, ``oifname``, ``priority``, ``fwmark``, ``flow``, ``tun-id``, ``fwmask``, ``table``, ``suppress-prefixlen``, ``suppress-ifgroup``, ``goto``, ``l3mdev``, ``uid-range``, ``protocol``, ``ip-proto``, ``sport-range``, ``dport-range``, ``dscp``, ``flowlabel``, ``flowlabel-mask``]




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


- rtnlgrp-ipv4-rule
- rtnlgrp-ipv6-rule

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


.. _rt-rule-definition-rtgenmsg:

rtgenmsg
========
:type: struct


:members:
    :family (``u8``): 


.. _rt-rule-definition-fib-rule-hdr:

fib-rule-hdr
============
:type: struct


:members:
    :family (``u8``): 
    :dst-len (``u8``): 
    :src-len (``u8``): 
    :tos (``u8``): 
    :table (``u8``): 
    :res1 (``pad``): 
    :res2 (``pad``): 
    :action (``u8``): 
    :flags (``u32``): 


.. _rt-rule-definition-fr-act:

fr-act
======
:type: enum


:entries:
    - ``unspec``
    - ``to-tbl``
    - ``goto``
    - ``nop``
    - ``res3``
    - ``res4``
    - ``blackhole``
    - ``unreachable``
    - ``prohibit``


.. _rt-rule-definition-fib-rule-port-range:

fib-rule-port-range
===================
:type: struct


:members:
    :start (``u16``): 
    :end (``u16``): 


.. _rt-rule-definition-fib-rule-uid-range:

fib-rule-uid-range
==================
:type: struct


:members:
    :start (``u32``): 
    :end (``u32``): 



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


.. _rt-rule-attribute-set-fib-rule-attrs:

fib-rule-attrs
==============
dst (``u32``)
~~~~~~~~~~~~~


src (``u32``)
~~~~~~~~~~~~~


iifname (``string``)
~~~~~~~~~~~~~~~~~~~~


goto (``u32``)
~~~~~~~~~~~~~~


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


priority (``u32``)
~~~~~~~~~~~~~~~~~~


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


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


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


fwmark (``u32``)
~~~~~~~~~~~~~~~~
:display-hint: hex


flow (``u32``)
~~~~~~~~~~~~~~


tun-id (``u64``)
~~~~~~~~~~~~~~~~


suppress-ifgroup (``u32``)
~~~~~~~~~~~~~~~~~~~~~~~~~~


suppress-prefixlen (``u32``)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:display-hint: hex


table (``u32``)
~~~~~~~~~~~~~~~


fwmask (``u32``)
~~~~~~~~~~~~~~~~
:display-hint: hex


oifname (``string``)
~~~~~~~~~~~~~~~~~~~~


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


l3mdev (``u8``)
~~~~~~~~~~~~~~~


uid-range (``binary``)
~~~~~~~~~~~~~~~~~~~~~~
:struct: :ref:`rt-rule-definition-fib-rule-uid-range`


protocol (``u8``)
~~~~~~~~~~~~~~~~~


ip-proto (``u8``)
~~~~~~~~~~~~~~~~~


sport-range (``binary``)
~~~~~~~~~~~~~~~~~~~~~~~~
:struct: :ref:`rt-rule-definition-fib-rule-port-range`


dport-range (``binary``)
~~~~~~~~~~~~~~~~~~~~~~~~
:struct: :ref:`rt-rule-definition-fib-rule-port-range`


dscp (``u8``)
~~~~~~~~~~~~~


flowlabel (``u32``)
~~~~~~~~~~~~~~~~~~~
:byte-order: big-endian
:display-hint: hex


flowlabel-mask (``u32``)
~~~~~~~~~~~~~~~~~~~~~~~~
:byte-order: big-endian
:display-hint: hex

