aboutgitcodebugslistschat
path: root/port_fwd.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-11-03 13:22:56 +1100
committerStefano Brivio <sbrivio@redhat.com>2023-11-07 09:53:14 +0100
commite90f2770ae44de238a227f884e806637a2b80403 (patch)
tree215078d0b14fb196c2541bdc9f917cae11a505b1 /port_fwd.h
parent26d86f1304af402878d143ba20a18ef59c444263 (diff)
downloadpasst-e90f2770ae44de238a227f884e806637a2b80403.tar
passt-e90f2770ae44de238a227f884e806637a2b80403.tar.gz
passt-e90f2770ae44de238a227f884e806637a2b80403.tar.bz2
passt-e90f2770ae44de238a227f884e806637a2b80403.tar.lz
passt-e90f2770ae44de238a227f884e806637a2b80403.tar.xz
passt-e90f2770ae44de238a227f884e806637a2b80403.tar.zst
passt-e90f2770ae44de238a227f884e806637a2b80403.zip
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 <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'port_fwd.h')
-rw-r--r--port_fwd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/port_fwd.h b/port_fwd.h
index 6ed3f14..ad8ed1f 100644
--- a/port_fwd.h
+++ b/port_fwd.h
@@ -31,4 +31,7 @@ struct port_fwd {
in_port_t delta[NUM_PORTS];
};
+void get_bound_ports(struct ctx *c, int ns, uint8_t proto);
+void port_fwd_init(struct ctx *c);
+
#endif /* PORT_FWD_H */