16 #ifndef VNET_LISP_GPE_LISP_TYPES_H_ 17 #define VNET_LISP_GPE_LISP_TYPES_H_ 22 #define SHA1_AUTH_DATA_LEN 20 23 #define SHA256_AUTH_DATA_LEN 32 53 #define ip_addr_addr(_a) (_a)->ip 54 #define ip_addr_v4(_a) (_a)->ip.v4 55 #define ip_addr_v6(_a) (_a)->ip.v6 56 #define ip_addr_version(_a) (_a)->version 71 #define ip_prefix_addr(_a) (_a)->addr 72 #define ip_prefix_version(_a) ip_addr_version(&ip_prefix_addr(_a)) 73 #define ip_prefix_len(_a) (_a)->len 74 #define ip_prefix_v4(_a) ip_addr_v4(&ip_prefix_addr(_a)) 75 #define ip_prefix_v6(_a) ip_addr_v6(&ip_prefix_addr(_a)) 131 #define fid_addr_ippref(_a) (_a)->ippref 132 #define fid_addr_prefix_length(_a) ip_prefix_len(&fid_addr_ippref(_a)) 133 #define fid_addr_ip_version(_a) ip_prefix_version(&fid_addr_ippref(_a)) 134 #define fid_addr_mac(_a) (_a)->mac 135 #define fid_addr_nsh(_a) (_a)->nsh 136 #define fid_addr_type(_a) (_a)->type 145 #define sd_dst(_a) (_a)->dst 146 #define sd_src(_a) (_a)->src 147 #define sd_src_ippref(_a) fid_addr_ippref(&sd_src(_a)) 148 #define sd_dst_ippref(_a) fid_addr_ippref(&sd_dst(_a)) 149 #define sd_src_mac(_a) fid_addr_mac(&sd_src(_a)) 150 #define sd_dst_mac(_a) fid_addr_mac(&sd_dst(_a)) 151 #define sd_src_type(_a) fid_addr_type(&sd_src(_a)) 152 #define sd_dst_type(_a) fid_addr_type(&sd_dst(_a)) 161 #define vni_vni(_a) (_a)->vni 162 #define vni_mask_len(_a) (_a)->vni_mask_len 163 #define vni_gid(_a) (_a)->gid_addr 171 #define nsh_spi(_a) (_a)->spi 172 #define nsh_si(_a) (_a)->si 180 #define lcaf_arp_ndp_ip(_a) (_a)->addr 181 #define lcaf_arp_ndp_ip_ver(_a) ip_addr_version(&lcaf_arp_ndp_ip(_a)) 182 #define lcaf_arp_ndp_ip4(_a) ip_addr_v4(&lcaf_arp_ndp_ip(_a)) 183 #define lcaf_arp_ndp_ip6(_a) ip_addr_v6(&lcaf_arp_ndp_ip(_a)) 184 #define lcaf_arp_ndp_bd(_a) (_a)->bd 198 #define lcaf_type(_a) (_a)->type 199 #define lcaf_vni(_a) vni_vni(& (_a)->uni) 200 #define lcaf_vni_len(_a) vni_mask_len(& (_a)->uni) 203 typedef struct _gid_address_t
259 #define gid_address_type(_a) (_a)->type 260 #define gid_address_ippref(_a) (_a)->ippref 261 #define gid_address_ippref_len(_a) (_a)->ippref.len 262 #define gid_address_ip(_a) ip_prefix_addr(&gid_address_ippref(_a)) 263 #define gid_address_ip_version(_a) ip_addr_version(&gid_address_ip(_a)) 264 #define gid_address_lcaf(_a) (_a)->lcaf 265 #define gid_address_mac(_a) (_a)->mac 266 #define gid_address_nsh(_a) (_a)->nsh 267 #define gid_address_nsh_spi(_a) nsh_spi(&gid_address_nsh(_a)) 268 #define gid_address_nsh_si(_a) nsh_si(&gid_address_nsh(_a)) 269 #define gid_address_vni(_a) (_a)->vni 270 #define gid_address_vni_mask(_a) (_a)->vni_mask 271 #define gid_address_sd_dst_ippref(_a) sd_dst_ippref(&(_a)->sd) 272 #define gid_address_sd_src_ippref(_a) sd_src_ippref(&(_a)->sd) 273 #define gid_address_sd_dst_mac(_a) sd_dst_mac(&(_a)->sd) 274 #define gid_address_sd_src_mac(_a) sd_src_mac(&(_a)->sd) 275 #define gid_address_sd(_a) (_a)->sd 276 #define gid_address_sd_src(_a) sd_src(&gid_address_sd(_a)) 277 #define gid_address_sd_dst(_a) sd_dst(&gid_address_sd(_a)) 278 #define gid_address_sd_src_type(_a) sd_src_type(&gid_address_sd(_a)) 279 #define gid_address_sd_dst_type(_a) sd_dst_type(&gid_address_sd(_a)) 280 #define gid_address_arp_ndp(_a) (_a)->arp_ndp 281 #define gid_address_arp_ndp_bd(_a) lcaf_arp_ndp_bd(&gid_address_arp_ndp(_a)) 282 #define gid_address_arp_ndp_ip(_a) lcaf_arp_ndp_ip(&gid_address_arp_ndp(_a)) 283 #define gid_address_arp_ip4(_a) lcaf_arp_ndp_ip4(&gid_address_arp_ndp(_a)) 284 #define gid_address_ndp_ip6(_a) lcaf_arp_ndp_ip6(&gid_address_arp_ndp(_a)) 285 #define gid_address_ndp_bd gid_address_arp_ndp_bd 286 #define gid_address_arp_bd gid_address_arp_ndp_bd 289 #define foreach_gid_address_type_fcns \ 299 u16 _n ## _size_to_write (void * pref); \ 300 u16 _n ## _write (u8 * p, void * pref); \ 301 u8 _n ## _length (void *a); \ 302 void * _n ## _cast (gid_address_t * a); \ 303 void _n ## _copy (void * dst , void * src); 312 return (*((
u64 *) m) & 0xffffffffffff);
368 u8 delete_after_expiration:1;
u16 ip_address_iana_afi(ip_address_t *a)
void locator_free(locator_t *l)
boost::asio::ip::address ip_address_t
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
void ip_address_copy(ip_address_t *dst, const ip_address_t *src)
void build_src_dst(gid_address_t *sd, gid_address_t *src, gid_address_t *dst)
uword unformat_hmac_key_id(unformat_input_t *input, va_list *args)
u16 gid_address_put(u8 *b, gid_address_t *gid)
struct locator_pair locator_pair_t
void gid_to_dp_address(gid_address_t *g, dp_address_t *d)
u16 ip6_address_size_to_put()
uword unformat_ip_address(unformat_input_t *input, va_list *args)
enum fid_addr_type_t_ fid_addr_type_t
u16 ip_address_size_to_write(ip_address_t *a)
u8 * format_negative_mapping_action(u8 *, va_list *args)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
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)
uint64_t counter_t
64bit counters
Aggregrate type for a prefix.
static foreach_gid_address_type_fcns u64 mac_to_u64(u8 *m)
struct _gid_address_t * gid_addr
u8 gid_address_len(gid_address_t *a)
void ip_address_to_fib_prefix(const ip_address_t *addr, fib_prefix_t *prefix)
convert from a LISP address to a FIB prefix
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)
void ip_address_copy_addr(void *dst, const ip_address_t *src)
u32 ip_address_put(u8 *b, ip_address_t *a)
int ip_address_cmp(const ip_address_t *ip1, const ip_address_t *ip2)
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 ip_address_set(ip_address_t *dst, const void *src, u8 version)
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)
fid_address_t dp_address_t
void ip_prefix_to_fib_prefix(const ip_prefix_t *ipp, fib_prefix_t *fibp)
convert from a LISP to a FIB prefix
u8 ip_address_max_len(u8 ver)
u16 ip4_address_size_to_put()
template key/value backing page structure
u8 * format_fid_address(u8 *s, va_list *args)
u8 * format_ip_address(u8 *s, va_list *args)
void gid_address_from_ip(gid_address_t *g, ip_address_t *ip)
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)
void ip_address_to_46(const ip_address_t *addr, ip46_address_t *a, fib_protocol_t *proto)
uword unformat_ip_prefix(unformat_input_t *input, va_list *args)
u8 * format_hmac_key_id(u8 *s, va_list *args)