16 #ifndef VNET_LISP_GPE_LISP_TYPES_H_ 17 #define VNET_LISP_GPE_LISP_TYPES_H_ 40 #define ip_addr_addr(_a) (_a)->ip 41 #define ip_addr_v4(_a) (_a)->ip.v4 42 #define ip_addr_v6(_a) (_a)->ip.v6 43 #define ip_addr_version(_a) (_a)->version 58 #define ip_prefix_addr(_a) (_a)->addr 59 #define ip_prefix_version(_a) ip_addr_version(&ip_prefix_addr(_a)) 60 #define ip_prefix_len(_a) (_a)->len 61 #define ip_prefix_v4(_a) ip_addr_v4(&ip_prefix_addr(_a)) 62 #define ip_prefix_v6(_a) ip_addr_v6(&ip_prefix_addr(_a)) 107 #define fid_addr_ippref(_a) (_a)->ippref 108 #define fid_addr_mac(_a) (_a)->mac 109 #define fid_addr_type(_a) (_a)->type 117 #define sd_dst(_a) (_a)->dst 118 #define sd_src(_a) (_a)->src 119 #define sd_src_ippref(_a) fid_addr_ippref(&sd_src(_a)) 120 #define sd_dst_ippref(_a) fid_addr_ippref(&sd_dst(_a)) 121 #define sd_src_mac(_a) fid_addr_mac(&sd_src(_a)) 122 #define sd_dst_mac(_a) fid_addr_mac(&sd_dst(_a)) 131 #define vni_vni(_a) (_a)->vni 132 #define vni_mask_len(_a) (_a)->vni_mask_len 133 #define vni_gid(_a) (_a)->gid_addr 146 #define lcaf_type(_a) (_a)->type 147 #define lcaf_vni(_a) vni_vni(& (_a)->uni) 148 #define lcaf_vni_len(_a) vni_mask_len(& (_a)->uni) 151 typedef struct _gid_address_t
205 #define gid_address_type(_a) (_a)->type 206 #define gid_address_ippref(_a) (_a)->ippref 207 #define gid_address_ippref_len(_a) (_a)->ippref.len 208 #define gid_address_ip(_a) ip_prefix_addr(&gid_address_ippref(_a)) 209 #define gid_address_ip_version(_a) ip_addr_version(&gid_address_ip(_a)) 210 #define gid_address_lcaf(_a) (_a)->lcaf 211 #define gid_address_mac(_a) (_a)->mac 212 #define gid_address_vni(_a) (_a)->vni 213 #define gid_address_vni_mask(_a) (_a)->vni_mask 214 #define gid_address_sd_dst_ippref(_a) sd_dst_ippref(&(_a)->sd) 215 #define gid_address_sd_src_ippref(_a) sd_src_ippref(&(_a)->sd) 216 #define gid_address_sd_dst_mac(_a) sd_dst_mac(&(_a)->sd) 217 #define gid_address_sd_src_mac(_a) sd_src_mac(&(_a)->sd) 218 #define gid_address_sd(_a) (_a)->sd 219 #define gid_address_sd_src(_a) sd_src(&gid_address_sd(_a)) 220 #define gid_address_sd_dst(_a) sd_dst(&gid_address_sd(_a)) 223 #define foreach_gid_address_type_fcns \ 231 u16 _n ## _size_to_write (void * pref); \ 232 u16 _n ## _write (u8 * p, void * pref); \ 233 u8 _n ## _length (void *a); \ 234 void * _n ## _cast (gid_address_t * a); \ 235 void _n ## _copy (void * dst , void * src); 244 return (*((
u64 *) m) & 0xffffffffffff);
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
uword unformat_mac_address(unformat_input_t *input, va_list *args)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
u16 gid_address_put(u8 *b, gid_address_t *gid)
struct locator_pair locator_pair_t
void ip_address_set(ip_address_t *dst, void *src, u8 version)
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)
u32 locator_parse(void *ptr, locator_t *loc)
u32 gid_address_parse(u8 *offset, gid_address_t *a)
uword unformat_negative_mapping_action(unformat_input_t *input, va_list *args)
static foreach_gid_address_type_fcns u64 mac_to_u64(u8 *m)
void ip_address_copy(ip_address_t *dst, ip_address_t *src)
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)
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)
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)
void gid_address_ip_set(gid_address_t *dst, void *src, u8 version)
void ip_prefix_normalize(ip_prefix_t *a)
struct _gid_address_t gid_address_t
void * gid_address_cast(gid_address_t *gid, gid_address_type_t type)
u8 * format_mac_address(u8 *s, va_list *args)
fid_address_t dp_address_t
u8 ip_address_max_len(u8 ver)
u16 ip4_address_size_to_put()
template key/value backing page structure
u8 * format_ip_address(u8 *s, va_list *args)
u32 locator_cmp(locator_t *l1, locator_t *l2)
#define foreach_gid_address_type_fcns
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)