aboutgitcodebugslistschat
path: root/util.c
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.c
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.c')
-rw-r--r--util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util.c b/util.c
index 1569f1c..6b51fc5 100644
--- a/util.c
+++ b/util.c
@@ -45,9 +45,9 @@
*
* Return: newly created socket, negative error code on failure
*/
-static 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_sa(const struct ctx *c, enum epoll_type type,
+ const void *sa, socklen_t sl,
+ const char *ifname, bool v6only, uint32_t data)
{
sa_family_t af = ((const struct sockaddr *)sa)->sa_family;
union epoll_ref ref = { .type = type, .data = data };