aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lacp/lacp_test.c2
-rw-r--r--src/plugins/memif/memif_test.c4
-rw-r--r--src/tools/vppapigen/vppapigen_c.py4
3 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/lacp/lacp_test.c b/src/plugins/lacp/lacp_test.c
index cbff00d9502..4a705ff0140 100644
--- a/src/plugins/lacp/lacp_test.c
+++ b/src/plugins/lacp/lacp_test.c
@@ -114,6 +114,8 @@ api_sw_interface_lacp_dump (vat_main_t * vam)
S (mp);
/* Use a control ping for synchronization */
+ if (!lm->ping_id)
+ lm->ping_id = vl_msg_api_get_msg_index ((u8 *) (VL_API_CONTROL_PING_CRC));
mp_ping = vl_msg_api_alloc_as_if_client (sizeof (*mp_ping));
mp_ping->_vl_msg_id = htons (lm->ping_id);
mp_ping->client_index = vam->my_client_index;
diff --git a/src/plugins/memif/memif_test.c b/src/plugins/memif/memif_test.c
index d2ab7e0844d..05f5c29b957 100644
--- a/src/plugins/memif/memif_test.c
+++ b/src/plugins/memif/memif_test.c
@@ -304,6 +304,8 @@ api_memif_dump (vat_main_t * vam)
S (mp);
/* Use a control ping for synchronization */
+ if (!mm->ping_id)
+ mm->ping_id = vl_msg_api_get_msg_index ((u8 *) (VL_API_CONTROL_PING_CRC));
mp_ping = vl_msg_api_alloc_as_if_client (sizeof (*mp_ping));
mp_ping->_vl_msg_id = htons (mm->ping_id);
mp_ping->client_index = vam->my_client_index;
@@ -356,6 +358,8 @@ api_memif_socket_filename_dump (vat_main_t * vam)
S (mp);
/* Use a control ping for synchronization */
+ if (!mm->ping_id)
+ mm->ping_id = vl_msg_api_get_msg_index ((u8 *) (VL_API_CONTROL_PING_CRC));
mp_ping = vl_msg_api_alloc_as_if_client (sizeof (*mp_ping));
mp_ping->_vl_msg_id = htons (mm->ping_id);
mp_ping->client_index = vam->my_client_index;
diff --git a/src/tools/vppapigen/vppapigen_c.py b/src/tools/vppapigen/vppapigen_c.py
index e15a1417643..e84732e3f48 100644
--- a/src/tools/vppapigen/vppapigen_c.py
+++ b/src/tools/vppapigen/vppapigen_c.py
@@ -586,6 +586,10 @@ def generate_include_types(s, module, stream):
write('} vl_api_%s_t;\n' % o.name)
+ for t in s['Define']:
+ write('#define VL_API_{ID}_CRC "{n}_{crc:08x}"\n'
+ .format(n=t.name, ID=t.name.upper(), crc=t.crc))
+
write("\n#endif\n")