interface: add api test file

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ib07029204ecf12bf2adb5a39afa54bc98fb81f34
This commit is contained in:
Filip Tehlar
2021-07-23 22:03:05 +00:00
committed by Ole Tr�an
parent 2e55823af6
commit f0e67d78ae
21 changed files with 1484 additions and 164 deletions

View File

@ -65,13 +65,16 @@ do { \
#define PING(_tm, mp_ping) \
do \
{ \
if (!(_tm)->ping_id) \
(_tm)->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 ((_tm)->ping_id); \
socket_client_main_t *scm = vam->socket_client_main; \
if (scm && scm->socket_enable) \
mp_ping = vl_socket_client_msg_alloc (sizeof (*mp_ping)); \
else \
mp_ping = vl_msg_api_alloc_as_if_client (sizeof (*mp_ping)); \
mp_ping->_vl_msg_id = htons (VL_API_CONTROL_PING + 1); \
mp_ping->client_index = vam->my_client_index; \
vam->result_ready = 0; \
if (scm) \
scm->control_pings_outstanding++; \
} \
while (0);