From ce74c6f016dafd234431bbf561632b107fc11d06 Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Tue, 22 Jun 2021 14:10:41 +0000 Subject: misc: punt: api cleanup Use autogenerated code. Does not change API definitions. Type: improvement Signed-off-by: Filip Tehlar Change-Id: I13dae61ddb7150c7fe9a7fd0eae73055ff3f2816 --- src/vat/api_format.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'src/vat') diff --git a/src/vat/api_format.c b/src/vat/api_format.c index f5c8291dd66..c296a5b58a0 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -1981,7 +1981,6 @@ _(ip_source_and_port_range_check_add_del_reply) \ _(ip_source_and_port_range_check_interface_add_del_reply)\ _(delete_subif_reply) \ _(l2_interface_pbb_tag_rewrite_reply) \ -_(set_punt_reply) \ _(sw_interface_tag_add_del_reply) \ _(sw_interface_add_del_mac_address_reply) \ _(hw_interface_set_mtu_reply) \ @@ -2116,7 +2115,6 @@ _(IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL_REPLY, \ ip_source_and_port_range_check_interface_add_del_reply) \ _(DELETE_SUBIF_REPLY, delete_subif_reply) \ _(L2_INTERFACE_PBB_TAG_REWRITE_REPLY, l2_interface_pbb_tag_rewrite_reply) \ -_(SET_PUNT_REPLY, set_punt_reply) \ _(IP_TABLE_DETAILS, ip_table_details) \ _(IP_ROUTE_DETAILS, ip_route_details) \ _(SW_INTERFACE_TAG_ADD_DEL_REPLY, sw_interface_tag_add_del_reply) \ @@ -8332,47 +8330,6 @@ api_ip_source_and_port_range_check_interface_add_del (vat_main_t * vam) return ret; } -static int -api_set_punt (vat_main_t * vam) -{ - unformat_input_t *i = vam->input; - vl_api_address_family_t af; - vl_api_set_punt_t *mp; - u32 protocol = ~0; - u32 port = ~0; - int is_add = 1; - int ret; - - while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) - { - if (unformat (i, "%U", unformat_vl_api_address_family, &af)) - ; - else if (unformat (i, "protocol %d", &protocol)) - ; - else if (unformat (i, "port %d", &port)) - ; - else if (unformat (i, "del")) - is_add = 0; - else - { - clib_warning ("parse error '%U'", format_unformat_error, i); - return -99; - } - } - - M (SET_PUNT, mp); - - mp->is_add = (u8) is_add; - mp->punt.type = PUNT_API_TYPE_L4; - mp->punt.punt.l4.af = af; - mp->punt.punt.l4.protocol = (u8) protocol; - mp->punt.punt.l4.port = htons ((u16) port); - - S (mp); - W (ret); - return ret; -} - static int api_delete_subif (vat_main_t * vam) { @@ -9806,7 +9763,6 @@ _(l2_interface_pbb_tag_rewrite, \ " | sw_if_index \n" \ "[disable | push | pop | translate_pbb_stag ] \n" \ "dmac smac sid [vlanid ]") \ -_(set_punt, "protocol [ip ] [port ] [del]") \ _(ip_table_dump, "") \ _(ip_route_dump, "table-id [ip4|ip6]") \ _(ip_mtable_dump, "") \ -- cgit 1.2.3-korg