diff options
author | Andrej Kozemcak <akozemca@cisco.com> | 2016-05-02 12:14:33 +0200 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2016-05-05 11:46:10 +0000 |
commit | a9edd85e4cb35fd55c515dbfbad37aecd28c1431 (patch) | |
tree | 5e3b18b82beea727d9445a19fcbcec7962813ffc /vnet | |
parent | fdff1e6ed540f2a04792fb64e04b0c7862dc2b8c (diff) |
ONE-2: Add new LISP dump API for lisp gpe
API:
lisp_gpe_enable_disable_dump
Change-Id: I1c8e78f00f9a3f99c1f2f54884af565292e4ccf8
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/lisp-gpe/lisp_gpe.c | 11 | ||||
-rw-r--r-- | vnet/vnet/lisp-gpe/lisp_gpe.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/vnet/vnet/lisp-gpe/lisp_gpe.c b/vnet/vnet/lisp-gpe/lisp_gpe.c index 6ccc5f0d32e..4c39bf97cae 100644 --- a/vnet/vnet/lisp-gpe/lisp_gpe.c +++ b/vnet/vnet/lisp-gpe/lisp_gpe.c @@ -445,6 +445,14 @@ VLIB_CLI_COMMAND (show_lisp_gpe_tunnel_command, static) = { .function = show_lisp_gpe_tunnel_command_fn, }; +u8 +vnet_lisp_gpe_enable_disable_status(void) +{ + lisp_gpe_main_t * lgm = &lisp_gpe_main; + + return lgm->is_en; +} + clib_error_t * vnet_lisp_gpe_enable_disable (vnet_lisp_gpe_enable_disable_args_t * a) { @@ -471,6 +479,8 @@ vnet_lisp_gpe_enable_disable (vnet_lisp_gpe_enable_disable_args_t * a) { /* ask cp to re-add ifaces and defaults */ } + + lgm->is_en = 1; } else { @@ -509,6 +519,7 @@ vnet_lisp_gpe_enable_disable (vnet_lisp_gpe_enable_disable_args_t * a) vnet_lisp_gpe_add_del_iface(ai, 0); } vec_free(table_ids); + lgm->is_en = 0; } return 0; diff --git a/vnet/vnet/lisp-gpe/lisp_gpe.h b/vnet/vnet/lisp-gpe/lisp_gpe.h index 329083af631..cba779525a8 100644 --- a/vnet/vnet/lisp-gpe/lisp_gpe.h +++ b/vnet/vnet/lisp-gpe/lisp_gpe.h @@ -158,6 +158,7 @@ typedef struct lisp_gpe_main ip6_main_t * im6; ip_lookup_main_t * lm4; ip_lookup_main_t * lm6; + u8 is_en; } lisp_gpe_main_t; lisp_gpe_main_t lisp_gpe_main; @@ -195,6 +196,8 @@ typedef struct u32 vni; /* host byte order */ } vnet_lisp_gpe_add_del_iface_args_t; +u8 +vnet_lisp_gpe_enable_disable_status(void); void vnet_lisp_gpe_add_del_iface (vnet_lisp_gpe_add_del_iface_args_t *a, u32 * hw_if_indexp); |