summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/tcp/tcp.h')
-rw-r--r--src/vnet/tcp/tcp.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h
index 997df76f545..a17262fa7b4 100644
--- a/src/vnet/tcp/tcp.h
+++ b/src/vnet/tcp/tcp.h
@@ -116,7 +116,8 @@ extern timer_expiration_handler tcp_timer_retransmit_syn_handler;
_(RECOVERY, "Recovery on") \
_(FAST_RECOVERY, "Fast Recovery on") \
_(FR_1_SMSS, "Sent 1 SMSS") \
- _(HALF_OPEN_DONE, "Half-open completed")
+ _(HALF_OPEN_DONE, "Half-open completed") \
+ _(FINPNDG, "FIN pending")
typedef enum _tcp_connection_flag_bits
{
@@ -404,6 +405,9 @@ typedef struct _tcp_main
/** Port allocator random number generator seed */
u32 port_allocator_seed;
+
+ /** vlib buffer size */
+ u32 bytes_per_buffer;
} tcp_main_t;
extern tcp_main_t tcp_main;
@@ -587,6 +591,14 @@ tcp_available_snd_space (const tcp_connection_t * tc)
return available_wnd - flight_size;
}
+always_inline u8
+tcp_is_lost_fin (tcp_connection_t * tc)
+{
+ if ((tc->flags & TCP_CONN_FINSNT) && tc->snd_una_max - tc->snd_una == 1)
+ return 1;
+ return 0;
+}
+
i32 tcp_rcv_wnd_available (tcp_connection_t * tc);
u32 tcp_snd_space (tcp_connection_t * tc);
void tcp_update_rcv_wnd (tcp_connection_t * tc);
@@ -621,8 +633,8 @@ tcp_update_time (f64 now, u32 thread_index)
u32 tcp_push_header (transport_connection_t * tconn, vlib_buffer_t * b);
u32
-tcp_prepare_retransmit_segment (tcp_connection_t * tc, vlib_buffer_t * b,
- u32 offset, u32 max_bytes);
+tcp_prepare_retransmit_segment (tcp_connection_t * tc, u32 offset,
+ u32 max_bytes, vlib_buffer_t ** b);
void tcp_connection_timers_init (tcp_connection_t * tc);
void tcp_connection_timers_reset (tcp_connection_t * tc);