diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-11-03 13:23:01 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-11-07 09:53:26 +0100 |
commit | 1a40d0089506e120dac83c000777e86f6bcdd362 (patch) | |
tree | 448d82e70ad95c89c69328a149f4a675952ef641 /port_fwd.h | |
parent | 180dbc957aa5f49f03ab04b65f826e32763ab5cd (diff) | |
download | passt-1a40d0089506e120dac83c000777e86f6bcdd362.tar passt-1a40d0089506e120dac83c000777e86f6bcdd362.tar.gz passt-1a40d0089506e120dac83c000777e86f6bcdd362.tar.bz2 passt-1a40d0089506e120dac83c000777e86f6bcdd362.tar.lz passt-1a40d0089506e120dac83c000777e86f6bcdd362.tar.xz passt-1a40d0089506e120dac83c000777e86f6bcdd362.tar.zst passt-1a40d0089506e120dac83c000777e86f6bcdd362.zip |
port_fwd: Split TCP and UDP cases for get_bound_ports()
Currently get_bound_ports() takes a parameter to determine if it scans for
UDP or TCP bound ports, but in fact there's almost nothing in common
between those two paths. The parameter appears primarily to have been
a convenience for when we needed to invoke this function via NS_CALL().
Now that we don't need that, split it into separate TCP and UDP versions.
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.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -31,7 +31,8 @@ struct port_fwd { in_port_t delta[NUM_PORTS]; }; -void get_bound_ports(struct ctx *c, int ns, uint8_t proto); +void get_bound_ports_tcp(struct ctx *c, int ns); +void get_bound_ports_udp(struct ctx *c, int ns); void port_fwd_init(struct ctx *c); #endif /* PORT_FWD_H */ |