+ r = ppoll(p, 1, timeout_usec == (uint64_t) -1 ? NULL :
+ timespec_store(&ts, timeout_usec), NULL);
+ if (r < 0)
+ return -errno;
+
+ return r > 0 ? 1 : 0;
+}
+
+int sd_rtnl_wait(sd_rtnl *nl, uint64_t timeout_usec) {
+ assert_return(nl, -EINVAL);
+ assert_return(!rtnl_pid_changed(nl), -ECHILD);
+
+ if (nl->rqueue_size > 0)
+ return 0;
+
+ return rtnl_poll(nl, timeout_usec);
+}
+
+int sd_rtnl_call(sd_rtnl *nl,
+ sd_rtnl_message *message,
+ uint64_t usec,
+ sd_rtnl_message **ret) {
+ usec_t timeout;
+ uint32_t serial;
+ bool room = false;
+ int r;
+
+ assert_return(nl, -EINVAL);
+ assert_return(!rtnl_pid_changed(nl), -ECHILD);
+ assert_return(message, -EINVAL);
+
+ r = sd_rtnl_send(nl, message, &serial);
+ if (r < 0)
+ return r;
+
+ timeout = calc_elapse(usec);
+