]>
git.ipfire.org Git - network.git/blob - src/networkd/bus.h
55e65b817300e182b9d49539ba17eb9f988438be
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_BUS_H
22 #define NETWORKD_BUS_H
24 #define NETWORKD_BUS_DESCRIPTION "networkd"
26 #define DEFAULT_SYSTEM_BUS_ADDRESS "unix:path=/run/dbus/system_bus_socket"
28 #include <systemd/sd-bus.h>
29 #include <systemd/sd-event.h>
33 int nw_bus_connect(sd_bus
* bus
, sd_event
* loop
, struct nw_daemon
* daemon
);
35 struct nw_bus_implementation
{
37 const char* interface
;
39 const sd_bus_vtable
** vtables
;
42 #define BUS_VTABLES(...) ((const sd_bus_vtable* []){ __VA_ARGS__, NULL })
44 int nw_bus_register_implementation(sd_bus
* bus
,
45 const struct nw_bus_implementation
* impl
, void* data
);
47 #endif /* NETWORKD_BUS_H */