
Data Structures | |
| struct | cache_object |
| struct | cache_feature |
| struct | cache |
| struct | cache_extra |
| struct | cache_ops |
| struct | __dump_container |
| struct | __commit_container |
Macros | |
| #define | CACHE_MAX_FEATURE __CACHE_MAX_FEATURE |
| #define | CACHE_MAX_NAMELEN 32 |
Enumerations | |
| enum | { NO_FEATURES = 0, TIMER_FEATURE = 0, TIMER = (1 << TIMER_FEATURE), __CACHE_MAX_FEATURE } |
| enum | { C_OBJ_NONE = 0, C_OBJ_NEW, C_OBJ_ALIVE, C_OBJ_DEAD, C_OBJ_MAX } |
| enum | cache_type { CACHE_T_NONE = 0, CACHE_T_CT, CACHE_T_EXP, CACHE_T_MAX } |
| #define CACHE_MAX_FEATURE __CACHE_MAX_FEATURE |
Referenced by cache_create().
| #define CACHE_MAX_NAMELEN 32 |
| enum cache_type |
| int cache_add | ( | struct cache * | c, |
| struct cache_object * | obj, | ||
| int | id | ||
| ) |
References cache::add_fail, cache::add_fail_enospc, cache::add_ok, and cache::stats.
Referenced by cache_update_force().

| int cache_commit | ( | struct cache * | c, |
| struct nfct_handle * | h, | ||
| int | clientfd | ||
| ) |
References cache_ops::commit, and cache::ops.
| struct cache* cache_create | ( | const char * | name, |
| enum cache_type | type, | ||
| unsigned int | features, | ||
| struct cache_extra * | extra, | ||
| struct cache_ops * | ops | ||
| ) |
References cache_ops::alloc, CACHE_MAX_FEATURE, CACHE_T_MAX, CACHE_T_NONE, cache_ops::cmp, CONFIG, cache_ops::copy, cache::extra, cache::extra_offset, cache::feature_offset, cache::feature_type, cache::features, cache_ops::free, cache::h, cache_ops::hash, hashtable_create(), cache::name, NULL, cache::num_features, cache::object_size, cache::ops, cache_feature::size, cache_extra::size, size, cache::type, and type.

| void cache_del | ( | struct cache * | c, |
| struct cache_object * | obj | ||
| ) |
References cache::active, C_OBJ_DEAD, cache::del_ok, cache::stats, and cache_object::status.
Referenced by cache_object_put(), and cache_update_force().

References cache_flush(), cache::feature_offset, cache::features, cache::h, and hashtable_destroy().

References cache_ops::dump_step, __dump_container::fd, cache::h, hashtable_iterate(), and cache::ops.

| struct cache_object* cache_find | ( | struct cache * | c, |
| void * | ptr, | ||
| int * | pos | ||
| ) |
References cache::h, hashtable_find(), and hashtable_hash().
Referenced by cache_update_force().


References cache::flush, cache::h, hashtable_iterate(), and cache::stats.
Referenced by cache_destroy().


| void* cache_get_extra | ( | struct cache_object * | ) |
References cache_object::cache, and cache::extra_offset.
| void cache_object_free | ( | struct cache_object * | obj | ) |
References cache_object::cache, cache_ops::free, cache::objects, cache::ops, cache_object::ptr, and cache::stats.
Referenced by cache_object_put(), and cache_update_force().

| void cache_object_get | ( | struct cache_object * | obj | ) |
References cache_object::refcnt.
| struct cache_object* cache_object_new | ( | struct cache * | c, |
| void * | ptr | ||
| ) |
References cache::add_fail_enomem, cache_ops::alloc, C_OBJ_NONE, cache_object::cache, cache_ops::copy, NFCT_CP_OVERRIDE, NULL, cache::object_size, cache::objects, cache::ops, cache_object::ptr, cache::stats, and cache_object::status.
Referenced by cache_update_force().

| int cache_object_put | ( | struct cache_object * | obj | ) |
References cache_object::cache, cache_del(), cache_object_free(), and cache_object::refcnt.

| void cache_object_set_status | ( | struct cache_object * | obj, |
| int | status | ||
| ) |
References cache::active, C_OBJ_DEAD, cache_object::cache, cache::del_ok, cache::stats, and cache_object::status.
References cache::active, cache::add_fail, cache::add_ok, buf, cache::del_fail, cache::del_ok, cache::name, size, cache::stats, cache::upd_fail, and cache::upd_ok.
References cache::active, cache::add_fail, cache::add_fail_enomem, cache::add_fail_enospc, cache::add_ok, buf, cache::del_fail, cache::del_fail_enoent, cache::del_ok, cache::h, hashtable_counter(), cache::name, cache::objects, size, cache::stats, cache::upd_fail, cache::upd_fail_enoent, and cache::upd_ok.

| void cache_update | ( | struct cache * | c, |
| struct cache_object * | obj, | ||
| int | id, | ||
| void * | ptr | ||
| ) |
References C_OBJ_ALIVE, cache_ops::copy, cache_object::data, cache::extra, cache::extra_offset, cache::features, cache_object::lastupdate, NFCT_CP_META, cache::num_features, cache::ops, cache_object::ptr, cache_feature::size, cache::stats, cache_object::status, time_cached(), cache::upd_ok, cache_feature::update, and cache_extra::update.
Referenced by cache_update_force().


| struct cache_object* cache_update_force | ( | struct cache * | c, |
| void * | ptr | ||
| ) |
References C_OBJ_DEAD, cache_add(), cache_del(), cache_find(), cache_object_free(), cache_object_new(), cache_update(), id, NULL, and cache_object::status.

| struct cache_feature timer_feature |