+always_inline u32
+transport_tx_fifo_size (transport_connection_t * tc)
+{
+ stream_session_t *s = session_get (tc->s_index, tc->thread_index);
+ return s->server_tx_fifo->nitems;
+}
+
+always_inline u8
+transport_rx_fifo_has_ooo_data (transport_connection_t * tc)
+{
+ stream_session_t *s = session_get (tc->c_index, tc->thread_index);
+ return svm_fifo_has_ooo_data (s->server_rx_fifo);
+}
+
+always_inline f64
+transport_dispatch_period (u32 thread_index)
+{
+ return session_manager_main.wrk[thread_index].dispatch_period;
+}
+
+always_inline f64
+transport_time_now (u32 thread_index)
+{
+ return session_manager_main.wrk[thread_index].last_vlib_time;
+}
+
+always_inline u32
+session_get_index (stream_session_t * s)
+{
+ return (s - session_manager_main.wrk[s->thread_index].sessions);
+}
+
+always_inline stream_session_t *
+session_clone_safe (u32 session_index, u32 thread_index)
+{
+ stream_session_t *old_s, *new_s;
+ u32 current_thread_index = vlib_get_thread_index ();
+
+ /* If during the memcpy pool is reallocated AND the memory allocator
+ * decides to give the old chunk of memory to somebody in a hurry to
+ * scribble something on it, we have a problem. So add this thread as
+ * a session pool peeker.
+ */
+ session_pool_add_peeker (thread_index);
+ new_s = session_alloc (current_thread_index);
+ old_s = session_manager_main.wrk[thread_index].sessions + session_index;
+ clib_memcpy_fast (new_s, old_s, sizeof (*new_s));
+ session_pool_remove_peeker (thread_index);
+ new_s->thread_index = current_thread_index;
+ new_s->session_index = session_get_index (new_s);
+ return new_s;
+}
+
+transport_connection_t *session_get_transport (stream_session_t * s);
+
+u32 session_tx_fifo_max_dequeue (transport_connection_t * tc);