|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
58 #define foreach_lcaf_type \
78 #define _(cond, name) \
79 u16 name ## _write (u8 * p, void * a); \
80 u16 name ## _parse (u8 * p, void * a); \
81 u16 name ## _size_to_write (void * a); \
82 void name ## _free (void * a); \
83 void name ## _copy (void * dst, void * src); \
84 u8 name ## _length (void * a); \
85 int name ## _cmp (void *, void *);
88 #define CONCAT(a,b) a##_##b
89 #define IF(c, t, e) CONCAT(IF, c)(t, e)
92 #define EXPAND_FCN(cond, fcn) \
96 #define _(cond, name) \
97 EXPAND_FCN(cond, name##_cmp),
103 #define _(cond, name) \
104 EXPAND_FCN(cond, name##_length),
110 #define _(cond, name) \
111 EXPAND_FCN(cond, name##_copy),
117 #define _(cond, name) \
118 EXPAND_FCN(cond, name##_free),
124 #define _(cond, name) \
125 EXPAND_FCN(cond, name##_size_to_write),
131 #define _(cond, name) \
132 EXPAND_FCN(cond, name##_write),
138 #define _(cond, name) \
139 EXPAND_FCN(cond, name##_parse),
148 return unformat (input,
"SPI:%d SI:%d", &
a->spi, &
a->si);
155 return format (s,
"SPI:%d SI:%d",
a->spi,
a->si);
161 u32 *
a = va_arg (*args,
u32 *);
162 return format (s,
"SPI:%d SI:%d", *
a >> 8, *
a & 0xff);
249 u32 *key_id = va_arg (*args,
u32 *);
254 if (!strcmp ((
char *) s,
"sha1"))
256 else if (!strcmp ((
char *) s,
"sha256"))
320 if (!strcmp ((
char *) s,
"no-action"))
322 else if (!strcmp ((
char *) s,
"natively-forward"))
324 else if (!strcmp ((
char *) s,
"send-map-request"))
326 else if (!strcmp ((
char *) s,
"drop"))
349 return format (0,
"sha1");
351 return format (0,
"sha256");
367 s =
format (s,
"no-action");
370 s =
format (s,
"natively-forward");
373 s =
format (s,
"send-map-request");
476 return (
len +
sizeof (
u16));
505 clib_warning (
"Source/Dest address type %d not supported!",
530 lcaf->
type = lh->type;
538 return sizeof (lh[0]);
559 u16 afi = clib_net_to_host_u16 (*(
u16 *) p);
577 #define INC(dst, exp) \
580 if ((u16)~0 == _sum) \
612 if (n1->
si != n2->
si)
629 size +=
sizeof (sd_hdr[0]);
675 u16 afi = clib_net_to_host_u16 (*((
u16 *) (p +
size)));
911 size +=
sizeof (
h[0]);
978 size +=
sizeof (
h[0]);
984 size +=
sizeof (sd_hdr);
1023 size +=
sizeof (lcaf);
1043 u16 lcaf_len =
sizeof (
u32)
1050 size +=
sizeof (
h[0]);
1077 return sizeof (
u16);
1083 return sizeof (
u16);
1108 u16 lcaf_size =
sizeof (
u32) +
sizeof (
u16)
1148 return sizeof (
u16) + 6;
1219 return sizeof (
u16) + 6;
1232 afi = clib_net_to_host_u16 (*((
u16 *)
offset));
1296 return memcmp (a1, a2, 6);
1406 loc->
state = status;
1476 clib_warning (
"Unsupported gid type %d while conversion!",
size_to_write_fct lcaf_size_to_write_fcts[LCAF_TYPES]
int(* cmp_fct)(void *, void *)
#define gid_address_ippref_len(_a)
int sd_cmp(void *a1, void *a2)
u8 * format_fid_nsh_address(u8 *s, va_list *args)
u32 locator_cmp(locator_t *l1, locator_t *l2)
int ip_prefix_cmp(ip_prefix_t *p1, ip_prefix_t *p2)
u32 lcaf_parse(void *offset, gid_address_t *addr)
uword unformat_fid_address(unformat_input_t *i, va_list *args)
void locator_free(locator_t *l)
u16 ip_address_size_to_write(ip_address_t *a)
uword unformat_ip_prefix(unformat_input_t *input, va_list *args)
u8 * format_nsh_address(u8 *s, va_list *args)
u8 no_addr_length(void *a)
u8 ip_prefix_length(void *a)
#define gid_address_arp_ndp_bd(_a)
#define clib_memcpy(d, s, n)
#define LOC_REACHABLE(h_)
#define gid_address_sd_src_mac(_a)
void lcaf_copy(void *dst, void *src)
static u8 ip_iana_afi_to_version(lisp_afi_e afi)
int nsh_cmp(void *a1, void *a2)
#define gid_address_sd_dst(_a)
int vni_cmp(void *a1, void *a2)
void no_addr_copy(void *dst, void *src)
static void clib_mem_free(void *p)
#define gid_address_sd_dst_mac(_a)
u16 ip_prefix_size_to_write(void *pref)
u16 nsh_parse(u8 *p, void *a)
#define gid_address_sd_dst_ippref(_a)
u16 sd_write(u8 *p, void *a)
void * sd_cast(gid_address_t *a)
u16 vni_parse(u8 *p, void *a)
u16 ip_prefix_write(u8 *p, void *gid)
#define gid_address_ippref(_a)
void sd_copy(void *dst, void *src)
void * nsh_cast(gid_address_t *a)
#define ip_prefix_addr(_a)
u16(* size_to_write_fct)(void *)
struct _lcaf_hdr_t lcaf_hdr_t
#define gid_address_sd_dst_type(_a)
#define ip_prefix_len(_a)
u16 ip_version_to_size(ip_address_family_t af)
u16 no_addr_parse(u8 *p, void *a)
#define gid_address_ip(_a)
u16 nsh_size_to_write(void *a)
void ip_prefix_copy(void *dst, void *src)
#define gid_address_sd_src_ippref(_a)
uword unformat_hmac_key_id(unformat_input_t *input, va_list *args)
void * mac_cast(gid_address_t *a)
uword unformat_nsh_address(unformat_input_t *input, va_list *args)
u32 ip4_address_put(u8 *b, ip4_address_t *a)
u8 * format_hmac_key_id(u8 *s, va_list *args)
addr_len_fct addr_len_fcts[GID_ADDR_TYPES]
void *(* cast_fct)(gid_address_t *)
static u8 iana_afi_to_fid_addr_type(u16 type)
u16 ip_address_size(const ip_address_t *a)
u8 * format_mac_address(u8 *s, va_list *args)
void * lcaf_cast(gid_address_t *a)
u32 ip_address_put(u8 *b, ip_address_t *a)
u8 * format_negative_mapping_action(u8 *s, va_list *args)
u32 ip6_address_put(u8 *b, ip6_address_t *a)
u8 gid_address_len(gid_address_t *a)
#define ip_addr_version(_a)
copy_fct lcaf_copy_fcts[LCAF_TYPES]
u8 ip_address_max_len(u8 version)
u16(* serdes_fct)(u8 *, void *)
int no_addr_cmp(void *a1, void *a2)
u8 * format_fid_address(u8 *s, va_list *args)
static u16 gid_address_put_no_vni(u8 *b, gid_address_t *gid)
#define LOC_MPRIORITY(h_)
u16 gid_address_size_to_put(gid_address_t *gid)
u16 ip4_address_size_to_put()
void nsh_copy(void *dst, void *src)
struct clib_bihash_value offset
template key/value backing page structure
u32 lcaf_hdr_parse(void *offset, lcaf_t *lcaf)
u16 no_addr_size_to_write(void *a)
addr_len_fct lcaf_body_length_fcts[LCAF_TYPES]
#define fid_addr_type(_a)
u16 mac_write(u8 *p, void *a)
#define gid_address_vni(_a)
u16 ip6_address_size_to_put()
u32 locator_parse(void *b, locator_t *loc)
u8 * format_ip_address(u8 *s, va_list *args)
static u16 fid_addr_parse(u8 *p, fid_address_t *a)
cmp_fct lcaf_cmp_fcts[LCAF_TYPES]
void no_addr_free(void *a)
sll srl srl sll sra u16x4 i
void build_src_dst(gid_address_t *sd, gid_address_t *src, gid_address_t *dst)
void mac_copy(void *dst, void *src)
u8 * format_ip_prefix(u8 *s, va_list *args)
u16 gid_address_put(u8 *b, gid_address_t *gid)
int gid_address_cmp(gid_address_t *a1, gid_address_t *a2)
static u16 fid_addr_write(u8 *p, fid_address_t *a)
void ip_address_set(ip_address_t *dst, const void *src, ip_address_family_t af)
uword unformat_gid_address(unformat_input_t *input, va_list *args)
struct _lcaf_src_dst_hdr_t lcaf_src_dst_hdr_t
size_to_write_fct size_to_write_fcts[GID_ADDR_TYPES]
void(* copy_fct)(void *, void *)
#define gid_address_sd_src(_a)
void * gid_address_cast(gid_address_t *gid, gid_address_type_t type)
static u8 fid_address_length(fid_address_t *a)
void vni_copy(void *dst, void *src)
static int fid_addr_cmp(fid_address_t *a1, fid_address_t *a2)
static int mac_cmp(void *a1, void *a2)
#define gid_address_arp_ndp_ip(_a)
#define vec_free(V)
Free vector's memory (no header).
u16 lcaf_size_to_write(void *a)
template key/value backing page structure
u16 sd_size_to_write(void *a)
struct _lcaf_spi_hdr_t lcaf_spi_hdr_t
#define gid_address_sd_src_type(_a)
void gid_address_copy(gid_address_t *dst, gid_address_t *src)
u32 mac_parse(u8 *offset, u8 *a)
static lisp_afi_e ip_version_to_iana_afi(u16 version)
void gid_address_from_ip(gid_address_t *g, ip_address_t *ip)
description fragment has unexpected format
#define gid_address_nsh_si(_a)
copy_fct copy_fcts[GID_ADDR_TYPES]
#define foreach_lcaf_type
#define LCAF_SD_SRC_ML(_h)
static u16 gid_address_size_to_put_no_vni(gid_address_t *gid)
void gid_address_ip_set(gid_address_t *dst, void *src, ip_address_family_t version)
u32 gid_address_parse(u8 *offset, gid_address_t *a)
void * no_addr_cast(gid_address_t *a)
free_fct lcaf_free_fcts[LCAF_TYPES]
u16 try_parse_src_dst_lcaf(u8 *p, gid_address_t *a)
u16 lcaf_write(u8 *p, void *a)
#define fid_addr_ippref(_a)
serdes_fct write_fcts[GID_ADDR_TYPES]
serdes_fct lcaf_parse_fcts[LCAF_TYPES]
static u16 fid_addr_size_to_write(fid_address_t *a)
#define gid_address_nsh(_a)
void * ip_prefix_cast(gid_address_t *a)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u16 no_addr_write(u8 *p, void *a)
#define gid_address_type(_a)
void gid_address_free(gid_address_t *a)
u32 ip_address_parse(void *offset, u16 iana_afi, ip_address_t *dst)
u16 vni_write(u8 *p, void *a)
#define gid_address_vni_mask(_a)
#define ip_prefix_version(_a)
u8 * format_gid_address(u8 *s, va_list *args)
u16 mac_size_to_write(void *a)
u16 vni_size_to_write(void *a)
u16 ip_address_iana_afi(ip_address_t *a)
void locator_copy(locator_t *dst, locator_t *src)
uword unformat_negative_mapping_action(unformat_input_t *input, va_list *args)
#define clib_warning(format, args...)
struct _gid_address_t gid_address_t
#define gid_address_lcaf(_a)
#define LCAF_SD_DST_ML(_h)
cast_fct cast_fcts[GID_ADDR_TYPES]
struct _locator_hdr locator_hdr_t
u16 nsh_write(u8 *p, void *a)
u8(* addr_len_fct)(void *)
#define gid_address_nsh_spi(_a)
vl_api_mac_event_action_t action
void gid_to_dp_address(gid_address_t *g, dp_address_t *d)
serdes_fct lcaf_write_fcts[LCAF_TYPES]
uword unformat_mac_address(unformat_input_t *input, va_list *args)
u16 sd_parse(u8 *p, void *a)
static void * clib_mem_alloc(uword size)
vl_api_fib_path_type_t type
#define gid_address_mac(_a)
#define gid_address_sd(_a)
u8 * ip_addr_bytes(ip_address_t *ip)
enum ip_address_family_t_ ip_address_family_t