diff options
author | Vengada Govindan <venggovi@cisco.com> | 2016-08-25 10:34:34 -0700 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2016-09-06 18:53:51 +0000 |
commit | 07d2f84907e776383572fa5cc89071d90a8be36b (patch) | |
tree | 4b2ebf15f84d7e1724b9eca6fe1b329b1a251815 /vpp/vpp-api/api.c | |
parent | 5a1c11b53f60f4339e893b1a24cfc6515d2b08f7 (diff) |
Move iOAM Trace as a plugin
Change-Id: I78322e91485e5429871bd356f668b8ed90f4265a
Signed-off-by: Vengada Govindan <venggovi@cisco.com>
Diffstat (limited to 'vpp/vpp-api/api.c')
-rw-r--r-- | vpp/vpp-api/api.c | 49 |
1 files changed, 11 insertions, 38 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c index ead5f0cd..c339cb44 100644 --- a/vpp/vpp-api/api.c +++ b/vpp/vpp-api/api.c @@ -343,9 +343,8 @@ _(COP_INTERFACE_ENABLE_DISABLE, cop_interface_enable_disable) \ _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable) \ _(GET_NODE_GRAPH, get_node_graph) \ _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats) \ -_(TRACE_PROFILE_ADD, trace_profile_add) \ -_(TRACE_PROFILE_APPLY, trace_profile_apply) \ -_(TRACE_PROFILE_DEL, trace_profile_del) \ +_(IOAM_ENABLE, ioam_enable) \ +_(IOAM_DISABLE, ioam_disable) \ _(LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set) \ _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator) \ _(LISP_ADD_DEL_LOCAL_EID, lisp_add_del_local_eid) \ @@ -7035,56 +7034,30 @@ vl_api_get_node_graph_t_handler (vl_api_get_node_graph_t * mp) /* *INDENT-ON* */ } -static void vl_api_trace_profile_add_t_handler - (vl_api_trace_profile_add_t * mp) +static void +vl_api_ioam_enable_t_handler (vl_api_ioam_enable_t * mp) { int rv = 0; - vl_api_trace_profile_add_reply_t *rmp; + vl_api_ioam_enable_reply_t *rmp; clib_error_t *error; /* Ignoring the profile id as currently a single profile * is supported */ - error = ip6_ioam_trace_profile_set (mp->trace_num_elt, mp->trace_type, - ntohl (mp->node_id), - ntohl (mp->trace_app_data), - mp->pow_enable, mp->trace_tsp, - mp->trace_ppc); + error = ip6_ioam_enable (mp->trace_enable, mp->pow_enable, mp->trace_ppc); if (error) { clib_error_report (error); rv = clib_error_get_code (error); } - REPLY_MACRO (VL_API_TRACE_PROFILE_ADD_REPLY); -} - -static void vl_api_trace_profile_apply_t_handler - (vl_api_trace_profile_apply_t * mp) -{ - int rv = 0; - vl_api_trace_profile_apply_reply_t *rmp; - - if (mp->enable != 0) - { - rv = ip6_ioam_set_destination ((ip6_address_t *) (&mp->dest_ipv6), - ntohl (mp->prefix_length), - ntohl (mp->vrf_id), - mp->trace_op == IOAM_HBYH_ADD, - mp->trace_op == IOAM_HBYH_POP, - mp->trace_op == IOAM_HBYH_MOD); - } - else - { - //ip6_ioam_clear_destination(&ip6, mp->prefix_length, mp->vrf_id); - } - REPLY_MACRO (VL_API_TRACE_PROFILE_APPLY_REPLY); + REPLY_MACRO (VL_API_IOAM_ENABLE_REPLY); } -static void vl_api_trace_profile_del_t_handler - (vl_api_trace_profile_del_t * mp) +static void +vl_api_ioam_disable_t_handler (vl_api_ioam_disable_t * mp) { int rv = 0; - vl_api_trace_profile_del_reply_t *rmp; + vl_api_ioam_disable_reply_t *rmp; clib_error_t *error; error = clear_ioam_rewrite_fn (); @@ -7094,7 +7067,7 @@ static void vl_api_trace_profile_del_t_handler rv = clib_error_get_code (error); } - REPLY_MACRO (VL_API_TRACE_PROFILE_DEL_REPLY); + REPLY_MACRO (VL_API_IOAM_DISABLE_REPLY); } static void |