X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fcache.h;h=bd1cd6c5258ac5dcba0e690a71ec8ca2c5cd0112;hb=c4cbc73a5fdc59d90b5d3c8dadaff8f228b98671;hp=fa723e9d68125c1d165c0a978bac03fce91a75a8;hpb=4f0a5e7572a4257894b4bfede42c26d65152609e;p=catta diff --git a/avahi-core/cache.h b/avahi-core/cache.h index fa723e9..bd1cd6c 100644 --- a/avahi-core/cache.h +++ b/avahi-core/cache.h @@ -35,7 +35,11 @@ typedef enum { AVAHI_CACHE_EXPIRY1, AVAHI_CACHE_EXPIRY2, AVAHI_CACHE_EXPIRY3, - AVAHI_CACHE_FINAL + AVAHI_CACHE_EXPIRY_FINAL, + AVAHI_CACHE_POOF, /* Passive observation of failure */ + AVAHI_CACHE_POOF_FINAL, + AVAHI_CACHE_GOODBYE_FINAL, + AVAHI_CACHE_REPLACE_FINAL } AvahiCacheEntryState; typedef struct AvahiCacheEntry AvahiCacheEntry; @@ -52,6 +56,8 @@ struct AvahiCacheEntry { AvahiCacheEntryState state; AvahiTimeEvent *time_event; + AvahiAddress poof_address; + AVAHI_LLIST_FIELDS(AvahiCacheEntry, by_key); AVAHI_LLIST_FIELDS(AvahiCacheEntry, entry); }; @@ -83,6 +89,13 @@ void* avahi_cache_walk(AvahiCache *c, AvahiKey *pattern, AvahiCacheWalkCallback int avahi_cache_entry_half_ttl(AvahiCache *c, AvahiCacheEntry *e); +/** Start the "Passive observation of Failure" algorithm for all + * 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 */ +void avahi_cache_stop_poof(AvahiCache *c, AvahiRecord *record, const AvahiAddress *a); + void avahi_cache_flush(AvahiCache *c); #endif