summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorSatheesh Kumar K <sathk@cumulusnetworks.com>2019-08-26 02:18:05 -0700
committerSatheesh Kumar K <sathk@cumulusnetworks.com>2019-09-24 01:35:09 -0700
commit5fdca4ded5794dcf97235fa3f2d1f0e7e0969c29 (patch)
treedd9bfe9f888c0287e3ad40ebd91f64645f0ed4f1 /lib/zclient.c
parent4bf3dda597cea57745e1aab906d52fc808f088e2 (diff)
pimd, lib: adding support for MLAG Message processing at PIM
This includes: 1. Defining message formats 2. Stream Decoding after receiving the message at PIM 3. Handling MLAG UP & Down Notifications Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index a51e35fd98..dad0ffa945 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -2569,6 +2569,30 @@ void zclient_send_mlag_data(struct zclient *client, struct stream *client_s)
zclient_send_message(client);
}
+static void zclient_mlag_process_up(int command, struct zclient *zclient,
+ zebra_size_t length, vrf_id_t vrf_id)
+{
+ if (zclient->mlag_process_up)
+ (*zclient->mlag_process_up)();
+
+}
+
+static void zclient_mlag_process_down(int command, struct zclient *zclient,
+ zebra_size_t length, vrf_id_t vrf_id)
+{
+ if (zclient->mlag_process_down)
+ (*zclient->mlag_process_down)();
+
+}
+
+static void zclient_mlag_handle_msg(int command, struct zclient *zclient,
+ zebra_size_t length, vrf_id_t vrf_id)
+{
+ if (zclient->mlag_handle_msg)
+ (*zclient->mlag_handle_msg)(zclient->ibuf, length);
+
+}
+
/* Zebra client message read function. */
static int zclient_read(struct thread *thread)
{
@@ -2871,6 +2895,15 @@ static int zclient_read(struct thread *thread)
(*zclient->vxlan_sg_del)(command, zclient, length,
vrf_id);
break;
+ case ZEBRA_MLAG_PROCESS_UP:
+ zclient_mlag_process_up(command, zclient, length, vrf_id);
+ break;
+ case ZEBRA_MLAG_PROCESS_DOWN:
+ zclient_mlag_process_down(command, zclient, length, vrf_id);
+ break;
+ case ZEBRA_MLAG_FORWARD_MSG:
+ zclient_mlag_handle_msg(command, zclient, length, vrf_id);
+ break;
default:
break;
}