15 #ifndef __included_udp_h__ 16 #define __included_udp_h__ 37 typedef struct _udp_uri_main
74 #define udp_error(n,s) UDP_ERROR_##n, 80 #define foreach_udp4_dst_port \ 81 _ (67, dhcp_to_server) \ 82 _ (68, dhcp_to_client) \ 96 #define foreach_udp6_dst_port \ 97 _ (547, dhcpv6_to_server) \ 98 _ (546, dhcpv6_to_client) \ 101 _ (3785, bfd_echo6) \ 102 _ (4341, lisp_gpe6) \ 104 _ (4790, VXLAN6_GPE) \ 109 #define _(n,f) UDP_DST_PORT_##f = n, 116 #define _(n,f) UDP6_DST_PORT_##f = n, 176 u32 node_index,
u8 is_ip4);
273 ASSERT (_vec_len (ec0) == _vec_len (ec1));
282 u16 old_l0 = 0, old_l1 = 0;
static udp_connection_t * udp_listener_get(u32 conn_index)
unformat_function_t unformat_udp_header
struct _transport_connection transport_connection_t
uword * dst_port_info_by_dst_port[N_UDP_AF]
struct _vlib_node_registration vlib_node_registration_t
static udp_dst_port_info_t * udp_get_dst_port_info(udp_main_t *um, udp_dst_port_t dst_port, u8 is_ip4)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define foreach_udp6_dst_port
udp_uri_main_t udp_uri_main
struct _udp_uri_main udp_uri_main_t
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
udp_dst_port_info_t * dst_port_infos[N_UDP_AF]
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static void ip_udp_encap_one(vlib_main_t *vm, vlib_buffer_t *b0, u8 *ec0, word ec_len, u8 is_ip4)
void udp_punt_unknown(vlib_main_t *vm, u8 is_ip4, u8 is_add)
static void ip_udp_fixup_one(vlib_main_t *vm, vlib_buffer_t *b0, u8 is_ip4)
format_function_t format_udp_rx_trace
static void ip_udp_encap_two(vlib_main_t *vm, vlib_buffer_t *b0, vlib_buffer_t *b1, u8 *ec0, u8 *ec1, word ec_len, u8 is_v4)
void udp_unregister_dst_port(vlib_main_t *vm, udp_dst_port_t dst_port, u8 is_ip4)
#define clib_memcpy(a, b, c)
static udp_connection_t * udp_connection_get(u32 conn_index, u32 thread_index)
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
int vlib_main(vlib_main_t *volatile vm, unformat_input_t *input)
#define foreach_udp4_dst_port
vlib_node_registration_t udp4_uri_input_node
(constructor) VLIB_REGISTER_NODE (udp4_uri_input_node)
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
transport_connection_t connection
#define ip_csum_update(sum, old, new, type, field)
ip4_main_t ip4_main
Global ip4 main structure.
void udp_register_dst_port(vlib_main_t *vm, udp_dst_port_t dst_port, u32 node_index, u8 is_ip4)
static udp_uri_main_t * vnet_get_udp_main()
static u16 ip_csum_fold(ip_csum_t c)
format_function_t format_udp_header