summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/tcp')
-rw-r--r--src/vnet/tcp/tcp.c6
-rw-r--r--src/vnet/tcp/tcp_output.c17
2 files changed, 12 insertions, 11 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 99b015ba3d8..5fdeec608c9 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -1173,13 +1173,13 @@ tcp_session_flush_data (transport_connection_t * tconn)
/* *INDENT-OFF* */
const static transport_proto_vft_t tcp_proto = {
.enable = vnet_tcp_enable_disable,
- .bind = tcp_session_bind,
- .unbind = tcp_session_unbind,
+ .start_listen = tcp_session_bind,
+ .stop_listen = tcp_session_unbind,
.push_header = tcp_session_push_header,
.get_connection = tcp_session_get_transport,
.get_listener = tcp_session_get_listener,
.get_half_open = tcp_half_open_session_get_transport,
- .open = tcp_session_open,
+ .connect = tcp_session_open,
.close = tcp_session_close,
.cleanup = tcp_session_cleanup,
.send_mss = tcp_session_send_mss,
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index 9032a97a7f9..96ffd2c7efe 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -14,7 +14,6 @@
*/
#include <vnet/tcp/tcp.h>
-#include <vnet/lisp-cp/packets.h>
#include <math.h>
vlib_node_registration_t tcp4_output_node;
@@ -477,7 +476,7 @@ tcp_reuse_buffer (vlib_main_t * vm, vlib_buffer_t * b)
vnet_buffer (b)->tcp.flags = 0;
/* Leave enough space for headers */
- return vlib_buffer_make_headroom (b, MAX_HDRS_LEN);
+ return vlib_buffer_make_headroom (b, TRANSPORT_MAX_HDRS_LEN);
}
static void *
@@ -490,7 +489,7 @@ tcp_init_buffer (vlib_main_t * vm, vlib_buffer_t * b)
vnet_buffer (b)->tcp.flags = 0;
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b);
/* Leave enough space for headers */
- return vlib_buffer_make_headroom (b, MAX_HDRS_LEN);
+ return vlib_buffer_make_headroom (b, TRANSPORT_MAX_HDRS_LEN);
}
/**
@@ -1290,7 +1289,7 @@ tcp_prepare_segment (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
int n_bytes = 0;
u8 *data;
- seg_size = max_deq_bytes + MAX_HDRS_LEN;
+ seg_size = max_deq_bytes + TRANSPORT_MAX_HDRS_LEN;
/*
* Prepare options
@@ -1339,7 +1338,8 @@ tcp_prepare_segment (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
*b = vlib_get_buffer (vm, wrk->tx_buffers[--n_bufs]);
data = tcp_init_buffer (vm, *b);
n_bytes = stream_session_peek_bytes (&tc->connection, data, offset,
- bytes_per_buffer - MAX_HDRS_LEN);
+ bytes_per_buffer -
+ TRANSPORT_MAX_HDRS_LEN);
b[0]->current_length = n_bytes;
b[0]->flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;
b[0]->total_length_not_including_first_buffer = 0;
@@ -1710,9 +1710,10 @@ tcp_timer_persist_handler (u32 index)
tcp_validate_txf_size (tc, offset);
tc->snd_opts_len = tcp_make_options (tc, &tc->snd_opts, tc->state);
- max_snd_bytes = clib_min (tc->snd_mss, tm->bytes_per_buffer - MAX_HDRS_LEN);
- n_bytes = stream_session_peek_bytes (&tc->connection, data, offset,
- max_snd_bytes);
+ max_snd_bytes =
+ clib_min (tc->snd_mss, tm->bytes_per_buffer - TRANSPORT_MAX_HDRS_LEN);
+ n_bytes =
+ stream_session_peek_bytes (&tc->connection, data, offset, max_snd_bytes);
b->current_length = n_bytes;
ASSERT (n_bytes != 0 && (tcp_timer_is_active (tc, TCP_TIMER_RETRANSMIT)
|| tc->snd_nxt == tc->snd_una_max