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) \ 57 #define _(n,f) UDP_DST_PORT_##f = n, 64 #define _(n,f) UDP6_DST_PORT_##f = n, 114 u32 node_index,
u8 is_ip4);
185 ASSERT(_vec_len(ec0) == _vec_len(ec1));
194 u16 old_l0 = 0, old_l1 = 0;
226 new_l0 = clib_host_to_net_u16 (
228 new_l1 = clib_host_to_net_u16 (
unformat_function_t unformat_udp_header
always_inline 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)
uword * dst_port_info_by_dst_port[N_UDP_AF]
always_inline 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.
always_inline uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
#define foreach_udp6_dst_port
always_inline u16 ip_csum_fold(ip_csum_t c)
udp_dst_port_info_t * dst_port_infos[N_UDP_AF]
format_function_t format_udp_rx_trace
#define clib_memcpy(a, b, c)
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
always_inline udp_dst_port_info_t * udp_get_dst_port_info(udp_main_t *um, udp_dst_port_t dst_port, u8 is_ip4)
#define foreach_udp4_dst_port
always_inline void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
#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)
always_inline 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_header