acl_test_main_t * sm = &acl_test_main;
vl_api_acl_plugin_get_version_t * mp;
u32 msg_size = sizeof(*mp);
- f64 timeout;
+ int ret;
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;
-
- return 0;
+ W (ret);
+ return ret;
}
static int api_macip_acl_interface_get (vat_main_t * vam)
acl_test_main_t * sm = &acl_test_main;
vl_api_acl_plugin_get_version_t * mp;
u32 msg_size = sizeof(*mp);
- f64 timeout;
+ int ret;
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;
-
- return 0;
+ W (ret);
+ return ret;
}
#define vec_validate_acl_rules(v, idx) \
{
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 */
ip4_address_t src_v4address, dst_v4address;
ip6_address_t src_v6address, dst_v6address;
u8 *tag = 0;
+ int ret;
if (!unformat (i, "%d", &acl_index)) {
/* Just assume -1 */
mp->count = htonl(n_rules);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
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;
+ int ret;
if (!unformat (i, "%d", &acl_index)) {
errmsg ("missing acl index\n");
mp->acl_index = ntohl(acl_index);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
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;
+ int ret;
if (!unformat (i, "%d", &acl_index)) {
errmsg ("missing acl index\n");
mp->acl_index = ntohl(acl_index);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
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;
u8 is_input = 0;
u8 is_add = 0;
+ int ret;
// acl_interface_add_del <intfc> | sw_if_index <if-idx> acl_index <acl-idx> [out] [del]
mp->is_input = is_input;
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
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;
u8 is_add = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) {
mp->is_add = is_add;
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
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;
u32 *inacls = 0;
u32 *outacls = 0;
u8 is_input = 0;
+ int ret;
// acl_interface_set_acl_list <intfc> | sw_if_index <if-idx> input [acl-idx list] output [acl-idx list]
clib_memcpy(mp->acls, inacls, vec_len(inacls)*sizeof(u32));
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
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;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) {
mp->sw_if_index = ntohl (sw_if_index);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
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;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) {
mp->acl_index = ntohl (acl_index);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
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;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) {
mp->acl_index = ntohl (acl_index);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
#define vec_validate_macip_acl_rules(v, idx) \
{
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 */
u8 src_mac[6];
u8 *tag = 0;
u8 mac_mask_all_1[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->count = htonl(n_rules);
/* send it... */
- S;
+ S(mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
/*