From e90f2770ae44de238a227f884e806637a2b80403 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 3 Nov 2023 13:22:56 +1100 Subject: port_fwd: Move automatic port forwarding code to port_fwd.[ch] The implementation of scanning /proc files to do automatic port forwarding is a bit awkwardly split between procfs_scan_listen() in util.c, get_bound_ports() and related functions in conf.c and the initial setup code in conf(). Consolidate all of this into port_fwd.h, which already has some related definitions, and a new port_fwd.c. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- util.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'util.h') diff --git a/util.h b/util.h index 60d6872..9effc54 100644 --- a/util.h +++ b/util.h @@ -217,8 +217,6 @@ void bitmap_set(uint8_t *map, int bit); void bitmap_clear(uint8_t *map, int bit); int bitmap_isset(const uint8_t *map, int bit); char *line_read(char *buf, size_t len, int fd); -void procfs_scan_listen(struct ctx *c, uint8_t proto, int ip_version, int ns, - uint8_t *map, const uint8_t *exclude); void ns_enter(const struct ctx *c); bool ns_is_init(void); void write_pidfile(int fd, pid_t pid); -- cgit v1.2.3