From a32eaa3d00beef6bb81e2aadc2088e9a937d1fd0 Mon Sep 17 00:00:00 2001 From: Konstantin Ananyev Date: Thu, 3 Jun 2021 17:38:38 +0000 Subject: l4p: add ability to assign user-data to the stream Add ability for the user to assign user provided data to the stream. Right now this user provided 64-bit value is passed as a parameter for lookup4/lookup6 callbacks. Another change: change interpretation of lookup4()/lookup6() return value: < 0: error code (existing behaviour). == 0: success, TLDK will update L3 header src/dst addresses based on tldk dev values (existing behaviour). > 0: success, TLDK will not update L3 header src/dst addresses, will rely on user provided values. Signed-off-by: Konstantin Ananyev Change-Id: I32521422e0372d79c4b2781dd6fc9740e4ca93ab --- lib/libtle_l4p/tle_tcp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libtle_l4p/tle_tcp.h') diff --git a/lib/libtle_l4p/tle_tcp.h b/lib/libtle_l4p/tle_tcp.h index 9947041..76f3476 100644 --- a/lib/libtle_l4p/tle_tcp.h +++ b/lib/libtle_l4p/tle_tcp.h @@ -35,6 +35,8 @@ struct tle_tcp_stream_addr { struct tle_tcp_stream_cfg { uint8_t nb_retries; /**< max number of retransmission attempts. */ + uint64_t udata; /**< user data to be associated with the stream. */ + /* _cb and _ev are mutually exclusive */ struct tle_event *err_ev; /**< error event to use. */ struct tle_stream_cb err_cb; /**< error callback to use. */ -- cgit 1.2.3-korg