X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fcache.h;h=49ba9b9c4d92bae42843eb49d19334862efc082b;hb=9c0f9c65093cfa53d45f9b68782321eb8063a032;hp=3d71e504d81ae7857428622ac51f2a14d16a8c56;hpb=263515cd1d7b52ce2ad3dc55a93b9d6f730133f1;p=catta diff --git a/avahi-core/cache.h b/avahi-core/cache.h index 3d71e50..49ba9b9 100644 --- a/avahi-core/cache.h +++ b/avahi-core/cache.h @@ -1,21 +1,19 @@ #ifndef foocachehfoo #define foocachehfoo -/* $Id$ */ - /*** This file is part of avahi. - + avahi is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + avahi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with avahi; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 @@ -26,7 +24,7 @@ typedef struct AvahiCache AvahiCache; #include #include "prioq.h" -#include "server.h" +#include "internal.h" #include "timeeventq.h" #include "hashmap.h" @@ -48,9 +46,11 @@ struct AvahiCacheEntry { AvahiCache *cache; AvahiRecord *record; struct timeval timestamp; + struct timeval poof_timestamp; struct timeval expiry; int cache_flush; - + int poof_num; + AvahiAddress origin; AvahiCacheEntryState state; @@ -64,14 +64,17 @@ struct AvahiCacheEntry { struct AvahiCache { AvahiServer *server; - + AvahiInterface *interface; - + AvahiHashmap *hashmap; AVAHI_LLIST_HEAD(AvahiCacheEntry, entries); unsigned n_entries; + + int last_rand; + time_t last_rand_timestamp; }; AvahiCache *avahi_cache_new(AvahiServer *server, AvahiInterface *interface); @@ -90,7 +93,7 @@ int avahi_cache_entry_half_ttl(AvahiCache *c, AvahiCacheEntry *e); * records of the specified key. The specified address is */ void avahi_cache_start_poof(AvahiCache *c, AvahiKey *key, const AvahiAddress *a); -/* Stop a previously started POOF algorithm for a record. (Used for response suppresions records */ +/* Stop a previously started POOF algorithm for a record. (Used for response suppresions records */ void avahi_cache_stop_poof(AvahiCache *c, AvahiRecord *record, const AvahiAddress *a); void avahi_cache_flush(AvahiCache *c);