Lines Matching +full:sub +full:- +full:block
1 .. SPDX-License-Identifier: BSD-3-Clause
8 families such as ``NETLINK_ROUTE`` which use the ``netlink-raw`` protocol
14 The netlink-raw schema extends the :doc:`genetlink-legacy <genetlink-legacy>`
17 information. The raw netlink families also make use of type-specific
18 sub-messages.
21 -------
29 .. code-block:: yaml
31 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
33 name: rt-addr
34 protocol: netlink-raw
39 --------------------------
47 .. code-block:: yaml
49 mcast-groups:
51 -
52 name: rtnlgrp-ipv4-ifaddr
54 -
55 name: rtnlgrp-ipv6-ifaddr
57 -
58 name: rtnlgrp-mctp-ifaddr
61 Sub-messages
62 ------------
75 [GENERIC ATTR - wrapper]
81 own information wrapped in the ``GENERIC ATTR - wrapper``. Even though the
87 a sub-message.
89 A sub-message attribute uses the value of another attribute as a selector key to
90 choose the right sub-message format. For example if the following attribute has
93 .. code-block:: json
99 .. code-block:: yaml
101 -
103 type: sub-message
104 sub-message: linkinfo-data-msg
107 Then we look for a sub-message definition called ``linkinfo-data-msg`` and use
109 correct format for the sub-message:
111 .. code-block:: yaml
113 sub-messages:
114 name: linkinfo-data-msg
116 -
118 attribute-set: linkinfo-bridge-attrs
119 -
121 attribute-set: linkinfo-gre-attrs
122 -
124 attribute-set: linkinfo-geneve-attrs
126 This would decode the attribute value as a sub-message with the attribute-set
127 called ``linkinfo-gre-attrs`` as the attribute space.
129 A sub-message can have an optional ``fixed-header`` followed by zero or more
130 attributes from an ``attribute-set``. For example the following
131 ``tc-options-msg`` sub-message defines message formats that use a mixture of
132 ``fixed-header``, ``attribute-set`` or both together:
134 .. code-block:: yaml
136 sub-messages:
137 -
138 name: tc-options-msg
140 -
142 fixed-header: tc-fifo-qopt
143 -
145 attribute-set: tc-cake-attrs
146 -
148 fixed-header: tc-netem-qopt
149 attribute-set: tc-netem-attrs
152 sub-message attributes that depend on it.
155 sub-message selector will be resolved using the value 'closest' to the selector.
156 For example, if the same attribute name is defined in a nested ``attribute-set``
157 alongside a sub-message selector and also in a top level ``attribute-set``, then
163 -------------------------
166 make use of nested struct definitions. The ``netlink-raw`` schema makes it
169 ``tc-ratespec`` struct definition for both the ``rate`` and the ``peakrate``
170 members of ``struct tc-tbf-qopt``.
172 .. code-block:: yaml
174 -
175 name: tc-tbf-qopt
178 -
181 struct: tc-ratespec
182 -
185 struct: tc-ratespec
186 -
189 -
192 -