summaryrefslogtreecommitdiff
path: root/src/network/networkd-wait-online-manager.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-06-12 16:31:33 +0200
committerTom Gundersen <teg@jklm.no>2015-06-13 19:52:54 +0200
commit1c4baffc1895809bae9ac36b670af90a4cb9cd7d (patch)
treea0ad5af06e5aa9cf8998cc20e97780cfe375bcb9 /src/network/networkd-wait-online-manager.c
parenteb59b6094197a7dcef89639ec3e91eef61b639bb (diff)
sd-netlink: rename from sd-rtnl
Diffstat (limited to 'src/network/networkd-wait-online-manager.c')
-rw-r--r--src/network/networkd-wait-online-manager.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/network/networkd-wait-online-manager.c b/src/network/networkd-wait-online-manager.c
index 39f3845633..1fc724f5a4 100644
--- a/src/network/networkd-wait-online-manager.c
+++ b/src/network/networkd-wait-online-manager.c
@@ -23,7 +23,7 @@
#include <linux/if.h>
#include <fnmatch.h>
-#include "rtnl-util.h"
+#include "netlink-util.h"
#include "network-internal.h"
#include "networkd-wait-online-link.h"
@@ -93,7 +93,7 @@ bool manager_all_configured(Manager *m) {
return one_ready;
}
-static int manager_process_link(sd_rtnl *rtnl, sd_rtnl_message *mm, void *userdata) {
+static int manager_process_link(sd_netlink *rtnl, sd_netlink_message *mm, void *userdata) {
Manager *m = userdata;
uint16_t type;
Link *l;
@@ -104,7 +104,7 @@ static int manager_process_link(sd_rtnl *rtnl, sd_rtnl_message *mm, void *userda
assert(m);
assert(mm);
- r = sd_rtnl_message_get_type(mm, &type);
+ r = sd_netlink_message_get_type(mm, &type);
if (r < 0)
goto fail;
@@ -112,7 +112,7 @@ static int manager_process_link(sd_rtnl *rtnl, sd_rtnl_message *mm, void *userda
if (r < 0)
goto fail;
- r = sd_rtnl_message_read_string(mm, IFLA_IFNAME, &ifname);
+ r = sd_netlink_message_read_string(mm, IFLA_IFNAME, &ifname);
if (r < 0)
goto fail;
@@ -155,7 +155,7 @@ fail:
return 0;
}
-static int on_rtnl_event(sd_rtnl *rtnl, sd_rtnl_message *mm, void *userdata) {
+static int on_rtnl_event(sd_netlink *rtnl, sd_netlink_message *mm, void *userdata) {
Manager *m = userdata;
int r;
@@ -170,26 +170,26 @@ static int on_rtnl_event(sd_rtnl *rtnl, sd_rtnl_message *mm, void *userdata) {
}
static int manager_rtnl_listen(Manager *m) {
- _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL, *reply = NULL;
- sd_rtnl_message *i;
+ _cleanup_netlink_message_unref_ sd_netlink_message *req = NULL, *reply = NULL;
+ sd_netlink_message *i;
int r;
assert(m);
/* First, subscribe to interfaces coming and going */
- r = sd_rtnl_open(&m->rtnl);
+ r = sd_netlink_open(&m->rtnl);
if (r < 0)
return r;
- r = sd_rtnl_attach_event(m->rtnl, m->event, 0);
+ r = sd_netlink_attach_event(m->rtnl, m->event, 0);
if (r < 0)
return r;
- r = sd_rtnl_add_match(m->rtnl, RTM_NEWLINK, on_rtnl_event, m);
+ r = sd_netlink_add_match(m->rtnl, RTM_NEWLINK, on_rtnl_event, m);
if (r < 0)
return r;
- r = sd_rtnl_add_match(m->rtnl, RTM_DELLINK, on_rtnl_event, m);
+ r = sd_netlink_add_match(m->rtnl, RTM_DELLINK, on_rtnl_event, m);
if (r < 0)
return r;
@@ -198,15 +198,15 @@ static int manager_rtnl_listen(Manager *m) {
if (r < 0)
return r;
- r = sd_rtnl_message_request_dump(req, true);
+ r = sd_netlink_message_request_dump(req, true);
if (r < 0)
return r;
- r = sd_rtnl_call(m->rtnl, req, 0, &reply);
+ r = sd_netlink_call(m->rtnl, req, 0, &reply);
if (r < 0)
return r;
- for (i = reply; i; i = sd_rtnl_message_next(i)) {
+ for (i = reply; i; i = sd_netlink_message_next(i)) {
r = manager_process_link(m->rtnl, i, m);
if (r < 0)
return r;
@@ -323,7 +323,7 @@ void manager_free(Manager *m) {
sd_network_monitor_unref(m->network_monitor);
sd_event_source_unref(m->rtnl_event_source);
- sd_rtnl_unref(m->rtnl);
+ sd_netlink_unref(m->rtnl);
sd_event_unref(m->event);
free(m);