From 9657b6ed05cc67273f6bab1751ae98ca4e89f114 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Mon, 27 Sep 2021 05:24:30 +0200 Subject: conf, tcp: Periodic detection of bound ports for pasta port forwarding Detecting bound ports at start-up time isn't terribly useful: do this periodically instead, if configured. This is only implemented for TCP at the moment, UDP is somewhat more complicated: leave a TODO there. Signed-off-by: Stefano Brivio --- udp.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'udp.h') diff --git a/udp.h b/udp.h index c20f936..c79e938 100644 --- a/udp.h +++ b/udp.h @@ -40,12 +40,16 @@ union udp_epoll_ref { /** * struct udp_ctx - Execution context for UDP * @port_to_tap: Ports bound host-side, data to tap or ns L4 socket + * @init_detect_ports: If set, periodically detect ports bound in init (TODO) * @port_to_init: Ports bound namespace-side, data to init L4 socket + * @ns_detect_ports: If set, periodically detect ports bound in namespace * @timer_run: Timestamp of most recent timer run */ struct udp_ctx { uint8_t port_to_tap [USHRT_MAX / 8]; + int init_detect_ports; uint8_t port_to_init [USHRT_MAX / 8]; + int ns_detect_ports; struct timespec timer_run; }; -- cgit v1.2.3