FD.io VPP  v18.01-8-g0eacf49
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)
 
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 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...
 
u8 ip_interface_has_address (u32 sw_if_index, ip46_address_t *ip, u8 is_ip4)
 
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)
 
void * ip_interface_get_first_ip (u32 sw_if_index, u8 is_ip4)
 
void ip4_address_normalize (ip4_address_t *ip4, u8 preflen)
 
void ip6_address_normalize (ip6_address_t *ip6, u8 preflen)
 
void ip4_preflen_to_mask (u8 pref_len, ip4_address_t *ip)
 
u32 ip4_mask_to_preflen (ip4_address_t *mask)
 
void ip4_prefix_max_address_host_order (ip4_address_t *ip, u8 plen, ip4_address_t *res)
 
void ip6_prefix_max_address_host_order (ip6_address_t *ip, u8 plen, ip6_address_t *res)
 
void ip6_preflen_to_mask (u8 pref_len, ip6_address_t *mask)
 
u32 ip6_mask_to_preflen (ip6_address_t *mask)
 

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

void ip4_address_normalize ( ip4_address_t ip4,
u8  preflen 
)

Definition at line 152 of file ip.c.

+ Here is the caller graph for this function:

u32 ip4_mask_to_preflen ( ip4_address_t mask)

Definition at line 191 of file ip.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_prefix_max_address_host_order ( ip4_address_t ip,
u8  plen,
ip4_address_t res 
)

Definition at line 199 of file ip.c.

+ Here is the caller graph for this function:

void ip4_preflen_to_mask ( u8  pref_len,
ip4_address_t ip 
)

Definition at line 182 of file ip.c.

+ Here is the caller graph for this function:

void ip6_address_normalize ( ip6_address_t ip6,
u8  preflen 
)

Definition at line 162 of file ip.c.

+ Here is the caller graph for this function:

u32 ip6_mask_to_preflen ( ip6_address_t mask)

Definition at line 252 of file ip.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip6_prefix_max_address_host_order ( ip6_address_t ip,
u8  plen,
ip6_address_t res 
)

Definition at line 229 of file ip.c.

+ Here is the caller graph for this function:

void ip6_preflen_to_mask ( u8  pref_len,
ip6_address_t mask 
)

Definition at line 208 of file ip.c.

+ Here is the caller graph for this function:

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

Definition at line 67 of file ip.c.

+ Here is the caller graph for this function:

void ip_del_all_interface_addresses ( vlib_main_t vm,
u32  sw_if_index 
)

Definition at line 80 of file ip46_cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 133 of file ip.h.

+ Here is the caller graph for this function:

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

Definition at line 142 of file ip.h.

+ Here is the caller graph for this function:

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 151 of file ip.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* ip_interface_get_first_ip ( u32  sw_if_index,
u8  is_ip4 
)

Definition at line 119 of file ip.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 ip_interface_has_address ( u32  sw_if_index,
ip46_address_t *  ip,
u8  is_ip4 
)

Definition at line 85 of file ip.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 41 of file ip.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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:

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:

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:

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

Definition at line 76 of file ip.c.

+ Here is the caller graph for this function:

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

Definition at line 368 of file interface_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 1242 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 786 of file ip_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_node_registration_t ip4_inacl_node
Initial value:
= {
.function = ip4_inacl,
.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",
},
}
static u8 * format_ip_inacl_trace(u8 *s, va_list *args)
Definition: ip_input_acl.c:29
static char * ip_inacl_error_strings[]
Definition: ip_input_acl.c:56
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
static uword ip4_inacl(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip_input_acl.c:388

(constructor) VLIB_REGISTER_NODE (ip4_inacl_node)

Definition at line 395 of file ip_input_acl.c.

vlib_node_registration_t ip6_inacl_node
Initial value:
= {
.function = ip6_inacl,
.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",
},
}
static u8 * format_ip_inacl_trace(u8 *s, va_list *args)
Definition: ip_input_acl.c:29
static char * ip_inacl_error_strings[]
Definition: ip_input_acl.c:56
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
static uword ip6_inacl(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip_input_acl.c:413

(constructor) VLIB_REGISTER_NODE (ip6_inacl_node)

Definition at line 420 of file ip_input_acl.c.

ip_main_t ip_main

Definition at line 42 of file ip_init.c.