aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-08-16 17:48:44 -0700
committerDamjan Marion <dmarion@me.com>2019-08-19 09:22:59 +0000
commitdfb3b8771292e4c863ca266856aa2b5eb7cc7518 (patch)
tree07d808f098db401d045706cb32994cc2630ea2ed /src/vnet/session/transport.c
parent12f6936cd8f69f17820ef749515fcf4d50001c60 (diff)
session: add explicit reset api
Type: feature This can be used to forcefully close a session. It's only available to builtin applications for now. Transports must support the reset api otherwise normal close is used. Change-Id: I5e6d681cbc4c8045385e293e0e9d86fa2bf45849 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/transport.c')
-rw-r--r--src/vnet/session/transport.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index 22a356eaae2..aa8deac5400 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -324,6 +324,15 @@ transport_close (transport_proto_t tp, u32 conn_index, u8 thread_index)
tp_vfts[tp].close (conn_index, thread_index);
}
+void
+transport_reset (transport_proto_t tp, u32 conn_index, u8 thread_index)
+{
+ if (tp_vfts[tp].reset)
+ tp_vfts[tp].reset (conn_index, thread_index);
+ else
+ tp_vfts[tp].close (conn_index, thread_index);
+}
+
u32
transport_start_listen (transport_proto_t tp, u32 session_index,
transport_endpoint_t * tep)