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

struct rtnl_qdisc* rtnl_class_leaf_qdisc ( struct rtnl_class *  class,
struct nl_cache *  cache 
) [read]

Lookup the leaf qdisc of a class

  • class the parent class
  • cache a qdisc cache including at laest all qdiscs of the interface the specified class is attached to
    Returns:
    The qdisc from the cache or NULL if the class has no leaf qdisc

Definition at line 406 of file class.c.

References rtnl_class_has_leaf_qdisc(), and rtnl_qdisc_get_by_parent().

{
      struct rtnl_qdisc *leaf;

      if (!rtnl_class_has_leaf_qdisc(class))
            return NULL;

      leaf = rtnl_qdisc_get_by_parent(cache, class->c_ifindex,
                              class->c_handle);
      if (!leaf || leaf->q_handle != class->c_info)
            return NULL;

      return leaf;
}


Generated by  Doxygen 1.6.0   Back to index