aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/flowprobe/flowprobe_test.c
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-12-09 15:51:44 +0100
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2019-12-10 04:08:58 +0000
commit3013e69884ce99aa27049947408286e16905f302 (patch)
tree38b2dd6e8c9e20843a3b213bd4d9ff0400d59ac4 /src/plugins/flowprobe/flowprobe_test.c
parent39d69112fcec114fde34955ceb41555221d3ba11 (diff)
flowprobe: use explicit types in api
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I4f1cccca7de0c07cee472bde80cd6b0ef60046bd
Diffstat (limited to 'src/plugins/flowprobe/flowprobe_test.c')
-rw-r--r--src/plugins/flowprobe/flowprobe_test.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/flowprobe/flowprobe_test.c b/src/plugins/flowprobe/flowprobe_test.c
index 245707d417d..a694e45ae9b 100644
--- a/src/plugins/flowprobe/flowprobe_test.c
+++ b/src/plugins/flowprobe/flowprobe_test.c
@@ -96,11 +96,11 @@ static int
api_flowprobe_params (vat_main_t * vam)
{
unformat_input_t *i = vam->input;
- u8 record_l2 = 0, record_l3 = 0, record_l4 = 0;
u32 active_timer = ~0;
u32 passive_timer = ~0;
vl_api_flowprobe_params_t *mp;
int ret;
+ u8 record_flags = 0;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
@@ -112,11 +112,11 @@ api_flowprobe_params (vat_main_t * vam)
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
if (unformat (i, "l2"))
- record_l2 = 1;
+ record_flags |= FLOWPROBE_RECORD_FLAG_L2;
else if (unformat (i, "l3"))
- record_l3 = 1;
+ record_flags |= FLOWPROBE_RECORD_FLAG_L3;
else if (unformat (i, "l4"))
- record_l4 = 1;
+ record_flags |= FLOWPROBE_RECORD_FLAG_L4;
else
break;
}
@@ -132,9 +132,7 @@ api_flowprobe_params (vat_main_t * vam)
/* Construct the API message */
M (FLOWPROBE_PARAMS, mp);
- mp->record_l2 = record_l2;
- mp->record_l3 = record_l3;
- mp->record_l4 = record_l4;
+ mp->record_flags = record_flags;
mp->active_timer = ntohl (active_timer);
mp->passive_timer = ntohl (passive_timer);