X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=zebra%2Fzebra_rnh.h;h=6e2dab8d9ff232da4f22295e10add575838430c2;hb=61678a82f875a2f584f9602153a2f3f16472b951;hp=95a39411816ff4be7920f95c5934cd548deb2205;hpb=c85711a8c9d9ec70348266ca98bfec7e8ac25c03;p=mirror_frr.git diff --git a/zebra/zebra_rnh.h b/zebra/zebra_rnh.h index 95a394118..6e2dab8d9 100644 --- a/zebra/zebra_rnh.h +++ b/zebra/zebra_rnh.h @@ -29,18 +29,18 @@ extern "C" { #endif -extern int zebra_rnh_ip_default_route; -extern int zebra_rnh_ipv6_default_route; - extern void zebra_rnh_init(void); -static inline int rnh_resolve_via_default(int family) +static inline const char *rnh_type2str(rnh_type_t type) { - if (((family == AF_INET) && zebra_rnh_ip_default_route) - || ((family == AF_INET6) && zebra_rnh_ipv6_default_route)) - return 1; - else - return 0; + switch (type) { + case RNH_NEXTHOP_TYPE: + return "Nexthop"; + case RNH_IMPORT_CHECK_TYPE: + return "Import"; + } + + return "ERROR"; } extern struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, @@ -60,6 +60,8 @@ extern void zebra_print_rnh_table(vrf_id_t vrfid, afi_t afi, struct vty *vty, rnh_type_t type, struct prefix *p); extern char *rnh_str(struct rnh *rnh, char *buf, int size); +extern int rnh_resolve_via_default(struct zebra_vrf *zvrf, int family); + #ifdef __cplusplus } #endif