18 #ifndef included_udp_h 19 #define included_udp_h 30 #define udp_error(n,s) UDP_ERROR_##n, 36 #define foreach_udp4_dst_port \ 37 _ (67, dhcp_to_server) \ 38 _ (68, dhcp_to_client) \ 49 #define foreach_udp6_dst_port \ 50 _ (547, dhcpv6_to_server) \ 51 _ (546, dhcpv6_to_client) \ 54 _ (4790, vxlan6_gpe) \ 58 #define _(n,f) UDP_DST_PORT_##f = n, 65 #define _(n,f) UDP6_DST_PORT_##f = n, 115 u32 node_index,
u8 is_ip4);
186 ASSERT(_vec_len(ec0) == _vec_len(ec1));
195 u16 old_l0 = 0, old_l1 = 0;
227 new_l0 = clib_host_to_net_u16 (
229 new_l1 = clib_host_to_net_u16 (
unformat_function_t unformat_udp_header
uword * dst_port_info_by_dst_port[N_UDP_AF]
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.
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#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_dst_port_info_t * dst_port_infos[N_UDP_AF]
static void ip_udp_encap_one(vlib_main_t *vm, vlib_buffer_t *b0, u8 *ec0, word ec_len, 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)
#define clib_memcpy(a, b, c)
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
#define foreach_udp4_dst_port
#define ip_csum_update(sum, old, new, type, field)
void udp_register_dst_port(vlib_main_t *vm, udp_dst_port_t dst_port, u32 node_index, u8 is_ip4)
static u16 ip_csum_fold(ip_csum_t c)
format_function_t format_udp_header