return nexthop;
}
-uint8_t nexthop_group_nexthop_num(const struct nexthop_group *nhg)
+uint16_t nexthop_group_nexthop_num(const struct nexthop_group *nhg)
{
struct nexthop *nhop;
- uint8_t num = 0;
+ uint16_t num = 0;
for (ALL_NEXTHOPS_PTR(nhg, nhop))
num++;
return num;
}
-static uint8_t
-nexthop_group_nexthop_num_no_recurse(const struct nexthop_group *nhg)
+static uint16_t nexthop_group_nexthop_num_no_recurse(const struct nexthop_group *nhg)
{
struct nexthop *nhop;
- uint8_t num = 0;
+ uint16_t num = 0;
for (nhop = nhg->nexthop; nhop; nhop = nhop->next)
num++;
return num;
}
-uint8_t nexthop_group_active_nexthop_num(const struct nexthop_group *nhg)
+uint16_t nexthop_group_active_nexthop_num(const struct nexthop_group *nhg)
{
struct nexthop *nhop;
- uint8_t num = 0;
+ uint16_t num = 0;
for (ALL_NEXTHOPS_PTR(nhg, nhop)) {
if (CHECK_FLAG(nhop->flags, NEXTHOP_FLAG_ACTIVE))
return NULL;
}
-static bool
-nexthop_group_equal_common(const struct nexthop_group *nhg1,
- const struct nexthop_group *nhg2,
- uint8_t (*nexthop_group_nexthop_num_func)(
- const struct nexthop_group *nhg))
+static bool nexthop_group_equal_common(
+ const struct nexthop_group *nhg1, const struct nexthop_group *nhg2,
+ uint16_t (*nexthop_group_nexthop_num_func)(const struct nexthop_group *nhg))
{
if (nhg1 && !nhg2)
return false;
const struct nexthop *nh);
/* Return the number of nexthops in this nhg */
-extern uint8_t nexthop_group_nexthop_num(const struct nexthop_group *nhg);
-extern uint8_t
-nexthop_group_active_nexthop_num(const struct nexthop_group *nhg);
+extern uint16_t nexthop_group_nexthop_num(const struct nexthop_group *nhg);
+extern uint16_t nexthop_group_active_nexthop_num(const struct nexthop_group *nhg);
extern bool nexthop_group_has_label(const struct nexthop_group *nhg);