summaryrefslogtreecommitdiff
path: root/sharpd/sharp_zebra.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-05-06 17:50:41 -0300
committerGitHub <noreply@github.com>2019-05-06 17:50:41 -0300
commit61bb5ca6e0ebbc9476395b42ddf398eff19996cc (patch)
treeaef6cb26900552cd887bd1f58fc9093646001fa8 /sharpd/sharp_zebra.c
parente8ca10f2e2198ef5b092671ccaa91e4b7016197c (diff)
parent121f9dee7ce9f1b1b8a81f8bd97eed39ed87b477 (diff)
Merge pull request #4253 from qlyoung/zapi-handler-args-macro
ZAPI callback args macro
Diffstat (limited to 'sharpd/sharp_zebra.c')
-rw-r--r--sharpd/sharp_zebra.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c
index f1e83628c2..19c7e556ca 100644
--- a/sharpd/sharp_zebra.c
+++ b/sharpd/sharp_zebra.c
@@ -58,8 +58,7 @@ static struct interface *zebra_interface_if_lookup(struct stream *s)
}
/* 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;
@@ -71,8 +70,7 @@ static int interface_add(int command, struct zclient *zclient,
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;
@@ -90,21 +88,19 @@ static int interface_delete(int command, struct zclient *zclient,
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;
@@ -113,8 +109,7 @@ static int interface_address_delete(int command, struct zclient *zclient,
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);
@@ -122,8 +117,7 @@ static int interface_state_up(int command, struct zclient *zclient,
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);
@@ -202,8 +196,7 @@ static void handle_repeated(bool installed)
}
}
-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;
@@ -345,8 +338,7 @@ void sharp_zebra_nexthop_watch(struct prefix *p, vrf_id_t vrf_id, bool import,
__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;