]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-wait-online.h
Merge pull request #2569 from zonque/removals
[thirdparty/systemd.git] / src / network / networkd-wait-online.h
1 /***
2 This file is part of systemd.
3
4 Copyright 2014 Tom Gundersen <teg@jklm.no>
5
6 systemd is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version.
10
11 systemd is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with systemd; If not, see <http://www.gnu.org/licenses/>.
18 ***/
19
20 #pragma once
21
22 #include "sd-event.h"
23 #include "sd-netlink.h"
24 #include "sd-network.h"
25
26 #include "hashmap.h"
27
28 typedef struct Manager Manager;
29
30 #include "networkd-wait-online-link.h"
31
32 struct Manager {
33 Hashmap *links;
34 Hashmap *links_by_name;
35
36 char **interfaces;
37 char **ignore;
38
39 sd_netlink *rtnl;
40 sd_event_source *rtnl_event_source;
41
42 sd_network_monitor *network_monitor;
43 sd_event_source *network_monitor_event_source;
44
45 sd_event *event;
46 };
47
48 void manager_free(Manager *m);
49 int manager_new(Manager **ret, char **interfaces, char **ignore, usec_t timeout);
50
51 DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
52
53 bool manager_all_configured(Manager *m);
54 bool manager_ignore_link(Manager *m, Link *link);