]> git.proxmox.com Git - mirror_frr.git/blame - mlag/mlag.proto
Merge pull request #5620 from qlyoung/fix-zebra-vrf-label-afi-check
[mirror_frr.git] / mlag / mlag.proto
CommitLineData
e05ab0b0
SK
1// See README.txt for information and build instructions.
2//
3// Note: START and END tags are used in comments to define sections used in
4// tutorials. They are not part of the syntax for Protocol Buffers.
5//
6// To get an in-depth walkthrough of this file and the related examples, see:
7// https://developers.google.com/protocol-buffers/docs/tutorials
8
9// [START declaration]
10syntax = "proto3";
11//package tutorial;
12
13/*
14 * This Contains the Message structures used for PIM MLAG Active-Active support.
15 * Mainly there were two types of messages
16 *
17 * 1. Messages sent from PIM (Node-1) to PIM (Node-2)
18 * 2. Messages sent from CLAG to PIM (status Messages)
19 *
20 * ProtoBuf supports maximum 32 fields, so to make it more generic message
21 * encoding is like below.
22 * __________________________________________
23 * | | |
24 * | Header | bytes |
25 * ___________________________________________
26 *
27 *
28 * Header carries Information about
29 * 1) what Message it is carrying
30 * 2) Bytes carries the actual payload encoded with protobuf
31 *
32 *
33 * Limitations
34 *=============
35 * Since message-type is 32-bit, there were no real limitations on number of
36 * messages Infra can support, but each message can carry only 32 fields.
37 *
38 */
39
40
41// [START messages]
42message ZebraMlag_Header {
43 enum MessageType {
44 ZEBRA_MLAG_NONE = 0; //Invalid message-type
45 ZEBRA_MLAG_REGISTER = 1;
46 ZEBRA_MLAG_DEREGISTER = 2;
47 ZEBRA_MLAG_STATUS_UPDATE = 3;
48 ZEBRA_MLAG_MROUTE_ADD = 4;
49 ZEBRA_MLAG_MROUTE_DEL = 5;
50 ZEBRA_MLAG_DUMP = 6;
51 ZEBRA_MLAG_MROUTE_ADD_BULK = 7;
52 ZEBRA_MLAG_MROUTE_DEL_BULK = 8;
53 ZEBRA_MLAG_PIM_CFG_DUMP = 10;
54 ZEBRA_MLAG_VXLAN_UPDATE = 11;
55 ZEBRA_MLAG_ZEBRA_STATUS_UPDATE = 12;
56 }
57
58 /*
59 * tells what type of message this payload carries
60 */
61 MessageType type = 1;
62
63 /*
64 * Length of payload
65 */
66 uint32 len = 2;
67
68 /*
69 * Actual Encoded payload
70 */
71 bytes data = 3;
72}
73
74
75/*
76 * ZEBRA_MLAG_REGISTER & ZEBRA_MLAG_DEREGISTER
77 *
78 * After the MLAGD is up, First Zebra has to register to send any data,
79 * otherwise MLAGD will not accept any data from the client.
80 * De-register will be used for the Data cleanup at MLAGD
81 * These are NULL payload message currently
82 */
83
84/*
85 * ZEBRA_MLAG_STATUS_UPDATE
86 *
87 * This message will be posted by CLAGD(an external control plane manager
88 * which monitors CLAG failures) to inform peerlink/CLAG Failure
89 * to zebra, after the failure Notification Node with primary role will
90 * forward the Traffic and Node with standby will drop the traffic
91 */
92
93message ZebraMlagStatusUpdate {
94 enum ClagState {
95 CLAG_STATE_DOWN = 0;
96 CLAG_STATE_RUNNING = 1;
97 }
98
99 enum ClagRole {
100 CLAG_ROLE_NONE = 0;
101 CLAG_ROLE_PRIMAY = 1;
102 CLAG_ROLE_SECONDARY = 2;
103 }
104
105 string peerlink = 1;
106 ClagRole my_role = 2;
107 ClagState peer_state = 3;
108}
109
110/*
111 * ZEBRA_MLAG_VXLAN_UPDATE
112 *
113 * This message will be posted by CLAGD(an external control plane Manager
114 * which is responsible for MCLAG) to inform zebra obout anycast/local
115 * ip updates.
116 */
117message ZebraMlagVxlanUpdate {
118 uint32 anycast_ip = 1;
119 uint32 local_ip = 2;
120}
121
122/*
123 * ZebraMlagZebraStatusUpdate
124 *
125 * This message will be posted by CLAGD to advertise FRR state
126 * Change Information to peer
127 */
128
129message ZebraMlagZebraStatusUpdate{
130 enum FrrState {
131 FRR_STATE_NONE = 0;
132 FRR_STATE_DOWN = 1;
133 FRR_STATE_UP = 2;
134 }
135
136 FrrState peer_frrstate = 1;
137}
138
139/*
140 * ZEBRA_MLAG_MROUTE_ADD & ZEBRA_MLAG_MROUTE_DEL
141 *
142 * These messages will be sent from PIM (Node-1) to PIM (Node-2) to perform
143 * DF Election for each Mcast flow. Elected DF will forward the traffic
144 * towards the host and loser will keep the OIL as empty, so that only single
145 * copy will be sent to host
146 * This message will be posted with any change in the params.
147 *
148 * ZEBRA_MLAG_MROUTE_DEL is mainly to delete the record at MLAGD when the
149 * mcast flow is deleted.
150 * key for the MLAGD lookup is (vrf_id, source_ip & group_ip)
151 */
152
153message ZebraMlagMrouteAdd {
154 string vrf_name = 1;
155 uint32 source_ip = 2;
156 uint32 group_ip = 3;
157 /*
158 * This is the IGP Cost to reach Configured RP in case of (*,G) or
159 * Cost to the source in case of (S,G) entry
160 */
161 uint32 cost_to_rp = 4;
162 uint32 owner_id = 5;
163 bool am_i_DR = 6;
164 bool am_i_Dual_active = 7;
165 uint32 vrf_id = 8;
166 string intf_name = 9;
167}
168
169message ZebraMlagMrouteDel {
170 string vrf_name = 1;
171 uint32 source_ip = 2;
172 uint32 group_ip = 3;
173 uint32 owner_id = 4;
174 uint32 vrf_id = 5;
175 string intf_name = 6;
176}
177
178message ZebraMlagMrouteAddBulk {
179 repeated ZebraMlagMrouteAdd mroute_add = 1;
180}
181
182message ZebraMlagMrouteDelBulk {
183 repeated ZebraMlagMrouteDel mroute_del = 1;
184}
185
186// [END messages]