X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fcache.h;h=fd740051649c3144a12a27b40fff3725ab1a2628;hb=9f00e061367adf8889e8faa17553f71f29ef2362;hp=bd1cd6c5258ac5dcba0e690a71ec8ca2c5cd0112;hpb=6d236291b17f2d02e15d4c6f1c87bc7b3fc4e982;p=catta diff --git a/avahi-core/cache.h b/avahi-core/cache.h index bd1cd6c..fd74005 100644 --- a/avahi-core/cache.h +++ b/avahi-core/cache.h @@ -26,7 +26,7 @@ typedef struct AvahiCache AvahiCache; #include #include "prioq.h" -#include "server.h" +#include "internal.h" #include "timeeventq.h" #include "hashmap.h" @@ -48,8 +48,10 @@ struct AvahiCacheEntry { AvahiCache *cache; AvahiRecord *record; struct timeval timestamp; + struct timeval poof_timestamp; struct timeval expiry; int cache_flush; + int poof_num; AvahiAddress origin; @@ -72,14 +74,14 @@ struct AvahiCache { AVAHI_LLIST_HEAD(AvahiCacheEntry, entries); unsigned n_entries; + + int last_rand; + time_t last_rand_timestamp; }; AvahiCache *avahi_cache_new(AvahiServer *server, AvahiInterface *interface); void avahi_cache_free(AvahiCache *c); -AvahiCacheEntry *avahi_cache_lookup_key(AvahiCache *c, AvahiKey *k); -AvahiCacheEntry *avahi_cache_lookup_record(AvahiCache *c, AvahiRecord *r); - void avahi_cache_update(AvahiCache *c, AvahiRecord *r, int cache_flush, const AvahiAddress *a); int avahi_cache_dump(AvahiCache *c, AvahiDumpCallback callback, void* userdata);