netlink.h (95d002e0a34cb0f238abb39987f9980f325d8332) | netlink.h (d07dcf9aadd6b2842b439e8668ff7ea2873f28d7) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2#ifndef _UAPI__LINUX_NETLINK_H 3#define _UAPI__LINUX_NETLINK_H 4 5#include <linux/kernel.h> 6#include <linux/socket.h> /* for __kernel_sa_family_t */ 7#include <linux/types.h> 8 --- 235 unchanged lines hidden (view full) --- 244 * implies we are selecting bit 2 and we want to set its value to 1. 245 * 246 */ 247struct nla_bitfield32 { 248 __u32 value; 249 __u32 selector; 250}; 251 | 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2#ifndef _UAPI__LINUX_NETLINK_H 3#define _UAPI__LINUX_NETLINK_H 4 5#include <linux/kernel.h> 6#include <linux/socket.h> /* for __kernel_sa_family_t */ 7#include <linux/types.h> 8 --- 235 unchanged lines hidden (view full) --- 244 * implies we are selecting bit 2 and we want to set its value to 1. 245 * 246 */ 247struct nla_bitfield32 { 248 __u32 value; 249 __u32 selector; 250}; 251 |
252/* 253 * policy descriptions - it's specific to each family how this is used 254 * Normally, it should be retrieved via a dump inside another attribute 255 * specifying where it applies. 256 */ 257 258/** 259 * enum netlink_attribute_type - type of an attribute 260 * @NL_ATTR_TYPE_INVALID: unused 261 * @NL_ATTR_TYPE_FLAG: flag attribute (present/not present) 262 * @NL_ATTR_TYPE_U8: 8-bit unsigned attribute 263 * @NL_ATTR_TYPE_U16: 16-bit unsigned attribute 264 * @NL_ATTR_TYPE_U32: 32-bit unsigned attribute 265 * @NL_ATTR_TYPE_U64: 64-bit unsigned attribute 266 * @NL_ATTR_TYPE_S8: 8-bit signed attribute 267 * @NL_ATTR_TYPE_S16: 16-bit signed attribute 268 * @NL_ATTR_TYPE_S32: 32-bit signed attribute 269 * @NL_ATTR_TYPE_S64: 64-bit signed attribute 270 * @NL_ATTR_TYPE_BINARY: binary data, min/max length may be specified 271 * @NL_ATTR_TYPE_STRING: string, min/max length may be specified 272 * @NL_ATTR_TYPE_NUL_STRING: NUL-terminated string, 273 * min/max length may be specified 274 * @NL_ATTR_TYPE_NESTED: nested, i.e. the content of this attribute 275 * consists of sub-attributes. The nested policy and maxtype 276 * inside may be specified. 277 * @NL_ATTR_TYPE_NESTED_ARRAY: nested array, i.e. the content of this 278 * attribute contains sub-attributes whose type is irrelevant 279 * (just used to separate the array entries) and each such array 280 * entry has attributes again, the policy for those inner ones 281 * and the corresponding maxtype may be specified. 282 * @NL_ATTR_TYPE_BITFIELD32: &struct nla_bitfield32 attribute 283 */ 284enum netlink_attribute_type { 285 NL_ATTR_TYPE_INVALID, 286 287 NL_ATTR_TYPE_FLAG, 288 289 NL_ATTR_TYPE_U8, 290 NL_ATTR_TYPE_U16, 291 NL_ATTR_TYPE_U32, 292 NL_ATTR_TYPE_U64, 293 294 NL_ATTR_TYPE_S8, 295 NL_ATTR_TYPE_S16, 296 NL_ATTR_TYPE_S32, 297 NL_ATTR_TYPE_S64, 298 299 NL_ATTR_TYPE_BINARY, 300 NL_ATTR_TYPE_STRING, 301 NL_ATTR_TYPE_NUL_STRING, 302 303 NL_ATTR_TYPE_NESTED, 304 NL_ATTR_TYPE_NESTED_ARRAY, 305 306 NL_ATTR_TYPE_BITFIELD32, 307}; 308 309/** 310 * enum netlink_policy_type_attr - policy type attributes 311 * @NL_POLICY_TYPE_ATTR_UNSPEC: unused 312 * @NL_POLICY_TYPE_ATTR_TYPE: type of the attribute, 313 * &enum netlink_attribute_type (U32) 314 * @NL_POLICY_TYPE_ATTR_MIN_VALUE_S: minimum value for signed 315 * integers (S64) 316 * @NL_POLICY_TYPE_ATTR_MAX_VALUE_S: maximum value for signed 317 * integers (S64) 318 * @NL_POLICY_TYPE_ATTR_MIN_VALUE_U: minimum value for unsigned 319 * integers (U64) 320 * @NL_POLICY_TYPE_ATTR_MAX_VALUE_U: maximum value for unsigned 321 * integers (U64) 322 * @NL_POLICY_TYPE_ATTR_MIN_LENGTH: minimum length for binary 323 * attributes, no minimum if not given (U32) 324 * @NL_POLICY_TYPE_ATTR_MAX_LENGTH: maximum length for binary 325 * attributes, no maximum if not given (U32) 326 * @NL_POLICY_TYPE_ATTR_POLICY_IDX: sub policy for nested and 327 * nested array types (U32) 328 * @NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE: maximum sub policy 329 * attribute for nested and nested array types, this can 330 * in theory be < the size of the policy pointed to by 331 * the index, if limited inside the nesting (U32) 332 * @NL_POLICY_TYPE_ATTR_BITFIELD32_MASK: valid mask for the 333 * bitfield32 type (U32) 334 * @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment 335 */ 336enum netlink_policy_type_attr { 337 NL_POLICY_TYPE_ATTR_UNSPEC, 338 NL_POLICY_TYPE_ATTR_TYPE, 339 NL_POLICY_TYPE_ATTR_MIN_VALUE_S, 340 NL_POLICY_TYPE_ATTR_MAX_VALUE_S, 341 NL_POLICY_TYPE_ATTR_MIN_VALUE_U, 342 NL_POLICY_TYPE_ATTR_MAX_VALUE_U, 343 NL_POLICY_TYPE_ATTR_MIN_LENGTH, 344 NL_POLICY_TYPE_ATTR_MAX_LENGTH, 345 NL_POLICY_TYPE_ATTR_POLICY_IDX, 346 NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE, 347 NL_POLICY_TYPE_ATTR_BITFIELD32_MASK, 348 NL_POLICY_TYPE_ATTR_PAD, 349 350 /* keep last */ 351 __NL_POLICY_TYPE_ATTR_MAX, 352 NL_POLICY_TYPE_ATTR_MAX = __NL_POLICY_TYPE_ATTR_MAX - 1 353}; 354 |
|
252#endif /* _UAPI__LINUX_NETLINK_H */ | 355#endif /* _UAPI__LINUX_NETLINK_H */ |