Lines Matching defs:nl
46 rtnl->sockaddr.nl.nl_family = AF_NETLINK;
85 if (rtnl->sockaddr.nl.nl_family != AF_NETLINK)
216 int sd_netlink_send(sd_netlink *nl,
221 assert_return(nl, -EINVAL);
222 assert_return(!rtnl_pid_changed(nl), -ECHILD);
226 rtnl_seal_message(nl, message);
228 r = socket_write_message(nl, message);
489 int sd_netlink_wait(sd_netlink *nl, uint64_t timeout_usec) {
490 assert_return(nl, -EINVAL);
491 assert_return(!rtnl_pid_changed(nl), -ECHILD);
493 if (nl->rqueue_size > 0)
496 return rtnl_poll(nl, false, timeout_usec);
517 int sd_netlink_call_async(sd_netlink *nl,
527 assert_return(nl, -EINVAL);
530 assert_return(!rtnl_pid_changed(nl), -ECHILD);
532 r = hashmap_ensure_allocated(&nl->reply_callbacks, &uint64_hash_ops);
537 r = prioq_ensure_allocated(&nl->reply_callbacks_prioq, timeout_compare);
550 k = sd_netlink_send(nl, m, &s);
558 r = hashmap_put(nl->reply_callbacks, &c->serial, c);
565 r = prioq_put(nl->reply_callbacks_prioq, c, &c->prioq_idx);
568 sd_netlink_call_async_cancel(nl, c->serial);
579 int sd_netlink_call_async_cancel(sd_netlink *nl, uint32_t serial) {
583 assert_return(nl, -EINVAL);
585 assert_return(!rtnl_pid_changed(nl), -ECHILD);
587 c = hashmap_remove(nl->reply_callbacks, &s);
592 prioq_remove(nl->reply_callbacks_prioq, c, &c->prioq_idx);