/* SPDX-License-Identifier: GPL-2.0-or-later * Copyright (c) 2026 Red Hat GmbH * Author: Stefano Brivio */ #ifndef PORTS_H #define PORTS_H /** * enum fwd_mode - Overall forwarding mode for a direction and protocol * @FWD_MODE_UNSET Initial value, not parsed/configured yet * @FWD_MODE_SPEC Forward specified ports * @FWD_MODE_NONE No forwarded ports * @FWD_MODE_AUTO Automatic detection and forwarding based on bound ports * @FWD_MODE_ALL Bind all free ports */ enum fwd_mode { FWD_MODE_UNSET = 0, FWD_MODE_SPEC, FWD_MODE_NONE, FWD_MODE_AUTO, FWD_MODE_ALL, }; void conf_ports_range_except(const struct ctx *c, char optname, const char *optarg, struct fwd_table *fwd, const union inany_addr *addr, const char *ifname, uint16_t first, uint16_t last, const uint8_t *exclude, uint16_t to, uint8_t flags); void conf_ports(const struct ctx *c, char optname, const char *optarg, struct fwd_table *fwd, enum fwd_mode *mode); #endif /* PORTS_H */