session tcp: handle rxt and acks as custom events
[vpp.git] / src / vnet / session / transport.h
index fadb02d..058a9ae 100644 (file)
 #include <vnet/vnet.h>
 #include <vnet/session/transport_types.h>
 
+typedef struct _transport_options_t
+{
+  transport_tx_fn_type_t tx_type;
+  transport_service_type_t service_type;
+  u8 half_open_has_fifos;
+} transport_options_t;
+
 /*
  * Transport protocol virtual function table
  */
@@ -45,7 +52,7 @@ typedef struct _transport_proto_vft
   u32 (*tx_fifo_offset) (transport_connection_t * tc);
   void (*update_time) (f64 time_now, u8 thread_index);
   void (*flush_data) (transport_connection_t *tconn);
-  int (*custom_tx) (void *session);
+  int (*custom_tx) (void *session, u32 max_burst_size);
   int (*app_rx_evt) (transport_connection_t *tconn);
 
   /*
@@ -74,8 +81,7 @@ typedef struct _transport_proto_vft
   /*
    * Properties
    */
-  transport_tx_fn_type_t tx_type;
-  transport_service_type_t service_type;
+  transport_options_t transport_options;
 } transport_proto_vft_t;
 /* *INDENT-ON* */
 
@@ -121,9 +127,9 @@ transport_get_half_open (transport_proto_t tp, u32 conn_index)
 }
 
 static inline int
-transport_custom_tx (transport_proto_t tp, void *s)
+transport_custom_tx (transport_proto_t tp, void *s, u32 max_burst_size)
 {
-  return tp_vfts[tp].custom_tx (s);
+  return tp_vfts[tp].custom_tx (s, max_burst_size);
 }
 
 static inline int