aboutgitcodebugslistschat
path: root/udp.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-07-18 15:26:53 +1000
committerStefano Brivio <sbrivio@redhat.com>2024-07-19 18:34:01 +0200
commit882599e18008f2c08aa5b094bae06516f8219f3d (patch)
tree8313790dd7f1cd4c390d9769eee5df906b5571f2 /udp.h
parentd29fa0856e75816431e78552821ec77c59e25b3e (diff)
downloadpasst-882599e18008f2c08aa5b094bae06516f8219f3d.tar
passt-882599e18008f2c08aa5b094bae06516f8219f3d.tar.gz
passt-882599e18008f2c08aa5b094bae06516f8219f3d.tar.bz2
passt-882599e18008f2c08aa5b094bae06516f8219f3d.tar.lz
passt-882599e18008f2c08aa5b094bae06516f8219f3d.tar.xz
passt-882599e18008f2c08aa5b094bae06516f8219f3d.tar.zst
passt-882599e18008f2c08aa5b094bae06516f8219f3d.zip
udp: Rename UDP listening sockets
EPOLL_TYPE_UDP is now only used for "listening" sockets; long lived sockets which can initiate new flows. Rename to EPOLL_TYPE_UDP_LISTEN and associated functions to match. Along with that, remove the .orig field from union udp_listen_epoll_ref, since it is now always true. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'udp.h')
-rw-r--r--udp.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/udp.h b/udp.h
index c81ef29..fb42e1c 100644
--- a/udp.h
+++ b/udp.h
@@ -9,8 +9,8 @@
#define UDP_TIMER_INTERVAL 1000 /* ms */
void udp_portmap_clear(void);
-void udp_buf_sock_handler(const struct ctx *c, union epoll_ref ref,
- uint32_t events, const struct timespec *now);
+void udp_listen_sock_handler(const struct ctx *c, union epoll_ref ref,
+ uint32_t events, const struct timespec *now);
void udp_reply_sock_handler(const struct ctx *c, union epoll_ref ref,
uint32_t events, const struct timespec *now);
int udp_tap_handler(const struct ctx *c, uint8_t pif,
@@ -23,19 +23,17 @@ void udp_timer(struct ctx *c, const struct timespec *now);
void udp_update_l2_buf(const unsigned char *eth_d, const unsigned char *eth_s);
/**
- * union udp_epoll_ref - epoll reference portion for TCP connections
+ * union udp_listen_epoll_ref - epoll reference for "listening" UDP sockets
* @port: Source port for connected sockets, bound port otherwise
* @pif: pif for this socket
- * @orig: Set if a spliced socket which can originate "connections"
* @v6: Set for IPv6 sockets or connections
* @u32: Opaque u32 value of reference
*/
-union udp_epoll_ref {
+union udp_listen_epoll_ref {
struct {
in_port_t port;
uint8_t pif;
- bool orig:1,
- v6:1;
+ bool v6:1;
};
uint32_t u32;
};