blob: cbfc3220ee698dd788c2323ede43f0e10bb51ec4 [file] [log] [blame]
Christopher Ferris8177cdf2020-08-03 11:53:55 -07001/****************************************************************************
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
30enum 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};
36enum br_mrp_ring_state_type {
37 BR_MRP_RING_STATE_OPEN,
38 BR_MRP_RING_STATE_CLOSED,
39};
40enum 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};
46enum br_mrp_port_role_type {
47 BR_MRP_PORT_ROLE_PRIMARY,
48 BR_MRP_PORT_ROLE_SECONDARY,
49};
50enum br_mrp_tlv_header_type {
51 BR_MRP_TLV_HEADER_END = 0x0,
52 BR_MRP_TLV_HEADER_COMMON = 0x1,
53 BR_MRP_TLV_HEADER_RING_TEST = 0x2,
54 BR_MRP_TLV_HEADER_RING_TOPO = 0x3,
55 BR_MRP_TLV_HEADER_RING_LINK_DOWN = 0x4,
56 BR_MRP_TLV_HEADER_RING_LINK_UP = 0x5,
57 BR_MRP_TLV_HEADER_OPTION = 0x7f,
58};
59enum br_mrp_sub_tlv_header_type {
60 BR_MRP_SUB_TLV_HEADER_TEST_MGR_NACK = 0x1,
61 BR_MRP_SUB_TLV_HEADER_TEST_PROPAGATE = 0x2,
62 BR_MRP_SUB_TLV_HEADER_TEST_AUTO_MGR = 0x3,
63};
64struct br_mrp_tlv_hdr {
65 __u8 type;
66 __u8 length;
67};
68struct br_mrp_sub_tlv_hdr {
69 __u8 type;
70 __u8 length;
71};
72struct br_mrp_end_hdr {
73 struct br_mrp_tlv_hdr hdr;
74};
75struct br_mrp_common_hdr {
76 __be16 seq_id;
77 __u8 domain[MRP_DOMAIN_UUID_LENGTH];
78};
79struct br_mrp_ring_test_hdr {
80 __be16 prio;
81 __u8 sa[ETH_ALEN];
82 __be16 port_role;
83 __be16 state;
84 __be16 transitions;
85 __be32 timestamp;
86};
87struct br_mrp_ring_topo_hdr {
88 __be16 prio;
89 __u8 sa[ETH_ALEN];
90 __be16 interval;
91};
92struct br_mrp_ring_link_hdr {
93 __u8 sa[ETH_ALEN];
94 __be16 port_role;
95 __be16 interval;
96 __be16 blocked;
97};
98struct br_mrp_sub_opt_hdr {
99 __u8 type;
100 __u8 manufacture_data[MRP_MANUFACTURE_DATA_LENGTH];
101};
102struct br_mrp_test_mgr_nack_hdr {
103 __be16 prio;
104 __u8 sa[ETH_ALEN];
105 __be16 other_prio;
106 __u8 other_sa[ETH_ALEN];
107};
108struct br_mrp_test_prop_hdr {
109 __be16 prio;
110 __u8 sa[ETH_ALEN];
111 __be16 other_prio;
112 __u8 other_sa[ETH_ALEN];
113};
114struct br_mrp_oui_hdr {
115 __u8 oui[MRP_OUI_LENGTH];
116};
117#endif