1 // See README.txt for information and build instructions.
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.
6 // To get an in-depth walkthrough of this file and the related examples, see:
7 // https://developers.google.com/protocol-buffers/docs/tutorials
14 * This Contains the Message structures used for PIM MLAG Active-Active support.
15 * Mainly there were two types of messages
17 * 1. Messages sent from PIM (Node-1) to PIM (Node-2)
18 * 2. Messages sent from CLAG to PIM (status Messages)
20 * ProtoBuf supports maximum 32 fields, so to make it more generic message
21 * encoding is like below.
22 * __________________________________________
25 * ___________________________________________
28 * Header carries Information about
29 * 1) what Message it is carrying
30 * 2) Bytes carries the actual payload encoded with protobuf
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.
42 message ZebraMlag_Header {
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;
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;
59 * tells what type of message this payload carries
69 * Actual Encoded payload
76 * ZEBRA_MLAG_REGISTER & ZEBRA_MLAG_DEREGISTER
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
85 * ZEBRA_MLAG_STATUS_UPDATE
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
93 message ZebraMlagStatusUpdate {
96 CLAG_STATE_RUNNING = 1;
101 CLAG_ROLE_PRIMAY = 1;
102 CLAG_ROLE_SECONDARY = 2;
106 ClagRole my_role = 2;
107 ClagState peer_state = 3;
111 * ZEBRA_MLAG_VXLAN_UPDATE
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
117 message ZebraMlagVxlanUpdate {
118 uint32 anycast_ip = 1;
123 * ZebraMlagZebraStatusUpdate
125 * This message will be posted by CLAGD to advertise FRR state
126 * Change Information to peer
129 message ZebraMlagZebraStatusUpdate{
136 FrrState peer_frrstate = 1;
140 * ZEBRA_MLAG_MROUTE_ADD & ZEBRA_MLAG_MROUTE_DEL
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.
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)
153 message ZebraMlagMrouteAdd {
155 uint32 source_ip = 2;
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
161 uint32 cost_to_rp = 4;
164 bool am_i_Dual_active = 7;
166 string intf_name = 9;
169 message ZebraMlagMrouteDel {
171 uint32 source_ip = 2;
175 string intf_name = 6;
178 message ZebraMlagMrouteAddBulk {
179 repeated ZebraMlagMrouteAdd mroute_add = 1;
182 message ZebraMlagMrouteDelBulk {
183 repeated ZebraMlagMrouteDel mroute_del = 1;