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_PORTMAP,
39 + SWITCH_ATTR_CPU_PORT,
42 + SWITCH_ATTR_OP_TYPE,
43 + SWITCH_ATTR_OP_NAME,
44 + SWITCH_ATTR_OP_PORT,
45 + SWITCH_ATTR_OP_VLAN,
46 + SWITCH_ATTR_OP_VALUE_INT,
47 + SWITCH_ATTR_OP_VALUE_STR,
48 + SWITCH_ATTR_OP_VALUE_PORTS,
49 + SWITCH_ATTR_OP_DESCRIPTION,
57 + SWITCH_PORTMAP_PORTS,
58 + SWITCH_PORTMAP_SEGMENT,
59 + SWITCH_PORTMAP_VIRT,
66 + SWITCH_CMD_GET_SWITCH,
67 + SWITCH_CMD_NEW_ATTR,
68 + SWITCH_CMD_LIST_GLOBAL,
69 + SWITCH_CMD_GET_GLOBAL,
70 + SWITCH_CMD_SET_GLOBAL,
71 + SWITCH_CMD_LIST_PORT,
72 + SWITCH_CMD_GET_PORT,
73 + SWITCH_CMD_SET_PORT,
74 + SWITCH_CMD_LIST_VLAN,
75 + SWITCH_CMD_GET_VLAN,
80 +enum switch_val_type {
88 +/* port nested attributes */
92 + SWITCH_PORT_FLAG_TAGGED,
93 + SWITCH_PORT_ATTR_MAX
96 +#define SWITCH_ATTR_DEFAULTS_OFFSET 0x1000
102 @@ -164,4 +248,6 @@ struct switch_attr {
106 -#endif /* _LINUX_SWITCH_H */