diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-09-26 01:34:43 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-09-26 01:34:43 +0000 |
commit | 6d236291b17f2d02e15d4c6f1c87bc7b3fc4e982 (patch) | |
tree | 059dfb0043280593de0df7a2308d9a37f69b35e7 /avahi-core/cache.h | |
parent | dae4b6457a2af1f1c7f340d709c9a65b8fd7f035 (diff) |
* Implement POOF aka "Passive Observation of Failure"
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@632 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/cache.h')
-rw-r--r-- | avahi-core/cache.h | 15 |
1 files changed, 14 insertions, 1 deletions
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 |