summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorSatheesh Kumar K <sathk@cumulusnetworks.com>2019-11-12 00:17:13 -0800
committerSatheesh Kumar K <sathk@cumulusnetworks.com>2019-11-13 20:43:15 -0800
commit46c2687c72e59dce69a5f5d35fc7bd4d76bc740e (patch)
tree36bfd76a80572e00abd9db78e49b10ced1153e39 /lib/zclient.c
parent36b5b98fefd2f77297f31274ca031104902f8b38 (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.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 1540fafb5d..7a62e408ea 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -2754,6 +2754,24 @@ void zclient_send_mlag_data(struct zclient *client, struct stream *client_s)
zclient_send_message(client);
}
+static void zclient_mlag_process_up(ZAPI_CALLBACK_ARGS)
+{
+ if (zclient->mlag_process_up)
+ (*zclient->mlag_process_up)();
+}
+
+static void zclient_mlag_process_down(ZAPI_CALLBACK_ARGS)
+{
+ if (zclient->mlag_process_down)
+ (*zclient->mlag_process_down)();
+}
+
+static void zclient_mlag_handle_msg(ZAPI_CALLBACK_ARGS)
+{
+ if (zclient->mlag_handle_msg)
+ (*zclient->mlag_handle_msg)(zclient->ibuf, length);
+}
+
/* Zebra client message read function. */
static int zclient_read(struct thread *thread)
{
@@ -3048,6 +3066,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;
}