FD.io VPP  v16.12-rc0-308-g931be3a
Vector Packet Processing
ip4.h File Reference
+ Include dependency graph for ip4.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ip4_fib_t
 
struct  ip4_add_del_interface_address_callback_t
 
struct  ip4_main_t
 IPv4 main type. More...
 

Macros

#define VNET_IP4_UNICAST_FEATURE_INIT(x, ...)
 
#define VNET_IP4_MULTICAST_FEATURE_INIT(x, ...)
 
#define VNET_IP4_TX_FEATURE_INIT(x, ...)
 

Typedefs

typedef struct ip4_fib_t ip4_fib_t
 
typedef void( ip4_add_del_interface_address_function_t) (struct ip4_main_t *im, uword opaque, u32 sw_if_index, ip4_address_t *address, u32 address_length, u32 if_address_index, u32 is_del)
 
typedef struct ip4_main_t ip4_main_t
 IPv4 main type. More...
 

Functions

static uword ip4_destination_matches_route (const ip4_main_t *im, const ip4_address_t *key, const ip4_address_t *dest, uword dest_length)
 
static uword ip4_destination_matches_interface (ip4_main_t *im, ip4_address_t *key, ip_interface_address_t *ia)
 
static uword ip4_unaligned_destination_matches_route (ip4_main_t *im, ip4_address_t *key, ip4_address_t *dest, uword dest_length)
 
static int ip4_src_address_for_packet (ip_lookup_main_t *lm, u32 sw_if_index, ip4_address_t *src)
 
static ip4_address_tip4_interface_address_matching_destination (ip4_main_t *im, ip4_address_t *dst, u32 sw_if_index, ip_interface_address_t **result_ia)
 
ip4_address_tip4_interface_first_address (ip4_main_t *im, u32 sw_if_index, ip_interface_address_t **result_ia)
 
clib_error_tip4_add_del_interface_address (vlib_main_t *vm, u32 sw_if_index, ip4_address_t *address, u32 address_length, u32 is_del)
 
void ip4_sw_interface_enable_disable (u32 sw_if_index, u32 is_enable)
 
int ip4_address_compare (ip4_address_t *a1, ip4_address_t *a2)
 
clib_error_tip4_probe_neighbor (vlib_main_t *vm, ip4_address_t *dst, u32 sw_if_index)
 
clib_error_tip4_set_arp_limit (u32 arp_limit)
 
uword ip4_udp_register_listener (vlib_main_t *vm, u16 dst_port, u32 next_node_index)
 
void ip4_icmp_register_type (vlib_main_t *vm, icmp4_type_t type, u32 node_index)
 
u16 ip4_tcp_udp_compute_checksum (vlib_main_t *vm, vlib_buffer_t *p0, ip4_header_t *ip0)
 
void ip4_register_protocol (u32 protocol, u32 node_index)
 
int vnet_set_ip4_flow_hash (u32 table_id, flow_hash_config_t flow_hash_config)
 
void ip4_mtrie_init (ip4_fib_mtrie_t *m)
 
int vnet_set_ip4_classify_intfc (vlib_main_t *vm, u32 sw_if_index, u32 table_index)
 
static u32 ip4_compute_flow_hash (const ip4_header_t *ip, flow_hash_config_t flow_hash_config)
 

Variables

ip4_main_t ip4_main
 Global ip4 main structure. More...
 
vlib_node_registration_t ip4_input_node
 Global ip4 input node. More...
 
vlib_node_registration_t ip4_lookup_node
 (constructor) VLIB_REGISTER_NODE (ip4_lookup_node) More...
 
vlib_node_registration_t ip4_rewrite_node
 (constructor) VLIB_REGISTER_NODE (ip4_rewrite_node) More...
 
vlib_node_registration_t ip4_rewrite_local_node
 (constructor) VLIB_REGISTER_NODE (ip4_rewrite_local_node) More...
 
vlib_node_registration_t ip4_arp_node
 (constructor) VLIB_REGISTER_NODE (ip4_arp_node) More...
 
vlib_node_registration_t ip4_glean_node
 (constructor) VLIB_REGISTER_NODE (ip4_glean_node) More...
 
vlib_node_registration_t ip4_midchain_node
 (constructor) VLIB_REGISTER_NODE (ip4_midchain_node) More...
 
serialize_function_t serialize_vnet_ip4_main
 
serialize_function_t unserialize_vnet_ip4_main
 

Macro Definition Documentation

#define VNET_IP4_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
vnet_feature_registration_t * next_feature[VNET_N_IP_FEAT]
Feature path configuration lists.
Definition: ip4.h:120
struct ip4_main_t ip4_main_t
IPv4 main type.
ip4_main_t ip4_main
Global ip4 main structure.
Definition: ip4_forward.c:1060
struct _vnet_feature_registration vnet_feature_registration_t
feature registration object

Definition at line 189 of file ip4.h.

#define VNET_IP4_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
vnet_feature_registration_t * next_feature[VNET_N_IP_FEAT]
Feature path configuration lists.
Definition: ip4.h:120
struct ip4_main_t ip4_main_t
IPv4 main type.
ip4_main_t ip4_main
Global ip4 main structure.
Definition: ip4_forward.c:1060
struct _vnet_feature_registration vnet_feature_registration_t
feature registration object

Definition at line 201 of file ip4.h.

#define VNET_IP4_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
vnet_feature_registration_t * next_feature[VNET_N_IP_FEAT]
Feature path configuration lists.
Definition: ip4.h:120
struct ip4_main_t ip4_main_t
IPv4 main type.
ip4_main_t ip4_main
Global ip4 main structure.
Definition: ip4_forward.c:1060
struct _vnet_feature_registration vnet_feature_registration_t
feature registration object

Definition at line 177 of file ip4.h.

Typedef Documentation

typedef void( ip4_add_del_interface_address_function_t) (struct ip4_main_t *im, uword opaque, u32 sw_if_index, ip4_address_t *address, u32 address_length, u32 if_address_index, u32 is_del)

Definition at line 73 of file ip4.h.

typedef struct ip4_fib_t ip4_fib_t
typedef struct ip4_main_t ip4_main_t

IPv4 main type.

State of IPv4 VPP processing including:

  • FIBs
  • Feature indices used in feature topological sort
  • Feature node run time references

Function Documentation

clib_error_t* ip4_add_del_interface_address ( vlib_main_t vm,
u32  sw_if_index,
ip4_address_t address,
u32  address_length,
u32  is_del 
)

Definition at line 847 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ip4_address_compare ( ip4_address_t a1,
ip4_address_t a2 
)

Definition at line 50 of file ip46_cli.c.

+ Here is the caller graph for this function:

static u32 ip4_compute_flow_hash ( const ip4_header_t ip,
flow_hash_config_t  flow_hash_config 
)
inlinestatic

Definition at line 341 of file ip4.h.

+ Here is the caller graph for this function:

static uword ip4_destination_matches_interface ( ip4_main_t im,
ip4_address_t key,
ip_interface_address_t ia 
)
inlinestatic

Definition at line 231 of file ip4.h.

+ Here is the call graph for this function:

static uword ip4_destination_matches_route ( const ip4_main_t im,
const ip4_address_t key,
const ip4_address_t dest,
uword  dest_length 
)
inlinestatic

Definition at line 224 of file ip4.h.

+ Here is the caller graph for this function:

void ip4_icmp_register_type ( vlib_main_t vm,
icmp4_type_t  type,
u32  node_index 
)

Definition at line 699 of file icmp4.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ip4_address_t* ip4_interface_address_matching_destination ( ip4_main_t im,
ip4_address_t dst,
u32  sw_if_index,
ip_interface_address_t **  result_ia 
)
inlinestatic

Definition at line 272 of file ip4.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ip4_address_t* ip4_interface_first_address ( ip4_main_t im,
u32  sw_if_index,
ip_interface_address_t **  result_ia 
)

Definition at line 591 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_mtrie_init ( ip4_fib_mtrie_t m)

Definition at line 354 of file ip4_mtrie.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* ip4_probe_neighbor ( vlib_main_t vm,
ip4_address_t dst,
u32  sw_if_index 
)

Definition at line 2107 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_register_protocol ( u32  protocol,
u32  node_index 
)

Definition at line 1790 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* ip4_set_arp_limit ( u32  arp_limit)

Definition at line 1420 of file arp.c.

+ Here is the caller graph for this function:

static int ip4_src_address_for_packet ( ip_lookup_main_t lm,
u32  sw_if_index,
ip4_address_t src 
)
inlinestatic

Definition at line 248 of file ip4.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_sw_interface_enable_disable ( u32  sw_if_index,
u32  is_enable 
)

Definition at line 709 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u16 ip4_tcp_udp_compute_checksum ( vlib_main_t vm,
vlib_buffer_t p0,
ip4_header_t ip0 
)

Definition at line 1336 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword ip4_udp_register_listener ( vlib_main_t vm,
u16  dst_port,
u32  next_node_index 
)

+ Here is the caller graph for this function:

static uword ip4_unaligned_destination_matches_route ( ip4_main_t im,
ip4_address_t key,
ip4_address_t dest,
uword  dest_length 
)
inlinestatic

Definition at line 241 of file ip4.h.

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

Definition at line 3263 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_set_ip4_flow_hash ( u32  table_id,
flow_hash_config_t  flow_hash_config 
)

Definition at line 3115 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

(constructor) VLIB_REGISTER_NODE (ip4_arp_node)

Definition at line 2049 of file ip4_forward.c.

vlib_node_registration_t ip4_glean_node

(constructor) VLIB_REGISTER_NODE (ip4_glean_node)

Definition at line 2065 of file ip4_forward.c.

vlib_node_registration_t ip4_input_node

Global ip4 input node.

Errors get attached to ip4 input node.

Global ip4 input node.

Definition at line 388 of file ip4_input.c.

vlib_node_registration_t ip4_lookup_node

(constructor) VLIB_REGISTER_NODE (ip4_lookup_node)

Definition at line 485 of file ip4_forward.c.

ip4_main_t ip4_main

Global ip4 main structure.

Definition at line 1060 of file ip4_forward.c.

vlib_node_registration_t ip4_midchain_node

(constructor) VLIB_REGISTER_NODE (ip4_midchain_node)

Definition at line 2674 of file ip4_forward.c.

vlib_node_registration_t ip4_rewrite_local_node

(constructor) VLIB_REGISTER_NODE (ip4_rewrite_local_node)

Definition at line 2686 of file ip4_forward.c.

vlib_node_registration_t ip4_rewrite_node

(constructor) VLIB_REGISTER_NODE (ip4_rewrite_node)

Definition at line 2657 of file ip4_forward.c.

serialize_function_t serialize_vnet_ip4_main

Definition at line 329 of file ip4.h.

serialize_function_t unserialize_vnet_ip4_main

Definition at line 329 of file ip4.h.