summaryrefslogtreecommitdiff
path: root/lib/zclient.h
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2020-09-25 13:48:21 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2020-09-28 12:41:00 -0400
commit21735352987e56f11facdc9fb1f4c53602aba9f6 (patch)
treed085984eacfd352271cb47980c1443db92aa7059 /lib/zclient.h
parentc6ce9334b5387f482af4112ed1ffe6a49debe352 (diff)
lib,zebra,sharpd: add code for backup proto-NHs but disabled
Add the zapi code for encoding/decoding of backup nexthops for when we are ready for it, but disable it for now so that we revert to the old way with them. When zebra gets a proto-NHG with a backup in it, we early fail and tell the upper level proto. In this case sharpd. Sharpd then reverts to the old way of installation with the route. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'lib/zclient.h')
-rw-r--r--lib/zclient.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/zclient.h b/lib/zclient.h
index b41f291554..959a101395 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -442,9 +442,14 @@ struct zapi_nexthop {
* ZAPI Nexthop Group. For use with protocol creation of nexthop groups.
*/
struct zapi_nhg {
+ uint16_t proto;
uint32_t id;
+
uint16_t nexthop_num;
struct zapi_nexthop nexthops[MULTIPATH_NUM];
+
+ uint16_t backup_nexthop_num;
+ struct zapi_nexthop backup_nexthops[MULTIPATH_NUM];
};
/*
@@ -907,6 +912,9 @@ bool zapi_ipset_notify_decode(struct stream *s,
uint32_t *unique,
enum zapi_ipset_notify_owner *note);
+
+extern int zapi_nhg_encode(struct stream *s, int cmd, struct zapi_nhg *api_nhg);
+extern int zapi_nhg_decode(struct stream *s, int cmd, struct zapi_nhg *api_nhg);
extern int zclient_nhg_send(struct zclient *zclient, int cmd,
struct zapi_nhg *api_nhg);