FD.io VPP  v17.01-9-ge7dcee4
Vector Packet Processing
lisp_cp_messages.h File Reference
+ Include dependency graph for lisp_cp_messages.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ecm_hdr_t
 
struct  map_request_hdr_t
 
struct  map_reply_hdr_t
 
struct  map_register_hdr_t
 
struct  map_notify_hdr_t
 

Macros

#define MAX_IP_PKT_LEN   4096
 
#define MAX_IP_HDR_LEN   40 /* without options or IPv6 hdr extensions */
 
#define UDP_HDR_LEN   8
 
#define LISP_DATA_HDR_LEN   8
 
#define LISP_ECM_HDR_LEN   4
 
#define MAX_LISP_MSG_ENCAP_LEN   2*(MAX_IP_HDR_LEN + UDP_HDR_LEN)+ LISP_ECM_HDR_LEN
 
#define MAX_LISP_PKT_ENCAP_LEN   MAX_IP_HDR_LEN + UDP_HDR_LEN + LISP_DATA_HDR_LEN
 
#define LISP_CONTROL_PORT   4342
 
#define EID_REC_CAST(h_)   ((eid_record_hdr_t *)(h_))
 
#define EID_REC_MLEN(h_)   EID_REC_CAST((h_))->eid_prefix_length
 
#define EID_REC_ADDR(h)   (u8 *)(h) + sizeof(eid_record_hdr_t)
 
#define ECM_TYPE(h_)   ((ecm_hdr_t *)(h_))->type
 
#define MREQ_TYPE(h_)   (h_)->type
 
#define MREQ_HDR_CAST(h_)   ((map_request_hdr_t *)(h_))
 
#define MREQ_REC_COUNT(h_)   (MREQ_HDR_CAST(h_))->record_count
 
#define MREQ_RLOC_PROBE(h_)   (MREQ_HDR_CAST(h_))->rloc_probe
 
#define MREQ_ITR_RLOC_COUNT(h_)   (MREQ_HDR_CAST(h_))->additional_itr_rloc_count
 
#define MREQ_NONCE(h_)   (MREQ_HDR_CAST(h_))->nonce
 
#define MREQ_SMR(h_)   (MREQ_HDR_CAST(h_))->solicit_map_request
 
#define MREQ_SMR_INVOKED(h_)   (MREQ_HDR_CAST(h_))->smr_invoked
 
#define MREP_TYPE(h_)   MREP_HDR_CAST(h_)->type
 
#define MREP_HDR_CAST(h_)   ((map_reply_hdr_t *)(h_))
 
#define MREP_REC_COUNT(h_)   MREP_HDR_CAST(h_)->record_count
 
#define MREP_RLOC_PROBE(h_)   MREP_HDR_CAST(h_)->rloc_probe
 
#define MREP_NONCE(h_)   MREP_HDR_CAST(h_)->nonce
 
#define LOC_CAST(h_)   ((locator_hdr_t *)(h_))
 
#define LOC_PROBED(h_)   LOC_CAST(h_)->probed
 
#define LOC_PRIORITY(h_)   LOC_CAST(h_)->priority
 
#define LOC_WEIGHT(h_)   LOC_CAST(h_)->weight
 
#define LOC_MPRIORITY(h_)   LOC_CAST(h_)->mpriority
 
#define LOC_MWEIGHT(h_)   LOC_CAST(h_)->mweight
 
#define LOC_REACHABLE(h_)   LOC_CAST(h_)->reachable
 
#define LOC_LOCAL(h_)   LOC_CAST(h_)->local
 
#define LOC_ADDR(h_)   ((u8 *)(h_) + sizeof(locator_hdr_t))
 
#define MAP_REC_EID_PLEN(h)   ((mapping_record_hdr_t *)(h))->eid_prefix_length
 
#define MAP_REC_LOC_COUNT(h)   ((mapping_record_hdr_t *)(h))->locator_count
 
#define MAP_REC_ACTION(h)   ((mapping_record_hdr_t *)(h))->action
 
#define MAP_REC_AUTH(h)   ((mapping_record_hdr_t *)(h))->authoritative
 
#define MAP_REC_TTL(h)   ((mapping_record_hdr_t *)(h))->ttl
 
#define MAP_REC_EID(h)   (u8 *)(h)+sizeof(mapping_record_hdr_t)
 
#define MAP_REC_VERSION(h)   (h)->version_hi << 8 | (h)->version_low
 
#define LCAF_TYPE(h)   ((lcaf_hdr_t *)(h))->type
 
#define LCAF_LENGTH(h)   ((lcaf_hdr_t *)(h))->len
 
#define LCAF_RES2(h)   ((lcaf_hdr_t *)(h))->reserved2
 
#define LCAF_FLAGS(h)   ((lcaf_hdr_t *)(h))->flags
 
#define LCAF_PAYLOAD(h)   (u8 *)(h)+sizeof(lcaf_hdr_t)
 
#define LCAF_SD_SRC_ML(_h)   (_h)->src_mask_len
 
#define LCAF_SD_DST_ML(_h)   (_h)->dst_mask_len
 
#define MREG_TYPE(h_)   (h_)->type
 
#define MREG_HDR_CAST(h_)   ((map_register_hdr_t *)(h_))
 
#define MREG_PROXY_MR(h_)   (MREG_HDR_CAST(h_))->proxy_map_reply
 
#define MREG_WANT_MAP_NOTIFY(h_)   (MREG_HDR_CAST(h_))->want_map_notify
 
#define MREG_REC_COUNT(h_)   (MREG_HDR_CAST(h_))->record_count
 
#define MREG_NONCE(h_)   (MREG_HDR_CAST(h_))->nonce
 
#define MREG_KEY_ID(h_)   (MREG_HDR_CAST(h_))->key_id
 
#define MREG_AUTH_DATA_LEN(h_)   (MREG_HDR_CAST(h_))->auth_data_len
 
#define MREG_DATA(h_)   (MREG_HDR_CAST(h_))->data
 
#define MNOTIFY_TYPE(h_)   (h_)->type
 
#define MNOTIFY_HDR_CAST(h_)   ((map_register_hdr_t *)(h_))
 
#define MNOTIFY_REC_COUNT(h_)   (MREG_HDR_CAST(h_))->record_count
 
#define MNOTIFY_NONCE(h_)   (MREG_HDR_CAST(h_))->nonce
 
#define MNOTIFY_KEY_ID(h_)   (MREG_HDR_CAST(h_))->key_id
 
#define MNOTIFY_AUTH_DATA_LEN(h_)   (MREG_HDR_CAST(h_))->auth_data_len
 
#define MNOTIFY_DATA(h_)   (MREG_HDR_CAST(h_))->data
 

Typedefs

typedef struct _eid_prefix_record_hdr eid_record_hdr_t
 
typedef struct _locator_hdr locator_hdr_t
 
typedef struct _mapping_record_hdr_t mapping_record_hdr_t
 
typedef enum lisp_authoritative lisp_authoritative_e
 
typedef struct _lcaf_hdr_t lcaf_hdr_t
 
typedef struct _lcaf_src_dst_hdr_t lcaf_src_dst_hdr_t
 

Enumerations

enum  lisp_msg_type_e {
  NOT_LISP_MSG, LISP_MAP_REQUEST = 1, LISP_MAP_REPLY, LISP_MAP_REGISTER,
  LISP_MAP_NOTIFY, LISP_INFO_NAT = 7, LISP_ENCAP_CONTROL_TYPE = 8, LISP_MSG_TYPES
}
 
enum  lisp_action_e { LISP_NO_ACTION, LISP_FORWARD_NATIVE, LISP_SEND_MAP_REQUEST, LISP_DROP }
 
enum  lisp_authoritative { A_NO_AUTHORITATIVE = 0, A_AUTHORITATIVE }
 

Functions

void eid_rec_hdr_init (eid_record_hdr_t *ptr)
 
char * ecm_hdr_to_char (ecm_hdr_t *h)
 
void map_request_hdr_init (void *ptr)
 
char * map_request_hdr_to_char (map_request_hdr_t *h)
 
void map_reply_hdr_init (void *ptr)
 
char * map_reply_hdr_to_char (map_reply_hdr_t *h)
 
static lisp_msg_type_e lisp_msg_type (void *b)
 
static void increment_record_count (void *b)
 
void mapping_record_init_hdr (mapping_record_hdr_t *h)
 

Macro Definition Documentation

#define ECM_TYPE (   h_)    ((ecm_hdr_t *)(h_))->type

Definition at line 125 of file lisp_cp_messages.h.

#define EID_REC_ADDR (   h)    (u8 *)(h) + sizeof(eid_record_hdr_t)

Definition at line 54 of file lisp_cp_messages.h.

#define EID_REC_CAST (   h_)    ((eid_record_hdr_t *)(h_))

Definition at line 52 of file lisp_cp_messages.h.

#define EID_REC_MLEN (   h_)    EID_REC_CAST((h_))->eid_prefix_length

Definition at line 53 of file lisp_cp_messages.h.

#define LCAF_FLAGS (   h)    ((lcaf_hdr_t *)(h))->flags

Definition at line 454 of file lisp_cp_messages.h.

#define LCAF_LENGTH (   h)    ((lcaf_hdr_t *)(h))->len

Definition at line 452 of file lisp_cp_messages.h.

#define LCAF_PAYLOAD (   h)    (u8 *)(h)+sizeof(lcaf_hdr_t)

Definition at line 455 of file lisp_cp_messages.h.

#define LCAF_RES2 (   h)    ((lcaf_hdr_t *)(h))->reserved2

Definition at line 453 of file lisp_cp_messages.h.

#define LCAF_SD_DST_ML (   _h)    (_h)->dst_mask_len

Definition at line 474 of file lisp_cp_messages.h.

#define LCAF_SD_SRC_ML (   _h)    (_h)->src_mask_len

Definition at line 473 of file lisp_cp_messages.h.

#define LCAF_TYPE (   h)    ((lcaf_hdr_t *)(h))->type

Definition at line 451 of file lisp_cp_messages.h.

#define LISP_CONTROL_PORT   4342

Definition at line 29 of file lisp_cp_messages.h.

#define LISP_DATA_HDR_LEN   8

Definition at line 24 of file lisp_cp_messages.h.

#define LISP_ECM_HDR_LEN   4

Definition at line 25 of file lisp_cp_messages.h.

#define LOC_ADDR (   h_)    ((u8 *)(h_) + sizeof(locator_hdr_t))

Definition at line 352 of file lisp_cp_messages.h.

#define LOC_CAST (   h_)    ((locator_hdr_t *)(h_))

Definition at line 344 of file lisp_cp_messages.h.

#define LOC_LOCAL (   h_)    LOC_CAST(h_)->local

Definition at line 351 of file lisp_cp_messages.h.

#define LOC_MPRIORITY (   h_)    LOC_CAST(h_)->mpriority

Definition at line 348 of file lisp_cp_messages.h.

#define LOC_MWEIGHT (   h_)    LOC_CAST(h_)->mweight

Definition at line 349 of file lisp_cp_messages.h.

#define LOC_PRIORITY (   h_)    LOC_CAST(h_)->priority

Definition at line 346 of file lisp_cp_messages.h.

#define LOC_PROBED (   h_)    LOC_CAST(h_)->probed

Definition at line 345 of file lisp_cp_messages.h.

#define LOC_REACHABLE (   h_)    LOC_CAST(h_)->reachable

Definition at line 350 of file lisp_cp_messages.h.

#define LOC_WEIGHT (   h_)    LOC_CAST(h_)->weight

Definition at line 347 of file lisp_cp_messages.h.

#define MAP_REC_ACTION (   h)    ((mapping_record_hdr_t *)(h))->action

Definition at line 410 of file lisp_cp_messages.h.

#define MAP_REC_AUTH (   h)    ((mapping_record_hdr_t *)(h))->authoritative

Definition at line 411 of file lisp_cp_messages.h.

#define MAP_REC_EID (   h)    (u8 *)(h)+sizeof(mapping_record_hdr_t)

Definition at line 413 of file lisp_cp_messages.h.

#define MAP_REC_EID_PLEN (   h)    ((mapping_record_hdr_t *)(h))->eid_prefix_length

Definition at line 408 of file lisp_cp_messages.h.

#define MAP_REC_LOC_COUNT (   h)    ((mapping_record_hdr_t *)(h))->locator_count

Definition at line 409 of file lisp_cp_messages.h.

#define MAP_REC_TTL (   h)    ((mapping_record_hdr_t *)(h))->ttl

Definition at line 412 of file lisp_cp_messages.h.

#define MAP_REC_VERSION (   h)    (h)->version_hi << 8 | (h)->version_low

Definition at line 414 of file lisp_cp_messages.h.

#define MAX_IP_HDR_LEN   40 /* without options or IPv6 hdr extensions */

Definition at line 22 of file lisp_cp_messages.h.

#define MAX_IP_PKT_LEN   4096

Definition at line 21 of file lisp_cp_messages.h.

#define MAX_LISP_MSG_ENCAP_LEN   2*(MAX_IP_HDR_LEN + UDP_HDR_LEN)+ LISP_ECM_HDR_LEN

Definition at line 26 of file lisp_cp_messages.h.

#define MAX_LISP_PKT_ENCAP_LEN   MAX_IP_HDR_LEN + UDP_HDR_LEN + LISP_DATA_HDR_LEN

Definition at line 27 of file lisp_cp_messages.h.

#define MNOTIFY_AUTH_DATA_LEN (   h_)    (MREG_HDR_CAST(h_))->auth_data_len

Definition at line 602 of file lisp_cp_messages.h.

#define MNOTIFY_DATA (   h_)    (MREG_HDR_CAST(h_))->data

Definition at line 603 of file lisp_cp_messages.h.

#define MNOTIFY_HDR_CAST (   h_)    ((map_register_hdr_t *)(h_))

Definition at line 598 of file lisp_cp_messages.h.

#define MNOTIFY_KEY_ID (   h_)    (MREG_HDR_CAST(h_))->key_id

Definition at line 601 of file lisp_cp_messages.h.

#define MNOTIFY_NONCE (   h_)    (MREG_HDR_CAST(h_))->nonce

Definition at line 600 of file lisp_cp_messages.h.

#define MNOTIFY_REC_COUNT (   h_)    (MREG_HDR_CAST(h_))->record_count

Definition at line 599 of file lisp_cp_messages.h.

#define MNOTIFY_TYPE (   h_)    (h_)->type

Definition at line 597 of file lisp_cp_messages.h.

#define MREG_AUTH_DATA_LEN (   h_)    (MREG_HDR_CAST(h_))->auth_data_len

Definition at line 543 of file lisp_cp_messages.h.

#define MREG_DATA (   h_)    (MREG_HDR_CAST(h_))->data

Definition at line 544 of file lisp_cp_messages.h.

#define MREG_HDR_CAST (   h_)    ((map_register_hdr_t *)(h_))

Definition at line 537 of file lisp_cp_messages.h.

#define MREG_KEY_ID (   h_)    (MREG_HDR_CAST(h_))->key_id

Definition at line 542 of file lisp_cp_messages.h.

#define MREG_NONCE (   h_)    (MREG_HDR_CAST(h_))->nonce

Definition at line 541 of file lisp_cp_messages.h.

#define MREG_PROXY_MR (   h_)    (MREG_HDR_CAST(h_))->proxy_map_reply

Definition at line 538 of file lisp_cp_messages.h.

#define MREG_REC_COUNT (   h_)    (MREG_HDR_CAST(h_))->record_count

Definition at line 540 of file lisp_cp_messages.h.

#define MREG_TYPE (   h_)    (h_)->type

Definition at line 536 of file lisp_cp_messages.h.

#define MREG_WANT_MAP_NOTIFY (   h_)    (MREG_HDR_CAST(h_))->want_map_notify

Definition at line 539 of file lisp_cp_messages.h.

#define MREP_HDR_CAST (   h_)    ((map_reply_hdr_t *)(h_))

Definition at line 276 of file lisp_cp_messages.h.

#define MREP_NONCE (   h_)    MREP_HDR_CAST(h_)->nonce

Definition at line 279 of file lisp_cp_messages.h.

#define MREP_REC_COUNT (   h_)    MREP_HDR_CAST(h_)->record_count

Definition at line 277 of file lisp_cp_messages.h.

#define MREP_RLOC_PROBE (   h_)    MREP_HDR_CAST(h_)->rloc_probe

Definition at line 278 of file lisp_cp_messages.h.

#define MREP_TYPE (   h_)    MREP_HDR_CAST(h_)->type

Definition at line 275 of file lisp_cp_messages.h.

#define MREQ_HDR_CAST (   h_)    ((map_request_hdr_t *)(h_))

Definition at line 206 of file lisp_cp_messages.h.

#define MREQ_ITR_RLOC_COUNT (   h_)    (MREQ_HDR_CAST(h_))->additional_itr_rloc_count

Definition at line 209 of file lisp_cp_messages.h.

#define MREQ_NONCE (   h_)    (MREQ_HDR_CAST(h_))->nonce

Definition at line 210 of file lisp_cp_messages.h.

#define MREQ_REC_COUNT (   h_)    (MREQ_HDR_CAST(h_))->record_count

Definition at line 207 of file lisp_cp_messages.h.

#define MREQ_RLOC_PROBE (   h_)    (MREQ_HDR_CAST(h_))->rloc_probe

Definition at line 208 of file lisp_cp_messages.h.

#define MREQ_SMR (   h_)    (MREQ_HDR_CAST(h_))->solicit_map_request

Definition at line 211 of file lisp_cp_messages.h.

#define MREQ_SMR_INVOKED (   h_)    (MREQ_HDR_CAST(h_))->smr_invoked

Definition at line 212 of file lisp_cp_messages.h.

#define MREQ_TYPE (   h_)    (h_)->type

Definition at line 205 of file lisp_cp_messages.h.

#define UDP_HDR_LEN   8

Definition at line 23 of file lisp_cp_messages.h.

Typedef Documentation

typedef struct _eid_prefix_record_hdr eid_record_hdr_t
typedef struct _lcaf_hdr_t lcaf_hdr_t
typedef struct _lcaf_src_dst_hdr_t lcaf_src_dst_hdr_t
typedef struct _locator_hdr locator_hdr_t
typedef struct _mapping_record_hdr_t mapping_record_hdr_t

Enumeration Type Documentation

Enumerator
LISP_NO_ACTION 
LISP_FORWARD_NATIVE 
LISP_SEND_MAP_REQUEST 
LISP_DROP 

Definition at line 416 of file lisp_cp_messages.h.

Enumerator
A_NO_AUTHORITATIVE 
A_AUTHORITATIVE 

Definition at line 424 of file lisp_cp_messages.h.

Enumerator
NOT_LISP_MSG 
LISP_MAP_REQUEST 
LISP_MAP_REPLY 
LISP_MAP_REGISTER 
LISP_MAP_NOTIFY 
LISP_INFO_NAT 
LISP_ENCAP_CONTROL_TYPE 
LISP_MSG_TYPES 

Definition at line 57 of file lisp_cp_messages.h.

Function Documentation

char* ecm_hdr_to_char ( ecm_hdr_t h)
void eid_rec_hdr_init ( eid_record_hdr_t ptr)
static void increment_record_count ( void *  b)
inlinestatic

Definition at line 294 of file lisp_cp_messages.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static lisp_msg_type_e lisp_msg_type ( void *  b)
inlinestatic

Definition at line 283 of file lisp_cp_messages.h.

+ Here is the caller graph for this function:

void map_reply_hdr_init ( void *  ptr)
char* map_reply_hdr_to_char ( map_reply_hdr_t h)
void map_request_hdr_init ( void *  ptr)
char* map_request_hdr_to_char ( map_request_hdr_t h)
void mapping_record_init_hdr ( mapping_record_hdr_t h)