X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blobdiff_plain;f=src%2Fvat%2Fapi_format.c;h=6e1ebf988b56eeaa83d58d2648b19c9ba01cabb6;hp=218ae95e6151375feb06e55020766abe81572887;hb=5de4fb707;hpb=8dc75c0cc3ac0db13778a0a32f9aa81597b80556 diff --git a/src/vat/api_format.c b/src/vat/api_format.c index 218ae95e615..6e1ebf988b5 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -7474,8 +7474,8 @@ api_tap_create_v2 (vat_main_t * vam) mp->id = ntohl (id); mp->host_namespace_set = host_ns != 0; mp->host_bridge_set = host_bridge != 0; - mp->host_ip4_addr_set = host_ip4_prefix_len != 0; - mp->host_ip6_addr_set = host_ip6_prefix_len != 0; + mp->host_ip4_prefix_set = host_ip4_prefix_len != 0; + mp->host_ip6_prefix_set = host_ip6_prefix_len != 0; mp->rx_ring_sz = ntohs (rx_ring_sz); mp->tx_ring_sz = ntohs (tx_ring_sz); mp->host_mtu_set = host_mtu_set; @@ -7493,9 +7493,9 @@ api_tap_create_v2 (vat_main_t * vam) if (host_bridge) clib_memcpy (mp->host_bridge, host_bridge, vec_len (host_bridge)); if (host_ip4_prefix_len) - clib_memcpy (mp->host_ip4_addr, &host_ip4_addr, 4); + clib_memcpy (mp->host_ip4_prefix.address, &host_ip4_addr, 4); if (host_ip6_prefix_len) - clib_memcpy (mp->host_ip6_addr, &host_ip6_addr, 16); + clib_memcpy (mp->host_ip6_prefix.address, &host_ip6_addr, 16); if (host_ip4_gw_set) clib_memcpy (mp->host_ip4_gw, &host_ip4_gw, 4); if (host_ip6_gw_set) @@ -11859,10 +11859,12 @@ static void vl_api_sw_interface_tap_v2_details_t_handler { vat_main_t *vam = &vat_main; - u8 *ip4 = format (0, "%U/%d", format_ip4_address, mp->host_ip4_addr, - mp->host_ip4_prefix_len); - u8 *ip6 = format (0, "%U/%d", format_ip6_address, mp->host_ip6_addr, - mp->host_ip6_prefix_len); + u8 *ip4 = + format (0, "%U/%d", format_ip4_address, mp->host_ip4_prefix.address, + mp->host_ip4_prefix.len); + u8 *ip6 = + format (0, "%U/%d", format_ip6_address, mp->host_ip6_prefix.address, + mp->host_ip6_prefix.len); print (vam->ofp, "\n%-16s %-12d %-5d %-12d %-12d %-14U %-30s %-20s %-20s %-30s 0x%-08x", @@ -11903,12 +11905,12 @@ static void vl_api_sw_interface_tap_v2_details_t_handler_json vat_json_object_add_string_copy (node, "host_bridge", mp->host_bridge); vat_json_object_add_string_copy (node, "host_ip4_addr", format (0, "%U/%d", format_ip4_address, - mp->host_ip4_addr, - mp->host_ip4_prefix_len)); - vat_json_object_add_string_copy (node, "host_ip6_addr", + mp->host_ip4_prefix.address, + mp->host_ip4_prefix.len)); + vat_json_object_add_string_copy (node, "host_ip6_prefix", format (0, "%U/%d", format_ip6_address, - mp->host_ip6_addr, - mp->host_ip6_prefix_len)); + mp->host_ip6_prefix.address, + mp->host_ip6_prefix.len)); }