{
vl_api_cli_inband_t *mp;
unformat_input_t *i = vam->input;
+ int ret;
if (vec_len (i->buffer) == 0)
return -1;
mp->length = htonl (len);
S (mp);
- W2 (print (vam->ofp, "%s", vam->cmd_reply));
+ W2 (ret, print (vam->ofp, "%s", vam->cmd_reply));
+ return ret;
}
static int
vl_api_create_loopback_t *mp;
u8 mac_address[6];
u8 mac_set = 0;
+ int ret;
memset (mac_address, 0, sizeof (mac_address));
clib_memcpy (mp->mac_address, mac_address, sizeof (mac_address));
S (mp);
- W;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_delete_loopback_t *mp;
u32 sw_if_index = ~0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->sw_if_index = ntohl (sw_if_index);
S (mp);
- W;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_want_stats_t *mp;
int enable = -1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->enable_disable = enable;
S (mp);
- W;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_want_interface_events_t *mp;
int enable = -1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vam->interface_event_display = enable;
S (mp);
- W;
+ W (ret);
+ return ret;
}
hash_pair_t *p;
name_sort_t *nses = 0, *ns;
sw_interface_subif_t *sub = NULL;
+ int ret;
/* Toss the old name table */
/* *INDENT-OFF* */
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static int
u32 sw_if_index;
u8 sw_if_index_set = 0;
u8 admin_up = 0, link_up = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply, return the good/bad news... */
- W;
+ W (ret);
+ return ret;
}
static int
vl_api_sw_interface_clear_stats_t *mp;
u32 sw_if_index;
u8 sw_if_index_set = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply, return the good/bad news... */
- W;
+ W (ret);
+ return ret;
}
#if DPDK >0
u8 pipe_set = 0;
u32 profile;
u8 profile_set = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 tb_size = 1000000;
u32 tc_rate[] = { 1250000000, 1250000000, 1250000000, 1250000000 };
u32 tc_period = 10;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
mp->tc_period = ntohl (tc_period);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 tc_set = 0;
u8 queue_set = 0;
u32 entry, tc, queue;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
mp->queue = ntohl (queue);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
#endif
u8 v6_address_set = 0;
ip4_address_t v4address;
ip6_address_t v6address;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply, return good/bad news */
- W;
+ W (ret);
+ return ret;
}
static int
u32 sw_if_index;
u8 sw_if_index_set = 0;
u8 enable = 1;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
static int
u32 sw_if_index, vrf_id = 0;
u8 sw_if_index_set = 0;
u8 is_ipv6 = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
static void vl_api_sw_interface_get_table_reply_t_handler
u32 sw_if_index;
u8 sw_if_index_set = 0;
u8 is_ipv6 = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_ipv6 = is_ipv6;
S (mp);
- W;
+ W (ret);
+ return ret;
}
static int
u32 sw_if_index = 0;
u8 sw_if_index_set = 0;
u8 is_enable = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
static int
u8 sw_if_index_set = 0;
u8 is_enable = 1;
u8 is_ipv6 = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
static int
u32 tx_sw_if_index;
u8 tx_sw_if_index_set = 0;
u8 enable = 1;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
mp->enable = enable;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 bvi = 0;
u32 shg = 0;
u8 enable = 1;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
mp->enable = enable;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_bridge_domain_dump_t *mp;
u32 bd_id = ~0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
}
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 is_add = 1;
u32 flood = 1, forward = 1, learn = 1, uu_flood = 1, arp_term = 0;
u32 mac_age = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
mp->mac_age = (u8) mac_age;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
}
else
{
+ int ret;
+
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
/* Return the good/bad news */
return (vam->retval);
u32 sw_if_index;
u32 feature_bitmap = 0;
u8 sw_if_index_set = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
mp->feature_bitmap = ntohl (feature_bitmap);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 bd_id_set = 0;
u8 is_set = 1;
u32 flags = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
mp->is_set = is_set;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
ip4_address_t v4addr;
ip6_address_t v6addr;
u8 macaddr[6];
+ int ret;
/* Parse args required to build the message */
clib_memcpy (mp->ip_address, &v4addr, sizeof (v4addr));
clib_memcpy (mp->mac_address, macaddr, 6);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
ip6_address_t ip6_address;
u32 ip6_mask_width;
int ip6_address_set = 0;
+ int ret;
memset (mac_address, 0, sizeof (mac_address));
S (mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
static int
u8 *tap_name;
u32 sw_if_index = ~0;
u8 sw_if_index_set = 0;
+ int ret;
memset (mac_address, 0, sizeof (mac_address));
S (mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
static int
vl_api_tap_delete_t *mp;
u32 sw_if_index = ~0;
u8 sw_if_index_set = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
static int
}
else
{
+ int ret;
+
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
/* Return the good/bad news */
ip6_address_t v6_grp_address, v6_src_address;
mfib_itf_flags_t iflags = 0;
mfib_entry_flags_t eflags = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
/* send it... */
S (mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
static int
}
else
{
+ int ret;
+
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
/* Return the good/bad news */
u32 address_length;
u8 address_set = 0;
mpls_label_t local_label = MPLS_LABEL_INVALID;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
static int
u8 is_add = 1;
ip4_address_t lo, hi;
u8 range_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
clib_memcpy (mp->hi_address, &hi, sizeof (mp->hi_address));
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 sw_if_index;
u8 enable = 1;
u8 sw_if_index_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->enable_disable = enable;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
};
ip6_address_t v6_next_hop_address = { {0} };
mpls_label_t next_hop_out_label = MPLS_LABEL_INVALID, *labels = NULL;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
}
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 unnum_sw_index = ~0;
u8 is_add = 1;
u8 sw_if_index_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_add = is_add;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 v6_address_set = 0;
ip4_address_t v4address;
ip6_address_t v6address;
+ int ret;
memset (mac_address, 0, sizeof (mac_address));
S (mp);
/* Wait for a reply, return good/bad news */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 vrf_id = 0;
u8 is_ipv6 = 0;
u8 vrf_id_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_ipv6 = is_ipv6;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 sw_if_index_set = 0;
u32 vlan_id;
u8 vlan_id_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->vlan_id = ntohl (vlan_id);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
#define foreach_create_subif_bit \
u32 tmp;
u16 outer_vlan_id = 0;
u16 inner_vlan_id = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->inner_vlan_id = ntohs (inner_vlan_id);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
ip4_address_t src, dst;
u8 src_set = 0;
u8 dst_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
clib_memcpy (mp->dst_address, &dst, sizeof (mp->dst_address));
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 is_ipv6 = 0;
u8 vrf_id_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
if (unformat (i, "vrf %d", &vrf_id))
mp->is_ipv6 = is_ipv6;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 v6_src_address_set = 0;
ip4_address_t v4srcaddress;
ip6_address_t v6srcaddress;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply, return good/bad news */
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 v6_src_address_set = 0;
ip4_address_t v4srcaddress;
ip6_address_t v6srcaddress;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply, return good/bad news */
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 oui_set = 0;
u32 fib_id;
u8 fib_id_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_add = is_add;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 is_add = 1;
u8 *hostname = 0;
u8 disable_event = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply, return good/bad news */
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 dport = 0;
u8 proto = 0;
u8 reverse = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_ipv6 = is_ipv6;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 sw_if_index;
u8 sw_if_index_set = 0;
u8 enable = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->enable = enable;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 sw_if_index_set = 0;
u8 v6_address_set = 0;
ip6_address_t v6address;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply, return good/bad news */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
u8 is_no = 0;
u32 val_lifetime = 0;
u32 pref_lifetime = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply, return good/bad news */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 lifetime = 0;
u32 initial_count = 0;
u32 initial_interval = 0;
+ int ret;
/* Parse args required to build the message */
S (mp);
/* Wait for a reply, return good/bad news */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 arp_nbr_limit;
u8 limit_set = 0;
u8 is_ipv6 = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_ipv6 = is_ipv6;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 tx_sw_if_index;
u8 tx_sw_if_index_set = 0;
u8 is_add = 1;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
mp->is_add = is_add;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
int has_pot_option = 0;
int has_seqno_option = 0;
int has_analyse_option = 0;
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
mp->trace_enable = has_trace_option;
S (mp);
- W;
-
- return (0);
-
+ W (ret);
+ return ret;
}
api_ioam_disable (vat_main_t * vam)
{
vl_api_ioam_disable_t *mp;
+ int ret;
M (IOAM_DISABLE, mp);
S (mp);
- W;
- return 0;
+ W (ret);
+ return ret;
}
static int
ip6_address_t next_address, tag;
u8 *name = 0;
u8 *policy_name = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vec_free (tags);
S (mp);
- W;
- /* NOTREACHED */
+ W (ret);
+ return ret;
}
static int
int j = 0;
int tunnel_names_length = 1; // Init to 1 to offset the #tunnel_names counter byte
int tun_name_len = 0; // Different naming convention used as confusing these would be "bad" (TM)
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
vec_free (tunnel_name);
S (mp);
- W;
- /* NOTREACHED */
+ W (ret);
+ return ret;
}
static int
ip6_address_t multicast_address;
u8 *policy_name = 0;
int multicast_address_set = 0;
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
vec_free (policy_name);
S (mp);
- W;
- /* NOTREACHED */
+ W (ret);
+ return ret;
}
u8 *mask = 0;
u32 current_data_flag = 0;
int current_data_offset = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vec_free (mask);
S (mp);
- W;
- /* NOTREACHED */
+ W (ret);
+ return ret;
}
uword
u32 match_n_vectors = 0;
u32 action = 0;
u32 metadata = 0;
+ int ret;
/*
* Warning: you have to supply skip_n and match_n
vec_free (match);
S (mp);
- W;
- /* NOTREACHED */
+ W (ret);
+ return ret;
}
static int
int sw_if_index_set;
u32 table_index = ~0;
u8 is_ipv6 = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_ipv6 = is_ipv6;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 ip6_table_index = ~0;
u32 other_table_index = ~0;
u32 is_input = 1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_input = (u8) is_input;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 path_mtu = ~0;
u32 template_interval = ~0;
u8 udp_checksum = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->udp_checksum = udp_checksum;
S (mp);
- W;
- /* NOTREACHED */
+ W (ret);
+ return ret;
}
static int
vl_api_set_ipfix_classify_stream_t *mp;
u32 domain_id = 0;
u32 src_port = UDP_DST_PORT_ipfix;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->src_port = htons ((u16) src_port);
S (mp);
- W;
- /* NOTREACHED */
+ W (ret);
+ return ret;
}
static int
u32 classify_table_index = ~0;
u8 ip_version = 0;
u8 transport_protocol = 255;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->transport_protocol = transport_protocol;
S (mp);
- W;
- /* NOTREACHED */
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_get_node_index_t *mp;
u8 *name = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vec_free (name);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_get_next_index_t *mp;
u8 *node_name = 0, *next_node_name = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vec_free (next_node_name);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_add_node_next_t *mp;
u8 *name = 0;
u8 *next = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vec_free (next);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u64 remote_cookie = 0;
u8 l2_sublayer_present = 0;
vl_api_l2tpv3_create_tunnel_t *mp;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_ipv6 = 1;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u64 new_local_cookie = 0;
u64 new_remote_cookie = 0;
vl_api_l2tpv3_set_tunnel_cookies_t *mp;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->new_remote_cookie = clib_host_to_net_u64 (new_remote_cookie);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 sw_if_index;
u8 sw_if_index_set = 0;
u8 enable_disable = 1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->enable_disable = enable_disable;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_l2tpv3_set_lookup_key_t *mp;
u8 key = ~0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->key = key;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static void vl_api_sw_if_l2tpv3_tunnel_details_t_handler
api_sw_if_l2tpv3_tunnel_dump (vat_main_t * vam)
{
vl_api_sw_if_l2tpv3_tunnel_dump_t *mp;
+ int ret;
/* Get list of l2tpv3-tunnel interfaces */
M (SW_IF_L2TPV3_TUNNEL_DUMP, mp);
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
api_sw_interface_tap_dump (vat_main_t * vam)
{
vl_api_sw_interface_tap_dump_t *mp;
+ int ret;
print (vam->ofp, "\n%-16s %s", "dev_name", "sw_if_index");
/* Get list of tap interfaces */
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static uword unformat_vxlan_decap_next
u32 encap_vrf_id = 0;
u32 decap_next_index = ~0;
u32 vni = 0;
+ int ret;
/* Can't "universally zero init" (={0}) due to GCC bug 53119 */
memset (&src, 0, sizeof src);
mp->is_ipv6 = ipv6_set;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static void vl_api_vxlan_tunnel_details_t_handler
vl_api_vxlan_tunnel_dump_t *mp;
u32 sw_if_index;
u8 sw_if_index_set = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static int
u8 src_set = 0;
u8 dst_set = 0;
u32 outer_fib_id = 0;
+ int ret;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
mp->teb = teb;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static void vl_api_gre_tunnel_details_t_handler
vl_api_gre_tunnel_dump_t *mp;
u32 sw_if_index;
u8 sw_if_index_set = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static int
{
// unformat_input_t * i = vam->input;
vl_api_l2_fib_clear_table_t *mp;
+ int ret;
M (L2_FIB_CLEAR_TABLE, mp);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 sw_if_index;
u8 enable = 1;
u8 sw_if_index_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->enable_disable = enable;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
#define foreach_vtr_op \
u32 push_dot1q = 1;
u32 tag1 = ~0;
u32 tag2 = ~0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->tag2 = ntohl (tag2);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 hwaddr[6];
u8 use_custom_mac = 0;
u8 *tag = 0;
+ int ret;
/* Shut up coverity */
memset (hwaddr, 0, sizeof (hwaddr));
vec_free (tag);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 custom_dev_instance = ~0;
u8 sw_if_index_set = 0;
u32 sw_if_index = (u32) ~ 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
}
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_delete_vhost_user_if_t *mp;
u32 sw_if_index = ~0;
u8 sw_if_index_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->sw_if_index = ntohl (sw_if_index);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static void vl_api_sw_interface_vhost_user_details_t_handler
api_sw_interface_vhost_user_dump (vat_main_t * vam)
{
vl_api_sw_interface_vhost_user_dump_t *mp;
+ int ret;
print (vam->ofp,
"Interface name idx hdr_sz features server regions filename");
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static int
api_show_version (vat_main_t * vam)
{
vl_api_show_version_t *mp;
+ int ret;
M (SHOW_VERSION, mp);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
u8 protocol = ~0;
u32 vni;
u8 vni_set = 0;
+ int ret;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
mp->is_ipv6 = ipv6_set;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static void vl_api_vxlan_gpe_tunnel_details_t_handler
vl_api_vxlan_gpe_tunnel_dump_t *mp;
u32 sw_if_index;
u8 sw_if_index_set = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
u8 *
vl_api_l2_fib_table_dump_t *mp;
u32 bd_id;
u8 bd_id_set = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
vl_api_interface_name_renumber_t *mp;
u32 sw_if_index = ~0;
u32 new_show_dev_instance = ~0;
+ int ret;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
mp->new_show_dev_instance = ntohl (new_show_dev_instance);
S (mp);
- W;
+ W (ret);
+ return ret;
}
static int
ip4_address_t address;
int address_set = 0;
u32 enable_disable = 1;
+ int ret;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
mp->address = address.as_u32;
S (mp);
- W;
+ W (ret);
+ return ret;
}
static int
ip6_address_t address;
int address_set = 0;
u32 enable_disable = 1;
+ int ret;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
clib_memcpy (mp->address, &address, sizeof (ip6_address_t));
S (mp);
- W;
+ W (ret);
+ return ret;
}
static int
u32 ip6_table_index = ~0;
u32 l2_table_index = ~0;
u8 is_add = 1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_add = is_add;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 sw_if_index_set = 0;
u8 ipv4_set = 0;
u8 ipv6_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static int
int ipv6_set = 0;
int is_ipv6;
int i;
+ int ret;
while (unformat_check_input (in) != UNFORMAT_END_OF_INPUT)
{
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static int
vl_api_ipsec_spd_add_del_t *mp;
u32 spd_id = ~0;
u8 is_add = 1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_add = is_add;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 sw_if_index_set = 0;
u32 spd_id = (u32) ~ 0;
u8 is_add = 1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_add = is_add;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 lport_start = 0, lport_stop = (u32) ~ 0;
ip4_address_t laddr4_start, laddr4_stop, raddr4_start, raddr4_stop;
ip6_address_t laddr6_start, laddr6_stop, raddr6_start, raddr6_stop;
+ int ret;
laddr4_start.as_u32 = raddr4_start.as_u32 = 0;
laddr4_stop.as_u32 = raddr4_stop.as_u32 = (u32) ~ 0;
mp->is_add = is_add;
mp->is_ip_any = is_ip_any;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
ip4_address_t tun_dst4;
ip6_address_t tun_src6;
ip6_address_t tun_dst6;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
}
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_ipsec_sa_set_key_t *mp;
u32 sa_id;
u8 *ck = 0, *ik = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
clib_memcpy (mp->integrity_key, ik, mp->integrity_key_length);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_ikev2_profile_add_del_t *mp;
u8 is_add = 1;
u8 *name = 0;
+ int ret;
const char *valid_chars = "a-zA-Z0-9_";
vec_free (name);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 *data = 0;
u32 auth_method = 0;
u8 is_hex = 0;
+ int ret;
const char *valid_chars = "a-zA-Z0-9_";
vec_free (data);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 is_local = 0;
u32 id_type = 0;
ip4_address_t ip4;
+ int ret;
const char *valid_chars = "a-zA-Z0-9_";
vec_free (data);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
ip4_address_t start_addr, end_addr;
const char *valid_chars = "a-zA-Z0-9_";
+ int ret;
start_addr.as_u32 = 0;
end_addr.as_u32 = (u32) ~ 0;
vec_free (name);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_ikev2_set_local_key_t *mp;
u8 *file = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vec_free (file);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
/*
u8 is_translation = 0;
u32 mtu = 0;
u32 ip6_src_len = 128;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
S (mp);
/* Wait for a reply, return good/bad news */
- W;
+ W (ret);
+ return ret;
}
static int
u32 num_m_args = 0;
u32 index;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
S (mp);
/* Wait for a reply, return good/bad news */
- W;
+ W (ret);
+ return ret;
}
static int
u8 is_add = 1;
ip6_address_t ip6_dst;
u32 num_m_args = 0, index, psid = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
S (mp);
/* Wait for a reply, return good/bad news */
- W;
+ W (ret);
+ return ret;
}
static int
api_map_domain_dump (vat_main_t * vam)
{
vl_api_map_domain_dump_t *mp;
+ int ret;
/* Construct the API message */
M (MAP_DOMAIN_DUMP, mp);
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_map_rule_dump_t *mp;
u32 domain_index = ~0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static void vl_api_map_add_domain_reply_t_handler
unformat_input_t *i = vam->input;
u8 *name;
u8 name_set = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
M (GET_FIRST_MSG_ID, mp);
clib_memcpy (mp->name, name, vec_len (name));
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_cop_interface_enable_disable_t *mp;
u32 sw_if_index = ~0;
u8 enable_disable = 1;
+ int ret;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
/* send it... */
S (mp);
/* Wait for the reply */
- W;
+ W (ret);
+ return ret;
}
static int
u32 sw_if_index = ~0;
u8 ip4 = 0, ip6 = 0, default_cop = 0;
u32 fib_id = 0;
+ int ret;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
/* send it... */
S (mp);
/* Wait for the reply */
- W;
+ W (ret);
+ return ret;
}
static int
api_get_node_graph (vat_main_t * vam)
{
vl_api_get_node_graph_t *mp;
+ int ret;
M (GET_NODE_GRAPH, mp);
/* send it... */
S (mp);
/* Wait for the reply */
- W;
+ W (ret);
+ return ret;
}
/* *INDENT-OFF* */
u32 sw_if_index, priority, weight;
u32 data_len = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 is_add = 1;
u8 *locator_set_name = NULL;
u8 locator_set_name_set = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
uword
u32 vni = 0;
u16 key_id = 0;
u8 *key = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
/* *INDENT-OFF* */
ip6_address_t rmt_rloc6, lcl_rloc6;
vl_api_lisp_gpe_locator_t *rmt_locs = 0, *lcl_locs = 0, rloc, *curr_rloc =
0;
+ int ret;
memset (&rloc, 0, sizeof (rloc));
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 ipv6_set = 0;
ip4_address_t ipv4;
ip6_address_t ipv6;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 ipv6_set = 0;
ip4_address_t ipv4;
ip6_address_t ipv6;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_lisp_gpe_enable_disable_t *mp;
u8 is_set = 0;
u8 is_en = 1;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_lisp_rloc_probe_enable_disable_t *mp;
u8 is_set = 0;
u8 is_en = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_lisp_map_register_enable_disable_t *mp;
u8 is_set = 0;
u8 is_en = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_lisp_enable_disable_t *mp;
u8 is_set = 0;
u8 is_en = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
api_show_lisp_map_register_state (vat_main_t * vam)
{
vl_api_show_lisp_map_register_state_t *mp;
+ int ret;
M (SHOW_LISP_MAP_REGISTER_STATE, mp);
S (mp);
/* wait for reply */
- W;
-
- return 0;
+ W (ret);
+ return ret;
}
static int
api_show_lisp_rloc_probe_state (vat_main_t * vam)
{
vl_api_show_lisp_rloc_probe_state_t *mp;
+ int ret;
M (SHOW_LISP_RLOC_PROBE_STATE, mp);
S (mp);
/* wait for reply */
- W;
-
- return 0;
+ W (ret);
+ return ret;
}
static int
api_show_lisp_map_request_mode (vat_main_t * vam)
{
vl_api_show_lisp_map_request_mode_t *mp;
+ int ret;
M (SHOW_LISP_MAP_REQUEST_MODE, mp);
S (mp);
/* wait for reply */
- W;
-
- return 0;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *input = vam->input;
vl_api_lisp_map_request_mode_t *mp;
u8 mode = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* wait for reply */
- W;
-
- /* notreached */
- return 0;
+ W (ret);
+ return ret;
}
/**
vl_api_lisp_pitr_set_locator_set_t *mp;
u8 is_add = 1;
u8 *ls_name = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* wait for reply */
- W;
-
- /* notreached */
- return 0;
+ W (ret);
+ return ret;
}
static int
api_show_lisp_pitr (vat_main_t * vam)
{
vl_api_show_lisp_pitr_t *mp;
+ int ret;
if (!vam->json_output)
{
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
/**
vl_api_lisp_eid_table_add_del_map_t *mp;
u8 is_add = 1, vni_set = 0, vrf_set = 0, bd_index_set = 0;
u32 vni, vrf, bd_index;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* wait for reply */
- W;
-
- /* notreached */
- return 0;
+ W (ret);
+ return ret;
}
uword
ip4_address_t rloc4;
ip6_address_t rloc6;
vl_api_remote_locator_t *rlocs = 0, rloc, *curr_rloc = 0;
+ int ret;
memset (&rloc, 0, sizeof (rloc));
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
/**
u8 reid_type, leid_type;
u32 leid_len = 0, reid_len = 0, len;
u8 is_add = 1;
+ int ret;
leid_type = reid_type = (u8) ~ 0;
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_lisp_gpe_add_del_iface_t *mp;
u8 action_set = 0, is_add = 1, is_l2 = 0, dp_table_set = 0, vni_set = 0;
u32 dp_table = 0, vni = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
/**
u8 *locator_set_name = 0;
u8 locator_set_name_set = 0;
u8 is_add = 1;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 is_index_set = 0, is_name_set = 0;
u8 *ls_name = 0;
u32 ls_index = ~0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
}
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_lisp_locator_set_dump_t *mp;
unformat_input_t *input = vam->input;
u8 filter = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
}
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 mode_set = 0;
unformat_input_t *input = vam->input;
vl_api_lisp_eid_table_map_dump_t *mp;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
S (mp);
}
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
api_lisp_eid_table_vni_dump (vat_main_t * vam)
{
vl_api_lisp_eid_table_vni_dump_t *mp;
+ int ret;
if (!vam->json_output)
{
S (mp);
}
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 eid_type = ~0, eid_set = 0;
u32 prefix_length = ~0, t, vni = 0;
u8 filter = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
}
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_lisp_gpe_fwd_entries_get_t *mp;
u8 vni_set = 0;
u32 vni = ~0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
#define vl_api_lisp_gpe_fwd_entries_get_reply_t_endian vl_noop_handler
vl_api_lisp_adjacencies_get_t *mp;
u8 vni_set = 0;
u32 vni = ~0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
api_lisp_map_server_dump (vat_main_t * vam)
{
vl_api_lisp_map_server_dump_t *mp;
+ int ret;
if (!vam->json_output)
{
S (mp);
}
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
api_lisp_map_resolver_dump (vat_main_t * vam)
{
vl_api_lisp_map_resolver_dump_t *mp;
+ int ret;
if (!vam->json_output)
{
S (mp);
}
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
api_show_lisp_status (vat_main_t * vam)
{
vl_api_show_lisp_status_t *mp;
+ int ret;
if (!vam->json_output)
{
/* send it... */
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_lisp_gpe_fwd_entry_path_dump_t *mp;
unformat_input_t *i = vam->input;
u32 fwd_entry_index = ~0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
S (mp);
}
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
api_lisp_get_map_request_itr_rlocs (vat_main_t * vam)
{
vl_api_lisp_get_map_request_itr_rlocs_t *mp;
+ int ret;
if (!vam->json_output)
{
/* send it... */
S (mp);
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 *host_if_name = 0;
u8 hw_addr[6];
u8 random_hw_addr = 1;
+ int ret;
memset (hw_addr, 0, sizeof (hw_addr));
vec_free (host_if_name);
S (mp);
- W2 (fprintf (vam->ofp, " new sw_if_index = %d ", vam->sw_if_index));
- /* NOTREACHED */
- return 0;
+ W2 (ret, fprintf (vam->ofp, " new sw_if_index = %d ", vam->sw_if_index));
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_af_packet_delete_t *mp;
u8 *host_if_name = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vec_free (host_if_name);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 type = 0;
u8 color_aware = 0;
sse2_qos_pol_action_params_st conform_action, exceed_action, violate_action;
+ int ret;
conform_action.action_type = SSE2_QOS_ACTION_TRANSMIT;
conform_action.dscp = 0;
mp->color_aware = color_aware;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
vl_api_policer_dump_t *mp;
u8 *match_name = 0;
u8 match_name_valid = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
S (mp);
}
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 ip6_table_index = ~0;
u32 l2_table_index = ~0;
u8 is_add = 1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_add = is_add;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_policer_classify_dump_t *mp;
u8 type = POLICER_CLASSIFY_N_TABLES;
+ int ret;
if (unformat (i, "type %U", unformat_policer_classify_table_type, &type))
;
S (mp);
}
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 random_hw_addr = 1;
u8 is_pipe = 0;
u8 is_master = 0;
+ int ret;
memset (hw_addr, 0, sizeof (hw_addr));
vec_free (if_name);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_netmap_delete_t *mp;
u8 *if_name = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vec_free (if_name);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static void vl_api_mpls_tunnel_details_t_handler
{
vl_api_mpls_tunnel_dump_t *mp;
i32 index = -1;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (vam->input) != UNFORMAT_END_OF_INPUT)
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
#define vl_api_mpls_fib_details_t_endian vl_noop_handler
api_mpls_fib_dump (vat_main_t * vam)
{
vl_api_mpls_fib_dump_t *mp;
+ int ret;
M (MPLS_FIB_DUMP, mp);
S (mp);
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
#define vl_api_ip_fib_details_t_endian vl_noop_handler
api_ip_fib_dump (vat_main_t * vam)
{
vl_api_ip_fib_dump_t *mp;
+ int ret;
M (IP_FIB_DUMP, mp);
S (mp);
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static void vl_api_ip_neighbor_details_t_handler
vl_api_ip_neighbor_dump_t *mp;
u8 is_ipv6 = 0;
u32 sw_if_index = ~0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
#define vl_api_ip6_fib_details_t_endian vl_noop_handler
api_ip6_fib_dump (vat_main_t * vam)
{
vl_api_ip6_fib_dump_t *mp;
+ int ret;
M (IP6_FIB_DUMP, mp);
S (mp);
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
int
api_classify_table_ids (vat_main_t * vam)
{
vl_api_classify_table_ids_t *mp;
+ int ret;
/* Construct the API message */
M (CLASSIFY_TABLE_IDS, mp);
mp->context = 0;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
int
vl_api_classify_table_by_interface_t *mp;
u32 sw_if_index = ~0;
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "%U", api_unformat_sw_if_index, vam, &sw_if_index))
mp->sw_if_index = ntohl (sw_if_index);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
int
vl_api_classify_table_info_t *mp;
u32 table_id = ~0;
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "table_id %d", &table_id))
mp->table_id = ntohl (table_id);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
int
vl_api_classify_session_dump_t *mp;
u32 table_id = ~0;
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "table_id %d", &table_id))
M (CONTROL_PING, mp);
S (mp);
}
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static void
api_ipfix_exporter_dump (vat_main_t * vam)
{
vl_api_ipfix_exporter_dump_t *mp;
+ int ret;
/* Construct the API message */
M (IPFIX_EXPORTER_DUMP, mp);
mp->context = 0;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
api_ipfix_classify_stream_dump (vat_main_t * vam)
{
vl_api_ipfix_classify_stream_dump_t *mp;
+ int ret;
/* Construct the API message */
M (IPFIX_CLASSIFY_STREAM_DUMP, mp);
mp->context = 0;
S (mp);
- W;
+ W (ret);
+ return ret;
/* NOTREACHED */
return 0;
}
api_ipfix_classify_table_dump (vat_main_t * vam)
{
vl_api_ipfix_classify_table_dump_t *mp;
+ int ret;
if (!vam->json_output)
{
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static void
u32 src_sw_if_index = ~0;
u32 dst_sw_if_index = ~0;
u8 state = 3;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->state = state;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static void
api_sw_interface_span_dump (vat_main_t * vam)
{
vl_api_sw_interface_span_dump_t *mp;
+ int ret;
M (SW_INTERFACE_SPAN_DUMP, mp);
S (mp);
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
int
vl_api_pg_create_interface_t *mp;
u32 if_id = ~0;
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "if_id %d", &if_id))
mp->interface_id = ntohl (if_id);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
int
u32 count = 1;
u8 pcap_file_set = 0;
u8 *pcap_file = 0;
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "if_id %d", &if_id))
vec_free (pcap_file);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
int
u8 enable = 1;
u8 stream_name_set = 0;
u8 *stream_name = 0;
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "stream %s", &stream_name))
vec_free (stream_name);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
int
u32 vrf_id = ~0;
u8 is_add = 1;
u8 is_ipv6 = 0;
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
mp->vrf_id = ntohl (vrf_id);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
int
u32 tcp_out_vrf_id = ~0, udp_out_vrf_id = ~0;
u32 tcp_in_vrf_id = ~0, udp_in_vrf_id = ~0;
u8 is_add = 1;
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
S (mp);
/* Wait for a reply... */
- W;
+ W (ret);
+ return ret;
}
static int
ip4_address_t src_address;
ip4_address_t dst_address;
u8 is_add = 1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_add = is_add;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 protocol = ~0;
u32 port = ~0;
int is_add = 1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->l4_port = htons ((u16) port);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static void vl_api_ipsec_gre_tunnel_details_t_handler
vl_api_ipsec_gre_tunnel_dump_t *mp;
u32 sw_if_index;
u8 sw_if_index_set = 0;
+ int ret;
/* Parse args required to build the message */
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_delete_subif_t *mp;
u32 sw_if_index = ~0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->sw_if_index = ntohl (sw_if_index);
S (mp);
- W;
+ W (ret);
+ return ret;
}
#define foreach_pbb_vtr_op \
u16 vlanid = 0;
u32 sid = ~0;
u32 tmp;
+ int ret;
/* Shut up coverity */
memset (dmac, 0, sizeof (dmac));
mp->i_sid = ntohl (sid);
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u32 ip4_table_index = ~0;
u32 ip6_table_index = ~0;
u8 is_add = 1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->is_add = is_add;
S (mp);
- W;
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
unformat_input_t *i = vam->input;
vl_api_flow_classify_dump_t *mp;
u8 type = FLOW_CLASSIFY_N_TABLES;
+ int ret;
if (unformat (i, "type %U", unformat_flow_classify_table_type, &type))
;
S (mp);
}
/* Wait for a reply... */
- W;
-
- /* NOTREACHED */
- return 0;
+ W (ret);
+ return ret;
}
static int
u8 *feature_name = 0;
u32 sw_if_index = ~0;
u8 enable = 1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vec_free (feature_name);
S (mp);
- W;
+ W (ret);
+ return ret;
}
static int
u32 sw_if_index = ~0;
u8 *tag = 0;
u8 enable = 1;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
vec_free (tag);
S (mp);
- W;
+ W (ret);
+ return ret;
}
static void vl_api_l2_xconnect_details_t_handler
api_l2_xconnect_dump (vat_main_t * vam)
{
vl_api_l2_xconnect_dump_t *mp;
+ int ret;
if (!vam->json_output)
{
M (CONTROL_PING, mp);
S (mp);
}
- W;
+ W (ret);
+ return ret;
}
static int
vl_api_sw_interface_set_mtu_t *mp;
u32 sw_if_index = ~0;
u32 mtu = 0;
+ int ret;
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{
mp->mtu = ntohs ((u16) mtu);
S (mp);
- W;
+ W (ret);
+ return ret;
}