diff options
author | Florin Coras <fcoras@cisco.com> | 2019-08-16 17:48:44 -0700 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2019-09-20 21:36:26 +0000 |
commit | a267cba29c449b5b06c18670280b899da7dd2511 (patch) | |
tree | 058b9b0a4b48b26e894f63e100f786f230c79cdf /src/vnet/session/transport.c | |
parent | 7fe501a4b585f87bb095a2b023c381cd8baa2abe (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.c')
-rw-r--r-- | src/vnet/session/transport.c | 9 |
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) |