/src/systemd/src/shared/firewall-util.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* SPDX-License-Identifier: LGPL-2.1+ */ |
2 | | #pragma once |
3 | | |
4 | | #include <stdbool.h> |
5 | | #include <stdint.h> |
6 | | |
7 | | #include "in-addr-util.h" |
8 | | |
9 | | #if HAVE_LIBIPTC |
10 | | |
11 | | int fw_add_masquerade( |
12 | | bool add, |
13 | | int af, |
14 | | int protocol, |
15 | | const union in_addr_union *source, |
16 | | unsigned source_prefixlen, |
17 | | const char *out_interface, |
18 | | const union in_addr_union *destination, |
19 | | unsigned destination_prefixlen); |
20 | | |
21 | | int fw_add_local_dnat( |
22 | | bool add, |
23 | | int af, |
24 | | int protocol, |
25 | | const char *in_interface, |
26 | | const union in_addr_union *source, |
27 | | unsigned source_prefixlen, |
28 | | const union in_addr_union *destination, |
29 | | unsigned destination_prefixlen, |
30 | | uint16_t local_port, |
31 | | const union in_addr_union *remote, |
32 | | uint16_t remote_port, |
33 | | const union in_addr_union *previous_remote); |
34 | | |
35 | | #else |
36 | | |
37 | | static inline int fw_add_masquerade( |
38 | | bool add, |
39 | | int af, |
40 | | int protocol, |
41 | | const union in_addr_union *source, |
42 | | unsigned source_prefixlen, |
43 | | const char *out_interface, |
44 | | const union in_addr_union *destination, |
45 | 0 | unsigned destination_prefixlen) { |
46 | 0 | return -EOPNOTSUPP; |
47 | 0 | } Unexecuted instantiation: networkd-address.c:fw_add_masquerade Unexecuted instantiation: nspawn-expose-ports.c:fw_add_masquerade |
48 | | |
49 | | static inline int fw_add_local_dnat( |
50 | | bool add, |
51 | | int af, |
52 | | int protocol, |
53 | | const char *in_interface, |
54 | | const union in_addr_union *source, |
55 | | unsigned source_prefixlen, |
56 | | const union in_addr_union *destination, |
57 | | unsigned destination_prefixlen, |
58 | | uint16_t local_port, |
59 | | const union in_addr_union *remote, |
60 | | uint16_t remote_port, |
61 | 0 | const union in_addr_union *previous_remote) { |
62 | 0 | return -EOPNOTSUPP; |
63 | 0 | } Unexecuted instantiation: networkd-address.c:fw_add_local_dnat Unexecuted instantiation: nspawn-expose-ports.c:fw_add_local_dnat |
64 | | |
65 | | #endif |