From 7bc770ceb62ede18414b7bb5788692e32477e373 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Tue, 31 Jan 2017 14:03:33 -0600 Subject: Convert message macro S to accept a message pointer parameter; Rather than blindly assume an unbound, fixed message parameter explicilty pass it as a paramter to the S() macro. Change-Id: Ieea1f1815cadd2eec7d9240408d69acdc3caa49a Signed-off-by: Jon Loeliger --- src/plugins/snat/snat_test.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) (limited to 'src/plugins/snat') diff --git a/src/plugins/snat/snat_test.c b/src/plugins/snat/snat_test.c index c6f9a8ff62d..c0913f37d4f 100644 --- a/src/plugins/snat/snat_test.c +++ b/src/plugins/snat/snat_test.c @@ -159,7 +159,8 @@ static int api_snat_add_address_range (vat_main_t * vam) mp->is_ip4 = 1; mp->is_add = is_add; - S; W; + S(mp); + W; /* NOTREACHED */ return 0; @@ -205,7 +206,8 @@ static int api_snat_interface_add_del_feature (vat_main_t * vam) mp->is_add = is_add; mp->is_inside = is_inside; - S; W; + S(mp); + W; /* NOTREACHED */ return 0; } @@ -273,7 +275,8 @@ static int api_snat_add_static_mapping(vat_main_t * vam) memcpy (mp->local_ip_address, &local_addr, 4); memcpy (mp->external_ip_address, &external_addr, 4); - S; W; + S(mp); + W; /* NOTREACHED */ return 0; } @@ -331,12 +334,12 @@ static int api_snat_static_mapping_dump(vat_main_t * vam) "port", "vrf"); M(SNAT_STATIC_MAPPING_DUMP, mp); - S; + S(mp); /* Use a control ping for synchronization */ { vl_api_snat_control_ping_t *mp; M(SNAT_CONTROL_PING, mp); - S; + S(mp); } W; /* NOTREACHED */ @@ -386,7 +389,8 @@ static int api_snat_show_config(vat_main_t * vam) } M(SNAT_SHOW_CONFIG, mp); - S; W; + S(mp); + W; /* NOTREACHED */ return 0; } @@ -412,12 +416,12 @@ static int api_snat_address_dump(vat_main_t * vam) } M(SNAT_ADDRESS_DUMP, mp); - S; + S(mp); /* Use a control ping for synchronization */ { vl_api_snat_control_ping_t *mp; M(SNAT_CONTROL_PING, mp); - S; + S(mp); } W; /* NOTREACHED */ @@ -446,12 +450,12 @@ static int api_snat_interface_dump(vat_main_t * vam) } M(SNAT_INTERFACE_DUMP, mp); - S; + S(mp); /* Use a control ping for synchronization */ { vl_api_snat_control_ping_t *mp; M(SNAT_CONTROL_PING, mp); - S; + S(mp); } W; /* NOTREACHED */ @@ -479,7 +483,8 @@ static int api_snat_set_workers (vat_main_t * vam) M(SNAT_SET_WORKERS, mp); mp->worker_mask = clib_host_to_net_u64 (bitmap[0]); - S; W; + S(mp); + W; /* NOTREACHED */ return 0; @@ -507,12 +512,12 @@ static int api_snat_worker_dump(vat_main_t * vam) } M(SNAT_WORKER_DUMP, mp); - S; + S(mp); /* Use a control ping for synchronization */ { vl_api_snat_control_ping_t *mp; M(SNAT_CONTROL_PING, mp); - S; + S(mp); } W; /* NOTREACHED */ @@ -553,7 +558,8 @@ static int api_snat_ipfix_enable_disable (vat_main_t * vam) mp->sw_if_index = ntohl(sw_if_index); mp->is_add = is_add; - S; W; + S(mp); + W; /* NOTREACHED */ return 0; } @@ -579,12 +585,12 @@ static int api_snat_interface_addr_dump(vat_main_t * vam) } M(SNAT_INTERFACE_ADDR_DUMP, mp); - S; + S(mp); /* Use a control ping for synchronization */ { vl_api_snat_control_ping_t *mp; M(SNAT_CONTROL_PING, mp); - S; + S(mp); } W; /* NOTREACHED */ @@ -620,7 +626,8 @@ static int api_snat_add_del_interface_addr (vat_main_t * vam) mp->src_port = htons((u16) src_port); mp->enable = enable; - S; W; + S(mp); + W; /* NOTREACHED */ return 0; } -- cgit 1.2.3-korg