diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2017-02-21 18:28:34 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-02-27 10:20:50 +0000 |
commit | 3e7b569361f97368b0cad3468fac76ef2a398bfa (patch) | |
tree | c1184cd493b762c5d868857d71fc919bc14ccfce /src/vnet/lisp-gpe/lisp_gpe_api.c | |
parent | 646ba9b004055861c6dbce14424cb1d3de757ff6 (diff) |
Add GPE CLI/API for setting encap mode
Change-Id: Id89e23fb5d275572b2356c073dfa0f55719e1a76
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-gpe/lisp_gpe_api.c')
-rw-r--r-- | src/vnet/lisp-gpe/lisp_gpe_api.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/vnet/lisp-gpe/lisp_gpe_api.c b/src/vnet/lisp-gpe/lisp_gpe_api.c index 8d19f8ce466..f6bd5440a6d 100644 --- a/src/vnet/lisp-gpe/lisp_gpe_api.c +++ b/src/vnet/lisp-gpe/lisp_gpe_api.c @@ -56,7 +56,9 @@ _(GPE_ADD_DEL_FWD_ENTRY, gpe_add_del_fwd_entry) \ _(GPE_FWD_ENTRIES_GET, gpe_fwd_entries_get) \ _(GPE_FWD_ENTRY_PATH_DUMP, gpe_fwd_entry_path_dump) \ _(GPE_ENABLE_DISABLE, gpe_enable_disable) \ -_(GPE_ADD_DEL_IFACE, gpe_add_del_iface) +_(GPE_ADD_DEL_IFACE, gpe_add_del_iface) \ +_(GPE_SET_ENCAP_MODE, gpe_set_encap_mode) \ +_(GPE_GET_ENCAP_MODE, gpe_get_encap_mode) static locator_pair_t * unformat_gpe_loc_pairs (void *locs, u32 rloc_num) @@ -373,6 +375,30 @@ vl_api_gpe_add_del_iface_t_handler (vl_api_gpe_add_del_iface_t * mp) REPLY_MACRO (VL_API_GPE_ADD_DEL_IFACE_REPLY); } +static void +vl_api_gpe_set_encap_mode_t_handler (vl_api_gpe_set_encap_mode_t * mp) +{ + vl_api_gpe_set_encap_mode_reply_t *rmp; + int rv = 0; + + rv = vnet_gpe_set_encap_mode (mp->mode); + REPLY_MACRO (VL_API_GPE_SET_ENCAP_MODE_REPLY); +} + +static void +vl_api_gpe_get_encap_mode_t_handler (vl_api_gpe_get_encap_mode_t * mp) +{ + vl_api_gpe_get_encap_mode_reply_t *rmp; + int rv = 0; + + /* *INDENT-OFF* */ + REPLY_MACRO2 (VL_API_GPE_GET_ENCAP_MODE_REPLY, + ({ + rmp->encap_mode = vnet_gpe_get_encap_mode (); + })); + /* *INDENT-ON* */ +} + /* * gpe_api_hookup * Add vpe's API message handlers to the table. |