]> git.meshlink.io Git - catta/blobdiff - avahi-core/cache.h
Make the poof algorithm only positive if 4 unanswered queries each
[catta] / avahi-core / cache.h
index 3d71e504d81ae7857428622ac51f2a14d16a8c56..fd740051649c3144a12a27b40fff3725ab1a2628 100644 (file)
@@ -26,7 +26,7 @@ typedef struct AvahiCache AvahiCache;
 
 #include <avahi-common/llist.h>
 #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,6 +74,9 @@ 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);