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


=======================================
Family ``nlctrl`` netlink specification
=======================================


.. contents:: :depth: 3


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


genetlink meta-family that exposes information about all genetlink
families registered in the kernel (including itself).


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


.. _nlctrl-operation-getfamily:

getfamily
=========
Get / dump genetlink families

:attribute-set: :ref:`nlctrl-attribute-set-ctrl-attrs`
:do:
    **request**
        :attributes: [``family-name``]

    **reply**
        :attributes: [``family-id``, ``family-name``, ``hdrsize``, ``maxattr``, ``mcast-groups``, ``ops``, ``version``]

:dump:
    **reply**
        :attributes: [``family-id``, ``family-name``, ``hdrsize``, ``maxattr``, ``mcast-groups``, ``ops``, ``version``]



.. _nlctrl-operation-getpolicy:

getpolicy
=========
Get / dump genetlink policies

:attribute-set: :ref:`nlctrl-attribute-set-ctrl-attrs`
:dump:
    **request**
        :attributes: [``family-name``, ``family-id``, ``op``]

    **reply**
        :attributes: [``family-id``, ``op-policy``, ``policy``]




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


.. _nlctrl-definition-op-flags:

op-flags
========
:type: flags
:enum-name: None


:entries:
    - ``admin-perm``
    - ``cmd-cap-do``
    - ``cmd-cap-dump``
    - ``cmd-cap-haspol``
    - ``uns-admin-perm``


.. _nlctrl-definition-attr-type:

attr-type
=========
:enum-name: netlink-attribute-type
:type: enum


:entries:
    - ``invalid``
    - ``flag``
    - ``u8``
    - ``u16``
    - ``u32``
    - ``u64``
    - ``s8``
    - ``s16``
    - ``s32``
    - ``s64``
    - ``binary``
    - ``string``
    - ``nul-string``
    - ``nested``
    - ``nested-array``
    - ``bitfield32``
    - ``sint``
    - ``uint``



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


.. _nlctrl-attribute-set-ctrl-attrs:

ctrl-attrs
==========
family-id (``u16``)
~~~~~~~~~~~~~~~~~~~


family-name (``string``)
~~~~~~~~~~~~~~~~~~~~~~~~


version (``u32``)
~~~~~~~~~~~~~~~~~


hdrsize (``u32``)
~~~~~~~~~~~~~~~~~


maxattr (``u32``)
~~~~~~~~~~~~~~~~~


ops (``indexed-array``)
~~~~~~~~~~~~~~~~~~~~~~~
:sub-type: nest
:nested-attributes: :ref:`nlctrl-attribute-set-op-attrs`


mcast-groups (``indexed-array``)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:sub-type: nest
:nested-attributes: :ref:`nlctrl-attribute-set-mcast-group-attrs`


policy (``nest-type-value``)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:type-value: ['policy-id', 'attr-id']
:nested-attributes: :ref:`nlctrl-attribute-set-policy-attrs`


op-policy (``nest-type-value``)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:type-value: ['op-id']
:nested-attributes: :ref:`nlctrl-attribute-set-op-policy-attrs`


op (``u32``)
~~~~~~~~~~~~


.. _nlctrl-attribute-set-mcast-group-attrs:

mcast-group-attrs
=================
name (``string``)
~~~~~~~~~~~~~~~~~


id (``u32``)
~~~~~~~~~~~~


.. _nlctrl-attribute-set-op-attrs:

op-attrs
========
id (``u32``)
~~~~~~~~~~~~


flags (``u32``)
~~~~~~~~~~~~~~~
:enum: :ref:`nlctrl-definition-op-flags`
:enum-as-flags: True


.. _nlctrl-attribute-set-policy-attrs:

policy-attrs
============
type (``u32``)
~~~~~~~~~~~~~~
:enum: :ref:`nlctrl-definition-attr-type`


min-value-s (``s64``)
~~~~~~~~~~~~~~~~~~~~~


max-value-s (``s64``)
~~~~~~~~~~~~~~~~~~~~~


min-value-u (``u64``)
~~~~~~~~~~~~~~~~~~~~~


max-value-u (``u64``)
~~~~~~~~~~~~~~~~~~~~~


min-length (``u32``)
~~~~~~~~~~~~~~~~~~~~


max-length (``u32``)
~~~~~~~~~~~~~~~~~~~~


policy-idx (``u32``)
~~~~~~~~~~~~~~~~~~~~


policy-maxtype (``u32``)
~~~~~~~~~~~~~~~~~~~~~~~~


bitfield32-mask (``u32``)
~~~~~~~~~~~~~~~~~~~~~~~~~


mask (``u64``)
~~~~~~~~~~~~~~


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


.. _nlctrl-attribute-set-op-policy-attrs:

op-policy-attrs
===============
do (``u32``)
~~~~~~~~~~~~


dump (``u32``)
~~~~~~~~~~~~~~

