summaryrefslogtreecommitdiffstats
path: root/src/vat
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2020-01-30 14:14:15 +0100
committerOle Trøan <otroan@employees.org>2020-02-26 11:46:39 +0000
commitdb86329abb4ea164b9061a1d6b47f186c6b9b8fb (patch)
tree669fe5cf65e70fa91449b12610558f2549949ea2 /src/vat
parent00ec4019b399132a72467ed4c3fb039d4f2466b7 (diff)
pg: API cleanup
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ibf693e4b178d2579bc3afb9653bffc07fbb7dd0a Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/vat')
-rw-r--r--src/vat/api_format.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index da64a8151fd..404f9045ea1 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -18593,17 +18593,15 @@ api_pg_capture (vat_main_t * vam)
}
}
- u32 name_len = vec_len (pcap_file);
/* Construct the API message */
M (PG_CAPTURE, mp);
mp->context = 0;
mp->interface_id = ntohl (if_id);
mp->is_enabled = enable;
mp->count = ntohl (count);
- mp->pcap_name_length = ntohl (name_len);
if (pcap_file_set != 0)
{
- clib_memcpy (mp->pcap_file_name, pcap_file, name_len);
+ vl_api_vec_to_api_string (pcap_file, &mp->pcap_file_name);
}
vec_free (pcap_file);
@@ -18641,15 +18639,13 @@ api_pg_enable_disable (vat_main_t * vam)
}
}
- u32 name_len = vec_len (stream_name);
/* Construct the API message */
M (PG_ENABLE_DISABLE, mp);
mp->context = 0;
mp->is_enabled = enable;
if (stream_name_set != 0)
{
- mp->stream_name_length = ntohl (name_len);
- clib_memcpy (mp->stream_name, stream_name, name_len);
+ vl_api_vec_to_api_string (stream_name, &mp->stream_name);
}
vec_free (stream_name);