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

int flnl_lookup ( struct nl_sock *  sk,
struct flnl_request *  req,
struct nl_cache *  cache 

Perform FIB Lookup

  • sk Netlink socket.
  • req Lookup request object.
  • cache Cache for result.
Builds a netlink message to request a FIB lookup, waits for the reply and adds the result to the specified cache.

0 on success or a negative error code.

Definition at line 259 of file lookup.c.

References flnl_lookup_build_request(), nl_cache_pickup(), nl_send_auto_complete(), and nlmsg_free().

      struct nl_msg *msg;
      int err;

      if ((err = flnl_lookup_build_request(req, 0, &msg)) < 0)
            return err;

      err = nl_send_auto_complete(sk, msg);
      if (err < 0)
            return err;

      return nl_cache_pickup(sk, cache);

Generated by  Doxygen 1.6.0   Back to index