1 --- a/include/linux/switch.h
2 +++ b/include/linux/switch.h
4 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5 * GNU General Public License for more details.
7 -#ifndef _LINUX_SWITCH_H
8 -#define _LINUX_SWITCH_H
10 +#ifndef __LINUX_SWITCH_H
11 +#define __LINUX_SWITCH_H
13 +#include <linux/types.h>
14 +#include <linux/netdevice.h>
15 +#include <linux/netlink.h>
16 +#include <linux/genetlink.h>
18 +#include <netlink/netlink.h>
19 +#include <netlink/genl/genl.h>
20 +#include <netlink/genl/ctrl.h>
22 #include <net/genetlink.h>
23 -#include <uapi/linux/switch.h>
26 +/* main attributes */
33 + SWITCH_ATTR_DEV_NAME,
38 + SWITCH_ATTR_CPU_PORT,
41 + SWITCH_ATTR_OP_TYPE,
42 + SWITCH_ATTR_OP_NAME,
43 + SWITCH_ATTR_OP_PORT,
44 + SWITCH_ATTR_OP_VLAN,
45 + SWITCH_ATTR_OP_VALUE_INT,
46 + SWITCH_ATTR_OP_VALUE_STR,
47 + SWITCH_ATTR_OP_VALUE_PORTS,
48 + SWITCH_ATTR_OP_DESCRIPTION,
57 + SWITCH_CMD_GET_SWITCH,
58 + SWITCH_CMD_NEW_ATTR,
59 + SWITCH_CMD_LIST_GLOBAL,
60 + SWITCH_CMD_GET_GLOBAL,
61 + SWITCH_CMD_SET_GLOBAL,
62 + SWITCH_CMD_LIST_PORT,
63 + SWITCH_CMD_GET_PORT,
64 + SWITCH_CMD_SET_PORT,
65 + SWITCH_CMD_LIST_VLAN,
66 + SWITCH_CMD_GET_VLAN,
71 +enum switch_val_type {
79 +/* port nested attributes */
83 + SWITCH_PORT_FLAG_TAGGED,
84 + SWITCH_PORT_ATTR_MAX
87 +#define SWITCH_ATTR_DEFAULTS_OFFSET 0x1000
93 @@ -157,4 +232,6 @@ struct switch_attr {
97 -#endif /* _LINUX_SWITCH_H */