+transport_service_type_t
+transport_protocol_service_type (transport_proto_t tp)
+{
+ return tp_vfts[tp].transport_options.service_type;
+}
+
+transport_tx_fn_type_t
+transport_protocol_tx_fn_type (transport_proto_t tp)
+{
+ return tp_vfts[tp].transport_options.tx_type;
+}
+
+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)
+{
+ 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)
+{
+ return tp_vfts[tp].start_listen (session_index, tep);
+}
+
+u32
+transport_stop_listen (transport_proto_t tp, u32 conn_index)
+{
+ return tp_vfts[tp].stop_listen (conn_index);
+}
+
+u8
+transport_protocol_is_cl (transport_proto_t tp)
+{
+ return (tp_vfts[tp].transport_options.service_type == TRANSPORT_SERVICE_CL);
+}
+
+always_inline void
+default_get_transport_endpoint (transport_connection_t * tc,
+ transport_endpoint_t * tep, u8 is_lcl)
+{
+ if (is_lcl)
+ {
+ tep->port = tc->lcl_port;
+ tep->is_ip4 = tc->is_ip4;
+ clib_memcpy_fast (&tep->ip, &tc->lcl_ip, sizeof (tc->lcl_ip));
+ }
+ else
+ {
+ tep->port = tc->rmt_port;
+ tep->is_ip4 = tc->is_ip4;
+ clib_memcpy_fast (&tep->ip, &tc->rmt_ip, sizeof (tc->rmt_ip));
+ }
+}
+
+void
+transport_get_endpoint (transport_proto_t tp, u32 conn_index,
+ u32 thread_index, transport_endpoint_t * tep,
+ u8 is_lcl)
+{
+ if (tp_vfts[tp].get_transport_endpoint)
+ tp_vfts[tp].get_transport_endpoint (conn_index, thread_index, tep,
+ is_lcl);
+ else
+ {
+ transport_connection_t *tc;
+ tc = transport_get_connection (tp, conn_index, thread_index);
+ default_get_transport_endpoint (tc, tep, is_lcl);
+ }
+}
+
+void
+transport_get_listener_endpoint (transport_proto_t tp, u32 conn_index,
+ transport_endpoint_t * tep, u8 is_lcl)
+{
+ if (tp_vfts[tp].get_transport_listener_endpoint)
+ tp_vfts[tp].get_transport_listener_endpoint (conn_index, tep, is_lcl);
+ else
+ {
+ transport_connection_t *tc;
+ tc = transport_get_listener (tp, conn_index);
+ default_get_transport_endpoint (tc, tep, is_lcl);
+ }
+}
+