aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libtle_l4p/tle_tcp.h
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2021-05-13 15:26:50 +0000
committerKonstantin Ananyev <konstantin.ananyev@intel.com>2021-05-13 17:32:55 +0000
commite0d62f616439955946d24ad83d49552da24afd5d (patch)
tree6a0b3cb971cb2857da3c7b5111bc64d2b0ac1b60 /lib/libtle_l4p/tle_tcp.h
parent10ae544444cfafc4367d9c1f39f332b6206772bf (diff)
l4p/tcp: introduce tle_tcp_stream_establish() API
tle_tcp_stream_establish() allows to create streams in established connection state. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: Ib302c4d7f229144d2624279f973f00041fb611b2
Diffstat (limited to 'lib/libtle_l4p/tle_tcp.h')
-rw-r--r--lib/libtle_l4p/tle_tcp.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/libtle_l4p/tle_tcp.h b/lib/libtle_l4p/tle_tcp.h
index b0cbda6..3155dfa 100644
--- a/lib/libtle_l4p/tle_tcp.h
+++ b/lib/libtle_l4p/tle_tcp.h
@@ -52,6 +52,33 @@ struct tle_tcp_stream_param {
};
/**
+ * Timestamp option.
+ */
+union tle_tcp_tsopt {
+ uint64_t raw;
+ struct {
+ uint32_t val;
+ uint32_t ecr;
+ };
+};
+
+/**
+ * SYN time option values.
+ */
+struct tle_tcp_syn_opts {
+ uint16_t mss;
+ uint8_t wscale;
+ union tle_tcp_tsopt ts;
+};
+
+struct tle_tcp_conn_info {
+ uint16_t wnd;
+ uint32_t seq;
+ uint32_t ack;
+ struct tle_tcp_syn_opts so;
+};
+
+/**
* create a new stream within given TCP context.
* @param ctx
* TCP context to create new stream within.
@@ -129,6 +156,11 @@ tle_tcp_stream_get_addr(const struct tle_stream *s,
*/
int tle_tcp_stream_get_mss(const struct tle_stream *ts);
+struct tle_stream *
+tle_tcp_stream_establish(struct tle_ctx *ctx,
+ const struct tle_tcp_stream_param *prm,
+ const struct tle_tcp_conn_info *ci);
+
/**
* Client mode connect API.
*/