summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-08-16 17:48:44 -0700
committerJohn Lo <loj@cisco.com>2019-09-20 21:36:26 +0000
commita267cba29c449b5b06c18670280b899da7dd2511 (patch)
tree058b9b0a4b48b26e894f63e100f786f230c79cdf /src/vnet/session/transport.h
parent7fe501a4b585f87bb095a2b023c381cd8baa2abe (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> (cherry picked from commit dfb3b8771292e4c863ca266856aa2b5eb7cc7518)
Diffstat (limited to 'src/vnet/session/transport.h')
-rw-r--r--src/vnet/session/transport.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h
index c4f74ebe991..cbe3c36734c 100644
--- a/src/vnet/session/transport.h
+++ b/src/vnet/session/transport.h
@@ -39,6 +39,7 @@ typedef struct _transport_proto_vft
u32 (*stop_listen) (u32 conn_index);
int (*connect) (transport_endpoint_cfg_t * rmt);
void (*close) (u32 conn_index, u32 thread_index);
+ void (*reset) (u32 conn_index, u32 thread_index);
void (*cleanup) (u32 conn_index, u32 thread_index);
clib_error_t *(*enable) (vlib_main_t * vm, u8 is_en);
@@ -96,6 +97,7 @@ do { \
int transport_connect (transport_proto_t tp, transport_endpoint_cfg_t * tep);
void transport_close (transport_proto_t tp, u32 conn_index, u8 thread_index);
+void transport_reset (transport_proto_t tp, u32 conn_index, u8 thread_index);
u32 transport_start_listen (transport_proto_t tp, u32 session_index,
transport_endpoint_t * tep);
u32 transport_stop_listen (transport_proto_t tp, u32 conn_index);