FD.io VPP  v16.12-rc0-308-g931be3a
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_interface_address_callback_t
 
struct  ip6_fib_table_instance_t_
 A represenation of a single IP6 table. More...
 
struct  ip6_main_t
 
union  ip6_icmp_neighbor_discovery_event_data_t
 
struct  ip6_hop_by_hop_main_t
 

Macros

#define IP6_FIB_DEFAULT_HASH_NUM_BUCKETS   (64 * 1024)
 
#define IP6_FIB_DEFAULT_HASH_MEMORY_SIZE   (32<<20)
 
#define IP6_FIB_NUM_TABLES   (IP6_FIB_TABLE_NON_FWDING+1)
 
#define VNET_IP6_UNICAST_FEATURE_INIT(x, ...)
 
#define VNET_IP6_MULTICAST_FEATURE_INIT(x, ...)
 
#define VNET_IP6_TX_FEATURE_INIT(x, ...)
 
#define OI_DECAP   0x80000000
 

Typedefs

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)
 
typedef enum ip6_fib_table_instance_type_t_ ip6_fib_table_instance_type_t
 Enumeration of the FIB table instance types. More...
 
typedef struct ip6_fib_table_instance_t_ ip6_fib_table_instance_t
 A represenation of a single IP6 table. More...
 
typedef struct ip6_main_t ip6_main_t
 

Enumerations

enum  ip6_fib_table_instance_type_t_ { IP6_FIB_TABLE_FWDING, IP6_FIB_TABLE_NON_FWDING }
 Enumeration of the FIB table instance types. More...
 
enum  ip6_icmp_neighbor_discovery_event_type_t { ICMP6_ND_EVENT_INIT }
 

Functions

static uword ip6_destination_matches_route (const ip6_main_t *im, const ip6_address_t *key, const ip6_address_t *dest, uword dest_length)
 
static uword ip6_destination_matches_interface (ip6_main_t *im, ip6_address_t *key, ip_interface_address_t *ia)
 
static uword ip6_unaligned_destination_matches_route (ip6_main_t *im, ip6_address_t *key, ip6_address_t *dest, uword dest_length)
 
static int ip6_src_address_for_packet (ip_lookup_main_t *lm, u32 sw_if_index, ip6_address_t *src)
 
static 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)
 
void ip6_sw_interface_enable_disable (u32 sw_if_index, u32 is_enable)
 
int ip6_address_compare (ip6_address_t *a1, ip6_address_t *a2)
 
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)
 
void ip6_ethernet_update_adjacency (vnet_main_t *vnm, u32 sw_if_index, u32 ai)
 
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 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, flow_hash_config_t flow_hash_config)
 
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)
 
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_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 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)
 
int vnet_set_ip6_classify_intfc (vlib_main_t *vm, u32 sw_if_index, u32 table_index)
 
static u32 ip6_compute_flow_hash (const ip6_header_t *ip, flow_hash_config_t flow_hash_config)
 
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))
 
int ip6_hbh_unregister_option (u8 option)
 
void ip6_hbh_set_next_override (uword next)
 

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_glean_node
 (constructor) VLIB_REGISTER_NODE (ip6_glean_node) More...
 
vlib_node_registration_t ip6_midchain_node
 (constructor) VLIB_REGISTER_NODE (ip6_midchain_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...
 
ip6_hop_by_hop_main_t ip6_hop_by_hop_main
 

Macro Definition Documentation

#define IP6_FIB_DEFAULT_HASH_MEMORY_SIZE   (32<<20)

Definition at line 58 of file ip6.h.

#define IP6_FIB_DEFAULT_HASH_NUM_BUCKETS   (64 * 1024)

Definition at line 57 of file ip6.h.

#define IP6_FIB_NUM_TABLES   (IP6_FIB_TABLE_NON_FWDING+1)

Definition at line 111 of file ip6.h.

#define OI_DECAP   0x80000000

Definition at line 524 of file ip6.h.

#define VNET_IP6_MULTICAST_FEATURE_INIT (   x,
  ... 
)
Value:
__VA_ARGS__ vnet_feature_registration_t mc_##x; \
static void __vnet_add_feature_registration_mc_##x (void) \
__attribute__((__constructor__)) ; \
static void __vnet_add_feature_registration_mc_##x (void) \
{ \
im->next_feature[VNET_IP_RX_MULTICAST_FEAT] = &mc_##x; \
} \
__VA_ARGS__ vnet_feature_registration_t mc_##x
ip6_main_t ip6_main
Definition: ip6_forward.c:2655
struct ip6_main_t ip6_main_t
vnet_feature_registration_t * next_feature[VNET_N_IP_FEAT]
Definition: ip6.h:164
struct _vnet_feature_registration vnet_feature_registration_t
feature registration object

Definition at line 216 of file ip6.h.

#define VNET_IP6_TX_FEATURE_INIT (   x,
  ... 
)
Value:
__VA_ARGS__ vnet_feature_registration_t tx_##x; \
static void __vnet_add_feature_registration_tx_##x (void) \
__attribute__((__constructor__)) ; \
static void __vnet_add_feature_registration_tx_##x (void) \
{ \
tx_##x.next = im->next_feature[VNET_IP_TX_FEAT]; \
im->next_feature[VNET_IP_TX_FEAT] = &tx_##x; \
} \
__VA_ARGS__ vnet_feature_registration_t tx_##x
ip6_main_t ip6_main
Definition: ip6_forward.c:2655
struct ip6_main_t ip6_main_t
vnet_feature_registration_t * next_feature[VNET_N_IP_FEAT]
Definition: ip6.h:164
struct _vnet_feature_registration vnet_feature_registration_t
feature registration object

Definition at line 228 of file ip6.h.

#define VNET_IP6_UNICAST_FEATURE_INIT (   x,
  ... 
)
Value:
__VA_ARGS__ vnet_feature_registration_t uc_##x; \
static void __vnet_add_feature_registration_uc_##x (void) \
__attribute__((__constructor__)) ; \
static void __vnet_add_feature_registration_uc_##x (void) \
{ \
uc_##x.next = im->next_feature[VNET_IP_RX_UNICAST_FEAT]; \
im->next_feature[VNET_IP_RX_UNICAST_FEAT] = &uc_##x; \
} \
__VA_ARGS__ vnet_feature_registration_t uc_##x
ip6_main_t ip6_main
Definition: ip6_forward.c:2655
struct ip6_main_t ip6_main_t
vnet_feature_registration_t * next_feature[VNET_N_IP_FEAT]
Definition: ip6.h:164
struct _vnet_feature_registration vnet_feature_registration_t
feature registration object

Definition at line 204 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 80 of file ip6.h.

A represenation of a single IP6 table.

Enumeration of the FIB table instance types.

typedef struct ip6_main_t ip6_main_t

Enumeration Type Documentation

Enumeration of the FIB table instance types.

Enumerator
IP6_FIB_TABLE_FWDING 

This table stores the routes that are used to forward traffic.

The key is the prefix, the result the adjacnecy to forward on.

IP6_FIB_TABLE_NON_FWDING 

The table that stores ALL routes learned by the DP.

Some of these routes may not be ready to install in forwarding at a given time. The key in this table is the prefix, the result is the fib_entry_t

Definition at line 96 of file ip6.h.

Enumerator
ICMP6_ND_EVENT_INIT 

Definition at line 252 of file ip6.h.

Function Documentation

clib_error_t* disable_ip6_interface ( vlib_main_t vm,
u32  sw_if_index 
)

Definition at line 3043 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 3093 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_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 491 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 53 of file ip46_cli.c.

+ Here is the caller graph for this function:

static u32 ip6_compute_flow_hash ( const ip6_header_t ip,
flow_hash_config_t  flow_hash_config 
)
inlinestatic

Definition at line 473 of file ip6.h.

+ Here is the caller graph for this function:

static uword ip6_destination_matches_interface ( ip6_main_t im,
ip6_address_t key,
ip_interface_address_t ia 
)
inlinestatic

Definition at line 280 of file ip6.h.

+ Here is the call graph for this function:

static uword ip6_destination_matches_route ( const ip6_main_t im,
const ip6_address_t key,
const ip6_address_t dest,
uword  dest_length 
)
inlinestatic

Definition at line 265 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 2825 of file ip6_forward.c.

+ Here is the caller graph for this function:

void ip6_ethernet_update_adjacency ( vnet_main_t vnm,
u32  sw_if_index,
u32  ai 
)

Definition at line 484 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ip6_hbh_register_option ( u8  option,
int   optionsvlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt,
u8 traceu8 *s, ip6_hop_by_hop_option_t *opt 
)

Definition at line 2602 of file ip6_forward.c.

+ Here is the caller graph for this function:

void ip6_hbh_set_next_override ( uword  next)

Definition at line 2594 of file ip6_forward.c.

+ Here is the caller graph for this function:

int ip6_hbh_unregister_option ( u8  option)

Definition at line 2625 of file ip6_forward.c.

+ Here is the caller graph for this function:

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

Definition at line 329 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 3078 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 2809 of file ip6_forward.c.

+ Here is the caller graph for this function:

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 
)

Definition at line 2419 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 2502 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 1749 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 1477 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 3583 of file ip6_neighbor.c.

+ Here is the caller graph for this function:

static int ip6_src_address_for_packet ( ip_lookup_main_t lm,
u32  sw_if_index,
ip6_address_t src 
)
inlinestatic

Definition at line 305 of file ip6.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip6_sw_interface_enable_disable ( u32  sw_if_index,
u32  is_enable 
)

Definition at line 412 of file ip6_forward.c.

+ 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 1105 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 
)

+ Here is the caller graph for this function:

static uword ip6_unaligned_destination_matches_route ( ip6_main_t im,
ip6_address_t key,
ip6_address_t dest,
uword  dest_length 
)
inlinestatic

Definition at line 290 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 3379 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 3670 of file ip6_neighbor.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 3754 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 3640 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 3058 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 526 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,
flow_hash_config_t  flow_hash_config 
)

Definition at line 2877 of file ip6_forward.c.

+ Here is the call graph for this function:

+ 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 678 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 1714 of file ip6_forward.c.

vlib_node_registration_t ip6_glean_node

(constructor) VLIB_REGISTER_NODE (ip6_glean_node)

Definition at line 1731 of file ip6_forward.c.

ip6_hop_by_hop_main_t ip6_hop_by_hop_main

Definition at line 2222 of file ip6_forward.c.

vlib_node_registration_t ip6_icmp_neighbor_discovery_event_node

Definition at line 2369 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 768 of file ip6_forward.c.

ip6_main_t ip6_main

Definition at line 2655 of file ip6_forward.c.

vlib_node_registration_t ip6_midchain_node

(constructor) VLIB_REGISTER_NODE (ip6_midchain_node)

Definition at line 2176 of file ip6_forward.c.

vlib_node_registration_t ip6_rewrite_local_node

(constructor) VLIB_REGISTER_NODE (ip6_rewrite_local_node)

Definition at line 2204 of file ip6_forward.c.

vlib_node_registration_t ip6_rewrite_node

(constructor) VLIB_REGISTER_NODE (ip6_rewrite_node)

Definition at line 2188 of file ip6_forward.c.

serialize_function_t serialize_vnet_ip6_main

Definition at line 376 of file ip6.h.

serialize_function_t unserialize_vnet_ip6_main

Definition at line 376 of file ip6.h.