40 #ifndef included_ip_ip6_h 41 #define included_ip_ip6_h 53 #define IP6_FIB_DEFAULT_HASH_NUM_BUCKETS (64 * 1024) 54 #define IP6_FIB_DEFAULT_HASH_MEMORY_SIZE (32<<20) 133 BVT(clib_bihash) ip6_lookup_table;
232 u32 table_index_or_id,
314 *result_ia = result ? ia : 0;
327 #define IP6_ROUTE_FLAG_ADD (0 << 0) 328 #define IP6_ROUTE_FLAG_DEL (1 << 0) 329 #define IP6_ROUTE_FLAG_TABLE_ID (0 << 1) 330 #define IP6_ROUTE_FLAG_FIB_INDEX (1 << 1) 331 #define IP6_ROUTE_FLAG_KEEP_OLD_ADJACENCY (1 << 2) 332 #define IP6_ROUTE_FLAG_NO_REDISTRIBUTE (1 << 3) 333 #define IP6_ROUTE_FLAG_NOT_LAST_IN_GROUP (1 << 4) 335 #define IP6_ROUTE_FLAG_NEIGHBOR (1 << 5) 364 u32 dst_address_length,
366 u32 next_hop_sw_if_index,
367 u32 next_hop_weight,
u32 adj_index,
368 u32 explicit_fib_index);
371 u32 fib_index_or_table_id,
378 u32 table_index_or_table_id,
383 u8 ** result_length);
386 u32 table_index_or_table_id,
392 u32 table_index_or_table_id,
398 u32 if_address_index);
412 u32 next_node_index);
424 u8 * link_layer_address,
425 uword n_bytes_link_layer_address,
431 u8 * link_layer_address,
432 uword n_bytes_link_layer_address);
448 u8 surpress,
u8 managed,
u8 other,
449 u8 ll_option,
u8 send_unicast,
u8 cease,
450 u8 use_lifetime,
u32 lifetime,
451 u32 initial_count,
u32 initial_interval,
452 u32 max_interval,
u32 min_interval,
458 u8 use_default,
u32 val_lifetime,
u32 pref_lifetime,
459 u8 no_advertise,
u8 off_link,
u8 no_autoconfig,
u8 no_onlink,
500 || ip->
protocol == IP_PROTOCOL_UDP);
512 t1 = is_tcp_udp ? tcp->
ports.
src : 0;
513 t2 = is_tcp_udp ? tcp->
ports.
dst : 0;
519 ((t1<<16) | t2) : ((t2<<16) | t1);
#define foreach_ip_interface_address(lm, a, sw_if_index, loop, body)
void( ip6_add_del_interface_address_function_t)(struct ip6_main_t *im, uword opaque, u32 sw_if_index, ip6_address_t *address, u32 address_length, u32 if_address_index, u32 is_del)
int ip6_address_compare(ip6_address_t *a1, ip6_address_t *a2)
sll srl srl sll sra u16x4 i
always_inline uword ip6_destination_matches_interface(ip6_main_t *im, ip6_address_t *key, ip_interface_address_t *ia)
void ip6_register_protocol(u32 protocol, u32 node_index)
#define IP_FLOW_HASH_SRC_PORT
static void(BVT(clib_bihash)*h, BVT(clib_bihash_value)*v)
int vnet_set_ip6_classify_intfc(vlib_main_t *vm, u32 sw_if_index, u32 table_index)
i32 dst_address_length_refcounts[129]
int ip6_neighbor_ra_prefix(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *prefix_addr, u8 prefix_len, u8 use_default, u32 val_lifetime, u32 pref_lifetime, u8 no_advertise, u8 off_link, u8 no_autoconfig, u8 no_onlink, u8 is_no)
#define IP_FLOW_HASH_REVERSE_SRC_DST
int ip6_neighbor_ra_config(vlib_main_t *vm, u32 sw_if_index, u8 surpress, u8 managed, u8 other, u8 ll_option, u8 send_unicast, u8 cease, u8 use_lifetime, u32 lifetime, u32 initial_count, u32 initial_interval, u32 max_interval, u32 min_interval, u8 is_no)
vlib_node_registration_t ip6_rewrite_node
(constructor) VLIB_REGISTER_NODE (ip6_rewrite_node)
struct _vlib_node_registration vlib_node_registration_t
#define IP_FLOW_HASH_DST_PORT
always_inline u32 ip6_compute_flow_hash(ip6_header_t *ip, u32 flow_hash_config)
uword as_uword[16/sizeof(uword)]
always_inline void * ip_interface_address_get_address(ip_lookup_main_t *lm, ip_interface_address_t *a)
vlib_packet_template_t discover_neighbor_packet_template
vlib_node_registration_t ip6_discover_neighbor_node
(constructor) VLIB_REGISTER_NODE (ip6_discover_neighbor_node)
#define IP_FLOW_HASH_DST_ADDR
void ip6_adjacency_set_interface_route(vnet_main_t *vnm, ip_adjacency_t *adj, u32 sw_if_index, u32 if_address_index)
void ip6_foreach_matching_route(ip6_main_t *im, u32 table_index_or_table_id, u32 flags, ip6_address_t *address, u32 address_length, ip6_address_t **results, u8 **result_length)
ip6_fib_t * find_ip6_fib_by_table_index_or_id(ip6_main_t *im, u32 table_index_or_id, u32 flags)
Get or create an IPv6 fib.
int ip6_interface_enabled(vlib_main_t *vm, u32 sw_if_index)
u32 table_index_or_table_id
clib_error_t * ip6_set_neighbor_limit(u32 neighbor_limit)
uword ip6_udp_register_listener(vlib_main_t *vm, u16 dst_port, u32 next_node_index)
struct ip6_main_t::@108 host_config
always_inline void ip6_src_address_for_packet(ip6_main_t *im, vlib_buffer_t *p, ip6_address_t *src, u32 sw_if_index)
void ip6_add_del_route(ip6_main_t *im, ip6_add_del_route_args_t *args)
clib_error_t * ip6_probe_neighbor(vlib_main_t *vm, ip6_address_t *dst, u32 sw_if_index)
u32 lookup_table_nbuckets
vlib_node_registration_t ip6_icmp_neighbor_discovery_event_node
int vnet_set_ip6_ethernet_neighbor(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *a, u8 *link_layer_address, uword n_bytes_link_layer_address, int is_static)
ip6_address_t dst_address
void ip6_maybe_remap_adjacencies(ip6_main_t *im, u32 table_index_or_table_id, u32 flags)
ip6_icmp_neighbor_discovery_event_type_t
vlib_node_registration_t ip6_input_node
(constructor) VLIB_REGISTER_NODE (ip6_input_node)
clib_error_t * set_ip6_link_local_address(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *address, u8 address_length)
void ip6_ethernet_mac_address_from_link_local_address(u8 *mac, ip6_address_t *ip)
u32 ip6_get_route(ip6_main_t *im, u32 fib_index_or_table_id, u32 flags, ip6_address_t *address, u32 address_length)
always_inline ip_interface_address_t * ip_interface_address_for_packet(ip_lookup_main_t *lm, vlib_buffer_t *b, u32 sw_if_index)
always_inline uword ip6_unaligned_destination_matches_route(ip6_main_t *im, ip6_address_t *key, ip6_address_t *dest, uword dest_length)
ip6_add_del_interface_address_callback_t * add_del_interface_address_callbacks
void ip6_link_local_address_from_ethernet_mac_address(ip6_address_t *ip, u8 *mac)
uword * fib_index_by_table_id
ip6_address_t fib_masks[129]
void( ip6_add_del_route_function_t)(struct ip6_main_t *im, uword opaque, ip6_fib_t *fib, u32 flags, ip6_address_t *address, u32 address_length, void *old_result, void *new_result)
#define hash_mix64(a0, b0, c0)
uword * non_empty_dst_address_length_bitmap
BVT(clib_bihash) ip6_lookup_table
u32 ip6_fib_lookup_with_table(ip6_main_t *im, u32 fib_index, ip6_address_t *dst)
clib_error_t * enable_ip6_interface(vlib_main_t *vm, u32 sw_if_index)
void ip6_add_del_route_next_hop(ip6_main_t *im, u32 flags, ip6_address_t *dst_address, u32 dst_address_length, ip6_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_weight, u32 adj_index, u32 explicit_fib_index)
void ip6_delete_matching_routes(ip6_main_t *im, u32 table_index_or_table_id, u32 flags, ip6_address_t *address, u32 address_length)
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
vlib_node_registration_t ip6_lookup_node
(constructor) VLIB_REGISTER_NODE (ip6_lookup_node)
#define IP_FLOW_HASH_SRC_ADDR
serialize_function_t serialize_vnet_ip6_main
ip_lookup_main_t lookup_main
u8 * prefix_lengths_in_search_order
struct ip6_main_t ip6_main_t
void vnet_ip6_fib_init(ip6_main_t *im, u32 fib_index)
int vnet_unset_ip6_ethernet_neighbor(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *a, u8 *link_layer_address, uword n_bytes_link_layer_address)
void vnet_register_ip6_neighbor_resolution_event(vnet_main_t *vnm, void *address_arg, uword node_index, uword type_opaque, uword data)
serialize_function_t unserialize_vnet_ip6_main
void( serialize_function_t)(serialize_main_t *m, va_list *va)
ip6_add_del_route_callback_t * add_del_route_callbacks
int vnet_set_ip6_flow_hash(u32 table_id, u32 flow_hash_config)
#define clib_mem_unaligned(pointer, type)
uword * interface_route_adj_index_by_sw_if_index
vlib_node_registration_t ip6_rewrite_local_node
(constructor) VLIB_REGISTER_NODE (ip6_rewrite_local_node)
always_inline u32 ip6_src_lookup_for_packet(ip6_main_t *im, vlib_buffer_t *b, ip6_header_t *i)
u32 vnet_ip6_neighbor_glean_add(u32 fib_index, void *next_hop_arg)
#define IP_FLOW_HASH_PROTO
clib_error_t * ip6_add_del_interface_address(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *address, u32 address_length, u32 is_del)
clib_error_t * disable_ip6_interface(vlib_main_t *vm, u32 sw_if_index)
always_inline uword ip6_destination_matches_route(ip6_main_t *im, ip6_address_t *key, ip6_address_t *dest, uword dest_length)
always_inline ip6_address_t * ip6_interface_address_matching_destination(ip6_main_t *im, ip6_address_t *dst, u32 sw_if_index, ip_interface_address_t **result_ia)
u32 * fib_index_by_sw_if_index
u32 ip6_fib_lookup(ip6_main_t *im, u32 sw_if_index, ip6_address_t *dst)