FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
ip_types.c File Reference
+ Include dependency graph for ip_types.c:

Go to the source code of this file.

Functions

u8format_ip_address (u8 *s, va_list *args)
 
uword unformat_ip_address (unformat_input_t *input, va_list *args)
 
u8format_ip_prefix (u8 *s, va_list *args)
 
uword unformat_ip_prefix (unformat_input_t *input, va_list *args)
 
u16 ip_address_size (const ip_address_t *a)
 
bool ip_address_is_zero (const ip_address_t *ip)
 
int ip_address_cmp (const ip_address_t *ip1, const ip_address_t *ip2)
 
void ip_address_copy (ip_address_t *dst, const ip_address_t *src)
 
u8ip_addr_bytes (ip_address_t *ip)
 
void ip_address_copy_addr (void *dst, const ip_address_t *src)
 
u16 ip_version_to_size (ip_address_family_t af)
 
vnet_link_t ip_address_family_to_link_type (ip_address_family_t af)
 
void ip_address_set (ip_address_t *dst, const void *src, u8 version)
 
fib_protocol_t ip_address_family_to_fib_proto (ip_address_family_t af)
 
ip_address_family_t ip_address_family_from_fib_proto (fib_protocol_t fp)
 
fib_protocol_t ip_address_to_46 (const ip_address_t *addr, ip46_address_t *a)
 
void ip_address_from_46 (const ip46_address_t *nh, fib_protocol_t fproto, ip_address_t *ip)
 
static void ip_prefix_normalize_ip4 (ip4_address_t *ip4, u8 preflen)
 
static void ip_prefix_normalize_ip6 (ip6_address_t *ip6, u8 preflen)
 
void ip_prefix_normalize (ip_prefix_t *a)
 
void ip_prefix_copy (void *dst, void *src)
 
int ip_prefix_cmp (ip_prefix_t *p1, ip_prefix_t *p2)
 
static bool ip4_prefix_validate (const ip_prefix_t *ip)
 
static bool ip6_prefix_validate (const ip_prefix_t *ip)
 
bool ip_prefix_validate (const ip_prefix_t *ip)
 
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_preflen_to_mask (u8 pref_len, ip6_address_t *mask)
 
void ip6_prefix_max_address_host_order (ip6_address_t *ip, u8 plen, ip6_address_t *res)
 
u32 ip6_mask_to_preflen (ip6_address_t *mask)
 

Function Documentation

◆ format_ip_address()

u8* format_ip_address ( u8 s,
va_list *  args 
)

Definition at line 21 of file ip_types.c.

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

◆ format_ip_prefix()

u8* format_ip_prefix ( u8 s,
va_list *  args 
)

Definition at line 56 of file ip_types.c.

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

◆ ip4_address_normalize()

void ip4_address_normalize ( ip4_address_t ip4,
u8  preflen 
)

Definition at line 411 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip4_mask_to_preflen()

u32 ip4_mask_to_preflen ( ip4_address_t mask)

Definition at line 450 of file ip_types.c.

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

◆ ip4_prefix_max_address_host_order()

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

Definition at line 458 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip4_prefix_validate()

static bool ip4_prefix_validate ( const ip_prefix_t ip)
static

Definition at line 368 of file ip_types.c.

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

◆ ip4_preflen_to_mask()

void ip4_preflen_to_mask ( u8  pref_len,
ip4_address_t ip 
)

Definition at line 441 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip6_address_normalize()

void ip6_address_normalize ( ip6_address_t *  ip6,
u8  preflen 
)

Definition at line 421 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip6_mask_to_preflen()

u32 ip6_mask_to_preflen ( ip6_address_t *  mask)

Definition at line 512 of file ip_types.c.

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

◆ ip6_prefix_max_address_host_order()

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

Definition at line 489 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip6_prefix_validate()

static bool ip6_prefix_validate ( const ip_prefix_t ip)
static

Definition at line 382 of file ip_types.c.

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

◆ ip6_preflen_to_mask()

void ip6_preflen_to_mask ( u8  pref_len,
ip6_address_t *  mask 
)

Definition at line 467 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip_addr_bytes()

u8* ip_addr_bytes ( ip_address_t ip)

Definition at line 146 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip_address_cmp()

int ip_address_cmp ( const ip_address_t ip1,
const ip_address_t ip2 
)

Definition at line 114 of file ip_types.c.

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

◆ ip_address_copy()

void ip_address_copy ( ip_address_t dst,
const ip_address_t src 
)

Definition at line 130 of file ip_types.c.

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

◆ ip_address_copy_addr()

void ip_address_copy_addr ( void *  dst,
const ip_address_t src 
)

Definition at line 161 of file ip_types.c.

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

◆ ip_address_family_from_fib_proto()

ip_address_family_t ip_address_family_from_fib_proto ( fib_protocol_t  fp)

Definition at line 235 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip_address_family_to_fib_proto()

fib_protocol_t ip_address_family_to_fib_proto ( ip_address_family_t  af)

Definition at line 221 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip_address_family_to_link_type()

vnet_link_t ip_address_family_to_link_type ( ip_address_family_t  af)

Definition at line 190 of file ip_types.c.

◆ ip_address_from_46()

void ip_address_from_46 ( const ip46_address_t *  nh,
fib_protocol_t  fproto,
ip_address_t ip 
)

Definition at line 257 of file ip_types.c.

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

◆ ip_address_is_zero()

bool ip_address_is_zero ( const ip_address_t ip)

Definition at line 99 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip_address_set()

void ip_address_set ( ip_address_t dst,
const void *  src,
u8  version 
)

Definition at line 205 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip_address_size()

u16 ip_address_size ( const ip_address_t a)

Definition at line 84 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip_address_to_46()

fib_protocol_t ip_address_to_46 ( const ip_address_t addr,
ip46_address_t *  a 
)

Definition at line 250 of file ip_types.c.

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

◆ ip_prefix_cmp()

int ip_prefix_cmp ( ip_prefix_t p1,
ip_prefix_t p2 
)

Definition at line 344 of file ip_types.c.

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

◆ ip_prefix_copy()

void ip_prefix_copy ( void *  dst,
void *  src 
)

Definition at line 338 of file ip_types.c.

+ Here is the caller graph for this function:

◆ ip_prefix_normalize()

void ip_prefix_normalize ( ip_prefix_t a)

Definition at line 318 of file ip_types.c.

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

◆ ip_prefix_normalize_ip4()

static void ip_prefix_normalize_ip4 ( ip4_address_t ip4,
u8  preflen 
)
static

Definition at line 265 of file ip_types.c.

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

◆ ip_prefix_normalize_ip6()

static void ip_prefix_normalize_ip6 ( ip6_address_t *  ip6,
u8  preflen 
)
static

Definition at line 282 of file ip_types.c.

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

◆ ip_prefix_validate()

bool ip_prefix_validate ( const ip_prefix_t ip)

Definition at line 397 of file ip_types.c.

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

◆ ip_version_to_size()

u16 ip_version_to_size ( ip_address_family_t  af)

Definition at line 175 of file ip_types.c.

+ Here is the caller graph for this function:

◆ unformat_ip_address()

uword unformat_ip_address ( unformat_input_t input,
va_list *  args 
)

Definition at line 41 of file ip_types.c.

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

◆ unformat_ip_prefix()

uword unformat_ip_prefix ( unformat_input_t input,
va_list *  args 
)

Definition at line 64 of file ip_types.c.

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