aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/control.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-01-24 11:38:18 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-01-26 08:21:51 +0000
commitba888e46f799a1ae209c51fffdd6159d75b20cdd (patch)
treebd07381021852decd23fd417ed102bc9491e4822 /src/vnet/lisp-cp/control.h
parent2d6b2d6d1bbb130921ec525a1cc6e88f42717c79 (diff)
Add option to use LISP Proxy-ETR
When enabled, destinations with negative mappings or those not reachable via underlay have their traffic forwarded to the PETR. Change-Id: I1056b0959736144f27fcca7b79263f921e7a8bd9 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/control.h')
-rw-r--r--src/vnet/lisp-cp/control.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/vnet/lisp-cp/control.h b/src/vnet/lisp-cp/control.h
index aa76a424264..14f3baec150 100644
--- a/src/vnet/lisp-cp/control.h
+++ b/src/vnet/lisp-cp/control.h
@@ -94,8 +94,27 @@ typedef enum
_MR_MODE_MAX
} map_request_mode_t;
+#define foreach_lisp_flag_bit \
+ _(USE_PETR, "Use Proxy-ETR")
+
+typedef enum lisp_flag_bits
+{
+#define _(sym, str) LISP_FLAG_BIT_##sym,
+ foreach_lisp_flag_bit
+#undef _
+} lisp_flag_bits_e;
+
+typedef enum lisp_flags
+{
+#define _(sym, str) LISP_FLAG_##sym = 1 << LISP_FLAG_BIT_##sym,
+ foreach_lisp_flag_bit
+#undef _
+} lisp_flags_e;
+
typedef struct
{
+ u32 flags;
+
/* LISP feature status */
u8 is_enabled;
@@ -170,9 +189,12 @@ typedef struct
/* track l2 and l3 interfaces that have been created for vni */
uword *l2_dp_intf_by_vni;
- /* Proxy ETR map index */
+ /* Proxy ITR map index */
u32 pitr_map_index;
+ /** Proxy ETR map index */
+ u32 petr_map_index;
+
/* LISP PITR mode */
u8 lisp_pitr;
@@ -280,6 +302,7 @@ clib_error_t *vnet_lisp_enable_disable (u8 is_enabled);
u8 vnet_lisp_enable_disable_status (void);
int vnet_lisp_pitr_set_locator_set (u8 * locator_set_name, u8 is_add);
+int vnet_lisp_use_petr (ip_address_t * ip, u8 is_add);
typedef struct
{
@@ -303,6 +326,12 @@ int vnet_lisp_map_register_enable_disable (u8 is_enable);
u8 vnet_lisp_map_register_state_get (void);
u8 vnet_lisp_rloc_probe_state_get (void);
+always_inline mapping_t *
+lisp_get_petr_mapping (lisp_cp_main_t * lcm)
+{
+ return pool_elt_at_index (lcm->mapping_pool, lcm->petr_map_index);
+}
+
#endif /* VNET_CONTROL_H_ */
/*