#include <vnet/ip/ip.h>
#include <vnet/lisp-cp/lisp_cp_messages.h>
+#define SHA1_AUTH_DATA_LEN 20
+#define SHA256_AUTH_DATA_LEN 32
+
+typedef enum
+{
+ HMAC_NO_KEY = 0,
+ HMAC_SHA_1_96,
+ HMAC_SHA_256_128
+} lisp_key_type_t;
+
+uword unformat_hmac_key_id (unformat_input_t * input, va_list * args);
+u8 *format_hmac_key_id (u8 * s, va_list * args);
+
typedef enum
{
IP4,
LCAF_TYPES
} lcaf_type_t;
-typedef enum
+typedef enum fid_addr_type_t_
{
FID_ADDR_IP_PREF,
FID_ADDR_MAC
-} fid_addr_type_t;
+} __attribute__ ((packed)) fid_addr_type_t;
/* flat address type */
typedef struct
ip_prefix_t ippref;
u8 mac[6];
};
- u8 type; /* fid_addr_type_t */
+ fid_addr_type_t type;
} fid_address_t;
typedef fid_address_t dp_address_t;
u16 ip_address_iana_afi (ip_address_t * a);
u8 ip_address_max_len (u8 ver);
u32 ip_address_put (u8 * b, ip_address_t * a);
+void ip_address_to_46 (const ip_address_t * addr,
+ ip46_address_t * a, fib_protocol_t * proto);
/* LISP AFI codes */
typedef enum
u8 weight;
u8 mpriority;
u8 mweight;
+ u8 probed;
} locator_t;
u32 locator_parse (void *ptr, locator_t * loc);
gid_address_t eid;
/* index of local locator set */
- u32 locator_set_index;
+ union
+ {
+ u32 locator_set_index;
+ locator_t *locators; /* used for map register message */
+ };
u32 ttl;
u8 action;
u8 local;
/* valid only for remote mappings */
u8 is_static;
+ u8 *key;
+ lisp_key_type_t key_id;
} mapping_t;
uword
void
build_src_dst (gid_address_t * sd, gid_address_t * src, gid_address_t * dst);
+void gid_address_from_ip (gid_address_t * g, ip_address_t * ip);
+
#endif /* VNET_LISP_GPE_LISP_TYPES_H_ */
/*