16 #ifndef VNET_LISP_GPE_LISP_CP_MESSAGES_H_ 17 #define VNET_LISP_GPE_LISP_CP_MESSAGES_H_ 21 #define MAX_IP_PKT_LEN 4096 22 #define MAX_IP_HDR_LEN 40 24 #define LISP_DATA_HDR_LEN 8 25 #define LISP_ECM_HDR_LEN 4 26 #define MAX_LISP_MSG_ENCAP_LEN 2*(MAX_IP_HDR_LEN + UDP_HDR_LEN)+ LISP_ECM_HDR_LEN 27 #define MAX_LISP_PKT_ENCAP_LEN MAX_IP_HDR_LEN + UDP_HDR_LEN + LISP_DATA_HDR_LEN 29 #define LISP_CONTROL_PORT 4342 44 typedef struct _eid_prefix_record_hdr
52 #define EID_REC_CAST(h_) ((eid_record_hdr_t *)(h_)) 53 #define EID_REC_MLEN(h_) EID_REC_CAST((h_))->eid_prefix_length 54 #define EID_REC_ADDR(h) (u8 *)(h) + sizeof(eid_record_hdr_t) 111 #if CLIB_ARCH_IS_LITTLE_ENDIAN 125 #define ECM_TYPE(h_) ((ecm_hdr_t *)(h_))->type 169 #if CLIB_ARCH_IS_LITTLE_ENDIAN 170 u8 solicit_map_request:1;
172 u8 map_data_present:1;
182 #if CLIB_ARCH_IS_LITTLE_ENDIAN 191 #if CLIB_ARCH_IS_LITTLE_ENDIAN 192 u8 additional_itr_rloc_count:5;
205 #define MREQ_TYPE(h_) (h_)->type 206 #define MREQ_HDR_CAST(h_) ((map_request_hdr_t *)(h_)) 207 #define MREQ_REC_COUNT(h_) (MREQ_HDR_CAST(h_))->record_count 208 #define MREQ_RLOC_PROBE(h_) (MREQ_HDR_CAST(h_))->rloc_probe 209 #define MREQ_ITR_RLOC_COUNT(h_) (MREQ_HDR_CAST(h_))->additional_itr_rloc_count 210 #define MREQ_NONCE(h_) (MREQ_HDR_CAST(h_))->nonce 211 #define MREQ_SMR(h_) (MREQ_HDR_CAST(h_))->solicit_map_request 212 #define MREQ_SMR_INVOKED(h_) (MREQ_HDR_CAST(h_))->smr_invoked 253 #if CLIB_ARCH_IS_LITTLE_ENDIAN 275 #define MREP_TYPE(h_) MREP_HDR_CAST(h_)->type 276 #define MREP_HDR_CAST(h_) ((map_reply_hdr_t *)(h_)) 277 #define MREP_REC_COUNT(h_) MREP_HDR_CAST(h_)->record_count 278 #define MREP_RLOC_PROBE(h_) MREP_HDR_CAST(h_)->rloc_probe 279 #define MREP_NONCE(h_) MREP_HDR_CAST(h_)->nonce 324 typedef struct _locator_hdr
331 #ifdef CLIB_ARCH_IS_LITTLE_ENDIAN 344 #define LOC_CAST(h_) ((locator_hdr_t *)(h_)) 345 #define LOC_PROBED(h_) LOC_CAST(h_)->probed 346 #define LOC_PRIORITY(h_) LOC_CAST(h_)->priority 347 #define LOC_WEIGHT(h_) LOC_CAST(h_)->weight 348 #define LOC_MPRIORITY(h_) LOC_CAST(h_)->mpriority 349 #define LOC_MWEIGHT(h_) LOC_CAST(h_)->mweight 350 #define LOC_REACHABLE(h_) LOC_CAST(h_)->reachable 351 #define LOC_LOCAL(h_) LOC_CAST(h_)->local 352 #define LOC_ADDR(h_) ((u8 *)(h_) + sizeof(locator_hdr_t)) 381 typedef struct _mapping_record_hdr_t
385 u8 eid_prefix_length;
386 #ifdef CLIB_ARCH_IS_LITTLE_ENDIAN 396 #ifdef CLIB_ARCH_IS_LITTLE_ENDIAN 408 #define MAP_REC_EID_PLEN(h) ((mapping_record_hdr_t *)(h))->eid_prefix_length 409 #define MAP_REC_LOC_COUNT(h) ((mapping_record_hdr_t *)(h))->locator_count 410 #define MAP_REC_ACTION(h) ((mapping_record_hdr_t *)(h))->action 411 #define MAP_REC_AUTH(h) ((mapping_record_hdr_t *)(h))->authoritative 412 #define MAP_REC_TTL(h) ((mapping_record_hdr_t *)(h))->ttl 413 #define MAP_REC_EID(h) (u8 *)(h)+sizeof(mapping_record_hdr_t) 414 #define MAP_REC_VERSION(h) (h)->version_hi << 8 | (h)->version_low 442 typedef struct _lcaf_hdr_t
451 #define LCAF_TYPE(h) ((lcaf_hdr_t *)(h))->type 452 #define LCAF_LENGTH(h) ((lcaf_hdr_t *)(h))->len 453 #define LCAF_RES2(h) ((lcaf_hdr_t *)(h))->reserved2 454 #define LCAF_FLAGS(h) ((lcaf_hdr_t *)(h))->flags 455 #define LCAF_PAYLOAD(h) (u8 *)(h)+sizeof(lcaf_hdr_t) 466 typedef struct _lcaf_src_dst_hdr_t
473 #define LCAF_SD_SRC_ML(_h) (_h)->src_mask_len 474 #define LCAF_SD_DST_ML(_h) (_h)->dst_mask_len 485 typedef struct _lcaf_spi_hdr_t
490 #define LCAF_SPI_SI(_h) (_h)->spi_si 525 #if CLIB_ARCH_IS_LITTLE_ENDIAN 527 u8 proxy_map_reply:1;
537 #if CLIB_ARCH_IS_LITTLE_ENDIAN 538 u8 want_map_notify:1;
552 #define MREG_TYPE(h_) (h_)->type 553 #define MREG_HDR_CAST(h_) ((map_register_hdr_t *)(h_)) 554 #define MREG_PROXY_MR(h_) (MREG_HDR_CAST(h_))->proxy_map_reply 555 #define MREG_WANT_MAP_NOTIFY(h_) (MREG_HDR_CAST(h_))->want_map_notify 556 #define MREG_REC_COUNT(h_) (MREG_HDR_CAST(h_))->record_count 557 #define MREG_NONCE(h_) (MREG_HDR_CAST(h_))->nonce 558 #define MREG_KEY_ID(h_) (MREG_HDR_CAST(h_))->key_id 559 #define MREG_AUTH_DATA_LEN(h_) (MREG_HDR_CAST(h_))->auth_data_len 560 #define MREG_DATA(h_) (MREG_HDR_CAST(h_))->data 596 #if CLIB_ARCH_IS_LITTLE_ENDIAN 613 #define MNOTIFY_TYPE(h_) (h_)->type 614 #define MNOTIFY_HDR_CAST(h_) ((map_register_hdr_t *)(h_)) 615 #define MNOTIFY_REC_COUNT(h_) (MREG_HDR_CAST(h_))->record_count 616 #define MNOTIFY_NONCE(h_) (MREG_HDR_CAST(h_))->nonce 617 #define MNOTIFY_KEY_ID(h_) (MREG_HDR_CAST(h_))->key_id 618 #define MNOTIFY_AUTH_DATA_LEN(h_) (MREG_HDR_CAST(h_))->auth_data_len 619 #define MNOTIFY_DATA(h_) (MREG_HDR_CAST(h_))->data struct _mapping_record_hdr_t mapping_record_hdr_t
#define MREP_REC_COUNT(h_)
void eid_rec_hdr_init(eid_record_hdr_t *ptr)
#define MREQ_REC_COUNT(h_)
static void increment_record_count(void *b)
struct _lcaf_spi_hdr_t lcaf_spi_hdr_t
struct _eid_prefix_record_hdr eid_record_hdr_t
char * map_reply_hdr_to_char(map_reply_hdr_t *h)
enum lisp_authoritative lisp_authoritative_e
char * ecm_hdr_to_char(ecm_hdr_t *h)
void mapping_record_init_hdr(mapping_record_hdr_t *h)
vl_api_fib_path_type_t type
void map_request_hdr_init(void *ptr)
u8 additional_itr_rloc_count
struct _lcaf_src_dst_hdr_t lcaf_src_dst_hdr_t
char * map_request_hdr_to_char(map_request_hdr_t *h)
struct _lcaf_hdr_t lcaf_hdr_t
static lisp_msg_type_e lisp_msg_type(void *b)
struct _locator_hdr locator_hdr_t
void map_reply_hdr_init(void *ptr)