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

struct rtnl_class* rtnl_class_get ( struct nl_cache *  cache,
int  ifindex,
uint32_t  handle 
) [read]

Look up class by its handle in the provided cache

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

Definition at line 260 of file class.c.

References nl_object_get().

{
      struct rtnl_class *class;
      
      if (cache->c_ops != &rtnl_class_ops)
            return NULL;

      nl_list_for_each_entry(class, &cache->c_items, ce_list) {
            if (class->c_handle == handle && class->c_ifindex == ifindex) {
                  nl_object_get((struct nl_object *) class);
                  return class;
            }
      }
      return NULL;
}


Generated by  Doxygen 1.6.0   Back to index