1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
3 #ifndef _UAPI_LINUX_MRP_BRIDGE_H_
4 #define _UAPI_LINUX_MRP_BRIDGE_H_
6 #include <linux/types.h>
7 #include <linux/if_ether.h>
9 #define MRP_MAX_FRAME_LENGTH 200
10 #define MRP_DEFAULT_PRIO 0x8000
11 #define MRP_DOMAIN_UUID_LENGTH 16
13 #define MRP_FRAME_PRIO 7
14 #define MRP_OUI_LENGTH 3
15 #define MRP_MANUFACTURE_DATA_LENGTH 2
17 enum br_mrp_ring_role_type
{
18 BR_MRP_RING_ROLE_DISABLED
,
24 enum br_mrp_in_role_type
{
25 BR_MRP_IN_ROLE_DISABLED
,
30 enum br_mrp_ring_state_type
{
31 BR_MRP_RING_STATE_OPEN
,
32 BR_MRP_RING_STATE_CLOSED
,
35 enum br_mrp_in_state_type
{
37 BR_MRP_IN_STATE_CLOSED
,
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
,
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
,
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,
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,