summaryrefslogtreecommitdiffstats
path: root/src/plugins/snat
diff options
context:
space:
mode:
authorJon Loeliger <jdl@netgate.com>2017-01-31 14:03:33 -0600
committerDave Barach <openvpp@barachs.net>2017-02-02 17:31:37 +0000
commit7bc770ceb62ede18414b7bb5788692e32477e373 (patch)
treea0898e2e7b3b994c9edbc2442328545513849bec /src/plugins/snat
parent614e97d87b46853384cf0dcf1d59aaf9f4b2fa92 (diff)
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 <jdl@netgate.com>
Diffstat (limited to 'src/plugins/snat')
-rw-r--r--src/plugins/snat/snat_test.c41
1 files changed, 24 insertions, 17 deletions
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;
}