File: //usr/share/doc/ynl/rt-rule.rst
.. LINENO 2
.. SPDX-License-Identifier: GPL-2.0
.. NOTE: This document was auto-generated.
.. _netlink-rt-rule:
========================================
Family ``rt-rule`` netlink specification
========================================
.. contents:: :depth: 3
-------
Summary
-------
FIB rule management over rtnetlink.
----------
Operations
----------
.. LINENO 184
.. _rt-rule-operation-newrule:
newrule
=======
Add new FIB rule
:attribute-set: :ref:`rt-rule-attribute-set-fib-rule-attrs`
:do:
.. LINENO 188
**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``]
.. LINENO 210
.. _rt-rule-operation-newrule-ntf:
newrule-ntf
===========
Notify a rule creation
:value: 32
:notify: getrule
.. LINENO 215
.. _rt-rule-operation-delrule:
delrule
=======
Remove an existing FIB rule
:attribute-set: :ref:`rt-rule-attribute-set-fib-rule-attrs`
:do:
.. LINENO 219
**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``]
.. LINENO 223
.. _rt-rule-operation-delrule-ntf:
delrule-ntf
===========
Notify a rule deletion
:value: 33
:notify: getrule
.. LINENO 228
.. _rt-rule-operation-getrule:
getrule
=======
Dump all FIB rules
:attribute-set: :ref:`rt-rule-attribute-set-fib-rule-attrs`
:dump:
.. LINENO 232
**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``]
----------------
Multicast groups
----------------
- rtnlgrp-ipv4-rule
- rtnlgrp-ipv6-rule
-----------
Definitions
-----------
.. LINENO 12
.. _rt-rule-definition-rtgenmsg:
rtgenmsg
========
:type: struct
:members:
:family (``u8``):
.. LINENO 23
.. _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``):
.. LINENO 57
.. _rt-rule-definition-fr-act:
fr-act
======
:type: enum
:enum-name: None
:entries:
- ``unspec``
- ``to-tbl``
- ``goto``
- ``nop``
- ``res3``
- ``res4``
- ``blackhole``
- ``unreachable``
- ``prohibit``
.. LINENO 71
.. _rt-rule-definition-fib-rule-port-range:
fib-rule-port-range
===================
:type: struct
:members:
:start (``u16``):
:end (``u16``):
.. LINENO 81
.. _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
==============
.. LINENO 97
dst (``u32``)
~~~~~~~~~~~~~
.. LINENO 100
src (``u32``)
~~~~~~~~~~~~~
.. LINENO 103
iifname (``string``)
~~~~~~~~~~~~~~~~~~~~
.. LINENO 106
goto (``u32``)
~~~~~~~~~~~~~~
.. LINENO 109
unused2 (``pad``)
~~~~~~~~~~~~~~~~~
.. LINENO 112
priority (``u32``)
~~~~~~~~~~~~~~~~~~
.. LINENO 115
unused3 (``pad``)
~~~~~~~~~~~~~~~~~
.. LINENO 118
unused4 (``pad``)
~~~~~~~~~~~~~~~~~
.. LINENO 121
unused5 (``pad``)
~~~~~~~~~~~~~~~~~
.. LINENO 124
fwmark (``u32``)
~~~~~~~~~~~~~~~~
:display-hint: hex
.. LINENO 128
flow (``u32``)
~~~~~~~~~~~~~~
.. LINENO 131
tun-id (``u64``)
~~~~~~~~~~~~~~~~
.. LINENO 134
suppress-ifgroup (``u32``)
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. LINENO 137
suppress-prefixlen (``u32``)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:display-hint: hex
.. LINENO 141
table (``u32``)
~~~~~~~~~~~~~~~
.. LINENO 144
fwmask (``u32``)
~~~~~~~~~~~~~~~~
:display-hint: hex
.. LINENO 148
oifname (``string``)
~~~~~~~~~~~~~~~~~~~~
.. LINENO 151
pad (``pad``)
~~~~~~~~~~~~~
.. LINENO 154
l3mdev (``u8``)
~~~~~~~~~~~~~~~
.. LINENO 157
uid-range (``binary``)
~~~~~~~~~~~~~~~~~~~~~~
:struct: :ref:`rt-rule-definition-fib-rule-uid-range`
.. LINENO 161
protocol (``u8``)
~~~~~~~~~~~~~~~~~
.. LINENO 164
ip-proto (``u8``)
~~~~~~~~~~~~~~~~~
.. LINENO 167
sport-range (``binary``)
~~~~~~~~~~~~~~~~~~~~~~~~
:struct: :ref:`rt-rule-definition-fib-rule-port-range`
.. LINENO 171
dport-range (``binary``)
~~~~~~~~~~~~~~~~~~~~~~~~
:struct: :ref:`rt-rule-definition-fib-rule-port-range`
.. LINENO 175
dscp (``u8``)
~~~~~~~~~~~~~