|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
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);
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 fib_proto_from_ip46(ip46_type_t iproto)
Convert from ip46_type to fib_protocol.
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
VLIB_API_INIT_FUNCTION(udp_api_hookup)
#define REPLY_MACRO2(t, body)
#define clib_memcpy(d, s, n)
u32 fib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
index_t ue_fib_index
The FIB index in which the encap destination resides.
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
UDP encap details during dump.
udp_encap_t * udp_encap_pool
Pool of encaps.
static void vl_api_udp_encap_dump_t_handler(vl_api_udp_encap_dump_t *mp, vlib_main_t *vm)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vl_api_udp_encap_t udp_encap
The UDP encap representation.
static void vl_api_udp_encap_add_t_handler(vl_api_udp_encap_add_t *mp, vlib_main_t *vm)
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
#define pool_foreach(VAR, POOL)
Iterate through pool.
An API client registration, only in vpp/vlib.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static api_main_t * vlibapi_get_main(void)
void udp_encap_unlock(index_t uei)
static void vl_api_udp_encap_del_t_handler(vl_api_udp_encap_del_t *mp, vlib_main_t *vm)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
struct udp_encap_t_::@559::@561 ip6
static void send_udp_encap_details(const udp_encap_t *ue, vl_api_registration_t *reg, u32 context)
fib_protocol_t ue_ip_proto
the protocol of the IP header imposed
vl_api_address_family_t ip_address_family_encode(ip_address_family_t af)
static clib_error_t * udp_api_hookup(vlib_main_t *vm)
struct udp_encap_t_::@559::@560 ip4
API main structure, used by both vpp and binary API clients.
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)
vl_api_udp_encap_t udp_encap
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void setup_message_id_table(api_main_t *am)
#define foreach_udp_api_msg
union udp_encap_t_::@559 ue_hdrs
The headers to paint, in packet painting order.
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
void * vl_msg_api_alloc(int nbytes)