40 #ifndef included_ip_ip6_h 41 #define included_ip_ip6_h 56 #define IP6_FIB_DEFAULT_HASH_NUM_BUCKETS (64 * 1024) 57 #define IP6_FIB_DEFAULT_HASH_MEMORY_SIZE (32<<20) 85 u32 address_length,
u32 if_address_index,
u32 is_del);
112 #define IP6_FIB_NUM_TABLES (IP6_FIB_TABLE_NON_FWDING+1) 120 BVT (clib_bihash) ip6_hash;
220 fib_masks[dest_length].as_uword[
i])
298 *result_ia = result ? ia : 0;
305 u32 address_length,
u32 is_del);
317 u16 dst_port,
u32 next_node_index);
334 u8 * link_layer_address,
335 uword n_bytes_link_layer_address,
341 u8 * link_layer_address,
342 uword n_bytes_link_layer_address);
357 u8 suppress,
u8 managed,
u8 other,
358 u8 ll_option,
u8 send_unicast,
u8 cease,
359 u8 use_lifetime,
u32 lifetime,
360 u32 initial_count,
u32 initial_interval,
361 u32 max_interval,
u32 min_interval,
u8 is_no);
366 u8 use_default,
u32 val_lifetime,
u32 pref_lifetime,
367 u8 no_advertise,
u8 off_link,
u8 no_autoconfig,
368 u8 no_onlink,
u8 is_no);
394 uword data,
int is_add);
401 u32 sw_if_index,
u16 bd_index,
u8 shg);
417 || ip->
protocol == IP_PROTOCOL_UDP);
429 t1 = is_tcp_udp ? tcp->
ports.src : 0;
430 t2 = is_tcp_udp ? tcp->
ports.dst : 0;
436 ((t1 << 16) | t2) : ((t2 << 16) | t1);
466 #define OI_DECAP 0x80000000 #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)
u8 pad[3]
log2 (size of the packing page block)
vlib_node_registration_t ip6_midchain_node
(constructor) VLIB_REGISTER_NODE (ip6_midchain_node)
sll srl srl sll sra u16x4 i
void ip6_register_protocol(u32 protocol, u32 node_index)
#define IP_FLOW_HASH_SRC_PORT
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
ip_interface_address_t * if_address_pool
Pool of addresses that are assigned to interfaces.
void ip6_hbh_set_next_override(uword next)
int vnet_set_ip6_classify_intfc(vlib_main_t *vm, u32 sw_if_index, u32 table_index)
The table that stores ALL routes learned by the DP.
static 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)
Definitions for all things IP (v4|v6) unicast and multicast lookup related.
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)
int vnet_add_del_ip6_nd_change_event(vnet_main_t *vnm, void *data_callback, u32 pid, void *address_arg, uword node_index, uword type_opaque, uword data, int is_add)
int ip6_hbh_register_option(u8 option, int options(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt), u8 *trace(u8 *s, ip6_hop_by_hop_option_t *opt))
#define IP_FLOW_HASH_REVERSE_SRC_DST
u8 * ip_enabled_by_sw_if_index
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
u8 * prefix_lengths_in_search_order
uword as_uword[16/sizeof(uword)]
flow_hash_config_t flow_hash_config
vlib_packet_template_t discover_neighbor_packet_template
BVT(clib_bihash) ip6_hash
vlib_node_registration_t ip6_discover_neighbor_node
(constructor) VLIB_REGISTER_NODE (ip6_discover_neighbor_node)
#define IP_FLOW_HASH_DST_ADDR
void ip6_ethernet_update_adjacency(vnet_main_t *vnm, u32 sw_if_index, u32 ai)
ip6_hop_by_hop_main_t ip6_hop_by_hop_main
static uword ip6_destination_matches_route(const ip6_main_t *im, const ip6_address_t *key, const ip6_address_t *dest, uword dest_length)
int ip6_interface_enabled(vlib_main_t *vm, u32 sw_if_index)
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)
A represenation of a single IP6 table.
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 ip6_hbh_unregister_option(u8 option)
static int ip6_src_address_for_packet(ip_lookup_main_t *lm, u32 sw_if_index, ip6_address_t *src)
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)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
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)
vlib_node_registration_t ip6_glean_node
(constructor) VLIB_REGISTER_NODE (ip6_glean_node)
static u32 ip6_compute_flow_hash(const ip6_header_t *ip, flow_hash_config_t flow_hash_config)
ip6_add_del_interface_address_callback_t * add_del_interface_address_callbacks
int ip6_neighbor_ra_config(vlib_main_t *vm, u32 sw_if_index, u8 suppress, 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)
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]
#define hash_mix64(a0, b0, c0)
This table stores the routes that are used to forward traffic.
clib_error_t * enable_ip6_interface(vlib_main_t *vm, u32 sw_if_index)
u32 * if_address_pool_index_by_sw_if_index
Head of doubly linked list of interface addresses for each software interface.
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 IP6_FIB_NUM_TABLES
#define IP_FLOW_HASH_SRC_ADDR
Flow hash configuration.
ip6_fib_table_instance_type_t_
Enumeration of the FIB table instance types.
serialize_function_t serialize_vnet_ip6_main
ip_lookup_main_t lookup_main
i32 dst_address_length_refcounts[129]
struct ip6_main_t ip6_main_t
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)
u32 flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
int vnet_set_ip6_flow_hash(u32 table_id, flow_hash_config_t flow_hash_config)
static uword ip6_destination_matches_interface(ip6_main_t *im, ip6_address_t *key, ip_interface_address_t *ia)
void vnet_register_ip6_neighbor_resolution_event(vnet_main_t *vnm, void *address_arg, uword node_index, uword type_opaque, uword data)
struct ip6_fib_table_instance_t_ ip6_fib_table_instance_t
A represenation of a single IP6 table.
serialize_function_t unserialize_vnet_ip6_main
void( serialize_function_t)(serialize_main_t *m, va_list *va)
uword * non_empty_dst_address_length_bitmap
int vnet_ip6_nd_term(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *p0, ethernet_header_t *eth, ip6_header_t *ip, u32 sw_if_index, u16 bd_index, u8 shg)
#define clib_mem_unaligned(pointer, type)
uword * interface_route_adj_index_by_sw_if_index
vlib_node_registration_t ip6_rewrite_local_node
#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)
static uword ip6_unaligned_destination_matches_route(ip6_main_t *im, ip6_address_t *key, ip6_address_t *dest, uword dest_length)
static void * ip_interface_address_get_address(ip_lookup_main_t *lm, ip_interface_address_t *a)
clib_error_t * disable_ip6_interface(vlib_main_t *vm, u32 sw_if_index)
vlib buffer structure definition and a few select access methods.
struct fib_table_t_ * fibs
u32 * fib_index_by_sw_if_index
void ip6_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
enum ip6_fib_table_instance_type_t_ ip6_fib_table_instance_type_t
Enumeration of the FIB table instance types.
A protocol Independent FIB table.