]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/wait-online/manager.h
core,journald: use quoted commandlines
[thirdparty/systemd.git] / src / network / wait-online / manager.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "sd-event.h"
5 #include "sd-netlink.h"
6 #include "sd-network.h"
7
8 #include "hashmap.h"
9 #include "network-util.h"
10 #include "time-util.h"
11
12 typedef struct Manager Manager;
13 typedef struct Link Link;
14
15 struct Manager {
16 Hashmap *links;
17 Hashmap *links_by_name;
18
19 /* Do not free the two members below. */
20 Hashmap *interfaces;
21 char **ignore;
22
23 LinkOperationalStateRange required_operstate;
24 bool any;
25
26 sd_netlink *rtnl;
27 sd_event_source *rtnl_event_source;
28
29 sd_network_monitor *network_monitor;
30 sd_event_source *network_monitor_event_source;
31
32 sd_event *event;
33 };
34
35 Manager* manager_free(Manager *m);
36 int manager_new(Manager **ret, Hashmap *interfaces, char **ignore,
37 LinkOperationalStateRange required_operstate,
38 bool any, usec_t timeout);
39
40 DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
41
42 bool manager_configured(Manager *m);