2019-12-27 17:55:18 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
|
|
|
/*
|
|
|
|
* include/uapi/linux/ethtool_netlink.h - netlink interface for ethtool
|
|
|
|
*
|
|
|
|
* See Documentation/networking/ethtool-netlink.txt in kernel source tree for
|
|
|
|
* doucumentation of the interface.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _UAPI_LINUX_ETHTOOL_NETLINK_H_
|
|
|
|
#define _UAPI_LINUX_ETHTOOL_NETLINK_H_
|
|
|
|
|
|
|
|
#include <linux/ethtool.h>
|
|
|
|
|
|
|
|
/* message types - userspace to kernel */
|
|
|
|
enum {
|
|
|
|
ETHTOOL_MSG_USER_NONE,
|
|
|
|
|
|
|
|
/* add new constants above here */
|
|
|
|
__ETHTOOL_MSG_USER_CNT,
|
|
|
|
ETHTOOL_MSG_USER_MAX = __ETHTOOL_MSG_USER_CNT - 1
|
|
|
|
};
|
|
|
|
|
|
|
|
/* message types - kernel to userspace */
|
|
|
|
enum {
|
|
|
|
ETHTOOL_MSG_KERNEL_NONE,
|
|
|
|
|
|
|
|
/* add new constants above here */
|
|
|
|
__ETHTOOL_MSG_KERNEL_CNT,
|
|
|
|
ETHTOOL_MSG_KERNEL_MAX = __ETHTOOL_MSG_KERNEL_CNT - 1
|
|
|
|
};
|
|
|
|
|
2019-12-27 17:55:23 +03:00
|
|
|
/* request header */
|
|
|
|
|
|
|
|
/* use compact bitsets in reply */
|
|
|
|
#define ETHTOOL_FLAG_COMPACT_BITSETS (1 << 0)
|
|
|
|
/* provide optional reply for SET or ACT requests */
|
|
|
|
#define ETHTOOL_FLAG_OMIT_REPLY (1 << 1)
|
|
|
|
|
|
|
|
#define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \
|
|
|
|
ETHTOOL_FLAG_OMIT_REPLY)
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ETHTOOL_A_HEADER_UNSPEC,
|
|
|
|
ETHTOOL_A_HEADER_DEV_INDEX, /* u32 */
|
|
|
|
ETHTOOL_A_HEADER_DEV_NAME, /* string */
|
|
|
|
ETHTOOL_A_HEADER_FLAGS, /* u32 - ETHTOOL_FLAG_* */
|
|
|
|
|
|
|
|
/* add new constants above here */
|
|
|
|
__ETHTOOL_A_HEADER_CNT,
|
|
|
|
ETHTOOL_A_HEADER_MAX = __ETHTOOL_A_HEADER_CNT - 1
|
|
|
|
};
|
|
|
|
|
2019-12-27 17:55:28 +03:00
|
|
|
/* bit sets */
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ETHTOOL_A_BITSET_BIT_UNSPEC,
|
|
|
|
ETHTOOL_A_BITSET_BIT_INDEX, /* u32 */
|
|
|
|
ETHTOOL_A_BITSET_BIT_NAME, /* string */
|
|
|
|
ETHTOOL_A_BITSET_BIT_VALUE, /* flag */
|
|
|
|
|
|
|
|
/* add new constants above here */
|
|
|
|
__ETHTOOL_A_BITSET_BIT_CNT,
|
|
|
|
ETHTOOL_A_BITSET_BIT_MAX = __ETHTOOL_A_BITSET_BIT_CNT - 1
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ETHTOOL_A_BITSET_BITS_UNSPEC,
|
|
|
|
ETHTOOL_A_BITSET_BITS_BIT, /* nest - _A_BITSET_BIT_* */
|
|
|
|
|
|
|
|
/* add new constants above here */
|
|
|
|
__ETHTOOL_A_BITSET_BITS_CNT,
|
|
|
|
ETHTOOL_A_BITSET_BITS_MAX = __ETHTOOL_A_BITSET_BITS_CNT - 1
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ETHTOOL_A_BITSET_UNSPEC,
|
|
|
|
ETHTOOL_A_BITSET_NOMASK, /* flag */
|
|
|
|
ETHTOOL_A_BITSET_SIZE, /* u32 */
|
|
|
|
ETHTOOL_A_BITSET_BITS, /* nest - _A_BITSET_BITS_* */
|
|
|
|
ETHTOOL_A_BITSET_VALUE, /* binary */
|
|
|
|
ETHTOOL_A_BITSET_MASK, /* binary */
|
|
|
|
|
|
|
|
/* add new constants above here */
|
|
|
|
__ETHTOOL_A_BITSET_CNT,
|
|
|
|
ETHTOOL_A_BITSET_MAX = __ETHTOOL_A_BITSET_CNT - 1
|
|
|
|
};
|
|
|
|
|
2019-12-27 17:55:18 +03:00
|
|
|
/* generic netlink info */
|
|
|
|
#define ETHTOOL_GENL_NAME "ethtool"
|
|
|
|
#define ETHTOOL_GENL_VERSION 1
|
|
|
|
|
2019-12-27 17:55:33 +03:00
|
|
|
#define ETHTOOL_MCGRP_MONITOR_NAME "monitor"
|
|
|
|
|
2019-12-27 17:55:18 +03:00
|
|
|
#endif /* _UAPI_LINUX_ETHTOOL_NETLINK_H_ */
|