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

struct rtnl_qdisc* rtnl_qdisc_get_by_parent ( struct nl_cache *  cache,
int  ifindex,
uint32_t  parent 
) [read]

Look up qdisc by its parent in the provided cache

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

Definition at line 581 of file qdisc.c.

References nl_object_get().

Referenced by rtnl_class_leaf_qdisc().

{
      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_parent == parent && q->q_ifindex == ifindex) {
                  nl_object_get((struct nl_object *) q);
                  return q;
            }
      }

      return NULL;
}


Generated by  Doxygen 1.6.0   Back to index