#include "nexthop_group.h"
#include "sharp_globals.h"
+#include "sharp_nht.h"
#include "sharp_zebra.h"
/* Zebra structure to hold current status. */
static int sharp_nexthop_update(int command, struct zclient *zclient,
zebra_size_t length, vrf_id_t vrf_id)
{
+ struct sharp_nh_tracker *nht;
struct zapi_route nhr;
char buf[PREFIX_STRLEN];
int i;
zlog_debug("Received update for %s",
prefix2str(&nhr.prefix, buf, sizeof(buf)));
+
+ nht = sharp_nh_tracker_get(&nhr.prefix);
+ nht->nhop_num = nhr.nexthop_num;
+ nht->updates++;
+
for (i = 0; i < nhr.nexthop_num; i++) {
struct zapi_nexthop *znh = &nhr.nexthops[i];