X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Futil.h;h=45b4ce779e3974293a3fa8b84e6fd6bfefb2fd9d;hb=22a61b042376903deada022e7585e0585aaa7d43;hp=1186cc24309d19aed11f60f16a577052b81fd02b;hpb=c58379bde376cb2298fca14f83a86626f1b76f2f;p=catta diff --git a/avahi-core/util.h b/avahi-core/util.h index 1186cc2..45b4ce7 100644 --- a/avahi-core/util.h +++ b/avahi-core/util.h @@ -36,12 +36,20 @@ gint avahi_wait_for_write(gint fd); GTimeVal *avahi_elapse_time(GTimeVal *tv, guint msec, guint jitter); -gint avahi_age(const GTimeVal *a); +glong avahi_age(const GTimeVal *a); -guint avahi_domain_hash(const gchar *p); -gboolean avahi_domain_cmp(const gchar *a, const gchar *b); gboolean avahi_domain_equal(const gchar *a, const gchar *b); +gint avahi_binary_domain_cmp(const gchar *a, const gchar *b); void avahi_hexdump(gconstpointer p, guint size); +/* Read the first label from the textual domain name *name, unescape + * it and write it to dest, *name is changed to point to the next label*/ +gchar *avahi_unescape_label(const gchar **name, gchar *dest, guint size); + +/* Escape the domain name in *src and write it to *ret_name */ +gchar *avahi_escape_label(const guint8* src, guint src_length, gchar **ret_name, guint *ret_size); + +gint avahi_domain_hash(const gchar *s); + #endif