Lines Matching +full:enum +full:- +full:as +full:- +full:flags
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 or limit based on fixed-width type e.g. u8-min, u16-max, etc.
19 pattern: ^[su](8|16|32|64)-(min|max)$
26 required: [ name, doc, attribute-sets, operations ]
36 enum: [ genetlink, genetlink-c, genetlink-legacy ] # Trim
37 uapi-header:
38 description: Path to the uAPI header, default is linux/${family-name}.h
40 # Start genetlink-c
41 c-family-name:
44 c-version-name:
47 max-by-define:
48 …description: Makes the number of attributes and commands be specified by a define, not an enum val…
50 cmd-max-name:
53 cmd-cnt-name:
56 # End genetlink-c
57 # Start genetlink-legacy
58 kernel-policy:
60 … Defines if the input policy in the kernel is global, per-operation, or split per operation type.
62 enum: [ split, per-op, global ]
67 # End genetlink-legacy
70 description: List of type and constant definitions (enums, flags, defines).
80 description: For C-compatible languages, header which already defines this value.
83 enum: [ const, enum, flags, struct ] # Trim
88 description: For const - the value.
90 # For enum and flags
91 value-start:
92 description: For enum or flags the literal initializer for the first value.
95 description: For enum or flags array of values.
99 - type: string
100 - type: object
110 render-max:
111 description: Render the max members for this enum.
113 # Start genetlink-c
114 enum-name:
115 description: Name for enum, if empty no name will be used.
117 name-prefix:
118 description: For enum the prefix of the values, optional.
120 # End genetlink-c
121 # Start genetlink-legacy
134 enum: [ u8, u16, u32, u64, s8, s16, s32, s64, string, binary ]
136 $ref: '#/$defs/len-or-define'
137 byte-order:
138 enum: [ little-endian, big-endian ]
142 enum:
143 description: Name of the enum type used for the attribute.
145 display-hint: &display-hint
150 enum: [ hex, mac, fddi, ipv4, ipv6, uuid ]
151 # End genetlink-legacy
153 attribute-sets:
166 name-prefix:
168 Prefix for the C enum name of the attributes. Default family[name]-set[name]-a-
170 enum-name:
171 description: Name for the enum type of the attribute.
176 subset-of:
178 Name of another space which this is a logical part of. Sub-spaces can be used to define
181 # Start genetlink-c
182 attr-cnt-name:
185 attr-max-name:
186 description: The explicit name for last member of attribute enum.
188 # End genetlink-c
199 type: &attr-type
201 enum: [ unused, pad, flag, binary, bitfield32,
203 string, nest, array-nest, nest-type-value ]
208 description: Value for the enum item representing this attribute in the uAPI.
210 type-value:
211 … description: Name of the value extracted from the type of a nest-type-value attribute.
215 byte-order:
216 enum: [ little-endian, big-endian ]
217 multi-attr:
219 nested-attributes:
220 description: Name of the space (sub-space) used inside the attribute.
222 enum:
223 description: Name of the enum type used for the attribute.
225 enum-as-flags:
227 Treat the enum as flags. In most cases enum is either used as flags or as values.
228 … Sometimes, however, both forms are necessary, in which case header contains the enum
236 flags-mask:
237 … description: Name of the flags constant on which to base mask (unsigned scalar types only).
241 $ref: '#/$defs/len-or-limit'
244 $ref: '#/$defs/len-or-limit'
245 min-len:
247 $ref: '#/$defs/len-or-define'
248 max-len:
250 $ref: '#/$defs/len-or-define'
251 exact-len:
253 $ref: '#/$defs/len-or-define'
254 sub-type: *attr-type
255 display-hint: *display-hint
256 # Start genetlink-c
257 name-prefix:
259 # End genetlink-c
260 # Start genetlink-legacy
264 # End genetlink-legacy
266 # Make sure name-prefix does not appear in subsets (subsets inherit naming)
268 name-prefix:
270 required: [ subset-of ]
271 subset-of:
273 required: [ name-prefix ]
278 subset-of:
293 enum-model:
297 to a single enum.
300 enum: [ unified, directional ] # Trim
301 name-prefix:
303 Prefix for the C enum name of the command. The name is formed by concatenating
306 enum-name:
307 description: Name for the enum type with commands.
309 async-prefix:
310 … description: Same as name-prefix but used to render notifications and events to separate enum.
312 async-enum:
313 description: Name for the enum type with notifications/events.
315 # Start genetlink-legacy
316 fixed-header: &fixed-header
318 Name of the structure defining the optional fixed-length protocol
322 # End genetlink-legacy
332 description: Name of the operation, also defining its C enum value in uAPI.
338 description: Value for the enum in the uAPI.
340 attribute-set:
345 flags: &cmd_flags
346 description: Command flags.
349 enum: [ admin-perm, uns-admin-perm ]
350 dont-validate:
351 description: Kernel attribute validation flags.
354 enum: [ strict, dump, dump-strict ]
355 config-cond:
360 # Start genetlink-legacy
361 fixed-header: *fixed-header
362 # End genetlink-legacy
363 do: &subop-type
368 request: &subop-attr-list
375 Names of attributes from the attribute-set (not full attribute
380 # Start genetlink-legacy
386 # End genetlink-legacy
387 reply: *subop-attr-list
394 dump: *subop-type
410 mcast-groups:
428 # Start genetlink-c
429 c-define-name:
432 # End genetlink-c
433 flags: *cmd_flags