]>
Commit | Line | Data |
---|---|---|
663996b3 MS |
1 | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ |
2 | ||
663996b3 MS |
3 | /*** |
4 | This file is part of systemd. | |
5 | ||
60f067b4 | 6 | Copyright 2014 Tom Gundersen <teg@jklm.no> |
663996b3 MS |
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 | ||
60f067b4 JS |
22 | #pragma once |
23 | ||
24 | #include "sd-event.h" | |
25 | #include "sd-rtnl.h" | |
5eef597e | 26 | #include "sd-network.h" |
60f067b4 JS |
27 | |
28 | #include "util.h" | |
5eef597e | 29 | #include "hashmap.h" |
663996b3 | 30 | |
e735f4d4 MP |
31 | typedef struct Manager Manager; |
32 | ||
33 | #include "networkd-wait-online-link.h" | |
34 | ||
35 | struct Manager { | |
5eef597e MP |
36 | Hashmap *links; |
37 | Hashmap *links_by_name; | |
38 | ||
39 | char **interfaces; | |
e735f4d4 | 40 | char **ignore; |
5eef597e | 41 | |
60f067b4 | 42 | sd_rtnl *rtnl; |
5eef597e MP |
43 | sd_event_source *rtnl_event_source; |
44 | ||
45 | sd_network_monitor *network_monitor; | |
46 | sd_event_source *network_monitor_event_source; | |
47 | ||
48 | sd_event *event; | |
e735f4d4 | 49 | }; |
663996b3 | 50 | |
60f067b4 | 51 | void manager_free(Manager *m); |
e735f4d4 | 52 | int manager_new(Manager **ret, char **interfaces, char **ignore, usec_t timeout); |
663996b3 | 53 | |
60f067b4 | 54 | DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free); |
5eef597e MP |
55 | |
56 | bool manager_all_configured(Manager *m); | |
e735f4d4 | 57 | bool manager_ignore_link(Manager *m, Link *link); |