34 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 42 #define foreach_udp_api_msg \ 43 _(UDP_ENCAP_DEL, udp_encap_del) \ 44 _(UDP_ENCAP_ADD, udp_encap_add) \ 45 _(UDP_ENCAP_DUMP, udp_encap_dump) 55 mp->_vl_msg_id = ntohs (VL_API_UDP_ENCAP_DETAILS);
118 u32 fib_index, table_id;
125 table_id = ntohl (mp->
udp_encap.table_id);
134 rv = VNET_API_ERROR_NO_SUCH_TABLE;
148 rmp->
id = ntohl (uei);
157 vl_api_udp_encap_del_reply_t *rmp;
165 #define vl_msg_name_crc_list 166 #include <vnet/udp/udp.api.h> 167 #undef vl_msg_name_crc_list 172 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 173 foreach_vl_msg_name_crc_udp;
183 vl_msg_api_set_handlers(VL_API_##N, #n, \ 184 vl_api_##n##_t_handler, \ 186 vl_api_##n##_t_endian, \ 187 vl_api_##n##_t_print, \ 188 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 representation.
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)
index_t udp_encap_add_and_lock(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)
#define REPLY_MACRO2(t, body)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static void vl_api_udp_encap_add_t_handler(vl_api_udp_encap_add_t *mp, vlib_main_t *vm)
void * vl_msg_api_alloc(int nbytes)
union udp_encap_t_::@357 ue_hdrs
The headers to paint, in packet painting order.
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
#define clib_memcpy(d, s, n)
static void send_udp_encap_details(const udp_encap_t *ue, vl_api_registration_t *reg, u32 context)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
struct udp_encap_t_::@357::@358 ip4
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
vl_api_udp_encap_t udp_encap
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
fib_protocol_t fib_proto_from_ip46(ip46_type_t iproto)
Convert from ip46_type to fib_protocol.
static void vl_api_udp_encap_del_t_handler(vl_api_udp_encap_del_t *mp, vlib_main_t *vm)
API main structure, used by both vpp and binary API clients.
An API client registration, only in vpp/vlib.
index_t ue_fib_index
The FIB index in which the encap destination resides.
UDP encap details during dump.
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
static void setup_message_id_table(api_main_t *am)
struct udp_encap_t_::@357::@359 ip6
u32 fib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
void udp_encap_unlock(index_t uei)
vl_api_udp_encap_t udp_encap