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

struct nl_cache* nl_cache_alloc_from_ops ( struct nl_cache_ops *  ops  )  [read]

Allocate an empty cache based on cache operations

  • ops cache operations to base the cache on
    Returns:
    A newly allocated and initialized cache.

Definition at line 187 of file cache.c.

References nl_cache_alloc().

Referenced by flnl_result_alloc_cache(), nl_cache_alloc_name(), rtnl_addr_alloc_cache(), rtnl_class_alloc_cache(), rtnl_cls_alloc_cache(), rtnl_link_alloc_cache(), rtnl_neigh_alloc_cache(), rtnl_neightbl_alloc_cache(), rtnl_qdisc_alloc_cache(), rtnl_route_alloc_cache(), and rtnl_rule_alloc_cache_by_family().

{
      struct nl_cache *new;

      new = nl_cache_alloc();
      if (!new)
            return NULL;

      new->c_ops = ops;

      return new;
}


Generated by  Doxygen 1.6.0   Back to index