FD.io VPP  v16.06
Vector Packet Processing
ip4_forward.c File Reference
+ Include dependency graph for ip4_forward.c:

Go to the source code of this file.

Data Structures

struct  ip4_interface_address_t
 
struct  ip4_forward_next_trace_t
 

Macros

#define foreach_notrace_ip4_arp_error
 

Enumerations

enum  ip4_rewrite_next_t { IP4_REWRITE_NEXT_DROP, IP4_REWRITE_NEXT_ARP }
 

Functions

u32 ip4_fib_lookup_with_table (ip4_main_t *im, u32 fib_index, ip4_address_t *dst, u32 disable_default_route)
 
static ip4_fib_tcreate_fib_with_table_id (ip4_main_t *im, u32 table_id)
 
ip4_fib_tfind_ip4_fib_by_table_index_or_id (ip4_main_t *im, u32 table_index_or_id, u32 flags)
 Get or create an IPv4 fib. More...
 
static void ip4_fib_init_adj_index_by_dst_address (ip_lookup_main_t *lm, ip4_fib_t *fib, u32 address_length)
 
static void ip4_fib_set_adj_index (ip4_main_t *im, ip4_fib_t *fib, u32 flags, u32 dst_address_u32, u32 dst_address_length, u32 adj_index)
 
void ip4_add_del_route (ip4_main_t *im, ip4_add_del_route_args_t *a)
 
void ip4_add_del_route_next_hop (ip4_main_t *im, u32 flags, ip4_address_t *dst_address, u32 dst_address_length, ip4_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_weight, u32 adj_index, u32 explicit_fib_index)
 
voidip4_get_route (ip4_main_t *im, u32 table_index_or_table_id, u32 flags, u8 *address, u32 address_length)
 
void ip4_foreach_matching_route (ip4_main_t *im, u32 table_index_or_table_id, u32 flags, ip4_address_t *address, u32 address_length, ip4_address_t **results, u8 **result_lengths)
 
void ip4_maybe_remap_adjacencies (ip4_main_t *im, u32 table_index_or_table_id, u32 flags)
 
void ip4_delete_matching_routes (ip4_main_t *im, u32 table_index_or_table_id, u32 flags, ip4_address_t *address, u32 address_length)
 
void ip4_forward_next_trace (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vlib_rx_or_tx_t which_adj_index)
 
always_inline uword ip4_lookup_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int lookup_for_responses_to_locally_received_packets, int is_indirect)
 
static uword ip4_lookup (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
void ip4_adjacency_set_interface_route (vnet_main_t *vnm, ip_adjacency_t *adj, u32 sw_if_index, u32 if_address_index)
 
static void ip4_add_interface_routes (u32 sw_if_index, ip4_main_t *im, u32 fib_index, ip_interface_address_t *a)
 
static void ip4_del_interface_routes (ip4_main_t *im, u32 fib_index, ip4_address_t *address, u32 address_length)
 
static clib_error_tip4_add_del_interface_address_internal (vlib_main_t *vm, u32 sw_if_index, ip4_address_t *new_address, u32 new_length, u32 redistribute, u32 insert_routes, u32 is_del)
 
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)
 
static clib_error_tip4_sw_interface_admin_up_down (vnet_main_t *vnm, u32 sw_if_index, u32 flags)
 
 VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION (ip4_sw_interface_admin_up_down)
 
static clib_error_tip4_sw_interface_add_del (vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
 
 VNET_SW_INTERFACE_ADD_DEL_FUNCTION (ip4_sw_interface_add_del)
 
static u8format_ip4_lookup_trace (u8 *s, va_list *args)
 
static uword ip4_indirect (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_tip4_lookup_init (vlib_main_t *vm)
 
static u8format_ip4_forward_next_trace (u8 *s, va_list *args)
 
static u8format_ip4_rewrite_trace (u8 *s, va_list *args)
 
static uword ip4_drop_or_punt (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, ip4_error_t error_code)
 
static uword ip4_drop (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip4_punt (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip4_miss (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
u16 ip4_tcp_udp_compute_checksum (vlib_main_t *vm, vlib_buffer_t *p0, ip4_header_t *ip0)
 
static u32 ip4_tcp_udp_validate_checksum (vlib_main_t *vm, vlib_buffer_t *p0)
 
static uword ip4_local (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
void ip4_register_protocol (u32 protocol, u32 node_index)
 
static clib_error_tshow_ip_local_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static uword ip4_arp (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_tarp_notrace_init (vlib_main_t *vm)
 
clib_error_tip4_probe_neighbor (vlib_main_t *vm, ip4_address_t *dst, u32 sw_if_index)
 
always_inline uword ip4_rewrite_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int rewrite_for_locally_received_packets)
 
static uword ip4_rewrite_transit (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip4_rewrite_local (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_tadd_del_interface_table (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static uword ip4_lookup_multicast (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
int ip4_lookup_validate (ip4_address_t *a, u32 fib_index0)
 
static clib_error_ttest_lookup_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
int vnet_set_ip4_flow_hash (u32 table_id, u32 flow_hash_config)
 
static clib_error_tset_ip_flow_hash_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
int vnet_set_ip4_classify_intfc (vlib_main_t *vm, u32 sw_if_index, u32 table_index)
 
static clib_error_tset_ip_classify_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

vlib_node_registration_t ip4_lookup_node
 (constructor) VLIB_REGISTER_NODE (ip4_lookup_node) More...
 
vlib_node_registration_t ip4_indirect_node
 (constructor) VLIB_REGISTER_NODE (ip4_indirect_node) More...
 
ip4_main_t ip4_main
 
vlib_node_registration_t ip4_drop_node
 (constructor) VLIB_REGISTER_NODE (ip4_drop_node) More...
 
vlib_node_registration_t ip4_punt_node
 (constructor) VLIB_REGISTER_NODE (ip4_punt_node) More...
 
vlib_node_registration_t ip4_miss_node
 (constructor) VLIB_REGISTER_NODE (ip4_miss_node) More...
 
vlib_node_registration_t ip4_local_node
 (constructor) VLIB_REGISTER_NODE (ip4_local_node) More...
 
vlib_cli_command_t show_ip_local
 (constructor) VLIB_CLI_COMMAND (show_ip_local) More...
 
static char * ip4_arp_error_strings []
 
vlib_node_registration_t ip4_arp_node
 (constructor) VLIB_REGISTER_NODE (ip4_arp_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_cli_command_t set_interface_ip_table_command
 (constructor) VLIB_CLI_COMMAND (set_interface_ip_table_command) More...
 
vlib_node_registration_t ip4_lookup_multicast_node
 (constructor) VLIB_REGISTER_NODE (ip4_lookup_multicast_node) More...
 
vlib_node_registration_t ip4_multicast_node
 (constructor) VLIB_REGISTER_NODE (ip4_multicast_node) More...
 
vlib_cli_command_t lookup_test_command
 (constructor) VLIB_CLI_COMMAND (lookup_test_command) More...
 
vlib_cli_command_t set_ip_flow_hash_command
 (constructor) VLIB_CLI_COMMAND (set_ip_flow_hash_command) More...
 
vlib_cli_command_t set_ip_classify_command
 (constructor) VLIB_CLI_COMMAND (set_ip_classify_command) More...
 

Macro Definition Documentation

#define foreach_notrace_ip4_arp_error
Value:
_(DROP) \
_(REQUEST_SENT) \
_(REPLICATE_DROP) \
_(REPLICATE_FAIL)
DROP
Definition: error.def:41

Definition at line 2357 of file ip4_forward.c.

Enumeration Type Documentation

Enumerator
IP4_REWRITE_NEXT_DROP 
IP4_REWRITE_NEXT_ARP 

Definition at line 2445 of file ip4_forward.c.

Function Documentation

static clib_error_t* add_del_interface_table ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 2809 of file ip4_forward.c.

+ Here is the call graph for this function:

clib_error_t* arp_notrace_init ( vlib_main_t vm)

Definition at line 2363 of file ip4_forward.c.

+ Here is the call graph for this function:

static ip4_fib_t* create_fib_with_table_id ( ip4_main_t im,
u32  table_id 
)
static

Definition at line 83 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ip4_fib_t* find_ip4_fib_by_table_index_or_id ( ip4_main_t im,
u32  table_index_or_id,
u32  flags 
)

Get or create an IPv4 fib.

Get or create an IPv4 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
imip4_main pointer.
table_index_or_idThe table index if IP4_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, 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 IP4_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 98 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_ip4_forward_next_trace ( u8 s,
va_list *  args 
)
static

Definition at line 1465 of file ip4_forward.c.

+ Here is the call graph for this function:

static u8 * format_ip4_lookup_trace ( u8 s,
va_list *  args 
)
static

Definition at line 1477 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_ip4_rewrite_trace ( u8 s,
va_list *  args 
)
static

Definition at line 1495 of file ip4_forward.c.

+ Here is the call graph for this function:

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 1239 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t * ip4_add_del_interface_address_internal ( vlib_main_t vm,
u32  sw_if_index,
ip4_address_t new_address,
u32  new_length,
u32  redistribute,
u32  insert_routes,
u32  is_del 
)
static

Definition at line 1159 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_add_del_route ( ip4_main_t im,
ip4_add_del_route_args_t a 
)

Definition at line 196 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_add_del_route_next_hop ( ip4_main_t im,
u32  flags,
ip4_address_t dst_address,
u32  dst_address_length,
ip4_address_t next_hop,
u32  next_hop_sw_if_index,
u32  next_hop_weight,
u32  adj_index,
u32  explicit_fib_index 
)

Definition at line 274 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ip4_add_interface_routes ( u32  sw_if_index,
ip4_main_t im,
u32  fib_index,
ip_interface_address_t a 
)
static

Definition at line 1052 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 1005 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword ip4_arp ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 2162 of file ip4_forward.c.

+ Here is the call graph for this function:

static void ip4_del_interface_routes ( ip4_main_t im,
u32  fib_index,
ip4_address_t address,
u32  address_length 
)
static

Definition at line 1115 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_delete_matching_routes ( ip4_main_t im,
u32  table_index_or_table_id,
u32  flags,
ip4_address_t address,
u32  address_length 
)

Definition at line 602 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword ip4_drop ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 1627 of file ip4_forward.c.

+ Here is the call graph for this function:

static uword ip4_drop_or_punt ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
ip4_error_t  error_code 
)
static

Definition at line 1604 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ip4_fib_init_adj_index_by_dst_address ( ip_lookup_main_t lm,
ip4_fib_t fib,
u32  address_length 
)
static

Definition at line 123 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 ip4_fib_lookup_with_table ( ip4_main_t im,
u32  fib_index,
ip4_address_t dst,
u32  disable_default_route 
)

Definition at line 50 of file ip4_forward.c.

+ Here is the caller graph for this function:

static void ip4_fib_set_adj_index ( ip4_main_t im,
ip4_fib_t fib,
u32  flags,
u32  dst_address_u32,
u32  dst_address_length,
u32  adj_index 
)
static

Definition at line 148 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_foreach_matching_route ( ip4_main_t im,
u32  table_index_or_table_id,
u32  flags,
ip4_address_t address,
u32  address_length,
ip4_address_t **  results,
u8 **  result_lengths 
)

Definition at line 488 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_forward_next_trace ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
vlib_rx_or_tx_t  which_adj_index 
)

Definition at line 1517 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* ip4_get_route ( ip4_main_t im,
u32  table_index_or_table_id,
u32  flags,
u8 address,
u32  address_length 
)

Definition at line 469 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword ip4_indirect ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 1372 of file ip4_forward.c.

+ Here is the call graph for this function:

static uword ip4_local ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 1756 of file ip4_forward.c.

+ Here is the call graph for this function:

static uword ip4_lookup ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 995 of file ip4_forward.c.

+ Here is the call graph for this function:

clib_error_t* ip4_lookup_init ( vlib_main_t vm)

Definition at line 1397 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword ip4_lookup_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  lookup_for_responses_to_locally_received_packets,
int  is_indirect 
)

Definition at line 644 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword ip4_lookup_multicast ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 2858 of file ip4_forward.c.

+ Here is the call graph for this function:

int ip4_lookup_validate ( ip4_address_t a,
u32  fib_index0 
)

Definition at line 3099 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_maybe_remap_adjacencies ( ip4_main_t im,
u32  table_index_or_table_id,
u32  flags 
)

Definition at line 522 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword ip4_miss ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 1639 of file ip4_forward.c.

+ Here is the call 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 2383 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword ip4_punt ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 1633 of file ip4_forward.c.

+ Here is the call graph for this function:

void ip4_register_protocol ( u32  protocol,
u32  node_index 
)

Definition at line 2125 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword ip4_rewrite_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  rewrite_for_locally_received_packets 
)

Definition at line 2451 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword ip4_rewrite_local ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 2770 of file ip4_forward.c.

+ Here is the call graph for this function:

static uword ip4_rewrite_transit ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 2761 of file ip4_forward.c.

+ Here is the call graph for this function:

static clib_error_t* ip4_sw_interface_add_del ( vnet_main_t vnm,
u32  sw_if_index,
u32  is_add 
)
static

Definition at line 1288 of file ip4_forward.c.

+ Here is the call graph for this function:

static clib_error_t* ip4_sw_interface_admin_up_down ( vnet_main_t vnm,
u32  sw_if_index,
u32  flags 
)
static

Definition at line 1251 of file ip4_forward.c.

+ Here is the call 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 1685 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 ip4_tcp_udp_validate_checksum ( vlib_main_t vm,
vlib_buffer_t p0 
)
static

Definition at line 1730 of file ip4_forward.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* set_ip_classify_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3261 of file ip4_forward.c.

+ Here is the call graph for this function:

static clib_error_t* set_ip_flow_hash_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3192 of file ip4_forward.c.

+ Here is the call graph for this function:

static clib_error_t* show_ip_local_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 2136 of file ip4_forward.c.

+ Here is the call graph for this function:

static clib_error_t* test_lookup_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3125 of file ip4_forward.c.

+ Here is the call graph for this function:

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

Definition at line 3239 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,
u32  flow_hash_config 
)

Definition at line 3176 of file ip4_forward.c.

+ Here is the caller graph for this function:

VNET_SW_INTERFACE_ADD_DEL_FUNCTION ( ip4_sw_interface_add_del  )

+ Here is the caller graph for this function:

VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION ( ip4_sw_interface_admin_up_down  )

+ Here is the caller graph for this function:

Variable Documentation

char* ip4_arp_error_strings[]
static
Initial value:
= {
[IP4_ARP_ERROR_DROP] = "address overflow drops",
[IP4_ARP_ERROR_REQUEST_SENT] = "ARP requests sent",
[IP4_ARP_ERROR_NON_ARP_ADJ] = "ARPs to non-ARP adjacencies",
[IP4_ARP_ERROR_REPLICATE_DROP] = "ARP replication completed",
[IP4_ARP_ERROR_REPLICATE_FAIL] = "ARP replication failed",
}

Definition at line 2333 of file ip4_forward.c.

Initial value:
= {
.function = ip4_arp,
.name = "ip4-arp",
.vector_size = sizeof (u32),
.error_strings = ip4_arp_error_strings,
.n_next_nodes = IP4_ARP_N_NEXT,
.next_nodes = {
[IP4_ARP_NEXT_DROP] = "error-drop",
},
}
static u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1465
static uword ip4_arp(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_forward.c:2162
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
static char * ip4_arp_error_strings[]
Definition: ip4_forward.c:2333

(constructor) VLIB_REGISTER_NODE (ip4_arp_node)

Definition at line 2341 of file ip4_forward.c.

vlib_node_registration_t ip4_drop_node
Initial value:
= {
.function = ip4_drop,
.name = "ip4-drop",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}
static uword ip4_drop(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_forward.c:1627
static u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1465
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (ip4_drop_node)

Definition at line 1644 of file ip4_forward.c.

vlib_node_registration_t ip4_indirect_node
Initial value:
= {
.function = ip4_indirect,
.name = "ip4-indirect",
.vector_size = sizeof (u32),
.format_trace = format_ip4_lookup_trace,
.n_next_nodes = IP_LOOKUP_N_NEXT,
.next_nodes = IP4_LOOKUP_NEXT_NODES,
}
#define IP4_LOOKUP_NEXT_NODES
Definition: lookup.h:93
static uword ip4_indirect(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_forward.c:1372
static u8 * format_ip4_lookup_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1477
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (ip4_indirect_node)

Definition at line 1381 of file ip4_forward.c.

vlib_node_registration_t ip4_local_node
Initial value:
= {
.function = ip4_local,
.name = "ip4-local",
.vector_size = sizeof (u32),
.n_next_nodes = IP_LOCAL_N_NEXT,
.next_nodes = {
[IP_LOCAL_NEXT_DROP] = "error-drop",
[IP_LOCAL_NEXT_PUNT] = "error-punt",
[IP_LOCAL_NEXT_UDP_LOOKUP] = "ip4-udp-lookup",
[IP_LOCAL_NEXT_ICMP] = "ip4-icmp-input",
},
}
static u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1465
unsigned int u32
Definition: types.h:88
static uword ip4_local(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_forward.c:1756

(constructor) VLIB_REGISTER_NODE (ip4_local_node)

Definition at line 2109 of file ip4_forward.c.

vlib_node_registration_t ip4_lookup_multicast_node
Initial value:
= {
.function = ip4_lookup_multicast,
.name = "ip4-lookup-multicast",
.vector_size = sizeof (u32),
.format_trace = format_ip4_lookup_trace,
.n_next_nodes = IP_LOOKUP_N_NEXT,
.next_nodes = IP4_LOOKUP_NEXT_NODES,
}
#define IP4_LOOKUP_NEXT_NODES
Definition: lookup.h:93
static u8 * format_ip4_lookup_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1477
unsigned int u32
Definition: types.h:88
static uword ip4_lookup_multicast(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_forward.c:2858

(constructor) VLIB_REGISTER_NODE (ip4_lookup_multicast_node)

Definition at line 3075 of file ip4_forward.c.

vlib_node_registration_t ip4_lookup_node
Initial value:
= {
.function = ip4_lookup,
.name = "ip4-lookup",
.vector_size = sizeof (u32),
.format_trace = format_ip4_lookup_trace,
.n_next_nodes = IP_LOOKUP_N_NEXT,
.next_nodes = IP4_LOOKUP_NEXT_NODES,
}
#define IP4_LOOKUP_NEXT_NODES
Definition: lookup.h:93
static u8 * format_ip4_lookup_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1477
unsigned int u32
Definition: types.h:88
static uword ip4_lookup(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_forward.c:995

(constructor) VLIB_REGISTER_NODE (ip4_lookup_node)

Definition at line 1360 of file ip4_forward.c.

ip4_main_t ip4_main

Definition at line 1394 of file ip4_forward.c.

vlib_node_registration_t ip4_miss_node
Initial value:
= {
.function = ip4_miss,
.name = "ip4-miss",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}
static u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1465
static uword ip4_miss(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_forward.c:1639
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (ip4_miss_node)

Definition at line 1670 of file ip4_forward.c.

vlib_node_registration_t ip4_multicast_node
Initial value:
= {
.function = ip4_drop,
.name = "ip4-multicast",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}
static uword ip4_drop(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_forward.c:1627
static u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1465
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (ip4_multicast_node)

Definition at line 3086 of file ip4_forward.c.

vlib_node_registration_t ip4_punt_node
Initial value:
= {
.function = ip4_punt,
.name = "ip4-punt",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-punt",
},
}
static u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1465
static uword ip4_punt(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_forward.c:1633
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (ip4_punt_node)

Definition at line 1657 of file ip4_forward.c.

vlib_node_registration_t ip4_rewrite_local_node
Initial value:
= {
.function = ip4_rewrite_local,
.name = "ip4-rewrite-local",
.vector_size = sizeof (u32),
.sibling_of = "ip4-rewrite-transit",
.format_trace = format_ip4_rewrite_trace,
.n_next_nodes = 2,
.next_nodes = {
[IP4_REWRITE_NEXT_DROP] = "error-drop",
[IP4_REWRITE_NEXT_ARP] = "ip4-arp",
},
}
static uword ip4_rewrite_local(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_forward.c:2770
static u8 * format_ip4_rewrite_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1495
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (ip4_rewrite_local_node)

Definition at line 2792 of file ip4_forward.c.

vlib_node_registration_t ip4_rewrite_node
Initial value:
= {
.function = ip4_rewrite_transit,
.name = "ip4-rewrite-transit",
.vector_size = sizeof (u32),
.format_trace = format_ip4_rewrite_trace,
.n_next_nodes = 2,
.next_nodes = {
[IP4_REWRITE_NEXT_DROP] = "error-drop",
[IP4_REWRITE_NEXT_ARP] = "ip4-arp",
},
}
static uword ip4_rewrite_transit(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_forward.c:2761
static u8 * format_ip4_rewrite_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1495
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (ip4_rewrite_node)

Definition at line 2778 of file ip4_forward.c.

vlib_cli_command_t lookup_test_command
Initial value:
= {
.path = "test lookup",
.short_help = "test lookup",
}
static clib_error_t * test_lookup_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip4_forward.c:3125

(constructor) VLIB_CLI_COMMAND (lookup_test_command)

Definition at line 3170 of file ip4_forward.c.

vlib_cli_command_t set_interface_ip_table_command
Initial value:
= {
.path = "set interface ip table",
.short_help = "Add/delete FIB table id for interface",
}
static clib_error_t * add_del_interface_table(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip4_forward.c:2809

(constructor) VLIB_CLI_COMMAND (set_interface_ip_table_command)

Definition at line 2850 of file ip4_forward.c.

vlib_cli_command_t set_ip_classify_command
Initial value:
= {
.path = "set ip classify",
.short_help =
"set ip classify intfc <int> table-index <index>",
}
static clib_error_t * set_ip_classify_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip4_forward.c:3261

(constructor) VLIB_CLI_COMMAND (set_ip_classify_command)

Definition at line 3302 of file ip4_forward.c.

vlib_cli_command_t set_ip_flow_hash_command
Initial value:
= {
.path = "set ip flow-hash",
.short_help =
"set ip table flow-hash table <fib-id> src dst sport dport proto reverse",
}
static clib_error_t * set_ip_flow_hash_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip4_forward.c:3192

(constructor) VLIB_CLI_COMMAND (set_ip_flow_hash_command)

Definition at line 3232 of file ip4_forward.c.

vlib_cli_command_t show_ip_local
Initial value:
= {
.path = "show ip local",
.short_help = "Show ip local protocol table",
}
static clib_error_t * show_ip_local_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip4_forward.c:2136

(constructor) VLIB_CLI_COMMAND (show_ip_local)

Definition at line 2155 of file ip4_forward.c.