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

int __cache_pickup ( struct nl_sock *  sk,
struct nl_cache *  cache,
struct nl_parser_param *  param 

Definition at line 464 of file cache.c.

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

Referenced by nl_cache_pickup().

      int err;
      struct nl_cb *cb;
      struct update_xdata x = {
            .ops = cache->c_ops,
            .params = param,

      NL_DBG(1, "Picking up answer for cache %p <%s>...\n",
              cache, nl_cache_name(cache));

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

      nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, update_msg_parser, &x);

      err = nl_recvmsgs(sk, cb);
      if (err < 0)
            NL_DBG(2, "While picking up for %p <%s>, recvmsgs() returned " \
                   "%d: %s", cache, nl_cache_name(cache),
                   err, nl_geterror(err));


      return err;

Generated by  Doxygen 1.6.0   Back to index