Documentation ¶
Overview ¶
Package yamlnetlink provides support for parsing YAML netlink specifications.
For more information, see: - https://lore.kernel.org/all/20220811022304.583300-1-kuba@kernel.org/ - https://github.com/kuba-moo/ynl/blob/main/Documentation/netlink/netlink-bindings.rst
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attribute ¶
type Attribute struct { Name string `yaml:"name"` Type string `yaml:"type"` TypeValue []string `yaml:"type-value"` Len string `yaml:"len"` Doc string `yaml:"doc"` NestedAttributes string `yaml:"nested-attributes"` }
An Attribute describes a single netlink attribute.
type AttributeSet ¶
type AttributeSet struct { Name string `yaml:"name"` NamePrefix string `yaml:"name-prefix"` Attributes []Attribute `yaml:"attributes"` }
An AttributeSet describes the netlink attributes for a given family.
type Config ¶
type Config struct { // Package specifies an optional package name for the generated code. If // unset, the default is to use the Spec.Name field. Package string }
Config specifies configuration for Generate.
type Operation ¶
type Operation struct { Name string `yaml:"name"` Doc string `yaml:"doc"` AttributeSet string `yaml:"attribute-set"` DontValidate []string `yaml:"dont-validate"` Notify string `yaml:"notify"` Do OperationAttributes `yaml:"do"` Dump OperationAttributes `yaml:"dump"` }
An Operation describes a single netlink request/reply operation.
type OperationAttributes ¶
type OperationAttributes struct { Request OperationAttributesList `yaml:"request"` Reply OperationAttributesList `yaml:"reply"` }
OperationAttributes describes the list of attributes used in netlink request and replies for a given Operation.
type OperationAttributesList ¶
type OperationAttributesList struct {
Attributes []string `yaml:"attributes"`
}
An OperationAttributesList contains the actual attributes used in a netlink request or reply operation.
type Operations ¶
Operations describes the request and reply operations available for a netlink family.
type Spec ¶
type Spec struct { Name string `yaml:"name"` Protocol string `yaml:"protocol"` Doc string `yaml:"doc"` UAPIHeader string `yaml:"uapi-header"` AttributeSets []AttributeSet `yaml:"attribute-sets"` Operations Operations `yaml:"operations"` }
A Spec is a YAML netlink specification.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
yamlnetlink-go
Command yamlnetlink-go generates Go code from YAML netlink specifications.
|
Command yamlnetlink-go generates Go code from YAML netlink specifications. |