aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/transport.h')
-rw-r--r--src/vnet/session/transport.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h
index 6dc6984cdf4..eb98032b1e4 100644
--- a/src/vnet/session/transport.h
+++ b/src/vnet/session/transport.h
@@ -44,9 +44,21 @@ typedef enum transport_snd_flags_
typedef struct transport_send_params_
{
- u32 snd_space;
- u32 tx_offset;
- u16 snd_mss;
+ union
+ {
+ /* Used to retrieve snd params from transports */
+ struct
+ {
+ u32 snd_space;
+ u32 tx_offset;
+ u16 snd_mss;
+ };
+ /* Used by custom tx functions */
+ struct
+ {
+ u32 max_burst_size;
+ };
+ };
transport_snd_flags_t flags;
} transport_send_params_t;
@@ -76,7 +88,7 @@ typedef struct _transport_proto_vft
transport_send_params_t *sp);
void (*update_time) (f64 time_now, u8 thread_index);
void (*flush_data) (transport_connection_t *tconn);
- int (*custom_tx) (void *session, u32 max_burst_size);
+ int (*custom_tx) (void *session, transport_send_params_t *sp);
int (*app_rx_evt) (transport_connection_t *tconn);
/*
@@ -152,9 +164,10 @@ transport_get_half_open (transport_proto_t tp, u32 conn_index)
}
static inline int
-transport_custom_tx (transport_proto_t tp, void *s, u32 max_burst_size)
+transport_custom_tx (transport_proto_t tp, void *s,
+ transport_send_params_t * sp)
{
- return tp_vfts[tp].custom_tx (s, max_burst_size);
+ return tp_vfts[tp].custom_tx (s, sp);
}
static inline int