Documentation/netlink/genetlink.yaml

Source file repositories/reference/linux-study-clean/Documentation/netlink/genetlink.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/netlink/genetlink.yaml
Extension
.yaml
Size
13057 bytes
Lines
363
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
%YAML 1.2
---
$id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml#
$schema: https://json-schema.org/draft-07/schema

# Common defines
$defs:
  name:
    type: string
    pattern: ^[0-9a-z-]+$
  uint:
    type: integer
    minimum: 0
  len-or-define:
    type: [ string, integer ]
    pattern: ^[0-9A-Za-z_-]+( - 1)?$
    minimum: 0
  len-or-limit:
    # literal int, const name, or limit based on fixed-width type
    # e.g. u8-min, u16-max, etc.
    type: [ string, integer ]
    pattern: ^[0-9A-Za-z_-]+$
    minimum: 0

# Schema for specs
title: Protocol
description: Specification of a genetlink protocol
type: object
required: [ name, doc, attribute-sets, operations ]
additionalProperties: False
properties:
  name:
    description: Name of the genetlink family.
    $ref: '#/$defs/name'
  doc:
    type: string
  protocol:
    description: Schema compatibility level. Default is "genetlink".
    enum: [ genetlink ]
  uapi-header:
    description: Path to the uAPI header, default is linux/${family-name}.h
    type: string

  definitions:
    description: List of type and constant definitions (enums, flags, defines).
    type: array
    items:
      type: object
      required: [ type, name ]
      additionalProperties: False
      properties:
        name:
          $ref: '#/$defs/name'
        header:
          description: For C-compatible languages, header which already defines this value.
          type: string
        scope:
          description: |
            Visibility of this definition. "uapi" (default) renders into
            the uAPI header, "kernel" renders into the kernel-side
            generated header, "user" renders into the user-side
            generated header. When combined with `header:`, the
            definition is not rendered, and the named header is
            included only by code matching the scope.
          enum: [ uapi, kernel, user ]
        type:
          enum: [ const, enum, flags ]
        doc:
          type: string

Annotation

Implementation Notes