Convert message macro S to accept a message pointer parameter;
[vpp.git] / src / examples / sample-plugin / sample / sample_test.c
index a47710e..bf7a059 100644 (file)
@@ -23,6 +23,8 @@
 #include <vlibmemory/api.h>
 #include <vlibsocket/api.h>
 #include <vppinfra/error.h>
+
+#define __plugin_msg_base sample_test_main.msg_id_base
 #include <vlibapi/vat_helper_macros.h>
 
 uword unformat_sw_if_index (unformat_input_t * input, va_list * args);
@@ -115,12 +117,12 @@ static int api_sample_macswap_enable_disable (vat_main_t * vam)
     }
     
     /* Construct the API message */
-    M(SAMPLE_MACSWAP_ENABLE_DISABLE, sample_macswap_enable_disable);
+    M(SAMPLE_MACSWAP_ENABLE_DISABLE, mp);
     mp->sw_if_index = ntohl (sw_if_index);
     mp->enable_disable = enable_disable;
 
     /* send it... */
-    S;
+    S(mp);
 
     /* Wait for a reply... */
     W;