Hybrid ICN (hICN)  v20.01-105-g43d0ecb
Classes | Macros | Typedefs | Enumerations | Functions
mapme.h File Reference

MAP-Me anchorless producer mobility management. More...

#include <stdint.h>
#include <stdbool.h>
#include "common.h"
#include "protocol.h"
#include "ops.h"
Include dependency graph for mapme.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  hicn_mapme_conf_t
 MAP-Me configuration options. More...
 
struct  mapme_params_t
 MAP-Me parameters (excluding those contained in * hicn_prefix_t) More...
 
struct  hicn_mapme_v4_header_t
 MAP-Me packet header for IPv4. More...
 
struct  hicn_mapme_v6_header_t
 MAP-Me packet header for IPv6. More...
 
union  hicn_mapme_header_t
 MAP-Me packet header (IP version agnostic) More...
 

Macros

#define HICN_MAPME_ACK_FLAG   (0x20 | 0x60)
 
#define HICN_MAPME_ICMP_TYPE_IPV4   5
 
#define HICN_MAPME_ICMP_TYPE_IPV6   137
 
#define HICN_MAPME_ICMP_TYPE_ACK_IPV4   (HICN_MAPME_ICMP_TYPE_IPV4 | HICN_MAPME_ACK_FLAG)
 
#define HICN_MAPME_ICMP_TYPE_ACK_IPV6   (HICN_MAPME_ICMP_TYPE_IPV6 | HICN_MAPME_ACK_FLAG)
 
#define HICN_MAPME_ICMP_CODE   0 /* Redirect Datagrams for the Network (or subnet) */
 
#define HICN_MAPME_TYPE_IS_IU(type)   ((type == HICN_MAPME_ICMP_TYPE_IPV4) || (type == HICN_MAPME_ICMP_TYPE_IPV6))
 
#define HICN_MAPME_TYPE_IS_IU_ACK(type)   ((type == HICN_MAPME_ICMP_TYPE_ACK_IPV4) || (type == HICN_MAPME_ICMP_TYPE_ACK_IPV6))
 
#define HICN_MAPME_IS_IU(type, code)   (HICN_MAPME_TYPE_IS_IU(type) && (code == HICN_MAPME_ICMP_CODE))
 
#define HICN_MAPME_IS_ACK(type, code)   (HICN_MAPME_TYPE_IS_IU_ACK(type) && (code == HICN_MAPME_ICMP_CODE))
 
#define HICN_IS_MAPME(type, code)   (HICN_MAPME_IS_IU(type, code) || HICN_MAPME_IS_ACK(type, code))
 
#define HICN_MAPME_IS_ACK_FAST(icmp_type)   (icmp_type & HICN_MAPME_ACK_FLAG)
 
#define HICN_MAPME_TTL   255
 
#define EXPECTED_MAPME_V4_HDRLEN   120
 
#define EXPECTED_MAPME_V6_HDRLEN   88
 
#define HICN_MAPME_V4_HDRLEN   sizeof(hicn_mapme_v4_header_t)
 
#define HICN_MAPME_V6_HDRLEN   sizeof(hicn_mapme_v6_header_t)
 

Typedefs

typedef u32 seq_t
 MAP-Me update sequence number.
 

Enumerations

enum  hicn_mapme_type_t {
  UNKNOWN, UPDATE, UPDATE_ACK, NOTIFICATION,
  NOTIFICATION_ACK
}
 MAP-Me packet types.
 

Functions

size_t hicn_mapme_create_packet (u8 *buf, const hicn_prefix_t *prefix, const mapme_params_t *params)
 
size_t hicn_mapme_create_ack (u8 *buf, const mapme_params_t *params)
 
int hicn_mapme_parse_packet (const u8 *packet, hicn_prefix_t *prefix, mapme_params_t *params)
 

Detailed Description

MAP-Me anchorless producer mobility management.