Data Structures | |
struct | nl_derived_object |
Object Creation/Deletion | |
nl_object * | nl_object_alloc (size_t size) |
Allocate a cacheable object. | |
nl_object * | nl_object_alloc_from_ops (struct nl_cache_ops *ops) |
Allocate a new object of kind specified by the operations handle. | |
nl_object * | nl_object_alloc_name (const char *kind) |
Allocate a new object of kind specified by the name. | |
nl_object * | nl_object_clone (struct nl_object *obj) |
Allocate a new object and copy all data from an existing object. | |
void | nl_object_free (struct nl_object *obj) |
Free a cacheable object. | |
Reference Management | |
void | nl_object_get (struct nl_object *obj) |
Acquire a reference on a object. | |
void | nl_object_put (struct nl_object *obj) |
Release a reference from an object. | |
int | nl_object_shared (struct nl_object *obj) |
Check whether this object is used by multiple users. | |
Utillities | |
void | nl_object_dump (struct nl_object *obj, struct nl_dump_params *params) |
Dump this object according to the specified parameters. | |
int | nl_object_match (struct nl_object *obj, struct nl_object *filter) |
Match a filter against an object. | |
Access Functions | |
int | nl_object_get_refcnt (struct nl_object *obj) |
Get reference count of object. | |
nl_cache_ops * | nl_object_get_ops (struct nl_object *obj) |
Get cache operations of object. | |
nl_cache * | nl_object_get_cache (struct nl_object *obj) |
Get cache this object is in. | |
void * | nl_object_priv (struct nl_object *obj) |
Get the private data of object. |
struct nl_object* nl_object_alloc | ( | size_t | size | ) |
Allocate a cacheable object.
size | size of object |
Definition at line 42 of file object.c.
Referenced by nl_object_alloc_from_ops(), and nl_object_clone().
struct nl_object* nl_object_alloc_from_ops | ( | struct nl_cache_ops * | ops | ) |
Allocate a new object of kind specified by the operations handle.
ops | cache operations handle |
Definition at line 66 of file object.c.
References nl_object_alloc().
Referenced by flnl_result_alloc(), nl_object_alloc_name(), rtnl_addr_alloc(), rtnl_class_alloc(), rtnl_cls_alloc(), rtnl_link_alloc(), rtnl_neigh_alloc(), rtnl_neightbl_alloc(), rtnl_qdisc_alloc(), rtnl_route_alloc(), and rtnl_rule_alloc().
struct nl_object* nl_object_alloc_name | ( | const char * | kind | ) |
Allocate a new object of kind specified by the name.
kind | name of object type |
Definition at line 85 of file object.c.
References nl_cache_mngt_lookup(), and nl_object_alloc_from_ops().
struct nl_object* nl_object_clone | ( | struct nl_object * | obj | ) |
Allocate a new object and copy all data from an existing object.
obj | object to inherite data from |
Definition at line 108 of file object.c.
References nl_object_alloc(), and nl_object_get().
Referenced by nl_cache_add().
void nl_object_free | ( | struct nl_object * | obj | ) |
Free a cacheable object.
obj | object to free |
Definition at line 143 of file object.c.
References nl_object_put().
Referenced by flnl_result_free(), nl_object_put(), rtnl_addr_free(), rtnl_class_free(), rtnl_cls_free(), rtnl_link_free(), rtnl_neigh_free(), rtnl_neightbl_free(), rtnl_qdisc_free(), rtnl_route_free(), and rtnl_rule_free().
void nl_object_get | ( | struct nl_object * | obj | ) |
Acquire a reference on a object.
obj | object to acquire reference from |
Definition at line 169 of file object.c.
Referenced by nl_object_clone(), rtnl_link_get(), rtnl_link_get_by_name(), rtnl_neigh_get(), rtnl_neightbl_get(), rtnl_qdisc_get(), rtnl_qdisc_get_by_parent(), and rtnl_route_get().
void nl_object_put | ( | struct nl_object * | obj | ) |
Release a reference from an object.
obj | object to release reference from |
Definition at line 178 of file object.c.
References nl_object_free().
Referenced by flnl_result_put(), nl_cache_add(), nl_cache_delete(), nl_object_free(), rtnl_addr_put(), rtnl_class_put(), rtnl_cls_put(), rtnl_link_put(), rtnl_neigh_put(), rtnl_neightbl_put(), rtnl_qdisc_put(), rtnl_route_put(), and rtnl_rule_put().
int nl_object_shared | ( | struct nl_object * | obj | ) |
Check whether this object is used by multiple users.
obj | object to check |
Definition at line 197 of file object.c.
Referenced by nl_cache_add().
void nl_object_dump | ( | struct nl_object * | obj, | |
struct nl_dump_params * | params | |||
) |
int nl_object_match | ( | struct nl_object * | obj, | |
struct nl_object * | filter | |||
) |
int nl_object_get_refcnt | ( | struct nl_object * | obj | ) |
struct nl_cache_ops* nl_object_get_ops | ( | struct nl_object * | obj | ) |
struct nl_cache* nl_object_get_cache | ( | struct nl_object * | obj | ) |
void* nl_object_priv | ( | struct nl_object * | obj | ) | [inline] |