]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/firewall-util.h
Merge pull request #18990 from yuwata/network-dhcpv6-use-domains
[thirdparty/systemd.git] / src / shared / firewall-util.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
76917807
LP
2#pragma once
3
a8fbdf54
TA
4#include <stdbool.h>
5#include <stdint.h>
6
76917807
LP
7#include "in-addr-util.h"
8
761cf19d
FW
9typedef struct FirewallContext FirewallContext;
10
11int fw_ctx_new(FirewallContext **ret);
da00b840 12FirewallContext *fw_ctx_free(FirewallContext *ctx);
761cf19d
FW
13
14DEFINE_TRIVIAL_CLEANUP_FUNC(FirewallContext *, fw_ctx_free);
15
76917807 16int fw_add_masquerade(
da00b840 17 FirewallContext **ctx,
76917807
LP
18 bool add,
19 int af,
76917807 20 const union in_addr_union *source,
7509c7fd 21 unsigned source_prefixlen);
76917807
LP
22
23int fw_add_local_dnat(
da00b840 24 FirewallContext **ctx,
76917807
LP
25 bool add,
26 int af,
27 int protocol,
76917807
LP
28 uint16_t local_port,
29 const union in_addr_union *remote,
30 uint16_t remote_port,
31 const union in_addr_union *previous_remote);