FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
ip.h File Reference
+ Include dependency graph for ip.h:

Go to the source code of this file.

Data Structures

struct  ip_protocol_info_t
 
struct  tcp_udp_port_info_t
 
struct  ip_main_t
 

Functions

clib_error_tip_main_init (vlib_main_t *vm)
 
static ip_protocol_info_tip_get_protocol_info (ip_main_t *im, u32 protocol)
 
static tcp_udp_port_info_tip_get_tcp_udp_port_info (ip_main_t *im, u32 port)
 
static ip_csum_t ip_incremental_checksum_buffer (vlib_main_t *vm, vlib_buffer_t *first_buffer, u32 first_buffer_offset, u32 n_bytes_to_checksum, ip_csum_t sum)
 
static u16 ip_calculate_l4_checksum (vlib_main_t *vm, vlib_buffer_t *p0, ip_csum_t sum0, u32 payload_length, u8 *iph, u32 ip_header_size, u8 *l4h)
 
void ip_del_all_interface_addresses (vlib_main_t *vm, u32 sw_if_index)
 
void ip_table_create (fib_protocol_t fproto, u32 table_id, u8 is_api, const u8 *name)
 
void ip_table_delete (fib_protocol_t fproto, u32 table_id, u8 is_api)
 
int ip_table_bind (fib_protocol_t fproto, u32 sw_if_index, u32 table_id, u8 is_api)
 
u8 ip_is_zero (ip46_address_t *ip46_address, u8 is_ip4)
 
u8 ip_is_local_host (ip46_address_t *ip46_address, u8 is_ip4)
 
u8 ip4_is_local_host (ip4_address_t *ip4_address)
 
u8 ip6_is_local_host (ip6_address_t *ip6_address)
 
u8 ip_is_local (u32 fib_index, ip46_address_t *ip46_address, u8 is_ip4)
 Checks that an ip is local to the requested fib. More...
 
void ip_copy (ip46_address_t *dst, ip46_address_t *src, u8 is_ip4)
 
void ip_set (ip46_address_t *dst, void *src, u8 is_ip4)
 
static u32 vlib_buffer_get_ip4_fib_index (vlib_buffer_t *b)
 
static u32 vlib_buffer_get_ip6_fib_index (vlib_buffer_t *b)
 
static u32 vlib_buffer_get_ip_fib_index (vlib_buffer_t *b, u8 is_ip4)
 

Variables

ip_main_t ip_main
 
vlib_node_registration_t ip4_inacl_node
 (constructor) VLIB_REGISTER_NODE (ip4_inacl_node) More...
 
vlib_node_registration_t ip6_inacl_node
 (constructor) VLIB_REGISTER_NODE (ip6_inacl_node) More...
 

Function Documentation

◆ ip4_is_local_host()

u8 ip4_is_local_host ( ip4_address_t ip4_address)

Definition at line 39 of file ip.c.

+ Here is the caller graph for this function:

◆ ip6_is_local_host()

u8 ip6_is_local_host ( ip6_address_t *  ip6_address)

Definition at line 45 of file ip.c.

+ Here is the caller graph for this function:

◆ ip_calculate_l4_checksum()

static u16 ip_calculate_l4_checksum ( vlib_main_t vm,
vlib_buffer_t p0,
ip_csum_t  sum0,
u32  payload_length,
u8 iph,
u32  ip_header_size,
u8 l4h 
)
inlinestatic

Definition at line 184 of file ip.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip_copy()

void ip_copy ( ip46_address_t *  dst,
ip46_address_t *  src,
u8  is_ip4 
)

Definition at line 81 of file ip.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip_del_all_interface_addresses()

void ip_del_all_interface_addresses ( vlib_main_t vm,
u32  sw_if_index 
)

Definition at line 82 of file ip46_cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip_get_protocol_info()

static ip_protocol_info_t* ip_get_protocol_info ( ip_main_t im,
u32  protocol 
)
inlinestatic

Definition at line 134 of file ip.h.

+ Here is the caller graph for this function:

◆ ip_get_tcp_udp_port_info()

static tcp_udp_port_info_t* ip_get_tcp_udp_port_info ( ip_main_t im,
u32  port 
)
inlinestatic

Definition at line 143 of file ip.h.

+ Here is the caller graph for this function:

◆ ip_incremental_checksum_buffer()

static ip_csum_t ip_incremental_checksum_buffer ( vlib_main_t vm,
vlib_buffer_t first_buffer,
u32  first_buffer_offset,
u32  n_bytes_to_checksum,
ip_csum_t  sum 
)
inlinestatic

Definition at line 152 of file ip.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip_is_local()

u8 ip_is_local ( u32  fib_index,
ip46_address_t *  ip46_address,
u8  is_ip4 
)

Checks that an ip is local to the requested fib.

Definition at line 55 of file ip.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip_is_local_host()

u8 ip_is_local_host ( ip46_address_t *  ip46_address,
u8  is_ip4 
)

Definition at line 29 of file ip.c.

+ Here is the caller graph for this function:

◆ ip_is_zero()

u8 ip_is_zero ( ip46_address_t *  ip46_address,
u8  is_ip4 
)

Definition at line 20 of file ip.c.

+ Here is the caller graph for this function:

◆ ip_main_init()

clib_error_t* ip_main_init ( vlib_main_t vm)

Definition at line 45 of file ip_init.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip_set()

void ip_set ( ip46_address_t *  dst,
void *  src,
u8  is_ip4 
)

Definition at line 93 of file ip.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip_table_bind()

int ip_table_bind ( fib_protocol_t  fproto,
u32  sw_if_index,
u32  table_id,
u8  is_api 
)

Definition at line 451 of file interface_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip_table_create()

void ip_table_create ( fib_protocol_t  fproto,
u32  table_id,
u8  is_api,
const u8 name 
)

Definition at line 666 of file ip_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip_table_delete()

void ip_table_delete ( fib_protocol_t  fproto,
u32  table_id,
u8  is_api 
)

Definition at line 483 of file ip_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_buffer_get_ip4_fib_index()

static u32 vlib_buffer_get_ip4_fib_index ( vlib_buffer_t b)
inlinestatic
+ Here is the caller graph for this function:

◆ vlib_buffer_get_ip6_fib_index()

static u32 vlib_buffer_get_ip6_fib_index ( vlib_buffer_t b)
inlinestatic
+ Here is the caller graph for this function:

◆ vlib_buffer_get_ip_fib_index()

static u32 vlib_buffer_get_ip_fib_index ( vlib_buffer_t b,
u8  is_ip4 
)
inlinestatic

Definition at line 284 of file ip.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ ip4_inacl_node

vlib_node_registration_t ip4_inacl_node
Initial value:
= {
.name = "ip4-inacl",
.vector_size = sizeof (u32),
.format_trace = format_ip_inacl_trace,
.error_strings = ip_inacl_error_strings,
.n_next_nodes = ACL_NEXT_INDEX_N_NEXT,
.next_nodes = {
[ACL_NEXT_INDEX_DENY] = "ip4-drop",
},
}
unsigned int u32
Definition: types.h:88
static char * ip_inacl_error_strings[]
Definition: ip_in_out_acl.c:76
#define ARRAY_LEN(x)
Definition: clib.h:67
static u8 * format_ip_inacl_trace(u8 *s, va_list *args)
Definition: ip_in_out_acl.c:42

(constructor) VLIB_REGISTER_NODE (ip4_inacl_node)

Definition at line 505 of file ip_in_out_acl.c.

◆ ip6_inacl_node

vlib_node_registration_t ip6_inacl_node
Initial value:
= {
.name = "ip6-inacl",
.vector_size = sizeof (u32),
.format_trace = format_ip_inacl_trace,
.error_strings = ip_inacl_error_strings,
.n_next_nodes = ACL_NEXT_INDEX_N_NEXT,
.next_nodes = {
[ACL_NEXT_INDEX_DENY] = "ip6-drop",
},
}
unsigned int u32
Definition: types.h:88
static char * ip_inacl_error_strings[]
Definition: ip_in_out_acl.c:76
#define ARRAY_LEN(x)
Definition: clib.h:67
static u8 * format_ip_inacl_trace(u8 *s, va_list *args)
Definition: ip_in_out_acl.c:42

(constructor) VLIB_REGISTER_NODE (ip6_inacl_node)

Definition at line 547 of file ip_in_out_acl.c.

◆ ip_main

ip_main_t ip_main

Definition at line 42 of file ip_init.c.