33 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 41 #define foreach_udp_api_msg \ 42 _(UDP_ENCAP_ADD_DEL, udp_encap_add_del) \ 43 _(UDP_ENCAP_DUMP, udp_encap_dump) 53 memset (mp, 0,
sizeof (*mp));
54 mp->_vl_msg_id = ntohs (VL_API_UDP_ENCAP_DETAILS);
104 vl_api_udp_encap_add_del_reply_t *rmp;
105 ip46_address_t src_ip, dst_ip;
106 u32 fib_index, table_id, ue_id;
110 ue_id = ntohl(mp->
id);
118 rv = VNET_API_ERROR_NO_SUCH_TABLE;
150 #define vl_msg_name_crc_list 151 #include <vnet/udp/udp.api.h> 152 #undef vl_msg_name_crc_list 157 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 158 foreach_vl_msg_name_crc_udp;
168 vl_msg_api_set_handlers(VL_API_##N, #n, \ 169 vl_api_##n##_t_handler, \ 171 vl_api_##n##_t_endian, \ 172 vl_api_##n##_t_print, \ 173 sizeof(vl_api_##n##_t), 1); fib_protocol_t ue_ip_proto
the protocol of the IP header imposed
#define foreach_udp_api_msg
The UDP encap represenation.
udp_encap_t * udp_encap_pool
Pool of encaps.
static clib_error_t * udp_api_hookup(vlib_main_t *vm)
VLIB_API_INIT_FUNCTION(udp_api_hookup)
static void vl_api_udp_encap_dump_t_handler(vl_api_udp_encap_dump_t *mp, vlib_main_t *vm)
struct udp_encap_t_::@293::@295 ip6
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
u32 ue_id
The ID given by the user/client.
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
void udp_encap_unlock(u32 id)
void * vl_msg_api_alloc(int nbytes)
index_t udp_encap_add_and_lock(u32 id, fib_protocol_t proto, index_t fib_index, const ip46_address_t *src_ip, const ip46_address_t *dst_ip, u16 src_port, u16 dst_port, udp_encap_fixup_flags_t flags)
API main structure, used by both vpp and binary API clients.
index_t ue_fib_index
The FIB index in which the encap destination resides.
u32 ft_table_id
Table ID (hash key) for this FIB.
#define clib_memcpy(a, b, c)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
static void setup_message_id_table(api_main_t *am)
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
Add / del table request A table can be added multiple times, but need be deleted only once...
struct udp_encap_t_::@293::@294 ip4
union udp_encap_t_::@293 ue_hdrs
The headers to paint, in packet painting order.
static void vl_api_udp_encap_add_del_t_handler(vl_api_udp_encap_add_del_t *mp, vlib_main_t *vm)
fib_table_t * fib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
static void send_udp_encap_details(const udp_encap_t *ue, unix_shared_memory_queue_t *q, u32 context)
A protocol Independent FIB table.
struct _unix_shared_memory_queue unix_shared_memory_queue_t