aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libtle_l4p/tle_ctx.h
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2021-06-03 17:38:38 +0000
committerKonstantin Ananyev <konstantin.ananyev@intel.com>2021-06-03 17:38:38 +0000
commita32eaa3d00beef6bb81e2aadc2088e9a937d1fd0 (patch)
tree29c5c0daf2e9905578aa0e6732b2de4a68086e6f /lib/libtle_l4p/tle_ctx.h
parent267cf19de5077e395cc05918159a93e63e8c4a11 (diff)
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 <konstantin.ananyev@intel.com> Change-Id: I32521422e0372d79c4b2781dd6fc9740e4ca93ab
Diffstat (limited to 'lib/libtle_l4p/tle_ctx.h')
-rw-r--r--lib/libtle_l4p/tle_ctx.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libtle_l4p/tle_ctx.h b/lib/libtle_l4p/tle_ctx.h
index 391cfe3..e730441 100644
--- a/lib/libtle_l4p/tle_ctx.h
+++ b/lib/libtle_l4p/tle_ctx.h
@@ -123,14 +123,14 @@ struct tle_ctx_param {
uint32_t send_bulk_size; /**< expected # of packets per send call. */
uint32_t flags; /**< specific flags */
- int (*lookup4)(void *opaque, const struct in_addr *addr,
- struct tle_dest *res);
+ int (*lookup4)(void *opaque, uint64_t stream_udata,
+ const struct in_addr *addr, struct tle_dest *res);
/**< will be called by send() to get IPv4 packet destination info. */
void *lookup4_data;
/**< opaque data pointer for lookup4() callback. */
- int (*lookup6)(void *opaque, const struct in6_addr *addr,
- struct tle_dest *res);
+ int (*lookup6)(void *opaque, uint64_t stream_udata,
+ const struct in6_addr *addr, struct tle_dest *res);
/**< will be called by send() to get IPv6 packet destination info. */
void *lookup6_data;
/**< opaque data pointer for lookup6() callback. */