Logo Search packages:      
Sourcecode: libnl2 version File versions  Download package

int nl_wait_for_ack ( struct nl_sock *  sk  ) 

Wait for ACK.

  • sk Netlink socket.
    Precondition:
    The netlink socket must be in blocking state.
    Waits until an ACK is received for the latest not yet acknowledged netlink message.

Definition at line 713 of file nl.c.

References NL_CB_ACK, nl_cb_clone(), NL_CB_CUSTOM, nl_cb_set(), and nl_recvmsgs().

Referenced by rtnl_cls_add(), rtnl_cls_change(), and rtnl_cls_delete().

{
      int err;
      struct nl_cb *cb;

      cb = nl_cb_clone(sk->s_cb);
      if (cb == NULL)
            return -NLE_NOMEM;

      nl_cb_set(cb, NL_CB_ACK, NL_CB_CUSTOM, ack_wait_handler, NULL);
      err = nl_recvmsgs(sk, cb);
      nl_cb_put(cb);

      return err;
}


Generated by  Doxygen 1.6.0   Back to index