FD.io VPP  v16.06
Vector Packet Processing
tuntap.c File Reference
+ Include dependency graph for tuntap.c:

Go to the source code of this file.

Data Structures

struct  subif_address_t
 
struct  tuntap_main_t
 
struct  in6_ifreq
 

Enumerations

enum  {
  TUNTAP_RX_NEXT_IP4_INPUT, TUNTAP_RX_NEXT_IP6_INPUT, TUNTAP_RX_NEXT_ETHERNET_INPUT, TUNTAP_RX_NEXT_DROP,
  TUNTAP_RX_N_NEXT
}
 

Functions

static void tuntap_punt_frame (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static void tuntap_nopunt_frame (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword tuntap_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword tuntap_rx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_ttuntap_read_ready (unix_file_t *uf)
 
static clib_error_ttuntap_exit (vlib_main_t *vm)
 
static clib_error_ttuntap_config (vlib_main_t *vm, unformat_input_t *input)
 
void tuntap_ip4_add_del_interface_address (ip4_main_t *im, uword opaque, u32 sw_if_index, ip4_address_t *address, u32 address_length, u32 if_address_index, u32 is_delete)
 
void tuntap_ip6_add_del_interface_address (ip6_main_t *im, uword opaque, u32 sw_if_index, ip6_address_t *address, u32 address_length, u32 if_address_index, u32 is_delete)
 
 VNET_HW_INTERFACE_CLASS (tuntap_interface_class, static)
 
static u8format_tuntap_interface_name (u8 *s, va_list *args)
 
static uword tuntap_intfc_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_DEVICE_CLASS (tuntap_dev_class, static)
 
static clib_error_ttuntap_init (vlib_main_t *vm)
 

Variables

static vnet_device_class_t tuntap_dev_class
 
static vnet_hw_interface_class_t tuntap_interface_class
 
static tuntap_main_t tuntap_main
 
vlib_node_registration_t tuntap_tx_node
 (constructor) VLIB_REGISTER_NODE (tuntap_tx_node) More...
 
static char * tuntap_rx_error_strings []
 
vlib_node_registration_t tuntap_rx_node
 (constructor) VLIB_REGISTER_NODE (tuntap_rx_node) More...
 

Enumeration Type Documentation

anonymous enum
Enumerator
TUNTAP_RX_NEXT_IP4_INPUT 
TUNTAP_RX_NEXT_IP6_INPUT 
TUNTAP_RX_NEXT_ETHERNET_INPUT 
TUNTAP_RX_NEXT_DROP 
TUNTAP_RX_N_NEXT 

Definition at line 187 of file tuntap.c.

Function Documentation

static u8* format_tuntap_interface_name ( u8 s,
va_list *  args 
)
static

Definition at line 843 of file tuntap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* tuntap_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 439 of file tuntap.c.

+ Here is the call graph for this function:

static clib_error_t* tuntap_exit ( vlib_main_t vm)
static

Definition at line 400 of file tuntap.c.

static clib_error_t* tuntap_init ( vlib_main_t vm)
static

Definition at line 875 of file tuntap.c.

+ Here is the call graph for this function:

static uword tuntap_intfc_tx ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 852 of file tuntap.c.

+ Here is the call graph for this function:

void tuntap_ip4_add_del_interface_address ( ip4_main_t im,
uword  opaque,
u32  sw_if_index,
ip4_address_t address,
u32  address_length,
u32  if_address_index,
u32  is_delete 
)

Definition at line 647 of file tuntap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void tuntap_ip6_add_del_interface_address ( ip6_main_t im,
uword  opaque,
u32  sw_if_index,
ip6_address_t address,
u32  address_length,
u32  if_address_index,
u32  is_delete 
)

Definition at line 737 of file tuntap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void tuntap_nopunt_frame ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 829 of file tuntap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void tuntap_punt_frame ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 820 of file tuntap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* tuntap_read_ready ( unix_file_t uf)
static

Definition at line 387 of file tuntap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword tuntap_rx ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 196 of file tuntap.c.

+ Here is the call graph for this function:

static uword tuntap_tx ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 122 of file tuntap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_DEVICE_CLASS ( tuntap_dev_class  ,
static   
)

+ Here is the caller graph for this function:

VNET_HW_INTERFACE_CLASS ( tuntap_interface_class  ,
static   
)

+ Here is the caller graph for this function:

Variable Documentation

vnet_device_class_t tuntap_dev_class
static

Definition at line 42 of file tuntap.c.

vnet_hw_interface_class_t tuntap_interface_class
static

Definition at line 43 of file tuntap.c.

tuntap_main_t tuntap_main
static
Initial value:
= {
.tun_name = "vnet",
.mtu_bytes = 4096 + 256,
}

Definition at line 108 of file tuntap.c.

char* tuntap_rx_error_strings[]
static
Initial value:
= {
"unknown packet type",
}

Definition at line 364 of file tuntap.c.

vlib_node_registration_t tuntap_rx_node
Initial value:
= {
.function = tuntap_rx,
.name = "tuntap-rx",
.state = VLIB_NODE_STATE_INTERRUPT,
.vector_size = 4,
.n_errors = 1,
.error_strings = tuntap_rx_error_strings,
.n_next_nodes = TUNTAP_RX_N_NEXT,
.next_nodes = {
[TUNTAP_RX_NEXT_IP4_INPUT] = "ip4-input-no-checksum",
[TUNTAP_RX_NEXT_IP6_INPUT] = "ip6-input",
[TUNTAP_RX_NEXT_DROP] = "error-drop",
[TUNTAP_RX_NEXT_ETHERNET_INPUT] = "ethernet-input",
},
}
static uword tuntap_rx(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: tuntap.c:196
static char * tuntap_rx_error_strings[]
Definition: tuntap.c:364

(constructor) VLIB_REGISTER_NODE (tuntap_rx_node)

Definition at line 368 of file tuntap.c.

vlib_node_registration_t tuntap_tx_node
Initial value:
= {
.function = tuntap_tx,
.name = "tuntap-tx",
.vector_size = 4,
}
static uword tuntap_tx(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: tuntap.c:122

(constructor) VLIB_REGISTER_NODE (tuntap_tx_node)

Definition at line 180 of file tuntap.c.