aboutgitcodebugslistschat
path: root/conf.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-02-28 22:25:20 +1100
committerStefano Brivio <sbrivio@redhat.com>2024-02-29 09:48:27 +0100
commit3b9098aa49bd083a7900dc6e0219bf76e389afd4 (patch)
tree6d80efa34cd6819d5e263bcd3dc5de7b3fb73875 /conf.c
parent10376e7a2f3780a3591d70da2f7db9b3367e9222 (diff)
downloadpasst-3b9098aa49bd083a7900dc6e0219bf76e389afd4.tar
passt-3b9098aa49bd083a7900dc6e0219bf76e389afd4.tar.gz
passt-3b9098aa49bd083a7900dc6e0219bf76e389afd4.tar.bz2
passt-3b9098aa49bd083a7900dc6e0219bf76e389afd4.tar.lz
passt-3b9098aa49bd083a7900dc6e0219bf76e389afd4.tar.xz
passt-3b9098aa49bd083a7900dc6e0219bf76e389afd4.tar.zst
passt-3b9098aa49bd083a7900dc6e0219bf76e389afd4.zip
fwd: Rename port_fwd.[ch] and their contents
Currently port_fwd.[ch] contains helpers related to port forwarding, particular automatic port forwarding. We're planning to allow much more flexible sorts of forwarding, including both port translation and NAT based on the flow table. This will subsume the existing port forwarding logic, so rename port_fwd.[ch] to fwd.[ch] with matching updates to all the names within. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/conf.c b/conf.c
index fb77272..e630140 100644
--- a/conf.c
+++ b/conf.c
@@ -109,10 +109,10 @@ static int parse_port_range(const char *s, char **endptr,
* @c: Execution context
* @optname: Short option name, t, T, u, or U
* @optarg: Option argument (port specification)
- * @fwd: Pointer to @port_fwd to be updated
+ * @fwd: Pointer to @fwd_ports to be updated
*/
static void conf_ports(const struct ctx *c, char optname, const char *optarg,
- struct port_fwd *fwd)
+ struct fwd_ports *fwd)
{
char addr_buf[sizeof(struct in6_addr)] = { 0 }, *addr = addr_buf;
char buf[BUFSIZ], *spec, *ifname = NULL, *p;
@@ -1158,7 +1158,7 @@ void conf(struct ctx *c, int argc, char **argv)
};
char userns[PATH_MAX] = { 0 }, netns[PATH_MAX] = { 0 };
bool copy_addrs_opt = false, copy_routes_opt = false;
- enum port_fwd_mode fwd_default = FWD_NONE;
+ enum fwd_ports_mode fwd_default = FWD_NONE;
bool v4_only = false, v6_only = false;
struct in6_addr *dns6 = c->ip6.dns;
struct fqdn *dnss = c->dns_search;
@@ -1746,7 +1746,7 @@ void conf(struct ctx *c, int argc, char **argv)
if (!c->udp.fwd_out.f.mode)
c->udp.fwd_out.f.mode = fwd_default;
- port_fwd_init(c);
+ fwd_scan_ports_init(c);
if (!c->quiet)
conf_print(c);