diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-07-18 15:26:41 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-07-19 18:33:23 +0200 |
commit | 781164e25bdf3e99233ab585f02c72525cfb79c5 (patch) | |
tree | 29426a9fc994eb9a6baff6791c422d455ebcbd01 /util.h | |
parent | 2faf6fcd8b542537a70d8aada644ed7a073f78d0 (diff) | |
download | passt-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |