]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/firewall-util.h
5915266b4bf7e8ee64a3c74bc7e8edef9fa7bfd3
4 This file is part of systemd.
6 Copyright 2015 Lennart Poettering
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version.
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 #include "in-addr-util.h"
29 int fw_add_masquerade(
33 const union in_addr_union
*source
,
34 unsigned source_prefixlen
,
35 const char *out_interface
,
36 const union in_addr_union
*destination
,
37 unsigned destination_prefixlen
);
39 int fw_add_local_dnat(
43 const char *in_interface
,
44 const union in_addr_union
*source
,
45 unsigned source_prefixlen
,
46 const union in_addr_union
*destination
,
47 unsigned destination_prefixlen
,
49 const union in_addr_union
*remote
,
51 const union in_addr_union
*previous_remote
);
55 static inline int fw_add_masquerade(
59 const union in_addr_union
*source
,
60 unsigned source_prefixlen
,
61 const char *out_interface
,
62 const union in_addr_union
*destination
,
63 unsigned destination_prefixlen
) {
67 static inline int fw_add_local_dnat(
71 const char *in_interface
,
72 const union in_addr_union
*source
,
73 unsigned source_prefixlen
,
74 const union in_addr_union
*destination
,
75 unsigned destination_prefixlen
,
77 const union in_addr_union
*remote
,
79 const union in_addr_union
*previous_remote
) {