summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-05 15:51:15 -0800
committerDamjan Marion <dmarion@me.com>2019-02-06 16:56:39 +0000
commit1ee7830e9ee8a62800822b6f5224d66243b916d4 (patch)
tree4629a50ea18dd0185f5a5de7d57a8120b1913be1 /src/vnet/session/transport.c
parent696d760865980d8191d11b562a5e431e4c4665af (diff)
transport: cleanup
- move transport specific types to transport_types - add transport wrapper functions for interaction with transport protocol vfts Change-Id: I93f70d884585fc2f41c4a605e310c80e8a8972f2 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/transport.c')
-rw-r--r--src/vnet/session/transport.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index df5282cc43a..2c4efe15806 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-#include <vnet/session/transport_interface.h>
+#include <vnet/session/transport.h>
#include <vnet/session/session.h>
#include <vnet/fib/fib.h>
@@ -271,17 +271,35 @@ transport_protocol_tx_fn_type (transport_proto_t tp)
return tp_vfts[tp].tx_type;
}
-transport_connection_t *
-transport_get_connection (transport_proto_t tp, u32 conn_index,
- u8 thread_index)
+void
+transport_cleanup (transport_proto_t tp, u32 conn_index, u8 thread_index)
+{
+ tp_vfts[tp].cleanup (conn_index, thread_index);
+}
+
+int
+transport_connect (transport_proto_t tp, transport_endpoint_cfg_t * tep)
+{
+ return tp_vfts[tp].connect (tep);
+}
+
+void
+transport_close (transport_proto_t tp, u32 conn_index, u8 thread_index)
{
- return tp_vfts[tp].get_connection (conn_index, thread_index);
+ tp_vfts[tp].close (conn_index, thread_index);
}
-transport_connection_t *
-transport_get_listener (transport_proto_t tp, u32 conn_index)
+u32
+transport_start_listen (transport_proto_t tp, u32 session_index,
+ transport_endpoint_t * tep)
+{
+ return tp_vfts[tp].start_listen (session_index, tep);
+}
+
+u32
+transport_stop_listen (transport_proto_t tp, u32 conn_index)
{
- return tp_vfts[tp].get_listener (conn_index);
+ return tp_vfts[tp].stop_listen (conn_index);
}
u8