]>
Commit | Line | Data |
---|---|---|
112358f3 MT |
1 | /*############################################################################# |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
4 | # Copyright (C) 2023 IPFire Network Development Team # | |
5 | # # | |
6 | # This program is free software: you can redistribute it and/or modify # | |
7 | # it under the terms of the GNU General Public License as published by # | |
8 | # the Free Software Foundation, either version 3 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
11 | # This program is distributed in the hope that it will be useful, # | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
18 | # # | |
19 | #############################################################################*/ | |
20 | ||
21 | #ifndef NETWORKD_DAEMON_H | |
22 | #define NETWORKD_DAEMON_H | |
23 | ||
eaf649ee MT |
24 | #include <systemd/sd-netlink.h> |
25 | ||
2361667e | 26 | typedef struct nw_daemon nw_daemon; |
112358f3 | 27 | |
766f08ca | 28 | #include "link.h" |
2361667e MT |
29 | #include "links.h" |
30 | #include "port.h" | |
31 | #include "ports.h" | |
766f08ca | 32 | #include "zone.h" |
2361667e | 33 | #include "zones.h" |
766f08ca | 34 | |
2361667e | 35 | int nw_daemon_create(nw_daemon** daemon); |
112358f3 | 36 | |
2361667e MT |
37 | nw_daemon* nw_daemon_ref(nw_daemon* daemon); |
38 | nw_daemon* nw_daemon_unref(nw_daemon* daemon); | |
112358f3 | 39 | |
2361667e | 40 | int nw_daemon_run(nw_daemon* daemon); |
c7e1b5db | 41 | |
2361667e | 42 | int nw_daemon_reload(nw_daemon* daemon); |
27a3a596 | 43 | |
605e975f MT |
44 | int nw_daemon_save(nw_daemon* daemon); |
45 | ||
eaf649ee MT |
46 | /* |
47 | Netlink | |
48 | */ | |
2361667e | 49 | sd_netlink* nw_daemon_get_rtnl(nw_daemon* daemon); |
eaf649ee | 50 | |
766f08ca MT |
51 | /* |
52 | Links | |
53 | */ | |
2361667e MT |
54 | nw_links* nw_daemon_links(nw_daemon* daemon); |
55 | void nw_daemon_drop_link(nw_daemon* daemon, nw_link* link); | |
56 | nw_link* nw_daemon_get_link_by_ifindex(nw_daemon* daemon, int ifindex); | |
57 | nw_link* nw_daemon_get_link_by_name(nw_daemon* daemon, const char* name); | |
766f08ca | 58 | |
7297ba7f MT |
59 | /* |
60 | Ports | |
61 | */ | |
2361667e MT |
62 | nw_ports* nw_daemon_ports(nw_daemon* daemon); |
63 | nw_port* nw_daemon_get_port_by_name(nw_daemon* daemon, const char* name); | |
7297ba7f | 64 | |
bd9ffd6a MT |
65 | /* |
66 | Zones | |
67 | */ | |
2361667e MT |
68 | nw_zones* nw_daemon_zones(nw_daemon* daemon); |
69 | nw_zone* nw_daemon_get_zone_by_name(nw_daemon* daemon, const char* name); | |
0c8e7342 | 70 | |
112358f3 | 71 | #endif /* NETWORKD_DAEMON_H */ |