1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
3 * include/linux/if_team.h - Network team device driver header
4 * Copyright (c) 2011 Jiri Pirko <jpirko@redhat.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
12 #ifndef _UAPI_LINUX_IF_TEAM_H_
13 #define _UAPI_LINUX_IF_TEAM_H_
16 #define TEAM_STRING_MAX_LEN 32
18 /**********************************
19 * NETLINK_GENERIC netlink family.
20 **********************************/
26 TEAM_CMD_PORT_LIST_GET
,
29 TEAM_CMD_MAX
= (__TEAM_CMD_MAX
- 1),
34 TEAM_ATTR_TEAM_IFINDEX
, /* u32 */
35 TEAM_ATTR_LIST_OPTION
, /* nest */
36 TEAM_ATTR_LIST_PORT
, /* nest */
39 TEAM_ATTR_MAX
= __TEAM_ATTR_MAX
- 1,
42 /* Nested layout of get/set msg:
44 * [TEAM_ATTR_LIST_OPTION]
45 * [TEAM_ATTR_ITEM_OPTION]
46 * [TEAM_ATTR_OPTION_*], ...
47 * [TEAM_ATTR_ITEM_OPTION]
48 * [TEAM_ATTR_OPTION_*], ...
50 * [TEAM_ATTR_LIST_PORT]
51 * [TEAM_ATTR_ITEM_PORT]
52 * [TEAM_ATTR_PORT_*], ...
53 * [TEAM_ATTR_ITEM_PORT]
54 * [TEAM_ATTR_PORT_*], ...
59 TEAM_ATTR_ITEM_OPTION_UNSPEC
,
60 TEAM_ATTR_ITEM_OPTION
, /* nest */
62 __TEAM_ATTR_ITEM_OPTION_MAX
,
63 TEAM_ATTR_ITEM_OPTION_MAX
= __TEAM_ATTR_ITEM_OPTION_MAX
- 1,
67 TEAM_ATTR_OPTION_UNSPEC
,
68 TEAM_ATTR_OPTION_NAME
, /* string */
69 TEAM_ATTR_OPTION_CHANGED
, /* flag */
70 TEAM_ATTR_OPTION_TYPE
, /* u8 */
71 TEAM_ATTR_OPTION_DATA
, /* dynamic */
72 TEAM_ATTR_OPTION_REMOVED
, /* flag */
73 TEAM_ATTR_OPTION_PORT_IFINDEX
, /* u32 */ /* for per-port options */
74 TEAM_ATTR_OPTION_ARRAY_INDEX
, /* u32 */ /* for array options */
76 __TEAM_ATTR_OPTION_MAX
,
77 TEAM_ATTR_OPTION_MAX
= __TEAM_ATTR_OPTION_MAX
- 1,
81 TEAM_ATTR_ITEM_PORT_UNSPEC
,
82 TEAM_ATTR_ITEM_PORT
, /* nest */
84 __TEAM_ATTR_ITEM_PORT_MAX
,
85 TEAM_ATTR_ITEM_PORT_MAX
= __TEAM_ATTR_ITEM_PORT_MAX
- 1,
89 TEAM_ATTR_PORT_UNSPEC
,
90 TEAM_ATTR_PORT_IFINDEX
, /* u32 */
91 TEAM_ATTR_PORT_CHANGED
, /* flag */
92 TEAM_ATTR_PORT_LINKUP
, /* flag */
93 TEAM_ATTR_PORT_SPEED
, /* u32 */
94 TEAM_ATTR_PORT_DUPLEX
, /* u8 */
95 TEAM_ATTR_PORT_REMOVED
, /* flag */
98 TEAM_ATTR_PORT_MAX
= __TEAM_ATTR_PORT_MAX
- 1,
102 * NETLINK_GENERIC related info
104 #define TEAM_GENL_NAME "team"
105 #define TEAM_GENL_VERSION 0x1
106 #define TEAM_GENL_CHANGE_EVENT_MC_GRP_NAME "change_event"
108 #endif /* _UAPI_LINUX_IF_TEAM_H_ */