]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/core/bpf-firewall.h
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / src / core / bpf-firewall.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 Copyright © 2016 Daniel Mack
6 ***/
7
8 #include <inttypes.h>
9
10 #include "unit.h"
11
12 enum {
13 BPF_FIREWALL_UNSUPPORTED = 0,
14 BPF_FIREWALL_SUPPORTED = 1,
15 BPF_FIREWALL_SUPPORTED_WITH_MULTI = 2,
16 };
17
18 int bpf_firewall_supported(void);
19
20 int bpf_firewall_compile(Unit *u);
21 int bpf_firewall_install(Unit *u);
22
23 int bpf_firewall_read_accounting(int map_fd, uint64_t *ret_bytes, uint64_t *ret_packets);
24 int bpf_firewall_reset_accounting(int map_fd);