From 2df39094d20ae60d2e04316f4ec058f81778cf64 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Mon, 4 Dec 2017 20:03:37 +0100 Subject: tapv2: multiple improvements - change interface naming scheme - rework netlink code - add option to set link address, namespace Change-Id: Icf667babb3077a07617b0b87c45c957e345cb4d1 Signed-off-by: Damjan Marion --- src/vnet/devices/tap/tap.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/vnet/devices/tap/tap.h') diff --git a/src/vnet/devices/tap/tap.h b/src/vnet/devices/tap/tap.h index 0e0f8cb4056..7d07ffb4e82 100644 --- a/src/vnet/devices/tap/tap.h +++ b/src/vnet/devices/tap/tap.h @@ -24,12 +24,14 @@ typedef struct { - u8 *name; - u8 hw_addr_set; - u8 hw_addr[6]; + u32 id; + u8 mac_addr_set; + u8 mac_addr[6]; u16 rx_ring_sz; u16 tx_ring_sz; u8 *host_namespace; + u8 *host_if_name; + u8 host_mac_addr[6]; u8 *host_bridge; ip4_address_t host_ip4_addr; u32 host_ip4_prefix_len; @@ -48,6 +50,12 @@ typedef struct u8 dev_name[64]; } tap_interface_details_t; +typedef struct +{ + u32 last_used_interface_id; + uword *dev_instance_by_interface_id; +} tap_main_t; + void tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args); int tap_delete_if (vlib_main_t * vm, u32 sw_if_index); int tap_dump_ifs (tap_interface_details_t ** out_tapids); -- cgit 1.2.3-korg