Hybrid ICN (hICN) plugin  v21.06-rc0-4-g18fa668
Classes | Macros | Typedefs | Enumerations | Functions | Variables
mapme.h File Reference

Mapme. More...

#include <vnet/dpo/load_balance.h>
#include <vnet/buffer.h>
#include <hicn/mapme.h>
#include "hicn.h"
#include "route.h"
#include "strategy_dpo_ctx.h"
#include "strategy_dpo_manager.h"
Include dependency graph for mapme.h:

Go to the source code of this file.

Classes

struct  hicn_mapme_conf_s
 

Macros

#define HICN_MAPME_ALLOW_LOCATORS   1
 
#define NOT_A_NOTIFICATION   false
 
#define TIMER_NO_REPEAT   false
 
#define INVALID_SEQ   0
 
#define foreach_hicn_mapme_event
 List of event to signat to the procesing node (eventmgr) More...
 
#define _(a)   HICN_MAPME_EVENT_##a,
 
#define TFIB(dpo_ctx)   ((hicn_mapme_tfib_t *) (dpo_ctx))
 
#define DEBUG(...)
 
#define WARN(...)
 
#define ERROR(...)
 

Typedefs

typedef struct hicn_mapme_conf_s hicn_mapme_main_t
 
typedef hicn_dpo_ctx_t hicn_mapme_tfib_t
 

Enumerations

enum  hicn_mapme_event_t { foreach_hicn_mapme_event }
 

Functions

 STATIC_ASSERT (sizeof(u32)==sizeof(seq_t), "seq_t is not 4 bytes")
 
 STATIC_ASSERT (sizeof(hicn_mapme_tfib_t)<=sizeof(hicn_dpo_ctx_t), "hicn_mapme_tfib_t is greater than hicn_dpo_ctx_t")
 
static_always_inline int hicn_mapme_nh_set (hicn_mapme_tfib_t *tfib, hicn_face_id_t face_id)
 
static_always_inline int hicn_mapme_nh_add (hicn_mapme_tfib_t *tfib, hicn_face_id_t face_id)
 Add a next hop iif it is not already a next hops.
 
static_always_inline int hicn_mapme_tfib_add (hicn_mapme_tfib_t *tfib, hicn_face_id_t face_id)
 
static_always_inline int hicn_mapme_tfib_clear (hicn_mapme_tfib_t *tfib)
 
static_always_inline int hicn_mapme_tfib_del (hicn_mapme_tfib_t *tfib, hicn_face_id_t face_id)
 
static_always_inline dpo_id_t * fib_epm_lookup (ip46_address_t *addr, u8 plen)
 Performs an Exact Prefix Match lookup on the FIB. More...
 
always_inline u32 hicn_mapme_get_dpo_vlib_edge (dpo_id_t *dpo)
 Returns the next hop vlib edge on which we can send an Interest packet. More...
 
always_inline char * hicn_mapme_get_dpo_face_node (hicn_face_id_t face_id)
 Returns the next hop node on which we can send an Update packet.
 

Variables

dpo_type_t hicn_face_udp_type
 
dpo_type_t hicn_face_ip_type
 
u32 strategy_face_ip4_vlib_edge
 
u32 strategy_face_ip6_vlib_edge
 
u32 strategy_face_udp4_vlib_edge
 
u32 strategy_face_udp6_vlib_edge
 

Detailed Description

Mapme.

Mapme implementation follows the "Anchorless mobility through hICN" document specification. In particular, the implementation is made of:

TFIB implementation is done as an extension of an hICN fib entry. In particular, the list of next hops hold the list of next hops in the tfib as well (stored at the end of the list of regualt next hops). Mapme implementation follows the hICN vrf implementation and consider the vrf 0 (default fib) as the control-plane fib to update every time a new next hop must be added or removed.

Macro Definition Documentation

◆ foreach_hicn_mapme_event

#define foreach_hicn_mapme_event
Value:
_ (FACE_ADD) \
_ (FACE_DEL) \
_ (FACE_APP_ADD) \
_ (FACE_APP_DEL) \
_ (FACE_NH_SET) \
_ (FACE_NH_ADD) \
_ (FACE_PH_ADD) \
_ (FACE_PH_DEL)

List of event to signat to the procesing node (eventmgr)

Function Documentation

◆ fib_epm_lookup()

static_always_inline dpo_id_t* fib_epm_lookup ( ip46_address_t addr,
u8  plen 
)

Performs an Exact Prefix Match lookup on the FIB.

Returns
the corresponding DPO (hICN or IP LB), or NULL

◆ hicn_mapme_get_dpo_vlib_edge()

always_inline u32 hicn_mapme_get_dpo_vlib_edge ( dpo_id_t *  dpo)

Returns the next hop vlib edge on which we can send an Interest packet.

This is both used to preprocess a dpo that will be stored as a next hop in the FIB, and to determine on which node to send an Interest Update.

◆ hicn_mapme_tfib_add()

static_always_inline int hicn_mapme_tfib_add ( hicn_mapme_tfib_t *  tfib,
hicn_face_id_t  face_id 
)

Add a 'previous' hop to the TFIB

XXX we should have the for look in the reverse order for simpler code.