FD.io VPP  v18.07-rc0-415-g6c78436
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

#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.

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

Definition at line 26 of file util.h.

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

Definition at line 27 of file util.h.

#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

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:

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:

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: