#include <vppinfra/error.h>
#include <vnet/ip/ip.h>
#include <arpa/inet.h>
+
+#define __plugin_msg_base acl_test_main.msg_id_base
#include <vlibapi/vat_helper_macros.h>
uword unformat_sw_if_index (unformat_input_t * input, va_list * args);
acl_test_main_t * sm = &acl_test_main;
vl_api_acl_plugin_get_version_t * mp;
u32 msg_size = sizeof(*mp);
- f64 timeout;
vam->result_ready = 0;
mp = vl_msg_api_alloc_as_if_client(msg_size);
mp->client_index = vam->my_client_index;
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;
acl_test_main_t * sm = &acl_test_main;
vl_api_acl_plugin_get_version_t * mp;
u32 msg_size = sizeof(*mp);
- f64 timeout;
vam->result_ready = 0;
mp = vl_msg_api_alloc_as_if_client(msg_size);
mp->client_index = vam->my_client_index;
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;
{
acl_test_main_t * sm = &acl_test_main;
unformat_input_t * i = vam->input;
- f64 timeout;
vl_api_acl_add_replace_t * mp;
u32 acl_index = ~0;
u32 msg_size = sizeof (*mp); /* without the rules */
mp->count = htonl(n_rules);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;
static int api_acl_del (vat_main_t * vam)
{
unformat_input_t * i = vam->input;
- f64 timeout;
vl_api_acl_del_t * mp;
u32 acl_index = ~0;
}
/* Construct the API message */
- M(ACL_DEL, acl_del);
+ M(ACL_DEL, mp);
mp->acl_index = ntohl(acl_index);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;
static int api_macip_acl_del (vat_main_t * vam)
{
unformat_input_t * i = vam->input;
- f64 timeout;
vl_api_acl_del_t * mp;
u32 acl_index = ~0;
}
/* Construct the API message */
- M(MACIP_ACL_DEL, acl_del);
+ M(MACIP_ACL_DEL, mp);
mp->acl_index = ntohl(acl_index);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;
static int api_acl_interface_add_del (vat_main_t * vam)
{
unformat_input_t * i = vam->input;
- f64 timeout;
vl_api_acl_interface_add_del_t * mp;
u32 sw_if_index = ~0;
u32 acl_index = ~0;
/* Construct the API message */
- M(ACL_INTERFACE_ADD_DEL, acl_interface_add_del);
+ M(ACL_INTERFACE_ADD_DEL, mp);
mp->acl_index = ntohl(acl_index);
mp->sw_if_index = ntohl(sw_if_index);
mp->is_add = is_add;
mp->is_input = is_input;
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;
static int api_macip_acl_interface_add_del (vat_main_t * vam)
{
unformat_input_t * i = vam->input;
- f64 timeout;
vl_api_macip_acl_interface_add_del_t * mp;
u32 sw_if_index = ~0;
u32 acl_index = ~0;
/* Construct the API message */
- M(MACIP_ACL_INTERFACE_ADD_DEL, macip_acl_interface_add_del);
+ M(MACIP_ACL_INTERFACE_ADD_DEL, mp);
mp->acl_index = ntohl(acl_index);
mp->sw_if_index = ntohl(sw_if_index);
mp->is_add = is_add;
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;
static int api_acl_interface_set_acl_list (vat_main_t * vam)
{
unformat_input_t * i = vam->input;
- f64 timeout;
vl_api_acl_interface_set_acl_list_t * mp;
u32 sw_if_index = ~0;
u32 acl_index = ~0;
}
/* Construct the API message */
- M2(ACL_INTERFACE_SET_ACL_LIST, acl_interface_set_acl_list, sizeof(u32) * (vec_len(inacls) + vec_len(outacls)));
+ M2(ACL_INTERFACE_SET_ACL_LIST, mp, sizeof(u32) * (vec_len(inacls) + vec_len(outacls)));
mp->sw_if_index = ntohl(sw_if_index);
mp->n_input = vec_len(inacls);
mp->count = vec_len(inacls) + vec_len(outacls);
clib_memcpy(mp->acls, inacls, vec_len(inacls)*sizeof(u32));
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;
static int api_acl_interface_list_dump (vat_main_t * vam)
{
unformat_input_t * i = vam->input;
- f64 timeout;
u32 sw_if_index = ~0;
vl_api_acl_interface_list_dump_t * mp;
}
/* Construct the API message */
- M(ACL_INTERFACE_LIST_DUMP, acl_interface_list_dump);
+ M(ACL_INTERFACE_LIST_DUMP, mp);
mp->sw_if_index = ntohl (sw_if_index);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;
static int api_acl_dump (vat_main_t * vam)
{
unformat_input_t * i = vam->input;
- f64 timeout;
u32 acl_index = ~0;
vl_api_acl_dump_t * mp;
}
/* Construct the API message */
- M(ACL_DUMP, acl_dump);
+ M(ACL_DUMP, mp);
mp->acl_index = ntohl (acl_index);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;
static int api_macip_acl_dump (vat_main_t * vam)
{
unformat_input_t * i = vam->input;
- f64 timeout;
u32 acl_index = ~0;
vl_api_acl_dump_t * mp;
}
/* Construct the API message */
- M(MACIP_ACL_DUMP, macip_acl_dump);
+ M(MACIP_ACL_DUMP, mp);
mp->acl_index = ntohl (acl_index);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;
{
acl_test_main_t * sm = &acl_test_main;
unformat_input_t * i = vam->input;
- f64 timeout;
vl_api_macip_acl_add_t * mp;
u32 msg_size = sizeof (*mp); /* without the rules */
mp->count = htonl(n_rules);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
W;