static void copy_state(struct rnh *rnh, const struct route_entry *re,
struct route_node *rn);
static int compare_state(struct route_entry *r1, struct route_entry *r2);
-static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
- vrf_id_t vrf_id);
+static int send_client(struct rnh *rnh, struct zserv *client,
+ enum rnh_type type, vrf_id_t vrf_id);
static void print_rnh(struct route_node *rn, struct vty *vty);
static int zebra_client_cleanup_rnh(struct zserv *client);
}
static inline struct route_table *get_rnh_table(vrf_id_t vrfid, afi_t afi,
- rnh_type_t type)
+ enum rnh_type type)
{
struct zebra_vrf *zvrf;
struct route_table *t = NULL;
route_unlock_node(rn);
}
-struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, rnh_type_t type,
+struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, enum rnh_type type,
bool *exists)
{
struct route_table *table;
return (rn->info);
}
-struct rnh *zebra_lookup_rnh(struct prefix *p, vrf_id_t vrfid, rnh_type_t type)
+struct rnh *zebra_lookup_rnh(struct prefix *p, vrf_id_t vrfid,
+ enum rnh_type type)
{
struct route_table *table;
struct route_node *rn;
XFREE(MTYPE_RNH, rnh);
}
-static void zebra_delete_rnh(struct rnh *rnh, rnh_type_t type)
+static void zebra_delete_rnh(struct rnh *rnh, enum rnh_type type)
{
struct route_node *rn;
* and as such it will have a resolved rnh.
*/
void zebra_add_rnh_client(struct rnh *rnh, struct zserv *client,
- rnh_type_t type, vrf_id_t vrf_id)
+ enum rnh_type type, vrf_id_t vrf_id)
{
if (IS_ZEBRA_DEBUG_NHT) {
char buf[PREFIX2STR_BUFFER];
}
void zebra_remove_rnh_client(struct rnh *rnh, struct zserv *client,
- rnh_type_t type)
+ enum rnh_type type)
{
if (IS_ZEBRA_DEBUG_NHT) {
char buf[PREFIX2STR_BUFFER];
*prn = rn;
if (!re && IS_ZEBRA_DEBUG_NHT_DETAILED)
- zlog_debug("\tRejected due to removed or is a bgp route");
+ zlog_debug(" Rejected due to removed or is a bgp route");
return re;
}
&& !rnh_resolve_via_default(zvrf, rn->p.family)) {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tNot allowed to resolve through default prefix");
+ " Not allowed to resolve through default prefix");
return NULL;
}
if (CHECK_FLAG(re->status, ROUTE_ENTRY_REMOVED)) {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tRoute Entry %s removed",
+ " Route Entry %s removed",
zebra_route_string(re->type));
continue;
}
!CHECK_FLAG(re->flags, ZEBRA_FLAG_FIB_OVERRIDE)) {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tRoute Entry %s !selected",
+ " Route Entry %s !selected",
zebra_route_string(re->type));
continue;
}
if (CHECK_FLAG(re->status, ROUTE_ENTRY_QUEUED)) {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tRoute Entry %s queued",
+ " Route Entry %s queued",
zebra_route_string(re->type));
continue;
}
if (nexthop == NULL) {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tRoute Entry %s no nexthops",
+ " Route Entry %s no nexthops",
zebra_route_string(re->type));
continue;
}
else {
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "\tNexthop must be connected, cannot recurse up");
+ " Nexthop must be connected, cannot recurse up");
return NULL;
}
}
/* Evaluate one tracked entry */
static void zebra_rnh_evaluate_entry(struct zebra_vrf *zvrf, afi_t afi,
- int force, rnh_type_t type,
+ int force, enum rnh_type type,
struct route_node *nrn)
{
struct rnh *rnh;
* covers multiple nexthops we are interested in.
*/
static void zebra_rnh_clear_nhc_flag(struct zebra_vrf *zvrf, afi_t afi,
- rnh_type_t type, struct route_node *nrn)
+ enum rnh_type type, struct route_node *nrn)
{
struct rnh *rnh;
struct route_entry *re;
* of a particular VRF and address-family or a specific prefix.
*/
void zebra_evaluate_rnh(struct zebra_vrf *zvrf, afi_t afi, int force,
- rnh_type_t type, struct prefix *p)
+ enum rnh_type type, struct prefix *p)
{
struct route_table *rnh_table;
struct route_node *nrn;
}
void zebra_print_rnh_table(vrf_id_t vrfid, afi_t afi, struct vty *vty,
- rnh_type_t type, struct prefix *p)
+ enum rnh_type type, struct prefix *p)
{
struct route_table *table;
struct route_node *rn;
return 0;
}
-static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
- vrf_id_t vrf_id)
+static int send_client(struct rnh *rnh, struct zserv *client,
+ enum rnh_type type, vrf_id_t vrf_id)
{
struct stream *s;
struct route_entry *re;
default:
flog_err(EC_ZEBRA_RNH_UNKNOWN_FAMILY,
"%s: Unknown family (%d) notification attempted\n",
- __FUNCTION__, rn->p.family);
+ __func__, rn->p.family);
break;
}
if (re) {
}
static int zebra_cleanup_rnh_client(vrf_id_t vrf_id, afi_t afi,
- struct zserv *client, rnh_type_t type)
+ struct zserv *client, enum rnh_type type)
{
struct route_table *ntable;
struct route_node *nrn;