1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include <inttypes.h>
5 
6 #include "unit.h"
7 
8 enum {
9         BPF_FIREWALL_UNSUPPORTED          = 0,
10         BPF_FIREWALL_SUPPORTED            = 1,
11         BPF_FIREWALL_SUPPORTED_WITH_MULTI = 2,
12 };
13 
14 int bpf_firewall_supported(void);
15 
16 int bpf_firewall_compile(Unit *u);
17 int bpf_firewall_install(Unit *u);
18 int bpf_firewall_load_custom(Unit *u);
19 
20 int bpf_firewall_read_accounting(int map_fd, uint64_t *ret_bytes, uint64_t *ret_packets);
21 int bpf_firewall_reset_accounting(int map_fd);
22 
23 void emit_bpf_firewall_warning(Unit *u);
24 
25 void bpf_firewall_close(Unit *u);
26