+ r = avahi_record_new_full("cname.local", AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_CNAME, AVAHI_DEFAULT_TTL);
+ r->data.cname.name = avahi_strdup("cocaine.local");
+
+ if (avahi_server_add(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, r) < 0) {
+ avahi_record_unref(r);
+ avahi_log_error("Failed to add CNAME record");
+ goto fail;
+ }
+ avahi_record_unref(r);
+