From 1ffedb586bd2fb6daa3970304fac7c5b415cd38f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 25 Sep 2005 20:12:40 +0000 Subject: * split off lookup.h and publish.h from core.h * implement wide-area DNS-SD * if multiple clients query the same records, only start the query packet sequence once * implement recursive CNAME queries * add support for resolving services without TXT or A/AAAA records * enlarge resolving timeouts to 5s * implement new browse/resolving events CACHE_EXHAUSTED/ALL_FOR_NOW * add support for resolving services without name. (i.e. for normal SRV records) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@608 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/rr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'avahi-core/rr.c') diff --git a/avahi-core/rr.c b/avahi-core/rr.c index 704f5be..90c6236 100644 --- a/avahi-core/rr.c +++ b/avahi-core/rr.c @@ -60,6 +60,19 @@ AvahiKey *avahi_key_new(const char *name, uint16_t class, uint16_t type) { return k; } +AvahiKey *avahi_key_new_cname(AvahiKey *key) { + assert(key); + + if (key->clazz != AVAHI_DNS_CLASS_IN) + return NULL; + + if (key->type == AVAHI_DNS_TYPE_CNAME) + return NULL; + + return avahi_key_new(key->name, key->clazz, AVAHI_DNS_TYPE_CNAME); +} + + AvahiKey *avahi_key_ref(AvahiKey *k) { assert(k); assert(k->ref >= 1); -- cgit