1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
7 #include "in-addr-util.h"
9 typedef struct FirewallContext FirewallContext
;
11 int fw_ctx_new(FirewallContext
**ret
);
12 FirewallContext
*fw_ctx_free(FirewallContext
*ctx
);
14 DEFINE_TRIVIAL_CLEANUP_FUNC(FirewallContext
*, fw_ctx_free
);
16 int fw_add_masquerade(
17 FirewallContext
**ctx
,
20 const union in_addr_union
*source
,
21 unsigned source_prefixlen
);
23 int fw_add_local_dnat(
24 FirewallContext
**ctx
,
29 const union in_addr_union
*remote
,
31 const union in_addr_union
*previous_remote
);