aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/tap.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-12-01 13:34:24 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-12-02 10:11:25 +0000
commit91c6ef7cae2d20ca17a69003a44090614412c63f (patch)
tree28a0ae8030e840a0bc8f65e28f9d5bc2868bf39d /src/vnet/devices/virtio/tap.h
parent9fa1581cc40b656b6e00d77479fc2424cd50a126 (diff)
tap_v2: multiple improvements
- add support for assigning tap interface to the bridge - add support for assigning tap interface host side ip4 and ip6 address - host namespace can be specified as PID (pid:12345) or full path to file - automatically bring linux interface up Change-Id: I1cf7c3cad9a740e430cc1b9c2bb0aad0ba4cc8d8 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/tap.h')
-rw-r--r--src/vnet/devices/virtio/tap.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vnet/devices/virtio/tap.h b/src/vnet/devices/virtio/tap.h
index 58dcb5bda51..0e0f8cb4056 100644
--- a/src/vnet/devices/virtio/tap.h
+++ b/src/vnet/devices/virtio/tap.h
@@ -25,13 +25,20 @@
typedef struct
{
u8 *name;
- u8 *net_ns;
u8 hw_addr_set;
u8 hw_addr[6];
u16 rx_ring_sz;
u16 tx_ring_sz;
+ u8 *host_namespace;
+ u8 *host_bridge;
+ ip4_address_t host_ip4_addr;
+ u32 host_ip4_prefix_len;
+ ip6_address_t host_ip6_addr;
+ u32 host_ip6_prefix_len;
/* return */
u32 sw_if_index;
+ int rv;
+ clib_error_t *error;
} tap_create_if_args_t;
/** TAP interface details struct */
@@ -41,7 +48,7 @@ typedef struct
u8 dev_name[64];
} tap_interface_details_t;
-int tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args);
+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);