tcp: remove unused code
[vpp.git] / src / vnet / tcp / tcp.h
index 1e6cf8a..23849a3 100644 (file)
@@ -34,7 +34,7 @@ extern timer_expiration_handler tcp_timer_retransmit_syn_handler;
 
 typedef enum _tcp_error
 {
-#define tcp_error(n,s) TCP_ERROR_##n,
+#define tcp_error(f, n, s, d) TCP_ERROR_##f,
 #include <vnet/tcp/tcp_error.def>
 #undef tcp_error
   TCP_N_ERROR,
@@ -193,9 +193,6 @@ typedef struct tcp_configuration_
   /** Number of preallocated connections */
   u32 preallocated_connections;
 
-  /** Number of preallocated half-open connections */
-  u32 preallocated_half_open_connections;
-
   /** Maxium allowed GSO packet size */
   u32 max_gso_size;
 
@@ -218,15 +215,9 @@ typedef struct _tcp_main
   /** vlib buffer size */
   u32 bytes_per_buffer;
 
-  /** Session layer edge indices to ip lookup (syns, rst) */
-  u32 ipl_next_node[2];
-
   /** Dispatch table by state and flags */
   tcp_lookup_dispatch_t dispatch_table[TCP_N_STATES][64];
 
-  /** Pool of half-open connections on which we've sent a SYN */
-  tcp_connection_t *half_open_connections;
-
   /** Seed used to generate random iss */
   tcp_iss_seed_t iss_seed;
 
@@ -256,6 +247,9 @@ typedef struct _tcp_main
 
   /** Protocol configuration */
   tcp_configuration_t cfg;
+
+  /** message ID base for API */
+  u16 msg_id_base;
 } tcp_main_t;
 
 extern tcp_main_t tcp_main;
@@ -271,6 +265,8 @@ extern vlib_node_registration_t tcp4_rcv_process_node;
 extern vlib_node_registration_t tcp6_rcv_process_node;
 extern vlib_node_registration_t tcp4_listen_node;
 extern vlib_node_registration_t tcp6_listen_node;
+extern vlib_node_registration_t tcp4_input_nolookup_node;
+extern vlib_node_registration_t tcp6_input_nolookup_node;
 
 #define tcp_cfg tcp_main.cfg
 #define tcp_node_index(node_id, is_ip4)                                \
@@ -291,7 +287,7 @@ tcp_get_worker (u32 thread_index)
 
 tcp_connection_t *tcp_connection_alloc (u8 thread_index);
 tcp_connection_t *tcp_connection_alloc_w_base (u8 thread_index,
-                                              tcp_connection_t * base);
+                                              tcp_connection_t **base);
 void tcp_connection_free (tcp_connection_t * tc);
 void tcp_connection_close (tcp_connection_t * tc);
 void tcp_connection_cleanup (tcp_connection_t * tc);
@@ -316,8 +312,8 @@ u32 tcp_snd_space (tcp_connection_t * tc);
 int tcp_fastrecovery_prr_snd_space (tcp_connection_t * tc);
 void tcp_reschedule (tcp_connection_t * tc);
 fib_node_index_t tcp_lookup_rmt_in_fib (tcp_connection_t * tc);
-u32 tcp_session_push_header (transport_connection_t * tconn,
-                            vlib_buffer_t * b);
+u32 tcp_session_push_header (transport_connection_t *tconn, vlib_buffer_t **b,
+                            u32 n_bufs);
 int tcp_session_custom_tx (void *conn, transport_send_params_t * sp);
 
 void tcp_connection_timers_init (tcp_connection_t * tc);
@@ -330,6 +326,7 @@ void tcp_connection_tx_pacer_reset (tcp_connection_t * tc, u32 window,
 void tcp_program_cleanup (tcp_worker_ctx_t * wrk, tcp_connection_t * tc);
 void tcp_check_gso (tcp_connection_t *tc);
 
+int tcp_buffer_make_reset (vlib_main_t *vm, vlib_buffer_t *b, u8 is_ip4);
 void tcp_punt_unknown (vlib_main_t * vm, u8 is_ip4, u8 is_add);
 int tcp_configure_v4_source_address_range (vlib_main_t * vm,
                                           ip4_address_t * start,