]>
git.ipfire.org Git - people/ms/network.git/blob - src/networkd/daemon.h
1 /*#############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2023 IPFire Network Development Team #
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. #
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. #
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/>. #
19 #############################################################################*/
21 #ifndef NETWORKD_DAEMON_H
22 #define NETWORKD_DAEMON_H
24 #include <systemd/sd-netlink.h>
26 typedef struct nw_daemon nw_daemon
;
35 int nw_daemon_create(nw_daemon
** daemon
);
37 nw_daemon
* nw_daemon_ref(nw_daemon
* daemon
);
38 nw_daemon
* nw_daemon_unref(nw_daemon
* daemon
);
40 int nw_daemon_run(nw_daemon
* daemon
);
42 int nw_daemon_reload(nw_daemon
* daemon
);
44 int nw_daemon_save(nw_daemon
* daemon
);
49 sd_netlink
* nw_daemon_get_rtnl(nw_daemon
* daemon
);
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
);
62 nw_ports
* nw_daemon_ports(nw_daemon
* daemon
);
63 nw_port
* nw_daemon_get_port_by_name(nw_daemon
* daemon
, const char* name
);
68 nw_zones
* nw_daemon_zones(nw_daemon
* daemon
);
69 nw_zone
* nw_daemon_get_zone_by_name(nw_daemon
* daemon
, const char* name
);
71 #endif /* NETWORKD_DAEMON_H */