GNU Linux-libre 6.9.2-gnu
[releases.git] / include / uapi / linux / mrp_bridge.h
1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2
3 #ifndef _UAPI_LINUX_MRP_BRIDGE_H_
4 #define _UAPI_LINUX_MRP_BRIDGE_H_
5
6 #include <linux/types.h>
7 #include <linux/if_ether.h>
8
9 #define MRP_MAX_FRAME_LENGTH            200
10 #define MRP_DEFAULT_PRIO                0x8000
11 #define MRP_DOMAIN_UUID_LENGTH          16
12 #define MRP_VERSION                     1
13 #define MRP_FRAME_PRIO                  7
14 #define MRP_OUI_LENGTH                  3
15 #define MRP_MANUFACTURE_DATA_LENGTH     2
16
17 enum br_mrp_ring_role_type {
18         BR_MRP_RING_ROLE_DISABLED,
19         BR_MRP_RING_ROLE_MRC,
20         BR_MRP_RING_ROLE_MRM,
21         BR_MRP_RING_ROLE_MRA,
22 };
23
24 enum br_mrp_in_role_type {
25         BR_MRP_IN_ROLE_DISABLED,
26         BR_MRP_IN_ROLE_MIC,
27         BR_MRP_IN_ROLE_MIM,
28 };
29
30 enum br_mrp_ring_state_type {
31         BR_MRP_RING_STATE_OPEN,
32         BR_MRP_RING_STATE_CLOSED,
33 };
34
35 enum br_mrp_in_state_type {
36         BR_MRP_IN_STATE_OPEN,
37         BR_MRP_IN_STATE_CLOSED,
38 };
39
40 enum br_mrp_port_state_type {
41         BR_MRP_PORT_STATE_DISABLED,
42         BR_MRP_PORT_STATE_BLOCKED,
43         BR_MRP_PORT_STATE_FORWARDING,
44         BR_MRP_PORT_STATE_NOT_CONNECTED,
45 };
46
47 enum br_mrp_port_role_type {
48         BR_MRP_PORT_ROLE_PRIMARY,
49         BR_MRP_PORT_ROLE_SECONDARY,
50         BR_MRP_PORT_ROLE_INTER,
51 };
52
53 enum br_mrp_tlv_header_type {
54         BR_MRP_TLV_HEADER_END = 0x0,
55         BR_MRP_TLV_HEADER_COMMON = 0x1,
56         BR_MRP_TLV_HEADER_RING_TEST = 0x2,
57         BR_MRP_TLV_HEADER_RING_TOPO = 0x3,
58         BR_MRP_TLV_HEADER_RING_LINK_DOWN = 0x4,
59         BR_MRP_TLV_HEADER_RING_LINK_UP = 0x5,
60         BR_MRP_TLV_HEADER_IN_TEST = 0x6,
61         BR_MRP_TLV_HEADER_IN_TOPO = 0x7,
62         BR_MRP_TLV_HEADER_IN_LINK_DOWN = 0x8,
63         BR_MRP_TLV_HEADER_IN_LINK_UP = 0x9,
64         BR_MRP_TLV_HEADER_IN_LINK_STATUS = 0xa,
65         BR_MRP_TLV_HEADER_OPTION = 0x7f,
66 };
67
68 enum br_mrp_sub_tlv_header_type {
69         BR_MRP_SUB_TLV_HEADER_TEST_MGR_NACK = 0x1,
70         BR_MRP_SUB_TLV_HEADER_TEST_PROPAGATE = 0x2,
71         BR_MRP_SUB_TLV_HEADER_TEST_AUTO_MGR = 0x3,
72 };
73
74 #endif