From 781164e25bdf3e99233ab585f02c72525cfb79c5 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 18 Jul 2024 15:26:41 +1000 Subject: flow: Helper to create sockets based on flowside We have upcoming use cases where it's useful to create new bound socket based on information from the flow table. Add flowside_sock_l4() to do this for either PIF_HOST or PIF_SPLICE sockets. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index 1d479dd..826614c 100644 --- a/util.h +++ b/util.h @@ -144,6 +144,9 @@ struct ctx; /* cppcheck-suppress funcArgNamesDifferent */ __attribute__ ((weak)) int ffsl(long int i) { return __builtin_ffsl(i); } +int sock_l4_sa(const struct ctx *c, enum epoll_type type, + const void *sa, socklen_t sl, + const char *ifname, bool v6only, uint32_t data); int sock_l4(const struct ctx *c, sa_family_t af, enum epoll_type type, const void *bind_addr, const char *ifname, uint16_t port, uint32_t data); -- cgit v1.2.3