session: use transport custom tx for app transports
[vpp.git] / src / vnet / session / transport.h
index 8500e9d..e446a39 100644 (file)
@@ -45,6 +45,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);
 
   /*
    * Connection retrieval
@@ -104,6 +105,12 @@ transport_get_half_open (transport_proto_t tp, u32 conn_index)
   return tp_vfts[tp].get_half_open (conn_index);
 }
 
+static inline int
+transport_custom_tx (transport_proto_t tp, void *s)
+{
+  return tp_vfts[tp].custom_tx (s);
+}
+
 void transport_register_protocol (transport_proto_t transport_proto,
                                  const transport_proto_vft_t * vft,
                                  fib_protocol_t fib_proto, u32 output_node);