diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-03-22 14:33:23 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-03-23 06:40:50 +0100 |
commit | da00b84087dd5f5dc3d0588fdef93bb71789bfb1 (patch) | |
tree | 4670aaf349b2f10b9df9dd603580a6f7bbd99ed2 /src/shared/firewall-util-private.h | |
parent | Merge pull request #19079 from poettering/resolved-ipv6-cache-fix (diff) | |
download | systemd-da00b84087dd5f5dc3d0588fdef93bb71789bfb1.tar.xz systemd-da00b84087dd5f5dc3d0588fdef93bb71789bfb1.zip |
firewall-util: logs which backend will be used
This also modernizes code a bit.
Diffstat (limited to 'src/shared/firewall-util-private.h')
-rw-r--r-- | src/shared/firewall-util-private.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/shared/firewall-util-private.h b/src/shared/firewall-util-private.h index 59e1e502fd..07e2d0bbd3 100644 --- a/src/shared/firewall-util-private.h +++ b/src/shared/firewall-util-private.h @@ -4,22 +4,27 @@ #include <stdbool.h> #include <stdint.h> -#include "in-addr-util.h" #include "sd-netlink.h" -enum FirewallBackend { +#include "in-addr-util.h" + +typedef enum FirewallBackend { FW_BACKEND_NONE, #if HAVE_LIBIPTC FW_BACKEND_IPTABLES, #endif FW_BACKEND_NFTABLES, -}; + _FW_BACKEND_MAX, + _FW_BACKEND_INVALID = -EINVAL, +} FirewallBackend; struct FirewallContext { - enum FirewallBackend firewall_backend; + FirewallBackend backend; sd_netlink *nfnl; }; +const char *firewall_backend_to_string(FirewallBackend b) _const_; + int fw_nftables_init(FirewallContext *ctx); void fw_nftables_exit(FirewallContext *ctx); |