summaryrefslogtreecommitdiffstats
path: root/avahi-common/domain.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-11 00:58:04 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-11 00:58:04 +0000
commitf56d3a4e5dec3aa75d25fae761a0642e6ebd7c3c (patch)
tree5ef56fa5e9815da6ec06ce6f83fe07a7a3453758 /avahi-common/domain.h
parentc530608ec993bf73e3d22d070a8d1ecd1f302ee4 (diff)
* rename avahi_is_valid_service_type() to avahi_is_valid_service_type_generic()
* add avahi_is_valid_service_type_strict() which doesn't allow subtypes and other strange things to pass * fix protocol validity checks in server.c * add new API function avahi_get_type_from_subtype() git-svn-id: file:///home/lennart/svn/public/avahi/trunk@716 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-common/domain.h')
-rw-r--r--avahi-common/domain.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/avahi-common/domain.h b/avahi-common/domain.h
index bcd036e..26f4b73 100644
--- a/avahi-common/domain.h
+++ b/avahi-common/domain.h
@@ -75,8 +75,21 @@ char *avahi_unescape_label(const char **name, char *dest, size_t size);
/** Escape the domain name in *src and write it to *ret_name */
char *avahi_escape_label(const char* src, size_t src_length, char **ret_name, size_t *ret_size);
-/** Return 1 when the specified string contains a valid service type, 0 otherwise */
-int avahi_is_valid_service_type(const char *t);
+/** Return 1 when the specified string contains a valid generic
+ * service type (i.e. a series of words starting with "_"), 0
+ * otherwise */
+int avahi_is_valid_service_type_generic(const char *t);
+
+/** Return 1 when the specified string contains a valid strict service
+ * type (i.e. consisting of only two words, the latter being either
+ * _udp or _tcp), 0 otherwise */
+int avahi_is_valid_service_type_strict(const char *t);
+
+/** Return 1 when the specified string contains a valid service subtype, 0 otherwise */
+int avahi_is_valid_service_subtype(const char *t);
+
+/** Return a pointer to the type section of a subtype i.e. _foo._sub._bar._tcp => _bar._tcp */
+const char *avahi_get_type_from_subtype(const char *t);
/** Return 1 when the specified string contains a valid domain name, 0 otherwise */
int avahi_is_valid_domain_name(const char *t);