]>
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 | |
60f067b4 | 31 | typedef struct Manager { |
5eef597e MP |
32 | Hashmap *links; |
33 | Hashmap *links_by_name; | |
34 | ||
35 | char **interfaces; | |
36 | ||
60f067b4 | 37 | sd_rtnl *rtnl; |
5eef597e MP |
38 | sd_event_source *rtnl_event_source; |
39 | ||
40 | sd_network_monitor *network_monitor; | |
41 | sd_event_source *network_monitor_event_source; | |
42 | ||
43 | sd_event *event; | |
60f067b4 | 44 | } Manager; |
663996b3 | 45 | |
60f067b4 | 46 | void manager_free(Manager *m); |
5eef597e | 47 | int manager_new(Manager **ret, char **interfaces); |
663996b3 | 48 | |
60f067b4 | 49 | DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free); |
5eef597e MP |
50 | |
51 | bool manager_all_configured(Manager *m); |