FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
ip46_address.h File Reference
+ Include dependency graph for ip46_address.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IP46_N_TYPES   (IP46_TYPE_IP6+2)
 
#define FOREACH_IP46_TYPE(_type)   for (_type = IP46_TYPE_IP4; _type <= IP46_TYPE_IP6; _type++)
 
#define ip46_address_initializer   {{{ 0 }}}
 

Enumerations

enum  ip46_type_t { IP46_TYPE_ANY, IP46_TYPE_BOTH = IP46_TYPE_ANY, IP46_TYPE_IP4, IP46_TYPE_IP6 }
 

Functions

u8format_ip46_type (u8 *s, va_list *args)
 
typedef CLIB_PACKED (union ip46_address_t_ { struct { u32 pad[3];ip4_address_t ip4;};ip6_address_t ip6;u8 as_u8[16];u64 as_u64[2];}) ip46_address_t
 
static u8 ip46_address_is_ip4 (const ip46_address_t *ip46)
 
static void ip46_address_mask_ip4 (ip46_address_t *ip46)
 
static void ip46_address_set_ip4 (ip46_address_t *ip46, const ip4_address_t *ip)
 
static void ip46_address_reset (ip46_address_t *ip46)
 
static int ip46_address_cmp (const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
 
static u8 ip46_address_is_zero (const ip46_address_t *ip46)
 
static u8 ip46_address_is_equal (const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
 
static_always_inline int ip4_address_is_equal (const ip4_address_t *ip4_1, const ip4_address_t *ip4_2)
 
static_always_inline int ip46_address_is_equal_v4 (const ip46_address_t *ip46, const ip4_address_t *ip4)
 
static_always_inline int ip46_address_is_equal_v6 (const ip46_address_t *ip46, const ip6_address_t *ip6)
 
static_always_inline void ip46_address_copy (ip46_address_t *dst, const ip46_address_t *src)
 
static_always_inline void ip46_address_set_ip6 (ip46_address_t *dst, const ip6_address_t *src)
 
static ip46_address_t to_ip46 (u32 is_ipv6, u8 *buf)
 
static ip46_type_t ip46_address_get_type (const ip46_address_t *ip)
 
static uword ip46_address_is_multicast (const ip46_address_t *a)
 
void ip4_address_increment (ip4_address_t *i)
 
void ip6_address_increment (ip6_address_t *i)
 
void ip46_address_increment (ip46_type_t type, ip46_address_t *ip)
 

Variables

format_function_t format_ip46_address
 

Macro Definition Documentation

◆ FOREACH_IP46_TYPE

#define FOREACH_IP46_TYPE (   _type)    for (_type = IP46_TYPE_IP4; _type <= IP46_TYPE_IP6; _type++)

Definition at line 32 of file ip46_address.h.

◆ ip46_address_initializer

#define ip46_address_initializer   {{{ 0 }}}

Definition at line 52 of file ip46_address.h.

◆ IP46_N_TYPES

#define IP46_N_TYPES   (IP46_TYPE_IP6+2)

Definition at line 30 of file ip46_address.h.

Enumeration Type Documentation

◆ ip46_type_t

Enumerator
IP46_TYPE_ANY 
IP46_TYPE_BOTH 
IP46_TYPE_IP4 
IP46_TYPE_IP6 

Definition at line 22 of file ip46_address.h.

Function Documentation

◆ CLIB_PACKED()

typedef CLIB_PACKED ( union ip46_address_t_ { struct { u32 pad[3];ip4_address_t ip4;};ip6_address_t ip6;u8 as_u8[16];u64 as_u64[2];}  )

◆ format_ip46_type()

u8* format_ip46_type ( u8 s,
va_list *  args 
)

Definition at line 19 of file ip46_address.c.

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

◆ ip46_address_cmp()

static int ip46_address_cmp ( const ip46_address_t *  ip46_1,
const ip46_address_t *  ip46_2 
)
inlinestatic

Definition at line 80 of file ip46_address.h.

+ Here is the caller graph for this function:

◆ ip46_address_copy()

static_always_inline void ip46_address_copy ( ip46_address_t *  dst,
const ip46_address_t *  src 
)

Definition at line 123 of file ip46_address.h.

+ Here is the caller graph for this function:

◆ ip46_address_get_type()

static ip46_type_t ip46_address_get_type ( const ip46_address_t *  ip)
inlinestatic

Definition at line 148 of file ip46_address.h.

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

◆ ip46_address_increment()

void ip46_address_increment ( ip46_type_t  type,
ip46_address_t *  ip 
)

Definition at line 61 of file ip46_address.c.

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

◆ ip46_address_is_equal()

static u8 ip46_address_is_equal ( const ip46_address_t *  ip46_1,
const ip46_address_t *  ip46_2 
)
inlinestatic

Definition at line 93 of file ip46_address.h.

+ Here is the caller graph for this function:

◆ ip46_address_is_equal_v4()

static_always_inline int ip46_address_is_equal_v4 ( const ip46_address_t *  ip46,
const ip4_address_t ip4 
)

Definition at line 108 of file ip46_address.h.

+ Here is the caller graph for this function:

◆ ip46_address_is_equal_v6()

static_always_inline int ip46_address_is_equal_v6 ( const ip46_address_t *  ip46,
const ip6_address_t *  ip6 
)

Definition at line 115 of file ip46_address.h.

+ Here is the caller graph for this function:

◆ ip46_address_is_ip4()

static u8 ip46_address_is_ip4 ( const ip46_address_t *  ip46)
inlinestatic

Definition at line 55 of file ip46_address.h.

◆ ip46_address_is_multicast()

static uword ip46_address_is_multicast ( const ip46_address_t *  a)
inlinestatic

Definition at line 154 of file ip46_address.h.

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

◆ ip46_address_is_zero()

static u8 ip46_address_is_zero ( const ip46_address_t *  ip46)
inlinestatic

Definition at line 87 of file ip46_address.h.

+ Here is the caller graph for this function:

◆ ip46_address_mask_ip4()

static void ip46_address_mask_ip4 ( ip46_address_t *  ip46)
inlinestatic

Definition at line 61 of file ip46_address.h.

+ Here is the caller graph for this function:

◆ ip46_address_reset()

static void ip46_address_reset ( ip46_address_t *  ip46)
inlinestatic

Definition at line 74 of file ip46_address.h.

+ Here is the caller graph for this function:

◆ ip46_address_set_ip4()

static void ip46_address_set_ip4 ( ip46_address_t *  ip46,
const ip4_address_t ip 
)
inlinestatic

Definition at line 67 of file ip46_address.h.

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

◆ ip46_address_set_ip6()

static_always_inline void ip46_address_set_ip6 ( ip46_address_t *  dst,
const ip6_address_t *  src 
)

Definition at line 130 of file ip46_address.h.

+ Here is the caller graph for this function:

◆ ip4_address_increment()

void ip4_address_increment ( ip4_address_t i)

Definition at line 37 of file ip46_address.c.

+ Here is the caller graph for this function:

◆ ip4_address_is_equal()

static_always_inline int ip4_address_is_equal ( const ip4_address_t ip4_1,
const ip4_address_t ip4_2 
)

Definition at line 101 of file ip46_address.h.

◆ ip6_address_increment()

void ip6_address_increment ( ip6_address_t *  i)

Definition at line 45 of file ip46_address.c.

+ Here is the caller graph for this function:

◆ to_ip46()

static ip46_address_t to_ip46 ( u32  is_ipv6,
u8 buf 
)
inlinestatic

Definition at line 137 of file ip46_address.h.

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

Variable Documentation

◆ format_ip46_address

format_function_t format_ip46_address

Definition at line 50 of file ip46_address.h.