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

struct rtnl_qdisc* rtnl_qdisc_get ( struct nl_cache *  cache,
int  ifindex,
uint32_t  handle 
) [read]

Look up qdisc by its handle in the provided cache

  • cache qdisc cache
  • ifindex interface the qdisc is attached to
  • handle qdisc handle
    Returns:
    pointer to qdisc inside the cache or NULL if no match was found.

Definition at line 606 of file qdisc.c.

References nl_object_get().

{
      struct rtnl_qdisc *q;

      if (cache->c_ops != &rtnl_qdisc_ops)
            return NULL;

      nl_list_for_each_entry(q, &cache->c_items, ce_list) {
            if (q->q_handle == handle && q->q_ifindex == ifindex) {
                  nl_object_get((struct nl_object *) q);
                  return q;
            }
      }

      return NULL;
}


Generated by  Doxygen 1.6.0   Back to index