hash = 31 * hash + tolower(*p);
}
}
+
+int avahi_domain_ends_with(const char *domain, const char *suffix) {
+ assert(domain);
+ assert(suffix);
+
+ assert(avahi_is_valid_domain_name(domain));
+ assert(avahi_is_valid_domain_name(suffix));
+
+ for (;;) {
+ char dummy[64];
+
+ if (avahi_domain_equal(domain, suffix))
+ return 1;
+
+ if (!(avahi_unescape_label(&domain, dummy, sizeof(dummy))))
+ return 0;
+ }
+}
/** Return some kind of hash value for the domain, useful for using domains as hash table keys. */
unsigned avahi_domain_hash(const char *name);
+/** Returns 1 if the the end labels of domain are eqal to suffix */
+int avahi_domain_ends_with(const char *domain, const char *suffix);
+
#ifndef DOXYGEN_SHOULD_SKIP_THIS
AVAHI_C_DECL_END
#endif