diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-08-12 00:54:24 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-08-12 00:54:24 +0000 |
commit | 33f474169daae72b9aa4c5ede260663207b2e4a3 (patch) | |
tree | 09eab09fd77e71ae445e6bc8caf1b9a66660bf03 /avahi-common/domain.h | |
parent | 66c6bca0849a82be92d6bff82c478d769f8af869 (diff) |
Documentation updates
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@301 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-common/domain.h')
-rw-r--r-- | avahi-common/domain.h | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/avahi-common/domain.h b/avahi-common/domain.h index 4a94be1..eed7af4 100644 --- a/avahi-common/domain.h +++ b/avahi-common/domain.h @@ -22,6 +22,9 @@ USA. ***/ +/** \file domain.h Domain name handling functions */ + + #include <inttypes.h> #include <sys/types.h> @@ -29,28 +32,49 @@ AVAHI_C_DECL_BEGIN -char *avahi_normalize_name(const char *s); /* avahi_free() the result! */ -char *avahi_get_host_name(void); /* avahi_free() the result! */ +/** Normalize a domain name into canonical form. This drops trailing + * dots and removes useless backslash escapes. avahi_free() the + * result! */ +char *avahi_normalize_name(const char *s); + +/** Return the local host name. avahi_free() the result! */ +char *avahi_get_host_name(void); +/** Return 1 when the specified domain names are equal, 0 otherwise */ int avahi_domain_equal(const char *a, const char *b); + +/** Do a binary comparison of to specified domain names, returnen -1, 0, or 1, depending on the error. */ int avahi_binary_domain_cmp(const char *a, const char *b); -/* Read the first label from the textual domain name *name, unescape +/** 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*/ char *avahi_unescape_label(const char **name, char *dest, size_t size); -/* Escape the domain name in *src and write it to *ret_name */ +/** Escape the domain name in *src and write it to *ret_name */ char *avahi_escape_label(const uint8_t* src, size_t src_length, char **ret_name, size_t *ret_size); +/** Return some kind of hash value for a string */ unsigned avahi_strhash(const char *p); + +/** Return some kind of hash value for a domain */ unsigned avahi_domain_hash(const char *s); +/** Return 1 when the specified string contains a valid service type, 0 otherwise */ int avahi_valid_service_type(const char *t); + +/** Return 1 when the specified string contains a valid domain name, 0 otherwise */ int avahi_valid_domain_name(const char *t); + +/** Return 1 when the specified string contains a valid service name, 0 otherwise */ int avahi_valid_service_name(const char *t); + +/** Return 1 when the specified string contains a valid non-FQDN host name (i.e. without dots), 0 otherwise */ int avahi_valid_host_name(const char *t); +/** Change every character in the string to upper case (ASCII), return a pointer to the string */ char *avahi_strup(char *s); + +/** Change every character in the string to lower case (ASCII), return a pointer to the string */ char *avahi_strdown(char *s); AVAHI_C_DECL_END |