FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
util.h File Reference
+ Include dependency graph for util.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ip46_address_type(ip46)   (ip46_address_is_ip4(ip46)?IP46_TYPE_IP4:IP46_TYPE_IP6)
 
#define ip46_prefix_is_ip4(ip46, len)   ((len) >= 96 && ip46_address_is_ip4(ip46))
 
#define ip46_prefix_type(ip46, len)   (ip46_prefix_is_ip4(ip46, len)?IP46_TYPE_IP4:IP46_TYPE_IP6)
 
#define clib_u32_loop_gt(a, b)   (((u32)(a)) - ((u32)(b)) < 0x7fffffff)
 32 bits integer comparison for running values. More...
 

Functions

void ip46_prefix_normalize (ip46_address_t *prefix, u8 plen)
 
uword unformat_ip46_prefix (unformat_input_t *input, va_list *args)
 
u8format_ip46_prefix (u8 *s, va_list *args)
 

Macro Definition Documentation

◆ clib_u32_loop_gt

#define clib_u32_loop_gt (   a,
 
)    (((u32)(a)) - ((u32)(b)) < 0x7fffffff)

32 bits integer comparison for running values.

1 > 0 is true. But 1 > 0xffffffff also is.

Definition at line 38 of file util.h.

◆ ip46_address_type

#define ip46_address_type (   ip46)    (ip46_address_is_ip4(ip46)?IP46_TYPE_IP4:IP46_TYPE_IP6)

Definition at line 26 of file util.h.

◆ ip46_prefix_is_ip4

#define ip46_prefix_is_ip4 (   ip46,
  len 
)    ((len) >= 96 && ip46_address_is_ip4(ip46))

Definition at line 27 of file util.h.

◆ ip46_prefix_type

#define ip46_prefix_type (   ip46,
  len 
)    (ip46_prefix_is_ip4(ip46, len)?IP46_TYPE_IP4:IP46_TYPE_IP6)

Definition at line 28 of file util.h.

Function Documentation

◆ format_ip46_prefix()

u8* format_ip46_prefix ( u8 s,
va_list *  args 
)

Definition at line 54 of file util.c.

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

◆ ip46_prefix_normalize()

void ip46_prefix_normalize ( ip46_address_t *  prefix,
u8  plen 
)

Definition at line 18 of file util.c.

+ Here is the caller graph for this function:

◆ unformat_ip46_prefix()

uword unformat_ip46_prefix ( unformat_input_t input,
va_list *  args 
)

Definition at line 32 of file util.c.

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