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

struct nl_cache* rtnl_qdisc_alloc_cache ( struct nl_handle *  handle  )  [read]

Build a qdisc cache including all qdiscs currently configured in the kernel

  • handle netlink handle
Allocates a new cache, initializes it properly and updates it to include all qdiscs currently configured in the kernel.

The caller is responsible for destroying and freeing the cache after using it. (nl_cache_destroy_and_free())
The cache or NULL if an error has occured.

Definition at line 558 of file qdisc.c.

References nl_cache_alloc_from_ops(), nl_cache_destroy_and_free(), and nl_cache_update().

      struct nl_cache * cache;
      cache = nl_cache_alloc_from_ops(&rtnl_qdisc_ops);
      if (cache == NULL)
            return NULL;

      if (nl_cache_update(handle, cache) < 0) {
            return NULL;

      return cache;

Generated by  Doxygen 1.6.0   Back to index