diff options
author | Damjan Marion <damarion@cisco.com> | 2017-12-04 20:03:37 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-12-08 19:33:49 +0000 |
commit | 2df39094d20ae60d2e04316f4ec058f81778cf64 (patch) | |
tree | 94db0b2286ac490bf412e6de117faa7e0eda2d00 /src/vnet/devices/tap/tap.h | |
parent | 20ec7165007bd38359ea516fe5389e9e828a9d62 (diff) |
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 <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/tap/tap.h')
-rw-r--r-- | src/vnet/devices/tap/tap.h | 14 |
1 files changed, 11 insertions, 3 deletions
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); |