summaryrefslogtreecommitdiffstats
path: root/src/vlibapi/vat_helper_macros.h
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-01-25 16:32:08 -0500
committerDave Barach <dave@barachs.net>2017-01-25 16:32:32 -0500
commit2d6b2d6d1bbb130921ec525a1cc6e88f42717c79 (patch)
tree72653c6777511e74738a303dee93ae39db3d2fbf /src/vlibapi/vat_helper_macros.h
parent044183faacc5eb8a055658f9deebefb56b254adc (diff)
Repair plugin binary API message numbering
Change-Id: I422a3f168bd483e011cfaf54af022cb79b78db02 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlibapi/vat_helper_macros.h')
-rw-r--r--src/vlibapi/vat_helper_macros.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/vlibapi/vat_helper_macros.h b/src/vlibapi/vat_helper_macros.h
index 7199364a389..dc91c9f5023 100644
--- a/src/vlibapi/vat_helper_macros.h
+++ b/src/vlibapi/vat_helper_macros.h
@@ -20,14 +20,13 @@
#define __vat_helper_macros_h__
/* M: construct, but don't yet send a message */
-
-#define M(T,t) \
-do { \
- vam->result_ready = 0; \
- mp = vl_msg_api_alloc_as_if_client(sizeof(*mp)); \
- memset (mp, 0, sizeof (*mp)); \
- mp->_vl_msg_id = ntohs (VL_API_##T); \
- mp->client_index = vam->my_client_index; \
+#define M(T,t) \
+do { \
+ vam->result_ready = 0; \
+ mp = vl_msg_api_alloc_as_if_client(sizeof(*mp)); \
+ memset (mp, 0, sizeof (*mp)); \
+ mp->_vl_msg_id = ntohs (VL_API_##T+__plugin_msg_base); \
+ mp->client_index = vam->my_client_index; \
} while(0);
#define M2(T,t,n) \
@@ -35,11 +34,10 @@ do { \
vam->result_ready = 0; \
mp = vl_msg_api_alloc_as_if_client(sizeof(*mp)+(n)); \
memset (mp, 0, sizeof (*mp)); \
- mp->_vl_msg_id = ntohs (VL_API_##T); \
+ mp->_vl_msg_id = ntohs (VL_API_##T+__plugin_msg_base); \
mp->client_index = vam->my_client_index; \
} while(0);
-
/* S: send a message */
#define S (vl_msg_api_send_shmem (vam->vl_input_queue, (u8 *)&mp))