40 #ifndef included_ip_main_h 41 #define included_ip_main_h 153 u32 first_buffer_offset,
157 u32 n_bytes_left = n_bytes_to_checksum;
170 if (n_bytes_left == 0)
193 u32 table_id,
u8 is_api);
199 void ip_copy (ip46_address_t * dst, ip46_address_t * src,
u8 is_ip4);
200 void ip_set (ip46_address_t * dst,
void *src,
u8 is_ip4);
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)
u32 ip4_mask_to_preflen(ip4_address_t *mask)
void ip_table_create(fib_protocol_t fproto, u32 table_id, u8 is_api, const u8 *name)
void ip6_address_normalize(ip6_address_t *ip6, u8 preflen)
void * ip_interface_get_first_ip(u32 sw_if_index, u8 is_ip4)
void ip_set(ip46_address_t *dst, void *src, u8 is_ip4)
void ip6_preflen_to_mask(u8 pref_len, ip6_address_t *mask)
Definitions for all things IP (v4|v6) unicast and multicast lookup related.
uword * port_info_by_name
u8 ip_is_local(u32 fib_index, ip46_address_t *ip46_address, u8 is_ip4)
Checks that an ip is local to the requested fib.
struct _vlib_node_registration vlib_node_registration_t
u8 ip_interface_has_address(u32 sw_if_index, ip46_address_t *ip, u8 is_ip4)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
void ip6_prefix_max_address_host_order(ip6_address_t *ip, u8 plen, ip6_address_t *res)
void ip4_address_normalize(ip4_address_t *ip4, u8 preflen)
#define VLIB_BUFFER_NEXT_PRESENT
unformat_function_t * unformat_pg_edit
ip_csum_t ip_incremental_checksum(ip_csum_t sum, void *_data, uword n_bytes)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
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
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
void ip_copy(ip46_address_t *dst, ip46_address_t *src, u8 is_ip4)
u32 ip6_mask_to_preflen(ip6_address_t *mask)
enum ip_protocol ip_protocol_t
void ip_del_all_interface_addresses(vlib_main_t *vm, u32 sw_if_index)
int ip_table_bind(fib_protocol_t fproto, u32 sw_if_index, u32 table_id, u8 is_api)
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)
void ip_table_delete(fib_protocol_t fproto, u32 table_id, u8 is_api)
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
void ip4_prefix_max_address_host_order(ip4_address_t *ip, u8 plen, ip4_address_t *res)
void ip4_preflen_to_mask(u8 pref_len, ip4_address_t *ip)
u8 ip_is_zero(ip46_address_t *ip46_address, u8 is_ip4)
tcp_udp_port_info_t * port_infos
u8 ip_is_local_host(ip46_address_t *ip46_address, u8 is_ip4)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, 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.