_(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
{
/** 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;
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);
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);