aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibapi/vat_helper_macros.h
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2021-07-23 18:24:19 +0000
committerOle Tr�an <otroan@employees.org>2021-07-29 09:13:35 +0000
commitabfe365ef66e8868dcfce1e34e48c74dbe8f092b (patch)
tree2629386441825285f2549d7a7cfa4836124ae685 /src/vlibapi/vat_helper_macros.h
parent254c803612c0c9ec5dfc1b90de6efb23ec5bedd5 (diff)
ip: add api test file
Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I49c4183a443b7b39924328900e6a6ac2e09be426
Diffstat (limited to 'src/vlibapi/vat_helper_macros.h')
-rw-r--r--src/vlibapi/vat_helper_macros.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vlibapi/vat_helper_macros.h b/src/vlibapi/vat_helper_macros.h
index 239e2091dc1..2e1b9422bf7 100644
--- a/src/vlibapi/vat_helper_macros.h
+++ b/src/vlibapi/vat_helper_macros.h
@@ -62,6 +62,19 @@ do { \
mp->client_index = vam->my_client_index; \
} while(0);
+#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); \
+ mp_ping->client_index = vam->my_client_index; \
+ vam->result_ready = 0; \
+ } \
+ while (0);
+
/* S: send a message */
#define S(mp) \
do { \