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

Cache
[Caching]


Detailed Description

   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


Modules

 Cache Implementation
 Object

Cache Modifications

static int __cache_add (struct nl_cache *cache, struct nl_object *obj)
int nl_cache_add (struct nl_cache *cache, struct nl_object *obj)
int nl_cache_move (struct nl_cache *cache, struct nl_object *obj)
void nl_cache_remove (struct nl_object *obj)
struct nl_object * nl_cache_search (struct nl_cache *cache, struct nl_object *needle)

Synchronization

int __cache_pickup (struct nl_sock *sk, struct nl_cache *cache, struct nl_parser_param *param)
static int cache_include (struct nl_cache *cache, struct nl_object *obj, struct nl_msgtype *type, change_func_t cb)
int nl_cache_include (struct nl_cache *cache, struct nl_object *obj, change_func_t change_cb)
int nl_cache_pickup (struct nl_sock *sk, struct nl_cache *cache)
int nl_cache_request_full_dump (struct nl_sock *sk, struct nl_cache *cache)
int nl_cache_resync (struct nl_sock *sk, struct nl_cache *cache, change_func_t change_cb)
static int pickup_cb (struct nl_object *c, struct nl_parser_param *p)
static int resync_cb (struct nl_object *c, struct nl_parser_param *p)

Cache Creation/Deletion

struct nl_cache * nl_cache_alloc (struct nl_cache_ops *ops)
int nl_cache_alloc_and_fill (struct nl_cache_ops *ops, struct nl_sock *sock, struct nl_cache **result)
int nl_cache_alloc_name (const char *kind, struct nl_cache **result)
void nl_cache_clear (struct nl_cache *cache)
void nl_cache_free (struct nl_cache *cache)
struct nl_cache * nl_cache_subset (struct nl_cache *orig, struct nl_object *filter)

Dumping

void nl_cache_dump (struct nl_cache *cache, struct nl_dump_params *params)
void nl_cache_dump_filter (struct nl_cache *cache, struct nl_dump_params *params, struct nl_object *filter)

Iterators

void nl_cache_foreach (struct nl_cache *cache, void(*cb)(struct nl_object *, void *), void *arg)
void nl_cache_foreach_filter (struct nl_cache *cache, struct nl_object *filter, void(*cb)(struct nl_object *, void *), void *arg)

Access Functions

struct nl_object * nl_cache_get_first (struct nl_cache *cache)
struct nl_object * nl_cache_get_last (struct nl_cache *cache)
struct nl_object * nl_cache_get_next (struct nl_object *obj)
struct nl_cache_opsnl_cache_get_ops (struct nl_cache *cache)
struct nl_object * nl_cache_get_prev (struct nl_object *obj)
int nl_cache_is_empty (struct nl_cache *cache)
int nl_cache_nitems (struct nl_cache *cache)
int nl_cache_nitems_filter (struct nl_cache *cache, struct nl_object *filter)

Utillities

void nl_cache_mark_all (struct nl_cache *cache)

Parsing

int nl_cache_parse_and_add (struct nl_cache *cache, struct nl_msg *msg)
int nl_cache_refill (struct nl_sock *sk, struct nl_cache *cache)


Generated by  Doxygen 1.6.0   Back to index