X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vnet%2Fvnet%2Flisp-cp%2Flisp_types.h;h=7df0e653f525ded55b7125a6be46a98ddaf8b038;hb=397fd7d39f023887e428de37a1929c366a99b8d5;hp=b37315edf8de7475c3f5072d246c258ab6ab6cac;hpb=5e575b1d59a5a4c1590ca09d6383a876fb9fdd25;p=vpp.git diff --git a/vnet/vnet/lisp-cp/lisp_types.h b/vnet/vnet/lisp-cp/lisp_types.h index b37315edf8d..7df0e653f52 100644 --- a/vnet/vnet/lisp-cp/lisp_types.h +++ b/vnet/vnet/lisp-cp/lisp_types.h @@ -19,6 +19,19 @@ #include #include +#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, @@ -186,6 +199,8 @@ u16 ip_address_size_to_write (ip_address_t * a); 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 @@ -268,6 +283,7 @@ typedef struct u8 weight; u8 mpriority; u8 mweight; + u8 probed; } locator_t; u32 locator_parse (void *ptr, locator_t * loc); @@ -290,7 +306,11 @@ typedef struct 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; @@ -299,6 +319,8 @@ typedef struct u8 local; /* valid only for remote mappings */ u8 is_static; + u8 *key; + lisp_key_type_t key_id; } mapping_t; uword @@ -318,6 +340,8 @@ typedef struct locator_pair 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_ */ /*