+ MIN (ARRAY_LEN (tapid->dev_name) - 1,
+ strlen ((const char *) hi->name)));
+ tapid->rx_ring_sz = vif->rx_ring_sz;
+ tapid->tx_ring_sz = vif->tx_ring_sz;
+ clib_memcpy(tapid->host_mac_addr, vif->host_mac_addr, 6);
+ if (vif->host_if_name)
+ {
+ clib_memcpy(tapid->host_if_name, vif->host_if_name,
+ MIN (ARRAY_LEN (tapid->host_if_name) - 1,
+ strlen ((const char *) vif->host_if_name)));
+ }
+ if (vif->net_ns)
+ {
+ clib_memcpy(tapid->host_namespace, vif->net_ns,
+ MIN (ARRAY_LEN (tapid->host_namespace) - 1,
+ strlen ((const char *) vif->net_ns)));
+ }
+ if (vif->host_bridge)
+ {
+ clib_memcpy(tapid->host_bridge, vif->host_bridge,
+ MIN (ARRAY_LEN (tapid->host_bridge) - 1,
+ strlen ((const char *) vif->host_bridge)));
+ }
+ if (vif->host_ip4_prefix_len)
+ clib_memcpy(tapid->host_ip4_addr, &vif->host_ip4_addr, 4);
+ tapid->host_ip4_prefix_len = vif->host_ip4_prefix_len;
+ if (vif->host_ip6_prefix_len)
+ clib_memcpy(tapid->host_ip6_addr, &vif->host_ip6_addr, 16);
+ tapid->host_ip6_prefix_len = vif->host_ip6_prefix_len;