Lines Matching +full:enum +full:- +full:cnt +full:- +full:name
1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
3 ---
4 $id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml#
5 $schema: https://json-schema.org/draft-07/schema
12 len-or-define:
14 pattern: ^[0-9A-Za-z_-]+( - 1)?$
16 len-or-limit:
17 # literal int, const name, or limit based on fixed-width type
18 # e.g. u8-min, u16-max, etc.
20 pattern: ^[0-9A-Za-z_-]+$
27 required: [ name, doc, attribute-sets, operations ]
30 name:
31 description: Name of the genetlink family.
37 enum: [ genetlink, genetlink-c, genetlink-legacy ] # Trim
38 uapi-header:
39 description: Path to the uAPI header, default is linux/${family-name}.h
41 # Start genetlink-c
42 c-family-name:
43 description: Name of the define for the family name.
45 c-version-name:
46 description: Name of the define for the version of the family.
48 max-by-define:
49 …description: Makes the number of attributes and commands be specified by a define, not an enum val…
51 cmd-max-name:
52 description: Name of the define for the last operation in the list.
54 cmd-cnt-name:
55 … description: The explicit name for constant holding the count of operations (last operation + 1).
57 # End genetlink-c
58 # Start genetlink-legacy
59 kernel-policy:
61 … Defines if the input policy in the kernel is global, per-operation, or split per operation type.
63 enum: [ split, per-op, global ]
68 # End genetlink-legacy
75 required: [ type, name ]
78 name:
81 description: For C-compatible languages, header which already defines this value.
84 enum: [ const, enum, flags, struct ] # Trim
89 description: For const - the value.
91 # For enum and flags
92 value-start:
93 description: For enum or flags the literal initializer for the first value.
96 description: For enum or flags array of values.
100 - type: string
101 - type: object
102 required: [ name ]
105 name:
111 render-max:
112 description: Render the max members for this enum.
114 # Start genetlink-c
115 enum-name:
116 description: Name for enum, if empty no name will be used.
118 name-prefix:
119 description: For enum the prefix of the values, optional.
121 enum-cnt-name:
122 description: Name of the render-max counter enum entry.
124 # End genetlink-c
125 # Start genetlink-legacy
131 required: [ name, type ]
134 name:
138 enum: [ u8, u16, u32, u64, s8, s16, s32, s64, string, binary ]
140 $ref: '#/$defs/len-or-define'
141 byte-order:
142 enum: [ little-endian, big-endian ]
146 enum:
147 description: Name of the enum type used for the attribute.
149 display-hint: &display-hint
154 enum: [ hex, mac, fddi, ipv4, ipv6, uuid ]
156 description: Name of the nested struct type.
158 # End genetlink-legacy
160 attribute-sets:
166 required: [ name, attributes ]
169 name:
171 … Name used when referring to this space in other definitions, not used outside of the spec.
173 name-prefix:
175 Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
177 enum-name:
179 Name for the enum type of the attribute, if empty no name will be used.
184 subset-of:
186 Name of another space which this is a logical part of. Sub-spaces can be used to define
189 # Start genetlink-c
190 attr-cnt-name:
191 … description: The explicit name for constant holding the count of attributes (last attr + 1).
193 attr-max-name:
194 description: The explicit name for last member of attribute enum.
196 # End genetlink-c
202 required: [ name ]
205 name:
207 type: &attr-type
209 enum: [ unused, pad, flag, binary, bitfield32,
211 string, nest, indexed-array, nest-type-value ]
216 description: Value for the enum item representing this attribute in the uAPI.
218 type-value:
219 … description: Name of the value extracted from the type of a nest-type-value attribute.
223 byte-order:
224 enum: [ little-endian, big-endian ]
225 multi-attr:
227 nested-attributes:
228 description: Name of the space (sub-space) used inside the attribute.
230 enum:
231 description: Name of the enum type used for the attribute.
233 enum-as-flags:
235 Treat the enum as flags. In most cases enum is either used as flags or as values.
236 … Sometimes, however, both forms are necessary, in which case header contains the enum
244 flags-mask:
245 … description: Name of the flags constant on which to base mask (unsigned scalar types only).
249 $ref: '#/$defs/len-or-limit'
252 $ref: '#/$defs/len-or-limit'
253 min-len:
255 $ref: '#/$defs/len-or-define'
256 max-len:
258 $ref: '#/$defs/len-or-define'
259 exact-len:
261 $ref: '#/$defs/len-or-define'
262 unterminated-ok:
267 sub-type: *attr-type
268 display-hint: *display-hint
269 # Start genetlink-c
270 name-prefix:
272 # End genetlink-c
273 # Start genetlink-legacy
275 description: Name of the struct type used for the attribute.
277 # End genetlink-legacy
279 # Make sure name-prefix does not appear in subsets (subsets inherit naming)
281 name-prefix:
283 required: [ subset-of ]
284 subset-of:
286 required: [ name-prefix ]
291 subset-of:
306 enum-model:
310 to a single enum.
313 enum: [ unified, directional ] # Trim
314 name-prefix:
316 Prefix for the C enum name of the command. The name is formed by concatenating
317 the prefix with the upper case name of the command, with dashes replaced by underscores.
319 enum-name:
321 Name for the enum type with commands, if empty no name will be used.
323 async-prefix:
324 … description: Same as name-prefix but used to render notifications and events to separate enum.
326 async-enum:
328 Name for the enum type with commands, if empty no name will be used.
330 # Start genetlink-legacy
331 fixed-header: &fixed-header
333 Name of the structure defining the optional fixed-length protocol
337 # End genetlink-legacy
344 required: [ name, doc ]
346 name:
347 description: Name of the operation, also defining its C enum value in uAPI.
353 description: Value for the enum in the uAPI.
355 attribute-set:
364 enum: [ admin-perm, uns-admin-perm ]
365 dont-validate:
369 enum: [ strict, dump, dump-strict ]
370 config-cond:
372 Name of the kernel config option gating the presence of
375 # Start genetlink-legacy
376 fixed-header: *fixed-header
377 # End genetlink-legacy
378 do: &subop-type
383 request: &subop-attr-list
390 Names of attributes from the attribute-set (not full attribute
395 # Start genetlink-legacy
401 # End genetlink-legacy
402 reply: *subop-attr-list
409 dump: *subop-type
411 description: Name of the command sharing the reply type with this notification.
423 description: Name of the multicast group generating given notification.
425 mcast-groups:
436 required: [ name ]
439 name:
441 The name for the group, used to form the define and the value of the define.
443 # Start genetlink-c
444 c-define-name:
445 description: Override for the name of the define in C uAPI.
447 # End genetlink-c
450 kernel-family:
462 sock-priv:
464 Literal name of the type which is used within the kernel