session: cleanup part 3
[vpp.git] / src / vnet / session / transport_interface.h
index e8a6dbc..1230486 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Copyright (c) 2017-2019 Cisco and/or its affiliates.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at:
 #include <vnet/vnet.h>
 #include <vnet/session/transport.h>
 
-typedef enum transport_dequeue_type_
-{
-  TRANSPORT_TX_PEEK,           /**< reliable transport protos */
-  TRANSPORT_TX_DEQUEUE,                /**< unreliable transport protos */
-  TRANSPORT_TX_INTERNAL,       /**< apps acting as transports */
-  TRANSPORT_TX_DGRAM,          /**< datagram mode */
-  TRANSPORT_TX_N_FNS
-} transport_tx_fn_type_t;
-
-typedef enum transport_service_type_
-{
-  TRANSPORT_SERVICE_VC,                /**< virtual circuit service */
-  TRANSPORT_SERVICE_CL,                /**< connectionless service */
-  TRANSPORT_SERVICE_APP,       /**< app transport service */
-  TRANSPORT_N_SERVICES
-} transport_service_type_t;
-
 /*
  * Transport protocol virtual function table
  */
@@ -98,9 +81,12 @@ void transport_register_protocol (transport_proto_t transport_proto,
                                  const transport_proto_vft_t * vft,
                                  fib_protocol_t fib_proto, u32 output_node);
 transport_proto_vft_t *transport_protocol_get_vft (transport_proto_t tp);
-transport_service_type_t transport_protocol_service_type (transport_proto_t);
-transport_tx_fn_type_t transport_protocol_tx_fn_type (transport_proto_t tp);
 void transport_update_time (f64 time_now, u8 thread_index);
+transport_connection_t *transport_get_connection (transport_proto_t tp,
+                                                 u32 conn_index,
+                                                 u8 thread_index);
+transport_connection_t *transport_get_listener (transport_proto_t tp,
+                                               u32 conn_index);
 void transport_enable_disable (vlib_main_t * vm, u8 is_en);
 
 always_inline u32