Skip to content

Commit

Permalink
lib: make zapi_nexthop_update_decode private
Browse files Browse the repository at this point in the history
zapi_nexthop_update_decode() is no longer called externally.

Also move the comment to zclient->nexthop_update where it now belongs.

Signed-off-by: David Lamparter <[email protected]>
  • Loading branch information
eqvinox committed Nov 20, 2023
1 parent 409a693 commit 03c4375
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions lib/zclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -2269,8 +2269,8 @@ const char *zapi_nexthop2str(const struct zapi_nexthop *znh, char *buf,
/*
* Decode the nexthop-tracking update message
*/
bool zapi_nexthop_update_decode(struct stream *s, struct prefix *match,
struct zapi_route *nhr)
static bool zapi_nexthop_update_decode(struct stream *s, struct prefix *match,
struct zapi_route *nhr)
{
uint32_t i;

Expand Down
23 changes: 11 additions & 12 deletions lib/zclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,17 @@ struct zclient {
/* Pointer to the callback functions. */
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);

Expand Down Expand Up @@ -1127,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);

Expand Down

0 comments on commit 03c4375

Please sign in to comment.