1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _UAPI_LINUX_MRP_BRIDGE_H_
20 #define _UAPI_LINUX_MRP_BRIDGE_H_
21 #include <linux/types.h>
22 #include <linux/if_ether.h>
23 #define MRP_MAX_FRAME_LENGTH 200
24 #define MRP_DEFAULT_PRIO 0x8000
25 #define MRP_DOMAIN_UUID_LENGTH 16
26 #define MRP_VERSION 1
27 #define MRP_FRAME_PRIO 7
28 #define MRP_OUI_LENGTH 3
29 #define MRP_MANUFACTURE_DATA_LENGTH 2
30 enum br_mrp_ring_role_type {
31   BR_MRP_RING_ROLE_DISABLED,
32   BR_MRP_RING_ROLE_MRC,
33   BR_MRP_RING_ROLE_MRM,
34   BR_MRP_RING_ROLE_MRA,
35 };
36 enum br_mrp_in_role_type {
37   BR_MRP_IN_ROLE_DISABLED,
38   BR_MRP_IN_ROLE_MIC,
39   BR_MRP_IN_ROLE_MIM,
40 };
41 enum br_mrp_ring_state_type {
42   BR_MRP_RING_STATE_OPEN,
43   BR_MRP_RING_STATE_CLOSED,
44 };
45 enum br_mrp_in_state_type {
46   BR_MRP_IN_STATE_OPEN,
47   BR_MRP_IN_STATE_CLOSED,
48 };
49 enum br_mrp_port_state_type {
50   BR_MRP_PORT_STATE_DISABLED,
51   BR_MRP_PORT_STATE_BLOCKED,
52   BR_MRP_PORT_STATE_FORWARDING,
53   BR_MRP_PORT_STATE_NOT_CONNECTED,
54 };
55 enum br_mrp_port_role_type {
56   BR_MRP_PORT_ROLE_PRIMARY,
57   BR_MRP_PORT_ROLE_SECONDARY,
58   BR_MRP_PORT_ROLE_INTER,
59 };
60 enum br_mrp_tlv_header_type {
61   BR_MRP_TLV_HEADER_END = 0x0,
62   BR_MRP_TLV_HEADER_COMMON = 0x1,
63   BR_MRP_TLV_HEADER_RING_TEST = 0x2,
64   BR_MRP_TLV_HEADER_RING_TOPO = 0x3,
65   BR_MRP_TLV_HEADER_RING_LINK_DOWN = 0x4,
66   BR_MRP_TLV_HEADER_RING_LINK_UP = 0x5,
67   BR_MRP_TLV_HEADER_IN_TEST = 0x6,
68   BR_MRP_TLV_HEADER_IN_TOPO = 0x7,
69   BR_MRP_TLV_HEADER_IN_LINK_DOWN = 0x8,
70   BR_MRP_TLV_HEADER_IN_LINK_UP = 0x9,
71   BR_MRP_TLV_HEADER_IN_LINK_STATUS = 0xa,
72   BR_MRP_TLV_HEADER_OPTION = 0x7f,
73 };
74 enum br_mrp_sub_tlv_header_type {
75   BR_MRP_SUB_TLV_HEADER_TEST_MGR_NACK = 0x1,
76   BR_MRP_SUB_TLV_HEADER_TEST_PROPAGATE = 0x2,
77   BR_MRP_SUB_TLV_HEADER_TEST_AUTO_MGR = 0x3,
78 };
79 #endif
80