diff options
author | Tom Gundersen <teg@jklm.no> | 2014-07-16 10:52:47 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-07-17 22:53:35 +0200 |
commit | 7de12ae764e73730df0658f9fb04bcf42add48e2 (patch) | |
tree | 93e82071cc3f505f7888cbd1f8f563934c7d6cab /src/network/networkd-wait-online.h | |
parent | 560852ced07a647e2d288ce2932aaf608712867d (diff) |
networkd-wait-online: track links
Rather than refetching the link information on ever event, we liston to
rtnl to track them. Much code stolen from resolved.
This will allow us to simplify the sd-network api and don't expose
information available over rtnl.
Diffstat (limited to 'src/network/networkd-wait-online.h')
-rw-r--r-- | src/network/networkd-wait-online.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/network/networkd-wait-online.h b/src/network/networkd-wait-online.h index e894351d2e..c57f902e9e 100644 --- a/src/network/networkd-wait-online.h +++ b/src/network/networkd-wait-online.h @@ -23,16 +23,29 @@ #include "sd-event.h" #include "sd-rtnl.h" +#include "sd-network.h" #include "util.h" +#include "hashmap.h" typedef struct Manager { - sd_event *event; + Hashmap *links; + Hashmap *links_by_name; + + char **interfaces; + sd_rtnl *rtnl; - sd_network_monitor *monitor; + sd_event_source *rtnl_event_source; + + sd_network_monitor *network_monitor; + sd_event_source *network_monitor_event_source; + + sd_event *event; } Manager; void manager_free(Manager *m); +int manager_new(Manager **ret, char **interfaces); DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free); -#define _cleanup_manager_free_ _cleanup_(manager_freep) + +bool manager_all_configured(Manager *m); |