aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat/api_format.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-01-25 08:39:04 +0100
committerDamjan Marion <dmarion@me.com>2019-01-25 20:51:37 +0000
commit1aaf0e343b25cc72fea4e1f1a23f83e82b6457cb (patch)
treebc96d583d176f810d06125b913a67b5ea9bfd41f /src/vat/api_format.c
parent514e59dfea2b0cfcbb333e324e6246a2f113ab1d (diff)
deprecate tapcli
Change-Id: I82dceaa27a7b0c96de077cf283e4f64aa426f271 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vat/api_format.c')
-rw-r--r--src/vat/api_format.c360
1 files changed, 0 insertions, 360 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index 556b8bc5563..0a429005048 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -1735,108 +1735,6 @@ static void vl_api_bridge_flags_reply_t_handler_json
vam->result_ready = 1;
}
-static void vl_api_tap_connect_reply_t_handler
- (vl_api_tap_connect_reply_t * mp)
-{
- vat_main_t *vam = &vat_main;
- i32 retval = ntohl (mp->retval);
- if (vam->async_mode)
- {
- vam->async_errors += (retval < 0);
- }
- else
- {
- vam->retval = retval;
- vam->sw_if_index = ntohl (mp->sw_if_index);
- vam->result_ready = 1;
- }
-
-}
-
-static void vl_api_tap_connect_reply_t_handler_json
- (vl_api_tap_connect_reply_t * mp)
-{
- vat_main_t *vam = &vat_main;
- vat_json_node_t node;
-
- vat_json_init_object (&node);
- vat_json_object_add_int (&node, "retval", ntohl (mp->retval));
- vat_json_object_add_uint (&node, "sw_if_index", ntohl (mp->sw_if_index));
-
- vat_json_print (vam->ofp, &node);
- vat_json_free (&node);
-
- vam->retval = ntohl (mp->retval);
- vam->result_ready = 1;
-
-}
-
-static void
-vl_api_tap_modify_reply_t_handler (vl_api_tap_modify_reply_t * mp)
-{
- vat_main_t *vam = &vat_main;
- i32 retval = ntohl (mp->retval);
- if (vam->async_mode)
- {
- vam->async_errors += (retval < 0);
- }
- else
- {
- vam->retval = retval;
- vam->sw_if_index = ntohl (mp->sw_if_index);
- vam->result_ready = 1;
- }
-}
-
-static void vl_api_tap_modify_reply_t_handler_json
- (vl_api_tap_modify_reply_t * mp)
-{
- vat_main_t *vam = &vat_main;
- vat_json_node_t node;
-
- vat_json_init_object (&node);
- vat_json_object_add_int (&node, "retval", ntohl (mp->retval));
- vat_json_object_add_uint (&node, "sw_if_index", ntohl (mp->sw_if_index));
-
- vat_json_print (vam->ofp, &node);
- vat_json_free (&node);
-
- vam->retval = ntohl (mp->retval);
- vam->result_ready = 1;
-}
-
-static void
-vl_api_tap_delete_reply_t_handler (vl_api_tap_delete_reply_t * mp)
-{
- vat_main_t *vam = &vat_main;
- i32 retval = ntohl (mp->retval);
- if (vam->async_mode)
- {
- vam->async_errors += (retval < 0);
- }
- else
- {
- vam->retval = retval;
- vam->result_ready = 1;
- }
-}
-
-static void vl_api_tap_delete_reply_t_handler_json
- (vl_api_tap_delete_reply_t * mp)
-{
- vat_main_t *vam = &vat_main;
- vat_json_node_t node;
-
- vat_json_init_object (&node);
- vat_json_object_add_int (&node, "retval", ntohl (mp->retval));
-
- vat_json_print (vam->ofp, &node);
- vat_json_free (&node);
-
- vam->retval = ntohl (mp->retval);
- vam->result_ready = 1;
-}
-
static void
vl_api_tap_create_v2_reply_t_handler (vl_api_tap_create_v2_reply_t * mp)
{
@@ -5461,10 +5359,6 @@ _(L2FIB_FLUSH_INT_REPLY, l2fib_flush_int_reply) \
_(L2FIB_FLUSH_BD_REPLY, l2fib_flush_bd_reply) \
_(L2_FLAGS_REPLY, l2_flags_reply) \
_(BRIDGE_FLAGS_REPLY, bridge_flags_reply) \
-_(TAP_CONNECT_REPLY, tap_connect_reply) \
-_(TAP_MODIFY_REPLY, tap_modify_reply) \
-_(TAP_DELETE_REPLY, tap_delete_reply) \
-_(SW_INTERFACE_TAP_DETAILS, sw_interface_tap_details) \
_(TAP_CREATE_V2_REPLY, tap_create_v2_reply) \
_(TAP_DELETE_V2_REPLY, tap_delete_v2_reply) \
_(SW_INTERFACE_TAP_V2_DETAILS, sw_interface_tap_v2_details) \
@@ -7588,206 +7482,6 @@ api_bd_ip_mac_dump (vat_main_t * vam)
}
static int
-api_tap_connect (vat_main_t * vam)
-{
- unformat_input_t *i = vam->input;
- vl_api_tap_connect_t *mp;
- u8 mac_address[6];
- u8 random_mac = 1;
- u8 name_set = 0;
- u8 *tap_name;
- u8 *tag = 0;
- ip4_address_t ip4_address;
- u32 ip4_mask_width;
- int ip4_address_set = 0;
- ip6_address_t ip6_address;
- u32 ip6_mask_width;
- int ip6_address_set = 0;
- int ret;
-
- clib_memset (mac_address, 0, sizeof (mac_address));
-
- /* Parse args required to build the message */
- while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
- {
- if (unformat (i, "mac %U", unformat_ethernet_address, mac_address))
- {
- random_mac = 0;
- }
- else if (unformat (i, "random-mac"))
- random_mac = 1;
- else if (unformat (i, "tapname %s", &tap_name))
- name_set = 1;
- else if (unformat (i, "tag %s", &tag))
- ;
- else if (unformat (i, "address %U/%d",
- unformat_ip4_address, &ip4_address, &ip4_mask_width))
- ip4_address_set = 1;
- else if (unformat (i, "address %U/%d",
- unformat_ip6_address, &ip6_address, &ip6_mask_width))
- ip6_address_set = 1;
- else
- break;
- }
-
- if (name_set == 0)
- {
- errmsg ("missing tap name");
- return -99;
- }
- if (vec_len (tap_name) > 63)
- {
- errmsg ("tap name too long");
- return -99;
- }
- vec_add1 (tap_name, 0);
-
- if (vec_len (tag) > 63)
- {
- errmsg ("tag too long");
- return -99;
- }
-
- /* Construct the API message */
- M (TAP_CONNECT, mp);
-
- mp->use_random_mac = random_mac;
- clib_memcpy (mp->mac_address, mac_address, 6);
- clib_memcpy (mp->tap_name, tap_name, vec_len (tap_name));
- if (tag)
- clib_memcpy (mp->tag, tag, vec_len (tag));
-
- if (ip4_address_set)
- {
- mp->ip4_address_set = 1;
- clib_memcpy (mp->ip4_address, &ip4_address, sizeof (mp->ip4_address));
- mp->ip4_mask_width = ip4_mask_width;
- }
- if (ip6_address_set)
- {
- mp->ip6_address_set = 1;
- clib_memcpy (mp->ip6_address, &ip6_address, sizeof (mp->ip6_address));
- mp->ip6_mask_width = ip6_mask_width;
- }
-
- vec_free (tap_name);
- vec_free (tag);
-
- /* send it... */
- S (mp);
-
- /* Wait for a reply... */
- W (ret);
- return ret;
-}
-
-static int
-api_tap_modify (vat_main_t * vam)
-{
- unformat_input_t *i = vam->input;
- vl_api_tap_modify_t *mp;
- u8 mac_address[6];
- u8 random_mac = 1;
- u8 name_set = 0;
- u8 *tap_name;
- u32 sw_if_index = ~0;
- u8 sw_if_index_set = 0;
- int ret;
-
- clib_memset (mac_address, 0, sizeof (mac_address));
-
- /* Parse args required to build the message */
- while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
- {
- if (unformat (i, "%U", api_unformat_sw_if_index, vam, &sw_if_index))
- sw_if_index_set = 1;
- else if (unformat (i, "sw_if_index %d", &sw_if_index))
- sw_if_index_set = 1;
- else if (unformat (i, "mac %U", unformat_ethernet_address, mac_address))
- {
- random_mac = 0;
- }
- else if (unformat (i, "random-mac"))
- random_mac = 1;
- else if (unformat (i, "tapname %s", &tap_name))
- name_set = 1;
- else
- break;
- }
-
- if (sw_if_index_set == 0)
- {
- errmsg ("missing vpp interface name");
- return -99;
- }
- if (name_set == 0)
- {
- errmsg ("missing tap name");
- return -99;
- }
- if (vec_len (tap_name) > 63)
- {
- errmsg ("tap name too long");
- }
- vec_add1 (tap_name, 0);
-
- /* Construct the API message */
- M (TAP_MODIFY, mp);
-
- mp->use_random_mac = random_mac;
- mp->sw_if_index = ntohl (sw_if_index);
- clib_memcpy (mp->mac_address, mac_address, 6);
- clib_memcpy (mp->tap_name, tap_name, vec_len (tap_name));
- vec_free (tap_name);
-
- /* send it... */
- S (mp);
-
- /* Wait for a reply... */
- W (ret);
- return ret;
-}
-
-static int
-api_tap_delete (vat_main_t * vam)
-{
- unformat_input_t *i = vam->input;
- 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)
- {
- if (unformat (i, "%U", api_unformat_sw_if_index, vam, &sw_if_index))
- sw_if_index_set = 1;
- else if (unformat (i, "sw_if_index %d", &sw_if_index))
- sw_if_index_set = 1;
- else
- break;
- }
-
- if (sw_if_index_set == 0)
- {
- errmsg ("missing vpp interface name");
- return -99;
- }
-
- /* Construct the API message */
- M (TAP_DELETE, mp);
-
- mp->sw_if_index = ntohl (sw_if_index);
-
- /* send it... */
- S (mp);
-
- /* Wait for a reply... */
- W (ret);
- return ret;
-}
-
-static int
api_tap_create_v2 (vat_main_t * vam)
{
unformat_input_t *i = vam->input;
@@ -12874,53 +12568,6 @@ api_sw_if_l2tpv3_tunnel_dump (vat_main_t * vam)
}
-static void vl_api_sw_interface_tap_details_t_handler
- (vl_api_sw_interface_tap_details_t * mp)
-{
- vat_main_t *vam = &vat_main;
-
- print (vam->ofp, "%-16s %d",
- mp->dev_name, clib_net_to_host_u32 (mp->sw_if_index));
-}
-
-static void vl_api_sw_interface_tap_details_t_handler_json
- (vl_api_sw_interface_tap_details_t * mp)
-{
- vat_main_t *vam = &vat_main;
- vat_json_node_t *node = NULL;
-
- if (VAT_JSON_ARRAY != vam->json_tree.type)
- {
- ASSERT (VAT_JSON_NONE == vam->json_tree.type);
- vat_json_init_array (&vam->json_tree);
- }
- node = vat_json_array_add (&vam->json_tree);
-
- vat_json_init_object (node);
- vat_json_object_add_uint (node, "sw_if_index", ntohl (mp->sw_if_index));
- vat_json_object_add_string_copy (node, "dev_name", mp->dev_name);
-}
-
-static int
-api_sw_interface_tap_dump (vat_main_t * vam)
-{
- vl_api_sw_interface_tap_dump_t *mp;
- vl_api_control_ping_t *mp_ping;
- int ret;
-
- print (vam->ofp, "\n%-16s %s", "dev_name", "sw_if_index");
- /* Get list of tap interfaces */
- M (SW_INTERFACE_TAP_DUMP, mp);
- S (mp);
-
- /* Use a control ping for synchronization */
- MPING (CONTROL_PING, mp_ping);
- S (mp_ping);
-
- W (ret);
- return ret;
-}
-
static void vl_api_sw_interface_tap_v2_details_t_handler
(vl_api_sw_interface_tap_v2_details_t * mp)
{
@@ -23460,13 +23107,6 @@ _(l2_flags, \
"sw_if <intfc> | sw_if_index <id> [learn] [forward] [uu-flood] [flood] [arp-term] [disable]\n") \
_(bridge_flags, \
"bd_id <bridge-domain-id> [learn] [forward] [uu-flood] [flood] [arp-term] [disable]\n") \
-_(tap_connect, \
- "tapname <name> mac <mac-addr> | random-mac [tag <string>]") \
-_(tap_modify, \
- "<vpp-if-name> | sw_if_index <id> tapname <name> mac <mac-addr> | random-mac") \
-_(tap_delete, \
- "<vpp-if-name> | sw_if_index <id>") \
-_(sw_interface_tap_dump, "") \
_(tap_create_v2, \
"id <num> [hw-addr <mac-addr>] [host-ns <name>] [rx-ring-size <num> [tx-ring-size <num>]") \
_(tap_delete_v2, \