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