40 #ifndef included_ip_main_h 41 #define included_ip_main_h 155 u32 first_buffer_offset,
156 u32 n_bytes_to_checksum,
160 u32 n_bytes_left = n_bytes_to_checksum;
162 u8 nb_segs = mb->nb_segs;
163 ASSERT(mb->data_len >= first_buffer_offset);
167 n =
clib_min (n_bytes_left, mb->data_len);
175 if ((nb_segs == 0) || (mb == 0))
178 n =
clib_min (n_bytes_left, mb->data_len);
179 h = rte_ctrlmbuf_data(mb);
182 ASSERT(n_bytes_left == 0);
189 u32 n_bytes_left = n_bytes_to_checksum;
202 if (n_bytes_left == 0)
uword * protocol_info_by_name
uword * protocol_info_by_protocol
static ip_csum_t ip_incremental_checksum_buffer(vlib_main_t *vm, vlib_buffer_t *first_buffer, u32 first_buffer_offset, u32 n_bytes_to_checksum, ip_csum_t sum)
#define rte_mbuf_from_vlib_buffer(x)
Definitions for all things IP (v4|v6) unicast and multicast lookup related.
uword * port_info_by_name
struct _vlib_node_registration vlib_node_registration_t
unformat_function_t * unformat_pg_edit
ip_csum_t ip_incremental_checksum(ip_csum_t sum, void *_data, uword n_bytes)
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 VLIB_BUFFER_NEXT_PRESENT
uword * port_info_by_port
static ip_protocol_info_t * ip_get_protocol_info(ip_main_t *im, u32 protocol)
u16 current_length
Nbytes between current data and the end of this buffer.
format_function_t * format_header
enum ip_protocol ip_protocol_t
void ip_del_all_interface_addresses(vlib_main_t *vm, u32 sw_if_index)
vlib_node_registration_t ip4_inacl_node
(constructor) VLIB_REGISTER_NODE (ip4_inacl_node)
ip_protocol_info_t * protocol_infos
clib_error_t * ip_main_init(vlib_main_t *vm)
vlib_node_registration_t ip6_inacl_node
(constructor) VLIB_REGISTER_NODE (ip6_inacl_node)
static tcp_udp_port_info_t * ip_get_tcp_udp_port_info(ip_main_t *im, u32 port)
unformat_function_t * unformat_pg_edit
u32 next_buffer
Next buffer for this linked-list of buffers.
unformat_function_t * unformat_header
format_function_t * format_header
unformat_function_t * unformat_match
tcp_udp_port_info_t * port_infos
u32 flags
buffer flags: VLIB_BUFFER_IS_TRACED: trace this buffer.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.