FD.io VPP  v16.06
Vector Packet Processing
ip6.h File Reference
+ Include dependency graph for ip6.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ip6_fib_key_t
 
struct  ip6_fib_t
 
struct  ip6_add_del_route_callback_t
 
struct  ip6_add_del_interface_address_callback_t
 
struct  ip6_main_t
 
union  ip6_icmp_neighbor_discovery_event_data_t
 
struct  ip6_add_del_route_args_t
 

Macros

#define IP6_FIB_DEFAULT_HASH_NUM_BUCKETS   (64 * 1024)
 
#define IP6_FIB_DEFAULT_HASH_MEMORY_SIZE   (32<<20)
 
#define IP6_ROUTE_FLAG_ADD   (0 << 0)
 
#define IP6_ROUTE_FLAG_DEL   (1 << 0)
 
#define IP6_ROUTE_FLAG_TABLE_ID   (0 << 1)
 
#define IP6_ROUTE_FLAG_FIB_INDEX   (1 << 1)
 
#define IP6_ROUTE_FLAG_KEEP_OLD_ADJACENCY   (1 << 2)
 
#define IP6_ROUTE_FLAG_NO_REDISTRIBUTE   (1 << 3)
 
#define IP6_ROUTE_FLAG_NOT_LAST_IN_GROUP   (1 << 4)
 
#define IP6_ROUTE_FLAG_NEIGHBOR   (1 << 5)
 

Typedefs

typedef voidip6_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)
 
typedef voidip6_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)
 
typedef struct ip6_main_t ip6_main_t
 

Enumerations

enum  ip6_rx_feature_type_t {
  IP6_RX_FEATURE_CHECK_ACCESS, IP6_RX_FEATURE_CHECK_SOURCE_REACHABLE_VIA_RX, IP6_RX_FEATURE_CHECK_SOURCE_REACHABLE_VIA_ANY, IP6_RX_FEATURE_IPSEC,
  IP6_RX_FEATURE_L2TPV3, IP6_RX_FEATURE_VPATH, IP6_RX_FEATURE_LOOKUP, IP6_N_RX_FEATURE
}
 
enum  ip6_icmp_neighbor_discovery_event_type_t { ICMP6_ND_EVENT_INIT }
 

Functions

u32 ip6_fib_lookup (ip6_main_t *im, u32 sw_if_index, ip6_address_t *dst)
 
u32 ip6_fib_lookup_with_table (ip6_main_t *im, u32 fib_index, ip6_address_t *dst)
 
ip6_fib_tfind_ip6_fib_by_table_index_or_id (ip6_main_t *im, u32 table_index_or_id, u32 flags)
 Get or create an IPv6 fib. More...
 
always_inline uword ip6_destination_matches_route (ip6_main_t *im, ip6_address_t *key, ip6_address_t *dest, uword dest_length)
 
always_inline uword ip6_destination_matches_interface (ip6_main_t *im, ip6_address_t *key, ip_interface_address_t *ia)
 
always_inline uword ip6_unaligned_destination_matches_route (ip6_main_t *im, ip6_address_t *key, ip6_address_t *dest, uword dest_length)
 
always_inline void ip6_src_address_for_packet (ip6_main_t *im, vlib_buffer_t *p, ip6_address_t *src, u32 sw_if_index)
 
always_inline u32 ip6_src_lookup_for_packet (ip6_main_t *im, vlib_buffer_t *b, ip6_header_t *i)
 
always_inline ip6_address_tip6_interface_address_matching_destination (ip6_main_t *im, ip6_address_t *dst, u32 sw_if_index, ip_interface_address_t **result_ia)
 
clib_error_tip6_add_del_interface_address (vlib_main_t *vm, u32 sw_if_index, ip6_address_t *address, u32 address_length, u32 is_del)
 
int ip6_address_compare (ip6_address_t *a1, ip6_address_t *a2)
 
void ip6_add_del_route (ip6_main_t *im, ip6_add_del_route_args_t *args)
 
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)
 
u32 ip6_get_route (ip6_main_t *im, u32 fib_index_or_table_id, u32 flags, ip6_address_t *address, u32 address_length)
 
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)
 
void ip6_delete_matching_routes (ip6_main_t *im, u32 table_index_or_table_id, u32 flags, ip6_address_t *address, u32 address_length)
 
void ip6_maybe_remap_adjacencies (ip6_main_t *im, u32 table_index_or_table_id, u32 flags)
 
void ip6_adjacency_set_interface_route (vnet_main_t *vnm, ip_adjacency_t *adj, u32 sw_if_index, u32 if_address_index)
 
u32 vnet_ip6_neighbor_glean_add (u32 fib_index, void *next_hop_arg)
 
clib_error_tip6_probe_neighbor (vlib_main_t *vm, ip6_address_t *dst, u32 sw_if_index)
 
clib_error_tip6_set_neighbor_limit (u32 neighbor_limit)
 
uword ip6_udp_register_listener (vlib_main_t *vm, u16 dst_port, u32 next_node_index)
 
u16 ip6_tcp_udp_icmp_compute_checksum (vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
 
void ip6_register_protocol (u32 protocol, u32 node_index)
 
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)
 
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_ip6_fib_init (ip6_main_t *im, u32 fib_index)
 
void ip6_link_local_address_from_ethernet_mac_address (ip6_address_t *ip, u8 *mac)
 
void ip6_ethernet_mac_address_from_link_local_address (u8 *mac, ip6_address_t *ip)
 
int vnet_set_ip6_flow_hash (u32 table_id, u32 flow_hash_config)
 
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)
 
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)
 
clib_error_tenable_ip6_interface (vlib_main_t *vm, u32 sw_if_index)
 
clib_error_tdisable_ip6_interface (vlib_main_t *vm, u32 sw_if_index)
 
int ip6_interface_enabled (vlib_main_t *vm, u32 sw_if_index)
 
clib_error_tset_ip6_link_local_address (vlib_main_t *vm, u32 sw_if_index, ip6_address_t *address, u8 address_length)
 
void vnet_register_ip6_neighbor_resolution_event (vnet_main_t *vnm, void *address_arg, uword node_index, uword type_opaque, uword data)
 
int vnet_set_ip6_classify_intfc (vlib_main_t *vm, u32 sw_if_index, u32 table_index)
 
always_inline u32 ip6_compute_flow_hash (ip6_header_t *ip, u32 flow_hash_config)
 

Variables

ip6_main_t ip6_main
 
vlib_node_registration_t ip6_input_node
 (constructor) VLIB_REGISTER_NODE (ip6_input_node) More...
 
vlib_node_registration_t ip6_rewrite_node
 (constructor) VLIB_REGISTER_NODE (ip6_rewrite_node) More...
 
vlib_node_registration_t ip6_rewrite_local_node
 (constructor) VLIB_REGISTER_NODE (ip6_rewrite_local_node) More...
 
vlib_node_registration_t ip6_discover_neighbor_node
 (constructor) VLIB_REGISTER_NODE (ip6_discover_neighbor_node) More...
 
vlib_node_registration_t ip6_icmp_neighbor_discovery_event_node
 
serialize_function_t serialize_vnet_ip6_main
 
serialize_function_t unserialize_vnet_ip6_main
 
vlib_node_registration_t ip6_lookup_node
 (constructor) VLIB_REGISTER_NODE (ip6_lookup_node) More...
 

Macro Definition Documentation

#define IP6_FIB_DEFAULT_HASH_MEMORY_SIZE   (32<<20)

Definition at line 54 of file ip6.h.

#define IP6_FIB_DEFAULT_HASH_NUM_BUCKETS   (64 * 1024)

Definition at line 53 of file ip6.h.

#define IP6_ROUTE_FLAG_ADD   (0 << 0)

Definition at line 327 of file ip6.h.

#define IP6_ROUTE_FLAG_DEL   (1 << 0)

Definition at line 328 of file ip6.h.

#define IP6_ROUTE_FLAG_FIB_INDEX   (1 << 1)

Definition at line 330 of file ip6.h.

#define IP6_ROUTE_FLAG_KEEP_OLD_ADJACENCY   (1 << 2)

Definition at line 331 of file ip6.h.

#define IP6_ROUTE_FLAG_NEIGHBOR   (1 << 5)

Definition at line 335 of file ip6.h.

#define IP6_ROUTE_FLAG_NO_REDISTRIBUTE   (1 << 3)

Definition at line 332 of file ip6.h.

#define IP6_ROUTE_FLAG_NOT_LAST_IN_GROUP   (1 << 4)

Definition at line 333 of file ip6.h.

#define IP6_ROUTE_FLAG_TABLE_ID   (0 << 1)

Definition at line 329 of file ip6.h.

Typedef Documentation

typedef 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)

Definition at line 92 of file ip6.h.

typedef 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)

Definition at line 76 of file ip6.h.

typedef struct ip6_main_t ip6_main_t

Enumeration Type Documentation

Enumerator
ICMP6_ND_EVENT_INIT 

Definition at line 193 of file ip6.h.

Enumerator
IP6_RX_FEATURE_CHECK_ACCESS 
IP6_RX_FEATURE_CHECK_SOURCE_REACHABLE_VIA_RX 
IP6_RX_FEATURE_CHECK_SOURCE_REACHABLE_VIA_ANY 
IP6_RX_FEATURE_IPSEC 
IP6_RX_FEATURE_L2TPV3 
IP6_RX_FEATURE_VPATH 
IP6_RX_FEATURE_LOOKUP 
IP6_N_RX_FEATURE 

Definition at line 105 of file ip6.h.

Function Documentation

clib_error_t* disable_ip6_interface ( vlib_main_t vm,
u32  sw_if_index 
)

Definition at line 2783 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* enable_ip6_interface ( vlib_main_t vm,
u32  sw_if_index 
)

Definition at line 2833 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

Get or create an IPv6 fib with the provided fib ID or index. The fib ID is a possibly-sparse user-defined value while the fib index defines the position of the fib in the fib vector.

Parameters
imip6_main pointer.
table_index_or_idThe table index if IP6_ROUTE_FLAG_FIB_INDEX bit is set in flags. Otherwise, when set to ~0, an arbitrary and unused fib ID is picked and can be retrieved with ret->table_id. Otherwise, it is the fib ID to be used to retrieve or create the desired fib.
flagsIndicates whether table_index_or_id is the fib index or ID. When the bit IP6_ROUTE_FLAG_FIB_INDEX is set, table_index_or_id is considered as the fib index, and the fib ID otherwise.
Returns
A pointer to the retrieved or created fib.
Remarks
When getting a fib with the fib index, the fib MUST already exist.

Definition at line 185 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 1155 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip6_add_del_route ( ip6_main_t im,
ip6_add_del_route_args_t args 
)

Definition at line 208 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 301 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ip6_address_compare ( ip6_address_t a1,
ip6_address_t a2 
)

Definition at line 45 of file ip46_cli.c.

+ Here is the caller graph for this function:

void ip6_adjacency_set_interface_route ( vnet_main_t vnm,
ip_adjacency_t adj,
u32  sw_if_index,
u32  if_address_index 
)

Definition at line 945 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline u32 ip6_compute_flow_hash ( ip6_header_t ip,
u32  flow_hash_config 
)

Definition at line 494 of file ip6.h.

+ Here is the caller graph for this function:

void ip6_delete_matching_routes ( ip6_main_t im,
u32  table_index_or_table_id,
u32  flags,
ip6_address_t address,
u32  address_length 
)

Definition at line 620 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword ip6_destination_matches_interface ( ip6_main_t im,
ip6_address_t key,
ip_interface_address_t ia 
)

Definition at line 251 of file ip6.h.

+ Here is the call graph for this function:

always_inline uword ip6_destination_matches_route ( ip6_main_t im,
ip6_address_t key,
ip6_address_t dest,
uword  dest_length 
)

Definition at line 236 of file ip6.h.

+ Here is the caller graph for this function:

void ip6_ethernet_mac_address_from_link_local_address ( u8 mac,
ip6_address_t ip 
)

Definition at line 2630 of file ip6_forward.c.

+ Here is the caller graph for this function:

u32 ip6_fib_lookup ( ip6_main_t im,
u32  sw_if_index,
ip6_address_t dst 
)

Definition at line 94 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 ip6_fib_lookup_with_table ( ip6_main_t im,
u32  fib_index,
ip6_address_t dst 
)

Definition at line 61 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 547 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 ip6_get_route ( ip6_main_t im,
u32  fib_index_or_table_id,
u32  flags,
ip6_address_t address,
u32  address_length 
)

Definition at line 523 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 296 of file ip6.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ip6_interface_enabled ( vlib_main_t vm,
u32  sw_if_index 
)

Definition at line 2818 of file ip6_neighbor.c.

+ Here is the caller graph for this function:

void ip6_link_local_address_from_ethernet_mac_address ( ip6_address_t ip,
u8 mac 
)

Definition at line 2614 of file ip6_forward.c.

+ Here is the caller graph for this function:

void ip6_maybe_remap_adjacencies ( ip6_main_t im,
u32  table_index_or_table_id,
u32  flags 
)

Definition at line 601 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 2231 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 2314 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* ip6_probe_neighbor ( vlib_main_t vm,
ip6_address_t dst,
u32  sw_if_index 
)

Definition at line 2129 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip6_register_protocol ( u32  protocol,
u32  node_index 
)

Definition at line 1908 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* ip6_set_neighbor_limit ( u32  neighbor_limit)

Definition at line 3175 of file ip6_neighbor.c.

+ Here is the caller graph for this function:

always_inline void ip6_src_address_for_packet ( ip6_main_t im,
vlib_buffer_t p,
ip6_address_t src,
u32  sw_if_index 
)

Definition at line 276 of file ip6.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline u32 ip6_src_lookup_for_packet ( ip6_main_t im,
vlib_buffer_t b,
ip6_header_t i 
)

Definition at line 285 of file ip6.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u16 ip6_tcp_udp_icmp_compute_checksum ( vlib_main_t vm,
vlib_buffer_t p0,
ip6_header_t ip0,
int *  bogus_lengthp 
)

Definition at line 1544 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword ip6_udp_register_listener ( vlib_main_t vm,
u16  dst_port,
u32  next_node_index 
)
always_inline uword ip6_unaligned_destination_matches_route ( ip6_main_t im,
ip6_address_t key,
ip6_address_t dest,
uword  dest_length 
)

Definition at line 261 of file ip6.h.

clib_error_t* set_ip6_link_local_address ( vlib_main_t vm,
u32  sw_if_index,
ip6_address_t address,
u8  address_length 
)

Definition at line 2983 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vnet_ip6_fib_init ( ip6_main_t im,
u32  fib_index 
)

Definition at line 101 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 vnet_ip6_neighbor_glean_add ( u32  fib_index,
void next_hop_arg 
)

Definition at line 518 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vnet_register_ip6_neighbor_resolution_event ( vnet_main_t vnm,
void address_arg,
uword  node_index,
uword  type_opaque,
uword  data 
)

Definition at line 3307 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_set_ip6_classify_intfc ( vlib_main_t vm,
u32  sw_if_index,
u32  table_index 
)

Definition at line 2758 of file ip6_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 326 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_set_ip6_flow_hash ( u32  table_id,
u32  flow_hash_config 
)

Definition at line 2669 of file ip6_forward.c.

+ Here is the caller graph for this function:

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 
)

Definition at line 462 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_node_registration_t ip6_discover_neighbor_node

(constructor) VLIB_REGISTER_NODE (ip6_discover_neighbor_node)

Definition at line 2111 of file ip6_forward.c.

vlib_node_registration_t ip6_icmp_neighbor_discovery_event_node

Definition at line 2181 of file ip6_neighbor.c.

vlib_node_registration_t ip6_input_node

(constructor) VLIB_REGISTER_NODE (ip6_input_node)

Definition at line 289 of file ip6_input.c.

vlib_node_registration_t ip6_lookup_node

(constructor) VLIB_REGISTER_NODE (ip6_lookup_node)

Definition at line 1267 of file ip6_forward.c.

ip6_main_t ip6_main

Definition at line 2490 of file ip6_forward.c.

vlib_node_registration_t ip6_rewrite_local_node

(constructor) VLIB_REGISTER_NODE (ip6_rewrite_local_node)

Definition at line 2474 of file ip6_forward.c.

vlib_node_registration_t ip6_rewrite_node

(constructor) VLIB_REGISTER_NODE (ip6_rewrite_node)

Definition at line 2461 of file ip6_forward.c.

serialize_function_t serialize_vnet_ip6_main

Definition at line 418 of file ip6.h.

serialize_function_t unserialize_vnet_ip6_main

Definition at line 418 of file ip6.h.