16 #ifndef __IP_TYPES_H__ 17 #define __IP_TYPES_H__ 31 #define FOR_EACH_IP_ADDRESS_FAMILY(_af) \ 32 for (_af = AF_IP4; _af <= AF_IP6; _af++) 34 #define u8_ptr_add(ptr, index) (((u8 *)ptr) + index) 35 #define u16_net_add(u, val) clib_host_to_net_u16(clib_net_to_host_u16(u) + (val)) 49 #define ip_addr_addr(_a) (_a)->ip 50 #define ip_addr_v4(_a) (_a)->ip.v4 51 #define ip_addr_v6(_a) (_a)->ip.v6 52 #define ip_addr_version(_a) (_a)->version 74 #define ip_prefix_addr(_a) (_a)->addr 75 #define ip_prefix_version(_a) ip_addr_version(&ip_prefix_addr(_a)) 76 #define ip_prefix_len(_a) (_a)->len 77 #define ip_prefix_v4(_a) ip_addr_v4(&ip_prefix_addr(_a)) 78 #define ip_prefix_v6(_a) ip_addr_v6(&ip_prefix_addr(_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
u8 * format_ip_address(u8 *s, va_list *args)
struct ip_address ip_address_t
int ip_address_cmp(const ip_address_t *ip1, const ip_address_t *ip2)
u16 ip_address_size(const ip_address_t *a)
enum ip_address_family_t_ ip_address_family_t
int ip_prefix_cmp(ip_prefix_t *p1, ip_prefix_t *p2)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
u8 * format_ip_address_family(u8 *s, va_list *args)
Aggregate type for a prefix.
struct ip_prefix ip_prefix_t
void ip_address_copy_addr(void *dst, const ip_address_t *src)
u16 ip_version_to_size(u8 ver)
uword unformat_ip_address_family(unformat_input_t *input, va_list *args)
uword unformat_ip_prefix(unformat_input_t *input, va_list *args)
void ip_prefix_to_fib_prefix(const ip_prefix_t *ipp, fib_prefix_t *fibp)
convert from a LISP to a FIB prefix
ip_address_family_t version
uword unformat_ip_address(unformat_input_t *input, va_list *args)
void ip_address_set(ip_address_t *dst, const void *src, u8 version)
void ip_prefix_normalize(ip_prefix_t *a)
union ip_address::@304 ip
void ip_address_copy(ip_address_t *dst, const ip_address_t *src)
void ip_address_to_46(const ip_address_t *addr, ip46_address_t *a, fib_protocol_t *proto)
u8 * format_ip_prefix(u8 *s, va_list *args)