|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
32 #include <vnet/devices/tap/tapv2.api_enum.h>
33 #include <vnet/devices/tap/tapv2.api_types.h>
35 #define REPLY_MSG_ID_BASE msg_id_base
56 ap->
id = ntohl (mp->
id);
115 "tap gso api flag mismatch");
117 (
int) TAP_FLAG_CSUM_OFFLOAD),
118 "tap checksum offload api flag mismatch");
120 "tap persist api flag mismatch");
122 "tap attach api flag mismatch");
124 "tap tun api flag mismatch");
126 (
int) TAP_FLAG_GRO_COALESCE),
127 "tap gro coalesce api flag mismatch");
129 "tap packed api flag mismatch");
131 (
int) TAP_FLAG_IN_ORDER),
"tap in-order api flag mismatch");
170 vl_api_tap_delete_v2_reply_t *rmp;
179 rmp->retval = ntohl (
rv);
197 mp->
id = htonl (tap_if->
id);
202 strlen ((
const char *) tap_if->
dev_name)));
238 u32 filter_sw_if_index;
254 if ((filter_sw_if_index == ~0)
262 #include <vnet/devices/tap/tapv2.api.c>
u32 id[default=0xffffffff]
ip6_address_t host_ip6_addr
ip4_address_t host_ip4_gw
#define VALIDATE_SW_IF_INDEX(mp)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
ip4_address_t host_ip4_addr
void ip4_address_decode(const vl_api_ip4_address_t in, ip4_address_t *out)
#define clib_memcpy(d, s, n)
vl_api_ip6_address_with_prefix_t host_ip6_prefix
vl_api_mac_address_t mac_address
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
void tap_create_if(vlib_main_t *vm, tap_create_if_args_t *args)
VLIB_API_INIT_FUNCTION(tapv2_api_hookup)
void ip6_address_decode(const vl_api_ip6_address_t in, ip6_address_t *out)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Dump tap interfaces request.
static clib_error_t * tapv2_api_hookup(vlib_main_t *vm)
static void tap_send_sw_interface_details(vpe_api_main_t *am, vl_api_registration_t *reg, tap_interface_details_t *tap_if, u32 context)
ip6_address_t host_ip6_gw
mac_address_t host_mac_addr
vl_api_tap_flags_t tap_flags
ip6_address_t host_ip6_addr
vl_api_ip6_address_with_prefix_t host_ip6_prefix
vl_api_interface_index_t sw_if_index[default=0xffffffff]
vl_api_ip6_address_t host_ip6_gw
void ip6_address_encode(const ip6_address_t *in, vl_api_ip6_address_t out)
vnet_main_t * vnet_get_main(void)
u16 rx_ring_sz[default=256]
An API client registration, only in vpp/vlib.
static void setup_message_id_table(api_main_t *am)
Reply for tap create reply.
string host_namespace[64]
vl_api_ip4_address_t host_ip4_gw
ip4_address_t host_ip4_addr
int tap_delete_if(vlib_main_t *vm, u32 sw_if_index)
static void vnet_set_sw_interface_tag(vnet_main_t *vnm, u8 *tag, u32 sw_if_index)
vl_api_interface_index_t sw_if_index
vl_api_tap_flags_t tap_flags
#define STATIC_ASSERT(truth,...)
u32 vl_api_string_len(vl_api_string_t *astr)
#define BAD_SW_IF_INDEX_LABEL
#define vec_free(V)
Free vector's memory (no header).
u16 tx_ring_sz[default=256]
void mac_address_encode(const mac_address_t *in, u8 *out)
description fragment has unexpected format
TAP interface details struct.
static void vnet_clear_sw_interface_tag(vnet_main_t *vnm, u32 sw_if_index)
@ TAP_API_FLAG_GRO_COALESCE
#define vec_foreach(var, vec)
Vector iterator.
void ip4_address_encode(const ip4_address_t *in, vl_api_ip4_address_t out)
static void vl_api_tap_create_v2_t_handler(vl_api_tap_create_v2_t *mp)
void mac_address_decode(const u8 *in, mac_address_t *out)
Conversion functions to/from (decode/encode) API types to VPP internal types.
vl_api_mac_address_t host_mac_addr
static void vl_api_tap_delete_v2_t_handler(vl_api_tap_delete_v2_t *mp)
vl_api_ip4_address_with_prefix_t host_ip4_prefix
u8 * vl_api_from_api_to_new_vec(void *mp, vl_api_string_t *astr)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static vlib_main_t * vlib_get_main(void)
#define REPLY_MSG_ID_BASE
Initialize a new tap interface with the given parameters.
string host_namespace[64]
static void vl_api_sw_interface_tap_v2_dump_t_handler(vl_api_sw_interface_tap_v2_dump_t *mp)
vl_api_ip4_address_with_prefix_t host_ip4_prefix
Reply for tap dump request.
@ TAP_API_FLAG_CSUM_OFFLOAD
int tap_dump_ifs(tap_interface_details_t **out_tapids)
vl_api_interface_index_t sw_if_index
vl_api_mac_address_t host_mac_addr
u8 num_rx_queues[default=1]
vl_api_interface_index_t sw_if_index
bool use_random_mac[default=true]
mac_address_t host_mac_addr
vpe_api_main_t vpe_api_main
void * vl_msg_api_alloc(int nbytes)