diff options
Diffstat (limited to 'src/plugins/ioam')
-rw-r--r-- | src/plugins/ioam/udp-ping/udp_ping.api | 24 | ||||
-rw-r--r-- | src/plugins/ioam/udp-ping/udp_ping_api.c | 12 | ||||
-rw-r--r-- | src/plugins/ioam/udp-ping/udp_ping_test.c | 16 |
3 files changed, 17 insertions, 35 deletions
diff --git a/src/plugins/ioam/udp-ping/udp_ping.api b/src/plugins/ioam/udp-ping/udp_ping.api index 6a5a6e68a03..b5b5f23810b 100644 --- a/src/plugins/ioam/udp-ping/udp_ping.api +++ b/src/plugins/ioam/udp-ping/udp_ping.api @@ -14,7 +14,7 @@ * limitations under the License. */ -vl_api_version 1.0.0 +vl_api_version 2.0.0 /** \brief UDP-Probe Add/Delete request @param src_ip_address - Source ipv4/v6 address for the udp-ping flow @@ -27,7 +27,7 @@ vl_api_version 1.0.0 @param is_ipv4 - To determine whether IPv4 or IPv6 address is used @param dis - TRUE is delete, FALSE if Add */ -define udp_ping_add_del_req { +autoreply define udp_ping_add_del { u32 client_index; u32 context; u8 src_ip_address[16]; @@ -43,32 +43,14 @@ define udp_ping_add_del_req { u8 reserve[3]; }; -/** \brief Udp-probe add/del response - @param context - sender context, to match reply w/ request - @param retval - return value for request -*/ -define udp_ping_add_del_reply { - u32 context; - i32 retval; -}; - /** \brief Udp-probe export add/del request @param context - sender context, to match reply w/ request @param retval - return value for request @param enable - If TRUE then enable export else disable */ -define udp_ping_export_req { +autoreply define udp_ping_export { u32 client_index; u32 context; u32 enable; }; -/** \brief Udp-probe export add/del response - @param context - sender context, to match reply w/ request - @param retval - return value for request -*/ -define udp_ping_export_reply { - u32 context; - i32 retval; -}; - diff --git a/src/plugins/ioam/udp-ping/udp_ping_api.c b/src/plugins/ioam/udp-ping/udp_ping_api.c index 52190097f1a..b66c1696010 100644 --- a/src/plugins/ioam/udp-ping/udp_ping_api.c +++ b/src/plugins/ioam/udp-ping/udp_ping_api.c @@ -56,11 +56,11 @@ /* List of message types that this module understands */ #define foreach_udp_ping_api_msg \ - _(UDP_PING_ADD_DEL_REQ, udp_ping_add_del_req) \ - _(UDP_PING_EXPORT_REQ, udp_ping_export_req) \ + _(UDP_PING_ADD_DEL, udp_ping_add_del) \ + _(UDP_PING_EXPORT, udp_ping_export) \ -static void vl_api_udp_ping_add_del_req_t_handler - (vl_api_udp_ping_add_del_req_t * mp) +static void +vl_api_udp_ping_add_del_t_handler (vl_api_udp_ping_add_del_t * mp) { ip46_address_t dst, src; int rv = 0; @@ -90,8 +90,8 @@ ERROROUT: REPLY_MACRO (VL_API_UDP_PING_ADD_DEL_REPLY); } -static void vl_api_udp_ping_export_req_t_handler - (vl_api_udp_ping_export_req_t * mp) +static void +vl_api_udp_ping_export_t_handler (vl_api_udp_ping_export_t * mp) { udp_ping_main_t *sm = &udp_ping_main; int rv = 0; diff --git a/src/plugins/ioam/udp-ping/udp_ping_test.c b/src/plugins/ioam/udp-ping/udp_ping_test.c index a5cc4f3f7e3..1ab8eec954a 100644 --- a/src/plugins/ioam/udp-ping/udp_ping_test.c +++ b/src/plugins/ioam/udp-ping/udp_ping_test.c @@ -117,11 +117,11 @@ do { \ } while(0); static int -api_udp_ping_add_del_req (vat_main_t * vam) +api_udp_ping_add_del (vat_main_t * vam) { udp_ping_test_main_t *sm = &udp_ping_test_main; unformat_input_t *input = vam->input; - vl_api_udp_ping_add_del_req_t *mp; + vl_api_udp_ping_add_del_t *mp; int rv = 0; ip6_address_t dst, src; u32 start_src_port, end_src_port; @@ -152,7 +152,7 @@ api_udp_ping_add_del_req (vat_main_t * vam) break; } - M (UDP_PING_ADD_DEL_REQ, udp_ping_add); + M (UDP_PING_ADD_DEL, udp_ping_add); clib_memcpy (mp->src_ip_address, &src, 16); clib_memcpy (mp->dst_ip_address, &dst, 16); @@ -171,11 +171,11 @@ api_udp_ping_add_del_req (vat_main_t * vam) } static int -api_udp_ping_export_req (vat_main_t * vam) +api_udp_ping_export (vat_main_t * vam) { udp_ping_test_main_t *sm = &udp_ping_test_main; unformat_input_t *input = vam->input; - vl_api_udp_ping_export_req_t *mp; + vl_api_udp_ping_export_t *mp; int rv = 0; int is_add = 1; f64 timeout; @@ -190,7 +190,7 @@ api_udp_ping_export_req (vat_main_t * vam) break; } - M (UDP_PING_EXPORT_REQ, udp_ping_export); + M (UDP_PING_EXPORT, udp_ping_export); mp->enable = is_add; @@ -205,13 +205,13 @@ api_udp_ping_export_req (vat_main_t * vam) * and that the data plane plugin processes */ #define foreach_vpe_api_msg \ -_(udp_ping_add_del_req, "src <local IPv6 address> start-src-port <first local port> "\ +_(udp_ping_add_del, "src <local IPv6 address> start-src-port <first local port> "\ "end-src-port <last local port> " \ "dst <remote IPv6 address> start-dst-port <first destination port> "\ "end-dst-port <last destination port> "\ "interval <time interval in sec for which ping packet will be sent> "\ "[disable]") \ -_(udp_ping_export_req, "export [disable]") \ +_(udp_ping_export, "export [disable]") \ static void |