diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-12-06 13:19:34 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-06 13:19:34 -0500 |
| commit | a44dcdee5589a9352bc2d2d9a69c281663701e8a (patch) | |
| tree | 82db71cbe125caa3e3b00041d52eb24a428d87b9 /lib/zclient.h | |
| parent | 0d26af12030301b47a9a7b43a98b1f0c003eb86c (diff) | |
| parent | 68a02e06e5f103048d947262c08c569056f74d1c (diff) | |
Merge pull request #5332 from mjstapp/remove_zapi_label_flag
*: revise zapi nexthop encoding
Diffstat (limited to 'lib/zclient.h')
| -rw-r--r-- | lib/zclient.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/zclient.h b/lib/zclient.h index 99ed34138e..9c5c65ffc5 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -289,7 +289,6 @@ struct zclient { #define ZAPI_MESSAGE_TAG 0x08 #define ZAPI_MESSAGE_MTU 0x10 #define ZAPI_MESSAGE_SRCPFX 0x20 -#define ZAPI_MESSAGE_LABEL 0x40 /* * This should only be used by a DAEMON that needs to communicate * the table being used is not in the VRF. You must pass the @@ -313,7 +312,7 @@ struct zapi_nexthop { enum nexthop_types_t type; vrf_id_t vrf_id; ifindex_t ifindex; - bool onlink; + uint8_t flags; union { union g_addr gate; enum blackhole_type bh_type; @@ -327,6 +326,12 @@ struct zapi_nexthop { }; /* + * ZAPI nexthop flags values + */ +#define ZAPI_NEXTHOP_FLAG_ONLINK 0x01 +#define ZAPI_NEXTHOP_FLAG_LABEL 0x02 + +/* * Some of these data structures do not map easily to * a actual data structure size giving different compilers * and systems. For those data structures we need @@ -689,6 +694,8 @@ extern int zclient_route_send(uint8_t, struct zclient *, struct zapi_route *); extern int zclient_send_rnh(struct zclient *zclient, int command, struct prefix *p, bool exact_match, vrf_id_t vrf_id); +int zapi_nexthop_encode(struct stream *s, const struct zapi_nexthop *api_nh, + uint32_t api_flags); extern int zapi_route_encode(uint8_t, struct stream *, struct zapi_route *); extern int zapi_route_decode(struct stream *, struct zapi_route *); bool zapi_route_notify_decode(struct stream *s, struct prefix *p, @@ -713,6 +720,8 @@ bool zapi_iptable_notify_decode(struct stream *s, enum zapi_iptable_notify_owner *note); extern struct nexthop *nexthop_from_zapi_nexthop(struct zapi_nexthop *znh); +int zapi_nexthop_from_nexthop(struct zapi_nexthop *znh, + const struct nexthop *nh); extern bool zapi_nexthop_update_decode(struct stream *s, struct zapi_route *nhr); |
