}
/* Inteface addition message from zebra. */
-static int interface_add(int command, struct zclient *zclient,
- zebra_size_t length, vrf_id_t vrf_id)
+static int interface_add(ZAPI_CALLBACK_ARGS)
{
struct interface *ifp;
return 0;
}
-static int interface_delete(int command, struct zclient *zclient,
- zebra_size_t length, vrf_id_t vrf_id)
+static int interface_delete(ZAPI_CALLBACK_ARGS)
{
struct interface *ifp;
struct stream *s;
return 0;
}
-static int interface_address_add(int command, struct zclient *zclient,
- zebra_size_t length, vrf_id_t vrf_id)
+static int interface_address_add(ZAPI_CALLBACK_ARGS)
{
- zebra_interface_address_read(command, zclient->ibuf, vrf_id);
+ zebra_interface_address_read(cmd, zclient->ibuf, vrf_id);
return 0;
}
-static int interface_address_delete(int command, struct zclient *zclient,
- zebra_size_t length, vrf_id_t vrf_id)
+static int interface_address_delete(ZAPI_CALLBACK_ARGS)
{
struct connected *c;
- c = zebra_interface_address_read(command, zclient->ibuf, vrf_id);
+ c = zebra_interface_address_read(cmd, zclient->ibuf, vrf_id);
if (!c)
return 0;
return 0;
}
-static int interface_state_up(int command, struct zclient *zclient,
- zebra_size_t length, vrf_id_t vrf_id)
+static int interface_state_up(ZAPI_CALLBACK_ARGS)
{
zebra_interface_if_lookup(zclient->ibuf);
return 0;
}
-static int interface_state_down(int command, struct zclient *zclient,
- zebra_size_t length, vrf_id_t vrf_id)
+static int interface_state_down(ZAPI_CALLBACK_ARGS)
{
zebra_interface_state_read(zclient->ibuf, vrf_id);
sg.r.inst, sg.r.total_routes);
}
- if (installed) {
+ if (!installed) {
sg.r.installed_routes = 0;
sharp_install_routes_helper(&p, sg.r.vrf_id, sg.r.inst,
&sg.r.nhop_group,
}
}
-static int route_notify_owner(int command, struct zclient *zclient,
- zebra_size_t length, vrf_id_t vrf_id)
+static int route_notify_owner(ZAPI_CALLBACK_ARGS)
{
struct timeval r;
struct prefix p;
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);
+ zlog_debug("Installed All Items %jd.%ld",
+ (intmax_t)r.tv_sec, (long)r.tv_usec);
handle_repeated(true);
}
break;
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);
+ zlog_debug("Removed all Items %jd.%ld",
+ (intmax_t)r.tv_sec, (long)r.tv_usec);
handle_repeated(false);
}
break;
__PRETTY_FUNCTION__);
}
-static int sharp_nexthop_update(int command, struct zclient *zclient,
- zebra_size_t length, vrf_id_t vrf_id)
+static int sharp_nexthop_update(ZAPI_CALLBACK_ARGS)
{
struct sharp_nh_tracker *nht;
struct zapi_route nhr;