summaryrefslogtreecommitdiffstats
path: root/cache.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-03-31 23:31:11 +0000
committerLennart Poettering <lennart@poettering.net>2005-03-31 23:31:11 +0000
commitd553a1c2d1cd3fcdd65ade64940b5bd3efc70675 (patch)
tree5e240f9fcea9fdc77662df825f217107fbd95406 /cache.h
parent07b93a6d49a3252e3f5cacadd15083949241b071 (diff)
add client part of known answer suppresion
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@20 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index e7c8e7e..3b4eef6 100644
--- a/cache.h
+++ b/cache.h
@@ -32,7 +32,8 @@ struct flxCacheEntry {
flxCacheEntryState state;
flxTimeEvent *time_event;
- FLX_LLIST_FIELDS(flxCacheEntry, by_name);
+ FLX_LLIST_FIELDS(flxCacheEntry, by_key);
+ FLX_LLIST_FIELDS(flxCacheEntry, entry);
};
struct _flxCache {
@@ -41,6 +42,8 @@ struct _flxCache {
flxInterface *interface;
GHashTable *hash_table;
+
+ FLX_LLIST_HEAD(flxCacheEntry, entries);
};
flxCache *flx_cache_new(flxServer *server, flxInterface *interface);
@@ -51,9 +54,13 @@ flxCacheEntry *flx_cache_lookup_record(flxCache *c, flxRecord *r);
void flx_cache_update(flxCache *c, flxRecord *r, gboolean unique, const flxAddress *a);
-void flx_cache_drop_key(flxCache *c, flxKey *k);
void flx_cache_drop_record(flxCache *c, flxRecord *r);
void flx_cache_dump(flxCache *c, FILE *f);
+typedef gpointer flxCacheWalkCallback(flxCache *c, flxKey *pattern, flxCacheEntry *e, gpointer userdata);
+gpointer flx_cache_walk(flxCache *c, flxKey *pattern, flxCacheWalkCallback cb, gpointer userdata);
+
+gboolean flx_cache_entry_half_ttl(flxCache *c, flxCacheEntry *e);
+
#endif