X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fikev2%2Fikev2_api.c;h=ef97898a7479cd6c52307b1d0a7f5916da852a52;hb=59f71132e;hp=f846bfab9f09557181923a3b5f40dbe24bd440cb;hpb=b29d523af039ac007238300a7316ba9e3e44ce25;p=vpp.git diff --git a/src/plugins/ikev2/ikev2_api.c b/src/plugins/ikev2/ikev2_api.c index f846bfab9f0..ef97898a747 100644 --- a/src/plugins/ikev2/ikev2_api.c +++ b/src/plugins/ikev2/ikev2_api.c @@ -61,6 +61,26 @@ vl_api_ikev2_plugin_get_version_t_handler (vl_api_ikev2_plugin_get_version_t * vl_api_send_msg (reg, (u8 *) rmp); } +static void + vl_api_ikev2_profile_set_liveness_t_handler + (vl_api_ikev2_profile_set_liveness_t * mp) +{ + vl_api_ikev2_profile_set_liveness_reply_t *rmp; + int rv = 0; + +#if WITH_LIBSSL > 0 + clib_error_t *error; + error = ikev2_set_liveness_params (clib_net_to_host_u32 (mp->period), + clib_net_to_host_u32 (mp->max_retries)); + if (error) + rv = VNET_API_ERROR_UNSPECIFIED; +#else + rv = VNET_API_ERROR_UNIMPLEMENTED; +#endif + + REPLY_MACRO (VL_API_IKEV2_PROFILE_SET_LIVENESS_REPLY); +} + static void vl_api_ikev2_profile_add_del_t_handler (vl_api_ikev2_profile_add_del_t * mp) { @@ -311,6 +331,30 @@ vl_api_ikev2_set_sa_lifetime_t_handler (vl_api_ikev2_set_sa_lifetime_t * mp) REPLY_MACRO (VL_API_IKEV2_SET_SA_LIFETIME_REPLY); } +static void + vl_api_ikev2_profile_set_ipsec_udp_port_t_handler + (vl_api_ikev2_profile_set_ipsec_udp_port_t * mp) +{ + vl_api_ikev2_profile_set_ipsec_udp_port_reply_t *rmp; + int rv = 0; + +#if WITH_LIBSSL > 0 + vlib_main_t *vm = vlib_get_main (); + + u8 *tmp = format (0, "%s", mp->name); + + rv = + ikev2_set_profile_ipsec_udp_port (vm, tmp, + clib_net_to_host_u16 (mp->port), + mp->is_set); + vec_free (tmp); +#else + rv = VNET_API_ERROR_UNIMPLEMENTED; +#endif + + REPLY_MACRO (VL_API_IKEV2_PROFILE_SET_IPSEC_UDP_PORT_REPLY); +} + static void vl_api_ikev2_set_tunnel_interface_t_handler (vl_api_ikev2_set_tunnel_interface_t * mp)