FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
tuntap.h
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * tuntap.h - kernel stack (reverse) punt/inject path
4  *
5  * Copyright (c) 2009 Cisco and/or its affiliates.
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at:
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *------------------------------------------------------------------
18  */
19 /**
20  * @file
21  * @brief Call from VLIB_INIT_FUNCTION to set the Linux kernel inject node name.
22  */
24 
25 /** arguments structure for vnet_tap_connect, vnet_tap_connect_renumber, etc.
26  */
27 
28 typedef struct
29 {
30  /** Interface name */
32  /** Mac address */
34  /** Please set the indicated ip4 address/mask on the interface */
36  /** Please set the indicated ip4 address/mask on the interface */
38  /** Renumber the (existing) interface */
40  /** (optional) ip4 address to set */
42  /** (optional) ip4 mask width to set */
44  /** (optional) ip6 address to set */
45  ip6_address_t *ip6_address;
46  /** (optional) ip6 mask width to set */
48  /** Output parameter: result sw_if_index */
50  /** Custom device instance */
52  /** original sw_if_index (renumber) */
55 
56 /** Connect a tap interface */
58 
59 /** Connect / renumber a tap interface */
62 
63 /** Modify a tap interface */
65 
66 /** delete a tap interface */
68 
69 
70 
71 /*
72  * fd.io coding-style-patch-verification: ON
73  *
74  * Local Variables:
75  * eval: (c-set-style "gnu")
76  * End:
77  */
vnet_tap_delete
int vnet_tap_delete(vlib_main_t *vm, u32 sw_if_index)
delete a tap interface
vnet_tap_connect_args_t::ip6_mask_width
u32 ip6_mask_width
(optional) ip6 mask width to set
Definition: tuntap.h:47
name
string name[64]
Definition: fib.api:25
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
vnet_tap_connect_args_t::ip6_address_set
u8 ip6_address_set
Please set the indicated ip4 address/mask on the interface.
Definition: tuntap.h:37
vnet_tap_connect_args_t::custom_dev_instance
u32 custom_dev_instance
Custom device instance.
Definition: tuntap.h:51
vnet_tap_connect_args_t::intfc_name
u8 * intfc_name
Interface name.
Definition: tuntap.h:31
vnet_tap_connect_args_t::ip4_mask_width
u32 ip4_mask_width
(optional) ip4 mask width to set
Definition: tuntap.h:43
register_tuntap_inject_node_name
void register_tuntap_inject_node_name(char *name)
vnet_tap_connect_args_t::sw_if_indexp
u32 * sw_if_indexp
Output parameter: result sw_if_index.
Definition: tuntap.h:49
vnet_tap_connect_args_t
arguments structure for vnet_tap_connect, vnet_tap_connect_renumber, etc.
Definition: tuntap.h:28
ip4_address_t
Definition: ip4_packet.h:50
vnet_tap_connect_args_t::renumber
u8 renumber
Renumber the (existing) interface.
Definition: tuntap.h:39
vnet_tap_connect_renumber
int vnet_tap_connect_renumber(vlib_main_t *vm, vnet_tap_connect_args_t *args)
Connect / renumber a tap interface.
vnet_tap_connect_args_t::ip4_address_set
u8 ip4_address_set
Please set the indicated ip4 address/mask on the interface.
Definition: tuntap.h:35
u32
unsigned int u32
Definition: types.h:88
vnet_tap_modify
int vnet_tap_modify(vlib_main_t *vm, vnet_tap_connect_args_t *args)
Modify a tap interface.
vnet_tap_connect_args_t::hwaddr_arg
u8 * hwaddr_arg
Mac address.
Definition: tuntap.h:33
vnet_tap_connect
int vnet_tap_connect(vlib_main_t *vm, vnet_tap_connect_args_t *args)
Connect a tap interface.
vlib_main_t
Definition: main.h:102
u8
unsigned char u8
Definition: types.h:56
vnet_tap_connect_args_t::ip6_address
ip6_address_t * ip6_address
(optional) ip6 address to set
Definition: tuntap.h:45
vnet_tap_connect_args_t::ip4_address
ip4_address_t * ip4_address
(optional) ip4 address to set
Definition: tuntap.h:41
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
vnet_tap_connect_args_t::orig_sw_if_index
u32 orig_sw_if_index
original sw_if_index (renumber)
Definition: tuntap.h:53