From b6c5d34354c7153bebd2c51e89fd2e32f0dc343c Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 23 Feb 2018 13:48:06 -0500 Subject: lib, zebra: Add Rule insertion success/failure messages Add code to allow rule insertion notifications to be sent back up the stack. Signed-off-by: Donald Sharp --- lib/zclient.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/zclient.h') diff --git a/lib/zclient.h b/lib/zclient.h index a315a7ed5..1aa94b641 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -218,6 +218,8 @@ struct zclient { int (*pw_status_update)(int, struct zclient *, uint16_t, vrf_id_t); int (*route_notify_owner)(int command, struct zclient *zclient, uint16_t length, vrf_id_t vrf_id); + int (*rule_notify_owner)(int command, struct zclient *zclient, + uint16_t length, vrf_id_t vrf_id); }; /* Zebra API message flag. */ @@ -361,6 +363,12 @@ enum zapi_route_notify_owner { ZAPI_ROUTE_REMOVE_FAIL, }; +enum zapi_rule_notify_owner { + ZAPI_RULE_FAIL_INSTALL, + ZAPI_RULE_INSTALLED, + ZAPI_RULE_REMOVED, +}; + /* Zebra MAC types */ #define ZEBRA_MACIP_TYPE_STICKY 0x01 /* Sticky MAC*/ #define ZEBRA_MACIP_TYPE_GW 0x02 /* gateway (SVI) mac*/ @@ -531,6 +539,10 @@ extern int zapi_route_decode(struct stream *, struct zapi_route *); bool zapi_route_notify_decode(struct stream *s, struct prefix *p, uint32_t *tableid, enum zapi_route_notify_owner *note); +bool zapi_rule_notify_decode(struct stream *s, uint32_t *seqno, + uint32_t *priority, uint32_t *unique, + ifindex_t *ifindex, + enum zapi_rule_notify_owner *note); extern struct nexthop *nexthop_from_zapi_nexthop(struct zapi_nexthop *znh); extern bool zapi_nexthop_update_decode(struct stream *s, struct zapi_route *nhr); -- cgit v1.2.3