diff options
Diffstat (limited to 'src/vat/api_format.c')
-rw-r--r-- | src/vat/api_format.c | 162 |
1 files changed, 0 insertions, 162 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c index a1c5e8ef5d8..2317af3d960 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -81,8 +81,6 @@ #define __plugin_msg_base 0 #include <vlibapi/vat_helper_macros.h> -#include <vnet/format_fns.h> - void vl_api_set_elog_main (elog_main_t * m); int vl_api_set_elog_trace_api_messages (int enable); @@ -3261,8 +3259,6 @@ _(ip_mroute_add_del_reply) \ _(mpls_route_add_del_reply) \ _(mpls_table_add_del_reply) \ _(mpls_ip_bind_unbind_reply) \ -_(bier_route_add_del_reply) \ -_(bier_table_add_del_reply) \ _(sw_interface_set_unnumbered_reply) \ _(set_ip_flow_hash_reply) \ _(sw_interface_ip6_enable_disable_reply) \ @@ -3416,8 +3412,6 @@ _(IP_MROUTE_ADD_DEL_REPLY, ip_mroute_add_del_reply) \ _(MPLS_TABLE_ADD_DEL_REPLY, mpls_table_add_del_reply) \ _(MPLS_ROUTE_ADD_DEL_REPLY, mpls_route_add_del_reply) \ _(MPLS_IP_BIND_UNBIND_REPLY, mpls_ip_bind_unbind_reply) \ -_(BIER_ROUTE_ADD_DEL_REPLY, bier_route_add_del_reply) \ -_(BIER_TABLE_ADD_DEL_REPLY, bier_table_add_del_reply) \ _(MPLS_TUNNEL_ADD_DEL_REPLY, mpls_tunnel_add_del_reply) \ _(SW_INTERFACE_SET_UNNUMBERED_REPLY, \ sw_interface_set_unnumbered_reply) \ @@ -6743,156 +6737,6 @@ api_sr_mpls_policy_del (vat_main_t * vam) } static int -api_bier_table_add_del (vat_main_t * vam) -{ - unformat_input_t *i = vam->input; - vl_api_bier_table_add_del_t *mp; - u8 is_add = 1; - u32 set = 0, sub_domain = 0, hdr_len = 3; - 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) - { - if (unformat (i, "sub-domain %d", &sub_domain)) - ; - else if (unformat (i, "set %d", &set)) - ; - else if (unformat (i, "label %d", &local_label)) - ; - else if (unformat (i, "hdr-len %d", &hdr_len)) - ; - else if (unformat (i, "add")) - is_add = 1; - else if (unformat (i, "del")) - is_add = 0; - else - { - clib_warning ("parse error '%U'", format_unformat_error, i); - return -99; - } - } - - if (MPLS_LABEL_INVALID == local_label) - { - errmsg ("missing label\n"); - return -99; - } - - /* Construct the API message */ - M (BIER_TABLE_ADD_DEL, mp); - - mp->bt_is_add = is_add; - mp->bt_label = ntohl (local_label); - mp->bt_tbl_id.bt_set = set; - mp->bt_tbl_id.bt_sub_domain = sub_domain; - mp->bt_tbl_id.bt_hdr_len_id = hdr_len; - - /* send it... */ - S (mp); - - /* Wait for a reply... */ - W (ret); - - return (ret); -} - -static int -api_bier_route_add_del (vat_main_t * vam) -{ - unformat_input_t *i = vam->input; - vl_api_bier_route_add_del_t *mp; - u8 is_add = 1; - u32 set = 0, sub_domain = 0, hdr_len = 3, bp = 0; - ip4_address_t v4_next_hop_address; - ip6_address_t v6_next_hop_address; - u8 next_hop_set = 0; - u8 next_hop_proto_is_ip4 = 1; - mpls_label_t next_hop_out_label = MPLS_LABEL_INVALID; - int ret; - - /* Parse args required to build the message */ - while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) - { - if (unformat (i, "%U", unformat_ip4_address, &v4_next_hop_address)) - { - next_hop_proto_is_ip4 = 1; - next_hop_set = 1; - } - else if (unformat (i, "%U", unformat_ip6_address, &v6_next_hop_address)) - { - next_hop_proto_is_ip4 = 0; - next_hop_set = 1; - } - if (unformat (i, "sub-domain %d", &sub_domain)) - ; - else if (unformat (i, "set %d", &set)) - ; - else if (unformat (i, "hdr-len %d", &hdr_len)) - ; - else if (unformat (i, "bp %d", &bp)) - ; - else if (unformat (i, "add")) - is_add = 1; - else if (unformat (i, "del")) - is_add = 0; - else if (unformat (i, "out-label %d", &next_hop_out_label)) - ; - else - { - clib_warning ("parse error '%U'", format_unformat_error, i); - return -99; - } - } - - if (!next_hop_set || (MPLS_LABEL_INVALID == next_hop_out_label)) - { - errmsg ("next hop / label set\n"); - return -99; - } - if (0 == bp) - { - errmsg ("bit=position not set\n"); - return -99; - } - - /* Construct the API message */ - M2 (BIER_ROUTE_ADD_DEL, mp, sizeof (vl_api_fib_path_t)); - - mp->br_is_add = is_add; - mp->br_route.br_tbl_id.bt_set = set; - mp->br_route.br_tbl_id.bt_sub_domain = sub_domain; - mp->br_route.br_tbl_id.bt_hdr_len_id = hdr_len; - mp->br_route.br_bp = ntohs (bp); - mp->br_route.br_n_paths = 1; - mp->br_route.br_paths[0].n_labels = 1; - mp->br_route.br_paths[0].label_stack[0].label = ntohl (next_hop_out_label); - mp->br_route.br_paths[0].proto = (next_hop_proto_is_ip4 ? - FIB_API_PATH_NH_PROTO_IP4 : - FIB_API_PATH_NH_PROTO_IP6); - - if (next_hop_proto_is_ip4) - { - clib_memcpy (&mp->br_route.br_paths[0].nh.address.ip4, - &v4_next_hop_address, sizeof (v4_next_hop_address)); - } - else - { - clib_memcpy (&mp->br_route.br_paths[0].nh.address.ip6, - &v6_next_hop_address, sizeof (v6_next_hop_address)); - } - - /* send it... */ - S (mp); - - /* Wait for a reply... */ - W (ret); - - return (ret); -} - -static int api_mpls_tunnel_add_del (vat_main_t * vam) { unformat_input_t *i = vam->input; @@ -14819,12 +14663,6 @@ _(sr_mpls_policy_add, \ "bsid <id> [weight <n>] [spray] next <sid> [next <sid>]") \ _(sr_mpls_policy_del, \ "bsid <id>") \ -_(bier_table_add_del, \ - "<label> <sub-domain> <set> <bsl> [del]") \ -_(bier_route_add_del, \ - "<bit-position> <sub-domain> <set> <bsl> via <addr> [table-id <n>]\n" \ - "[<intfc> | sw_if_index <id>]" \ - "[weight <n>] [del] [multipath]") \ _(sw_interface_set_unnumbered, \ "<intfc> | sw_if_index <id> unnum_if_index <id> [del]") \ _(create_vlan_subif, "<intfc> | sw_if_index <id> vlan <n>") \ |