adj_nbr_insert(nh_proto, link_type, nh_addr,
sw_if_index,
- adj->heap_handle);
+ adj_get_index(adj));
/*
* since we just added the ADJ we have no rewrite string for it,
adj = adj_get(adj_index);
}
- adj_lock(adj->heap_handle);
+ adj_lock(adj_get_index(adj));
- return (adj->heap_handle);
+ return (adj_get_index(adj));
}
adj_index_t
adj = adj_get(adj_index);
}
- adj_lock(adj->heap_handle);
- adj_nbr_update_rewrite(adj->heap_handle, rewrite);
+ adj_lock(adj_get_index(adj));
+ adj_nbr_update_rewrite(adj_get_index(adj), rewrite);
- return (adj->heap_handle);
+ return (adj_get_index(adj));
}
/**
adj_unlock(dpo->dpoi_index);
}
+static void
+adj_mem_show (void)
+{
+ fib_show_memory_usage("Adjacency",
+ pool_elts(adj_pool),
+ pool_len(adj_pool),
+ sizeof(ip_adjacency_t));
+}
+
const static dpo_vft_t adj_nbr_dpo_vft = {
.dv_lock = adj_dpo_lock,
.dv_unlock = adj_dpo_unlock,
.dv_format = format_adj_nbr,
+ .dv_mem_show = adj_mem_show,
};
const static dpo_vft_t adj_nbr_incompl_dpo_vft = {
.dv_lock = adj_dpo_lock,