summaryrefslogtreecommitdiff
path: root/lib/zclient.h
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-11-21 10:56:47 -0500
committerGitHub <noreply@github.com>2023-11-21 10:56:47 -0500
commit01af05fbd55edf444d2e39d9de44f5aef2b37719 (patch)
tree16e3d190df7f5b46a2385d528651cac29c649e23 /lib/zclient.h
parentb41f7b1b8e3647dac9826b9768d44c5e80ad1b47 (diff)
parent03c4375a4ac2b7a9837b79ab7d0bd732595ded27 (diff)
Merge pull request #14834 from opensourcerouting/zclient-nexthop-update
*: move common NHT update decoding bits into lib/
Diffstat (limited to 'lib/zclient.h')
-rw-r--r--lib/zclient.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/lib/zclient.h b/lib/zclient.h
index f18fc056fc..73eb6a16d8 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -293,6 +293,8 @@ struct zapi_cap {
typedef int (zclient_handler)(ZAPI_CALLBACK_ARGS);
/* clang-format on */
+struct zapi_route;
+
/* Structure for the zebra client. */
struct zclient {
/* The thread master we schedule ourselves on */
@@ -348,6 +350,19 @@ struct zclient {
void (*zebra_connected)(struct zclient *);
void (*zebra_capabilities)(struct zclient_capabilities *cap);
+ /*
+ * match -> is the prefix that the calling daemon asked to be matched
+ * against.
+ * nhr->prefix -> is the actual prefix that was matched against in the
+ * rib itself.
+ *
+ * This distinction is made because a LPM can be made if there is a
+ * covering route. This way the upper level protocol can make a
+ * decision point about whether or not it wants to use the match or not.
+ */
+ void (*nexthop_update)(struct vrf *vrf, struct prefix *match,
+ struct zapi_route *nhr);
+
int (*handle_error)(enum zebra_error_types error);
/*
@@ -1123,18 +1138,6 @@ int zapi_nexthop_from_nexthop(struct zapi_nexthop *znh,
const struct nexthop *nh);
int zapi_backup_nexthop_from_nexthop(struct zapi_nexthop *znh,
const struct nexthop *nh);
-/*
- * match -> is the prefix that the calling daemon asked to be matched
- * against.
- * nhr->prefix -> is the actual prefix that was matched against in the
- * rib itself.
- *
- * This distinction is made because a LPM can be made if there is a
- * covering route. This way the upper level protocol can make a decision
- * point about whether or not it wants to use the match or not.
- */
-extern bool zapi_nexthop_update_decode(struct stream *s, struct prefix *match,
- struct zapi_route *nhr);
const char *zapi_nexthop2str(const struct zapi_nexthop *znh, char *buf,
int bufsize);