aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/sctp/sctp_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/sctp/sctp_api.c')
-rw-r--r--src/vnet/sctp/sctp_api.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/vnet/sctp/sctp_api.c b/src/vnet/sctp/sctp_api.c
index 2c1b072228f..6aac77d2826 100644
--- a/src/vnet/sctp/sctp_api.c
+++ b/src/vnet/sctp/sctp_api.c
@@ -40,8 +40,9 @@
#include <vlibapi/api_helper_macros.h>
-#define foreach_sctp_api_msg \
-_(SCTP_ADD_SRC_DST_CONNECTION, sctp_add_src_dst_connection)
+#define foreach_sctp_api_msg \
+_(SCTP_ADD_SRC_DST_CONNECTION, sctp_add_src_dst_connection) \
+_(SCTP_DEL_SRC_DST_CONNECTION, sctp_del_src_dst_connection)
static void
vl_api_sctp_add_src_dst_connection_t_handler
@@ -63,6 +64,23 @@ static void
REPLY_MACRO (VL_API_SCTP_ADD_SRC_DST_CONNECTION_REPLY);
}
+static void
+ vl_api_sctp_del_src_dst_connection_t_handler
+ (vl_api_sctp_del_src_dst_connection_t * mp)
+{
+ vl_api_sctp_del_src_dst_connection_reply_t *rmp;
+ int rv;
+
+ if (mp->is_ipv6)
+ rv = sctp_sub_connection_del_ip6
+ ((ip6_address_t *) mp->src_address, (ip6_address_t *) mp->dst_address);
+ else
+ rv = sctp_sub_connection_del_ip4
+ ((ip4_address_t *) mp->src_address, (ip4_address_t *) mp->dst_address);
+
+ REPLY_MACRO (VL_API_SCTP_ADD_SRC_DST_CONNECTION_REPLY);
+}
+
#define vl_msg_name_crc_list
#include <vnet/sctp/sctp.api.h>
#undef vl_msg_name_crc_list