FD.io VPP  v16.06
Vector Packet Processing
lisp_types.h File Reference
+ Include dependency graph for lisp_types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vni_t
 
struct  source_dest_t
 
struct  lcaf_t
 
struct  locator_t
 
struct  locator_set_t
 
struct  mapping_t
 

Macros

#define ip_addr_addr(_a)   (_a)->ip
 
#define ip_addr_v4(_a)   (_a)->ip.v4
 
#define ip_addr_v6(_a)   (_a)->ip.v6
 
#define ip_addr_version(_a)   (_a)->version
 
#define ip_prefix_addr(_a)   (_a)->addr
 
#define ip_prefix_version(_a)   ip_addr_version(&ip_prefix_addr(_a))
 
#define ip_prefix_len(_a)   (_a)->len
 
#define ip_prefix_v4(_a)   ip_addr_v4(&ip_prefix_addr(_a))
 
#define ip_prefix_v6(_a)   ip_addr_v6(&ip_prefix_addr(_a))
 
#define vni_vni(_a)   (_a)->vni
 
#define vni_mask_len(_a)   (_a)->vni_mask_len
 
#define vni_gid(_a)   (_a)->gid_addr
 
#define lcaf_type(_a)   (_a)->type
 
#define lcaf_vni(_a)   vni_vni(& (_a)->uni)
 
#define lcaf_vni_len(_a)   vni_mask_len(& (_a)->uni)
 
#define lcaf_gid   (_a) vni_gid(& (_a)->uni)
 
#define gid_address_type(_a)   (_a)->type
 
#define gid_address_ippref(_a)   (_a)->ippref
 
#define gid_address_ippref_len(_a)   (_a)->ippref.len
 
#define gid_address_ip(_a)   ip_prefix_addr(&gid_address_ippref(_a))
 
#define gid_address_lcaf(_a)   (_a)->lcaf
 
#define gid_address_vni(_a)
 
#define gid_address_set_vni(_a, _val)   (lcaf_vni(&gid_address_lcaf(_a)) = (_val))
 

Typedefs

typedef struct _gid_address_t gid_address_t
 

Enumerations

enum  ip_address_type_t { IP4, IP6 }
 
enum  gid_address_type_t { GID_ADDR_IP_PREFIX, GID_ADDR_LCAF, GID_ADDR_NO_ADDRESS, GID_ADDR_TYPES }
 
enum  lcaf_type_t { LCAF_NULL_BODY = 0, LCAF_AFI_LIST_TYPE, LCAF_INSTANCE_ID, LCAF_TYPES }
 
enum  lisp_afi_e { LISP_AFI_NO_ADDR, LISP_AFI_IP, LISP_AFI_IP6, LISP_AFI_LCAF = 16387 }
 

Functions

typedef CLIB_PACKED (struct ip_address{union{ip4_address_t v4;ip6_address_t v6;}ip;u8 version;}) ip_address_t
 
int ip_address_cmp (ip_address_t *ip1, ip_address_t *ip2)
 
void ip_address_copy (ip_address_t *dst, ip_address_t *src)
 
void ip_address_copy_addr (void *dst, ip_address_t *src)
 
typedef CLIB_PACKED (struct ip_prefix{ip_address_t addr;u8 len;}) ip_prefix_t
 
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 ip4_address_size_to_put ()
 
u16 ip6_address_size_to_put ()
 
u32 ip4_address_put (u8 *b, ip4_address_t *a)
 
u32 ip6_address_put (u8 *b, ip6_address_t *a)
 
u16 ip_address_size_to_write (ip_address_t *a)
 
u16 ip_address_iana_afi (ip_address_t *a)
 
u8 ip_address_max_len (u8 ver)
 
u32 ip_address_put (u8 *b, ip_address_t *a)
 
u8format_gid_address (u8 *s, va_list *args)
 
uword unformat_gid_address (unformat_input_t *input, va_list *args)
 
int gid_address_cmp (gid_address_t *a1, gid_address_t *a2)
 
void gid_address_free (gid_address_t *a)
 
u16 gid_address_size_to_put (gid_address_t *a)
 
u16 gid_address_put (u8 *b, gid_address_t *gid)
 
u8 gid_address_len (gid_address_t *a)
 
voidgid_address_cast (gid_address_t *gid, gid_address_type_t type)
 
void gid_address_copy (gid_address_t *dst, gid_address_t *src)
 
u32 gid_address_parse (u8 *offset, gid_address_t *a)
 
u16 ip_prefix_size_to_write (void *pref)
 
u16 ip_prefix_write (u8 *p, void *pref)
 
u8 ip_prefix_length (void *a)
 
voidip_prefix_cast (gid_address_t *a)
 
void ip_prefix_copy (void *dst, void *src)
 
int lcaf_cmp (lcaf_t *lcaf1, lcaf_t *lcaf2)
 
u16 lcaf_size_to_write (void *pref)
 
u16 lcaf_write (u8 *p, void *pref)
 
u8 lcaf_prefix_length (void *a)
 
voidlcaf_cast (gid_address_t *a)
 
void lcaf_copy (void *dst, void *src)
 
u32 locator_parse (void *ptr, locator_t *loc)
 
void locator_copy (locator_t *dst, locator_t *src)
 
u32 locator_cmp (locator_t *l1, locator_t *l2)
 
void locator_free (locator_t *l)
 

Macro Definition Documentation

#define gid_address_ip (   _a)    ip_prefix_addr(&gid_address_ippref(_a))

Definition at line 164 of file lisp_types.h.

#define gid_address_ippref (   _a)    (_a)->ippref

Definition at line 162 of file lisp_types.h.

#define gid_address_ippref_len (   _a)    (_a)->ippref.len

Definition at line 163 of file lisp_types.h.

#define gid_address_lcaf (   _a)    (_a)->lcaf

Definition at line 165 of file lisp_types.h.

#define gid_address_set_vni (   _a,
  _val 
)    (lcaf_vni(&gid_address_lcaf(_a)) = (_val))

Definition at line 169 of file lisp_types.h.

#define gid_address_type (   _a)    (_a)->type

Definition at line 161 of file lisp_types.h.

#define gid_address_vni (   _a)
Value:
#define gid_address_type(_a)
Definition: lisp_types.h:161
#define gid_address_lcaf(_a)
Definition: lisp_types.h:165
#define lcaf_vni(_a)
Definition: lisp_types.h:111

Definition at line 166 of file lisp_types.h.

#define ip_addr_addr (   _a)    (_a)->ip

Definition at line 48 of file lisp_types.h.

#define ip_addr_v4 (   _a)    (_a)->ip.v4

Definition at line 49 of file lisp_types.h.

#define ip_addr_v6 (   _a)    (_a)->ip.v6

Definition at line 50 of file lisp_types.h.

#define ip_addr_version (   _a)    (_a)->version

Definition at line 51 of file lisp_types.h.

#define ip_prefix_addr (   _a)    (_a)->addr

Definition at line 53 of file lisp_types.h.

#define ip_prefix_len (   _a)    (_a)->len

Definition at line 55 of file lisp_types.h.

#define ip_prefix_v4 (   _a)    ip_addr_v4(&ip_prefix_addr(_a))

Definition at line 56 of file lisp_types.h.

#define ip_prefix_v6 (   _a)    ip_addr_v6(&ip_prefix_addr(_a))

Definition at line 57 of file lisp_types.h.

#define ip_prefix_version (   _a)    ip_addr_version(&ip_prefix_addr(_a))

Definition at line 54 of file lisp_types.h.

#define lcaf_gid   (_a) vni_gid(& (_a)->uni)

Definition at line 113 of file lisp_types.h.

#define lcaf_type (   _a)    (_a)->type

Definition at line 110 of file lisp_types.h.

#define lcaf_vni (   _a)    vni_vni(& (_a)->uni)

Definition at line 111 of file lisp_types.h.

#define lcaf_vni_len (   _a)    vni_mask_len(& (_a)->uni)

Definition at line 112 of file lisp_types.h.

#define vni_gid (   _a)    (_a)->gid_addr

Definition at line 89 of file lisp_types.h.

#define vni_mask_len (   _a)    (_a)->vni_mask_len

Definition at line 88 of file lisp_types.h.

#define vni_vni (   _a)    (_a)->vni

Definition at line 87 of file lisp_types.h.

Typedef Documentation

typedef struct _gid_address_t gid_address_t

Enumeration Type Documentation

Enumerator
GID_ADDR_IP_PREFIX 
GID_ADDR_LCAF 
GID_ADDR_NO_ADDRESS 
GID_ADDR_TYPES 

Definition at line 59 of file lisp_types.h.

Enumerator
IP4 
IP6 

Definition at line 22 of file lisp_types.h.

Enumerator
LCAF_NULL_BODY 
LCAF_AFI_LIST_TYPE 
LCAF_INSTANCE_ID 
LCAF_TYPES 

Definition at line 69 of file lisp_types.h.

enum lisp_afi_e
Enumerator
LISP_AFI_NO_ADDR 
LISP_AFI_IP 
LISP_AFI_IP6 
LISP_AFI_LCAF 

Definition at line 142 of file lisp_types.h.

Function Documentation

typedef CLIB_PACKED ( struct ip_address{union{ip4_address_t v4;ip6_address_t v6;}ip;u8 version;}  )
typedef CLIB_PACKED ( struct ip_prefix{ip_address_t addr;u8 len;}  )
u8* format_gid_address ( u8 s,
va_list *  args 
)

Definition at line 151 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_ip_address ( u8 s,
va_list *  args 
)

Definition at line 103 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_ip_prefix ( u8 s,
va_list *  args 
)

Definition at line 136 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* gid_address_cast ( gid_address_t gid,
gid_address_type_t  type 
)

Definition at line 650 of file lisp_types.c.

int gid_address_cmp ( gid_address_t a1,
gid_address_t a2 
)

Definition at line 730 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gid_address_copy ( gid_address_t dst,
gid_address_t src 
)

Definition at line 656 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gid_address_free ( gid_address_t a)

Definition at line 392 of file lisp_types.c.

+ Here is the caller graph for this function:

u8 gid_address_len ( gid_address_t a)

Definition at line 629 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 gid_address_parse ( u8 offset,
gid_address_t a 
)

Definition at line 664 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u16 gid_address_put ( u8 b,
gid_address_t gid 
)

Definition at line 636 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u16 gid_address_size_to_put ( gid_address_t a)

Definition at line 643 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 ip4_address_put ( u8 b,
ip4_address_t a 
)

Definition at line 284 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u16 ip4_address_size_to_put ( )

Definition at line 270 of file lisp_types.c.

+ Here is the caller graph for this function:

u32 ip6_address_put ( u8 b,
ip6_address_t a 
)

Definition at line 293 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u16 ip6_address_size_to_put ( )

Definition at line 277 of file lisp_types.c.

+ Here is the caller graph for this function:

int ip_address_cmp ( ip_address_t *  ip1,
ip_address_t *  ip2 
)

Definition at line 403 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip_address_copy ( ip_address_t *  dst,
ip_address_t *  src 
)

Definition at line 419 of file lisp_types.c.

+ Here is the caller graph for this function:

void ip_address_copy_addr ( void dst,
ip_address_t *  src 
)

Definition at line 425 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u16 ip_address_iana_afi ( ip_address_t *  a)

Definition at line 258 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 ip_address_max_len ( u8  ver)

Definition at line 264 of file lisp_types.c.

+ Here is the caller graph for this function:

u32 ip_address_put ( u8 b,
ip_address_t *  a 
)

Definition at line 302 of file lisp_types.c.

+ Here is the call graph for this function:

u16 ip_address_size_to_write ( ip_address_t *  a)

Definition at line 252 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* ip_prefix_cast ( gid_address_t a)

Definition at line 431 of file lisp_types.c.

void ip_prefix_copy ( void dst,
void src 
)

Definition at line 466 of file lisp_types.c.

+ Here is the caller graph for this function:

u8 ip_prefix_length ( void a)

Definition at line 460 of file lisp_types.c.

u16 ip_prefix_size_to_write ( void pref)

Definition at line 437 of file lisp_types.c.

+ Here is the call graph for this function:

u16 ip_prefix_write ( u8 p,
void pref 
)

Definition at line 444 of file lisp_types.c.

+ Here is the call graph for this function:

void* lcaf_cast ( gid_address_t a)

Definition at line 525 of file lisp_types.c.

int lcaf_cmp ( lcaf_t lcaf1,
lcaf_t lcaf2 
)
void lcaf_copy ( void dst,
void src 
)

Definition at line 509 of file lisp_types.c.

u8 lcaf_prefix_length ( void a)

Definition at line 519 of file lisp_types.c.

u16 lcaf_size_to_write ( void pref)

Definition at line 613 of file lisp_types.c.

+ Here is the call graph for this function:

u16 lcaf_write ( u8 p,
void pref 
)

Definition at line 545 of file lisp_types.c.

+ Here is the call graph for this function:

u32 locator_cmp ( locator_t l1,
locator_t l2 
)

Definition at line 799 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void locator_copy ( locator_t dst,
locator_t src 
)

Definition at line 790 of file lisp_types.c.

+ Here is the call graph for this function:

void locator_free ( locator_t l)

Definition at line 817 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 locator_parse ( void ptr,
locator_t loc 
)

Definition at line 765 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_gid_address ( unformat_input_t input,
va_list *  args 
)

Definition at line 166 of file lisp_types.c.

+ Here is the call graph for this function:

uword unformat_ip_address ( unformat_input_t input,
va_list *  args 
)

Definition at line 123 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_ip_prefix ( unformat_input_t input,
va_list *  args 
)

Definition at line 143 of file lisp_types.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: