Modules | |
Cache | |
Cache Management | | Type Specific Cache Operations | | +----------------+ +------------+ | request update | | msg_parser | | | +----------------+ +------------+ +- - - - -^- - - - - - - -^- -|- - - - nl_cache_update: | | | | 1) --------- co_request_update ------+ | | | | | 2) destroy old cache +----------- pp_cb ---------|---+ | | | 3) ---------- nl_recvmsgs ----------+ +- cb_valid -+ +--------------+ | | | | | nl_cache_add |<-----+ + - - -v- -|- - - - - - - - - - - +--------------+ | | +-------------+ | nl_recvmsgs | | | +-----|-^-----+ +---v-|---+ | | | nl_recv | +---------+ | | Core Netlink | |
Manager | |
Helps keeping caches up to date. | |
Cache Operations Sets | |
struct nl_cache_ops * | nl_cache_ops_lookup (const char *name) |
Lookup the set cache operations of a certain cache type. | |
struct nl_cache_ops * | nl_cache_ops_associate (int protocol, int msgtype) |
Associate a message type to a set of cache operations. | |
struct nl_msgtype * | nl_msgtype_lookup (struct nl_cache_ops *ops, int msgtype) |
Lookup message type cache association. | |
void | nl_cache_ops_foreach (void(*cb)(struct nl_cache_ops *, void *), void *arg) |
Call a function for each registered cache operation. | |
int | nl_cache_mngt_register (struct nl_cache_ops *ops) |
Register a set of cache operations. | |
int | nl_cache_mngt_unregister (struct nl_cache_ops *ops) |
Unregister a set of cache operations. | |
Global Cache Provisioning/Requiring | |
void | nl_cache_mngt_provide (struct nl_cache *cache) |
Provide a cache for global use. | |
void | nl_cache_mngt_unprovide (struct nl_cache *cache) |
Unprovide a cache for global use. | |
struct nl_cache * | nl_cache_mngt_require (const char *name) |
Demand the use of a global cache. |
struct nl_cache_ops* nl_cache_ops_lookup | ( | const char * | name | ) | [read] |
name | name of the cache type |
Definition at line 36 of file cache_mngt.c.
References nl_cache_ops::co_name, and nl_cache_ops::co_next.
Referenced by nl_cache_alloc_name(), nl_cache_mngr_add(), nl_cache_mngt_register(), nl_cache_mngt_require(), and nl_object_alloc_name().
struct nl_cache_ops* nl_cache_ops_associate | ( | int | protocol, | |
int | msgtype | |||
) | [read] |
protocol | netlink protocol | |
msgtype | netlink message type |
Definition at line 58 of file cache_mngt.c.
References nl_cache_ops::co_msgtypes, nl_cache_ops::co_next, nl_cache_ops::co_protocol, and nl_msgtype::mt_id.
Referenced by nl_msg_dump().
struct nl_msgtype* nl_msgtype_lookup | ( | struct nl_cache_ops * | ops, | |
int | msgtype | |||
) | [read] |
ops | cache operations | |
msgtype | netlink message type |
Definition at line 82 of file cache_mngt.c.
References nl_cache_ops::co_msgtypes, and nl_msgtype::mt_id.
void nl_cache_ops_foreach | ( | void(*)(struct nl_cache_ops *, void *) | cb, | |
void * | arg | |||
) |
cb | Callback function to be called | |
arg | User specific argument. |
Definition at line 110 of file cache_mngt.c.
References nl_cache_ops::co_next.
int nl_cache_mngt_register | ( | struct nl_cache_ops * | ops | ) |
ops | cache operations |
Definition at line 127 of file cache_mngt.c.
References nl_cache_ops::co_name, nl_cache_ops::co_next, nl_cache_ops::co_obj_ops, and nl_cache_ops_lookup().
Referenced by genl_register().
int nl_cache_mngt_unregister | ( | struct nl_cache_ops * | ops | ) |
ops | cache operations |
Definition at line 157 of file cache_mngt.c.
References nl_cache_ops::co_name, and nl_cache_ops::co_next.
Referenced by genl_unregister().
void nl_cache_mngt_provide | ( | struct nl_cache * | cache | ) |
cache | cache to provide |
Definition at line 189 of file cache_mngt.c.
References nl_cache_ops::co_major_cache.
Referenced by nl_cache_mngr_add().
void nl_cache_mngt_unprovide | ( | struct nl_cache * | cache | ) |
cache | cache to unprovide |
Definition at line 208 of file cache_mngt.c.
References nl_cache_ops::co_major_cache.
struct nl_cache* nl_cache_mngt_require | ( | const char * | name | ) | [read] |
name | name of the required object type |
Definition at line 229 of file cache_mngt.c.
References nl_cache_ops::co_major_cache, and nl_cache_ops_lookup().