~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/netlink/genetlink.yaml

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/netlink/genetlink.yaml (Version linux-6.12-rc7) and /Documentation/netlink/genetlink.yaml (Version linux-6.3.13)


  1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linu      1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
  2 %YAML 1.2                                           2 %YAML 1.2
  3 ---                                                 3 ---
  4 $id: http://kernel.org/schemas/netlink/genetli      4 $id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml#
  5 $schema: https://json-schema.org/draft-07/sche      5 $schema: https://json-schema.org/draft-07/schema
  6                                                     6 
  7 # Common defines                                    7 # Common defines
  8 $defs:                                              8 $defs:
  9   uint:                                             9   uint:
 10     type: integer                                  10     type: integer
 11     minimum: 0                                     11     minimum: 0
 12   len-or-define:                                   12   len-or-define:
 13     type: [ string, integer ]                      13     type: [ string, integer ]
 14     pattern: ^[0-9A-Za-z_-]+( - 1)?$           !!  14     pattern: ^[0-9A-Za-z_]+( - 1)?$
 15     minimum: 0                                 << 
 16   len-or-limit:                                << 
 17     # literal int or limit based on fixed-widt << 
 18     type: [ string, integer ]                  << 
 19     pattern: ^[su](8|16|32|64)-(min|max)$      << 
 20     minimum: 0                                     15     minimum: 0
 21                                                    16 
 22 # Schema for specs                                 17 # Schema for specs
 23 title: Protocol                                    18 title: Protocol
 24 description: Specification of a genetlink prot     19 description: Specification of a genetlink protocol
 25 type: object                                       20 type: object
 26 required: [ name, doc, attribute-sets, operati     21 required: [ name, doc, attribute-sets, operations ]
 27 additionalProperties: False                        22 additionalProperties: False
 28 properties:                                        23 properties:
 29   name:                                            24   name:
 30     description: Name of the genetlink family.     25     description: Name of the genetlink family.
 31     type: string                                   26     type: string
 32   doc:                                             27   doc:
 33     type: string                                   28     type: string
                                                   >>  29   version:
                                                   >>  30     description: Generic Netlink family version. Default is 1.
                                                   >>  31     type: integer
                                                   >>  32     minimum: 1
 34   protocol:                                        33   protocol:
 35     description: Schema compatibility level. D     34     description: Schema compatibility level. Default is "genetlink".
 36     enum: [ genetlink ]                            35     enum: [ genetlink ]
 37   uapi-header:                                 << 
 38     description: Path to the uAPI header, defa << 
 39     type: string                               << 
 40                                                    36 
 41   definitions:                                     37   definitions:
 42     description: List of type and constant def     38     description: List of type and constant definitions (enums, flags, defines).
 43     type: array                                    39     type: array
 44     items:                                         40     items:
 45       type: object                                 41       type: object
 46       required: [ type, name ]                     42       required: [ type, name ]
 47       additionalProperties: False                  43       additionalProperties: False
 48       properties:                                  44       properties:
 49         name:                                      45         name:
 50           type: string                             46           type: string
 51         header:                                    47         header:
 52           description: For C-compatible langua     48           description: For C-compatible languages, header which already defines this value.
 53           type: string                             49           type: string
 54         type:                                      50         type:
 55           enum: [ const, enum, flags ]             51           enum: [ const, enum, flags ]
 56         doc:                                       52         doc:
 57           type: string                             53           type: string
 58         # For const                                54         # For const
 59         value:                                     55         value:
 60           description: For const - the value.      56           description: For const - the value.
 61           type: [ string, integer ]                57           type: [ string, integer ]
 62         # For enum and flags                       58         # For enum and flags
 63         value-start:                               59         value-start:
 64           description: For enum or flags the l     60           description: For enum or flags the literal initializer for the first value.
 65           type: [ string, integer ]                61           type: [ string, integer ]
 66         entries:                                   62         entries:
 67           description: For enum or flags array     63           description: For enum or flags array of values.
 68           type: array                              64           type: array
 69           items:                                   65           items:
 70             oneOf:                                 66             oneOf:
 71               - type: string                       67               - type: string
 72               - type: object                       68               - type: object
 73                 required: [ name ]                 69                 required: [ name ]
 74                 additionalProperties: False        70                 additionalProperties: False
 75                 properties:                        71                 properties:
 76                   name:                            72                   name:
 77                     type: string                   73                     type: string
 78                   value:                           74                   value:
 79                     type: integer                  75                     type: integer
 80                   doc:                             76                   doc:
 81                     type: string                   77                     type: string
 82         render-max:                                78         render-max:
 83           description: Render the max members      79           description: Render the max members for this enum.
 84           type: boolean                            80           type: boolean
 85                                                    81 
 86   attribute-sets:                                  82   attribute-sets:
 87     description: Definition of attribute space     83     description: Definition of attribute spaces for this family.
 88     type: array                                    84     type: array
 89     items:                                         85     items:
 90       description: Definition of a single attr     86       description: Definition of a single attribute space.
 91       type: object                                 87       type: object
 92       required: [ name, attributes ]               88       required: [ name, attributes ]
 93       additionalProperties: False                  89       additionalProperties: False
 94       properties:                                  90       properties:
 95         name:                                      91         name:
 96           description: |                           92           description: |
 97             Name used when referring to this s     93             Name used when referring to this space in other definitions, not used outside of the spec.
 98           type: string                             94           type: string
 99         name-prefix:                               95         name-prefix:
100           description: |                           96           description: |
101             Prefix for the C enum name of the      97             Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
102           type: string                             98           type: string
103         enum-name:                                 99         enum-name:
104           description: Name for the enum type     100           description: Name for the enum type of the attribute.
105           type: string                            101           type: string
106         doc:                                      102         doc:
107           description: Documentation of the sp    103           description: Documentation of the space.
108           type: string                            104           type: string
109         subset-of:                                105         subset-of:
110           description: |                          106           description: |
111             Name of another space which this i    107             Name of another space which this is a logical part of. Sub-spaces can be used to define
112             a limited group of attributes whic    108             a limited group of attributes which are used in a nest.
113           type: string                            109           type: string
114         attributes:                               110         attributes:
115           description: List of attributes in t    111           description: List of attributes in the space.
116           type: array                             112           type: array
117           items:                                  113           items:
118             type: object                          114             type: object
119             required: [ name ]                 !! 115             required: [ name, type ]
120             additionalProperties: False           116             additionalProperties: False
121             properties:                           117             properties:
122               name:                               118               name:
123                 type: string                      119                 type: string
124               type: &attr-type                    120               type: &attr-type
125                 enum: [ unused, pad, flag, bin !! 121                 enum: [ unused, pad, flag, binary, u8, u16, u32, u64, s32, s64,
126                         uint, sint, u8, u16, u !! 122                         string, nest, array-nest, nest-type-value ]
127                         string, nest, indexed- << 
128               doc:                                123               doc:
129                 description: Documentation of     124                 description: Documentation of the attribute.
130                 type: string                      125                 type: string
131               value:                              126               value:
132                 description: Value for the enu    127                 description: Value for the enum item representing this attribute in the uAPI.
133                 $ref: '#/$defs/uint'              128                 $ref: '#/$defs/uint'
134               type-value:                         129               type-value:
135                 description: Name of the value    130                 description: Name of the value extracted from the type of a nest-type-value attribute.
136                 type: array                       131                 type: array
137                 items:                            132                 items:
138                   type: string                    133                   type: string
139               byte-order:                         134               byte-order:
140                 enum: [ little-endian, big-end    135                 enum: [ little-endian, big-endian ]
141               multi-attr:                         136               multi-attr:
142                 type: boolean                     137                 type: boolean
143               nested-attributes:                  138               nested-attributes:
144                 description: Name of the space    139                 description: Name of the space (sub-space) used inside the attribute.
145                 type: string                      140                 type: string
146               enum:                               141               enum:
147                 description: Name of the enum     142                 description: Name of the enum type used for the attribute.
148                 type: string                      143                 type: string
149               enum-as-flags:                      144               enum-as-flags:
150                 description: |                    145                 description: |
151                   Treat the enum as flags. In     146                   Treat the enum as flags. In most cases enum is either used as flags or as values.
152                   Sometimes, however, both for    147                   Sometimes, however, both forms are necessary, in which case header contains the enum
153                   form while specific attribut    148                   form while specific attributes may request to convert the values into a bitfield.
154                 type: boolean                     149                 type: boolean
155               checks:                             150               checks:
156                 description: Kernel input vali    151                 description: Kernel input validation.
157                 type: object                      152                 type: object
158                 additionalProperties: False       153                 additionalProperties: False
159                 properties:                       154                 properties:
160                   flags-mask:                     155                   flags-mask:
161                     description: Name of the f    156                     description: Name of the flags constant on which to base mask (unsigned scalar types only).
162                     type: string                  157                     type: string
163                   min:                            158                   min:
164                     description: Min value for    159                     description: Min value for an integer attribute.
165                     $ref: '#/$defs/len-or-limi !! 160                     type: integer
166                   max:                         << 
167                     description: Max value for << 
168                     $ref: '#/$defs/len-or-limi << 
169                   min-len:                        161                   min-len:
170                     description: Min length fo    162                     description: Min length for a binary attribute.
171                     $ref: '#/$defs/len-or-defi    163                     $ref: '#/$defs/len-or-define'
172                   max-len:                        164                   max-len:
173                     description: Max length fo    165                     description: Max length for a string or a binary attribute.
174                     $ref: '#/$defs/len-or-defi    166                     $ref: '#/$defs/len-or-define'
175                   exact-len:                   << 
176                     description: Exact length  << 
177                     $ref: '#/$defs/len-or-defi << 
178               sub-type: *attr-type                167               sub-type: *attr-type
179               display-hint: &display-hint      << 
180                 description: |                 << 
181                   Optional format indicator th << 
182                   the right formatting mechani << 
183                   type.                        << 
184                 enum: [ hex, mac, fddi, ipv4,  << 
185                                                   168 
186       # Make sure name-prefix does not appear     169       # Make sure name-prefix does not appear in subsets (subsets inherit naming)
187       dependencies:                               170       dependencies:
188         name-prefix:                              171         name-prefix:
189           not:                                    172           not:
190             required: [ subset-of ]               173             required: [ subset-of ]
191         subset-of:                                174         subset-of:
192           not:                                    175           not:
193             required: [ name-prefix ]             176             required: [ name-prefix ]
194                                                   177 
195       # type property is only required if not  << 
196       if:                                      << 
197         properties:                            << 
198           subset-of:                           << 
199             not:                               << 
200               type: string                     << 
201       then:                                    << 
202         properties:                            << 
203           attributes:                          << 
204             items:                             << 
205               required: [ type ]               << 
206                                                << 
207   operations:                                     178   operations:
208     description: Operations supported by the p    179     description: Operations supported by the protocol.
209     type: object                                  180     type: object
210     required: [ list ]                            181     required: [ list ]
211     additionalProperties: False                   182     additionalProperties: False
212     properties:                                   183     properties:
213       enum-model:                                 184       enum-model:
214         description: |                            185         description: |
215           The model of assigning values to the    186           The model of assigning values to the operations.
216           "unified" is the recommended model w    187           "unified" is the recommended model where all message types belong
217           to a single enum.                       188           to a single enum.
218           "directional" has the messages sent     189           "directional" has the messages sent to the kernel and from the kernel
219           enumerated separately.                  190           enumerated separately.
220         enum: [ unified ]                         191         enum: [ unified ]
221       name-prefix:                                192       name-prefix:
222         description: |                            193         description: |
223           Prefix for the C enum name of the co    194           Prefix for the C enum name of the command. The name is formed by concatenating
224           the prefix with the upper case name     195           the prefix with the upper case name of the command, with dashes replaced by underscores.
225         type: string                              196         type: string
226       enum-name:                                  197       enum-name:
227         description: Name for the enum type wi    198         description: Name for the enum type with commands.
228         type: string                              199         type: string
229       async-prefix:                               200       async-prefix:
230         description: Same as name-prefix but u    201         description: Same as name-prefix but used to render notifications and events to separate enum.
231         type: string                              202         type: string
232       async-enum:                                 203       async-enum:
233         description: Name for the enum type wi    204         description: Name for the enum type with notifications/events.
234         type: string                              205         type: string
235       list:                                       206       list:
236         description: List of commands             207         description: List of commands
237         type: array                               208         type: array
238         items:                                    209         items:
239           type: object                            210           type: object
240           additionalProperties: False             211           additionalProperties: False
241           required: [ name, doc ]                 212           required: [ name, doc ]
242           properties:                             213           properties:
243             name:                                 214             name:
244               description: Name of the operati    215               description: Name of the operation, also defining its C enum value in uAPI.
245               type: string                        216               type: string
246             doc:                                  217             doc:
247               description: Documentation for t    218               description: Documentation for the command.
248               type: string                        219               type: string
249             value:                                220             value:
250               description: Value for the enum     221               description: Value for the enum in the uAPI.
251               $ref: '#/$defs/uint'                222               $ref: '#/$defs/uint'
252             attribute-set:                        223             attribute-set:
253               description: |                      224               description: |
254                 Attribute space from which att    225                 Attribute space from which attributes directly in the requests and replies
255                 to this command are defined.      226                 to this command are defined.
256               type: string                        227               type: string
257             flags: &cmd_flags                     228             flags: &cmd_flags
258               description: Command flags.         229               description: Command flags.
259               type: array                         230               type: array
260               items:                              231               items:
261                 enum: [ admin-perm ]              232                 enum: [ admin-perm ]
262             dont-validate:                        233             dont-validate:
263               description: Kernel attribute va    234               description: Kernel attribute validation flags.
264               type: array                         235               type: array
265               items:                              236               items:
266                 enum: [ strict, dump, dump-str !! 237                 enum: [ strict, dump ]
267             config-cond:                       << 
268               description: |                   << 
269                 Name of the kernel config opti << 
270                 the operation, without the 'CO << 
271               type: string                     << 
272             do: &subop-type                       238             do: &subop-type
273               description: Main command handle    239               description: Main command handler.
274               type: object                        240               type: object
275               additionalProperties: False         241               additionalProperties: False
276               properties:                         242               properties:
277                 request: &subop-attr-list         243                 request: &subop-attr-list
278                   description: Definition of t    244                   description: Definition of the request message for a given command.
279                   type: object                    245                   type: object
280                   additionalProperties: False     246                   additionalProperties: False
281                   properties:                     247                   properties:
282                     attributes:                   248                     attributes:
283                       description: |              249                       description: |
284                         Names of attributes fr    250                         Names of attributes from the attribute-set (not full attribute
285                         definitions, just name    251                         definitions, just names).
286                       type: array                 252                       type: array
287                       items:                      253                       items:
288                         type: string              254                         type: string
289                 reply: *subop-attr-list           255                 reply: *subop-attr-list
290                 pre:                              256                 pre:
291                   description: Hook for a func    257                   description: Hook for a function to run before the main callback (pre_doit or start).
292                   type: string                    258                   type: string
293                 post:                             259                 post:
294                   description: Hook for a func    260                   description: Hook for a function to run after the main callback (post_doit or done).
295                   type: string                    261                   type: string
296             dump: *subop-type                     262             dump: *subop-type
297             notify:                               263             notify:
298               description: Name of the command    264               description: Name of the command sharing the reply type with this notification.
299               type: string                        265               type: string
300             event:                                266             event:
301               type: object                        267               type: object
302               additionalProperties: False         268               additionalProperties: False
303               properties:                         269               properties:
304                 attributes:                       270                 attributes:
305                   description: Explicit list o    271                   description: Explicit list of the attributes for the notification.
306                   type: array                     272                   type: array
307                   items:                          273                   items:
308                     type: string                  274                     type: string
309             mcgrp:                                275             mcgrp:
310               description: Name of the multica    276               description: Name of the multicast group generating given notification.
311               type: string                        277               type: string
312   mcast-groups:                                   278   mcast-groups:
313     description: List of multicast groups.        279     description: List of multicast groups.
314     type: object                                  280     type: object
315     required: [ list ]                            281     required: [ list ]
316     additionalProperties: False                   282     additionalProperties: False
317     properties:                                   283     properties:
318       list:                                       284       list:
319         description: List of groups.              285         description: List of groups.
320         type: array                               286         type: array
321         items:                                    287         items:
322           type: object                            288           type: object
323           required: [ name ]                      289           required: [ name ]
324           additionalProperties: False             290           additionalProperties: False
325           properties:                             291           properties:
326             name:                                 292             name:
327               description: |                      293               description: |
328                 The name for the group, used t    294                 The name for the group, used to form the define and the value of the define.
329               type: string                        295               type: string
330             flags: *cmd_flags                     296             flags: *cmd_flags
331                                                << 
332   kernel-family:                               << 
333     description: Additional global attributes  << 
334     type: object                               << 
335     additionalProperties: False                << 
336     properties:                                << 
337       headers:                                 << 
338         description: |                         << 
339           List of extra headers which should b << 
340           of the generated code.               << 
341         type: array                            << 
342         items:                                 << 
343           type: string                         << 
344       sock-priv:                               << 
345         description: |                         << 
346           Literal name of the type which is us << 
347           to store the socket state. The type  << 
348           to the kernel, and is not defined in << 
349         type: string                           << 
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php