16 #ifndef VNET_LISP_GPE_LISP_TYPES_H_ 17 #define VNET_LISP_GPE_LISP_TYPES_H_ 48 #define ip_addr_addr(_a) (_a)->ip 49 #define ip_addr_v4(_a) (_a)->ip.v4 50 #define ip_addr_v6(_a) (_a)->ip.v6 51 #define ip_addr_version(_a) (_a)->version 53 #define ip_prefix_addr(_a) (_a)->addr 54 #define ip_prefix_version(_a) ip_addr_version(&ip_prefix_addr(_a)) 55 #define ip_prefix_len(_a) (_a)->len 56 #define ip_prefix_v4(_a) ip_addr_v4(&ip_prefix_addr(_a)) 57 #define ip_prefix_v6(_a) ip_addr_v6(&ip_prefix_addr(_a)) 78 struct _gid_address_t;
87 #define vni_vni(_a) (_a)->vni 88 #define vni_mask_len(_a) (_a)->vni_mask_len 89 #define vni_gid(_a) (_a)->gid_addr 95 struct _gid_address_t *
src;
96 struct _gid_address_t *
dst;
110 #define lcaf_type(_a) (_a)->type 111 #define lcaf_vni(_a) vni_vni(& (_a)->uni) 112 #define lcaf_vni_len(_a) vni_mask_len(& (_a)->uni) 113 #define lcaf_gid (_a) vni_gid(& (_a)->uni) 116 typedef struct _gid_address_t
161 #define gid_address_type(_a) (_a)->type 162 #define gid_address_ippref(_a) (_a)->ippref 163 #define gid_address_ippref_len(_a) (_a)->ippref.len 164 #define gid_address_ip(_a) ip_prefix_addr(&gid_address_ippref(_a)) 165 #define gid_address_lcaf(_a) (_a)->lcaf 166 #define gid_address_vni(_a) ( (GID_ADDR_LCAF == gid_address_type(_a)) ? \ 167 lcaf_vni(&gid_address_lcaf(_a)) : 0) 169 #define gid_address_set_vni(_a, _val) \ 170 (lcaf_vni(&gid_address_lcaf(_a)) = (_val)) 184 void lcaf_copy (
void * dst ,
void * src);
u16 ip_address_iana_afi(ip_address_t *a)
void locator_free(locator_t *l)
void gid_address_copy(gid_address_t *dst, gid_address_t *src)
typedef CLIB_PACKED(struct ip_address{union{ip4_address_t v4;ip6_address_t v6;}ip;u8 version;}) ip_address_t
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
u16 ip_prefix_write(u8 *p, void *pref)
u16 gid_address_put(u8 *b, gid_address_t *gid)
u16 ip6_address_size_to_put()
uword unformat_ip_address(unformat_input_t *input, va_list *args)
u16 ip_address_size_to_write(ip_address_t *a)
int ip_address_cmp(ip_address_t *ip1, ip_address_t *ip2)
void lcaf_copy(void *dst, void *src)
u32 locator_parse(void *ptr, locator_t *loc)
struct _gid_address_t * src
u32 gid_address_parse(u8 *offset, gid_address_t *a)
void * lcaf_cast(gid_address_t *a)
u16 lcaf_write(u8 *p, void *pref)
u8 lcaf_prefix_length(void *a)
void ip_address_copy(ip_address_t *dst, ip_address_t *src)
struct _gid_address_t * dst
struct _gid_address_t * gid_addr
u8 gid_address_len(gid_address_t *a)
void ip_address_copy_addr(void *dst, ip_address_t *src)
u16 lcaf_size_to_write(void *pref)
u8 ip_prefix_length(void *a)
uword unformat_gid_address(unformat_input_t *input, va_list *args)
u32 ip4_address_put(u8 *b, ip4_address_t *a)
u8 * format_ip_prefix(u8 *s, va_list *args)
u32 ip_address_put(u8 *b, ip_address_t *a)
int lcaf_cmp(lcaf_t *lcaf1, lcaf_t *lcaf2)
void gid_address_free(gid_address_t *a)
u16 gid_address_size_to_put(gid_address_t *a)
u8 * format_gid_address(u8 *s, va_list *args)
int gid_address_cmp(gid_address_t *a1, gid_address_t *a2)
struct _gid_address_t gid_address_t
void * gid_address_cast(gid_address_t *gid, gid_address_type_t type)
void ip_prefix_copy(void *dst, void *src)
u16 ip_prefix_size_to_write(void *pref)
u8 ip_address_max_len(u8 ver)
u16 ip4_address_size_to_put()
u8 * format_ip_address(u8 *s, va_list *args)
u32 locator_cmp(locator_t *l1, locator_t *l2)
u32 ip6_address_put(u8 *b, ip6_address_t *a)
void locator_copy(locator_t *dst, locator_t *src)
uword unformat_ip_prefix(unformat_input_t *input, va_list *args)
void * ip_prefix_cast(gid_address_t *a)