aboutgitcodebugslistschat
path: root/util.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-07-18 15:26:41 +1000
committerStefano Brivio <sbrivio@redhat.com>2024-07-19 18:33:23 +0200
commit781164e25bdf3e99233ab585f02c72525cfb79c5 (patch)
tree29426a9fc994eb9a6baff6791c422d455ebcbd01 /util.h
parent2faf6fcd8b542537a70d8aada644ed7a073f78d0 (diff)
downloadpasst-781164e25bdf3e99233ab585f02c72525cfb79c5.tar
passt-781164e25bdf3e99233ab585f02c72525cfb79c5.tar.gz
passt-781164e25bdf3e99233ab585f02c72525cfb79c5.tar.bz2
passt-781164e25bdf3e99233ab585f02c72525cfb79c5.tar.lz
passt-781164e25bdf3e99233ab585f02c72525cfb79c5.tar.xz
passt-781164e25bdf3e99233ab585f02c72525cfb79c5.tar.zst
passt-781164e25bdf3e99233ab585f02c72525cfb79c5.zip
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 <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'util.h')
-rw-r--r--util.h3
1 files changed, 3 insertions, 0 deletions
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);