static int eigrp_zebra_route_notify_owner(int command, struct zclient *zclient, zebra_size_t length, vrf_id_t vrf_id) { struct prefix p; enum zapi_route_notify_owner note; uint32_t table; if (!zapi_route_notify_decode(zclient->ibuf, &p, &table, ¬e)) return -1; return 0; }
static int route_notify_owner(ZAPI_CALLBACK_ARGS) { struct timeval r; struct prefix p; enum zapi_route_notify_owner note; uint32_t table; if (!zapi_route_notify_decode(zclient->ibuf, &p, &table, ¬e)) return -1; switch (note) { case ZAPI_ROUTE_INSTALLED: sg.r.installed_routes++; if (sg.r.total_routes == sg.r.installed_routes) { monotime(&sg.r.t_end); timersub(&sg.r.t_end, &sg.r.t_start, &r); zlog_debug("Installed All Items %ld.%ld", r.tv_sec, r.tv_usec); handle_repeated(true); } break; case ZAPI_ROUTE_FAIL_INSTALL: zlog_debug("Failed install of route"); break; case ZAPI_ROUTE_BETTER_ADMIN_WON: zlog_debug("Better Admin Distance won over us"); break; case ZAPI_ROUTE_REMOVED: sg.r.removed_routes++; if (sg.r.total_routes == sg.r.removed_routes) { monotime(&sg.r.t_end); timersub(&sg.r.t_end, &sg.r.t_start, &r); zlog_debug("Removed all Items %ld.%ld", r.tv_sec, r.tv_usec); handle_repeated(false); } break; case ZAPI_ROUTE_REMOVE_FAIL: zlog_debug("Route removal Failure"); break; } return 0; }