avahi 0.6.30

avahi-common/domain.h

Go to the documentation of this file.
00001 #ifndef foodomainhfoo
00002 #define foodomainhfoo
00003 
00004 /***
00005   This file is part of avahi.
00006 
00007   avahi is free software; you can redistribute it and/or modify it
00008   under the terms of the GNU Lesser General Public License as
00009   published by the Free Software Foundation; either version 2.1 of the
00010   License, or (at your option) any later version.
00011 
00012   avahi is distributed in the hope that it will be useful, but WITHOUT
00013   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00014   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
00015   Public License for more details.
00016 
00017   You should have received a copy of the GNU Lesser General Public
00018   License along with avahi; if not, write to the Free Software
00019   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00020   USA.
00021 ***/
00022 
00025 #include <inttypes.h>
00026 #include <sys/types.h>
00027 
00028 #include <avahi-common/cdecl.h>
00029 
00030 AVAHI_C_DECL_BEGIN
00031 
00041 #define AVAHI_DOMAIN_NAME_MAX 1014
00042 
00044 #define AVAHI_LABEL_MAX 64
00045 
00050 char *avahi_normalize_name(const char *s, char *ret_s, size_t size);
00051 
00055 char *avahi_normalize_name_strdup(const char *s);
00056 
00062 int avahi_domain_equal(const char *a, const char *b);
00063 
00065 unsigned avahi_domain_hash(const char *name);
00066 
00073 char *avahi_unescape_label(const char **name, char *dest, size_t size);
00074 
00076 char *avahi_escape_label(const char* src, size_t src_length, char **ret_name, size_t *ret_size);
00077 
00085 int avahi_is_valid_service_type_generic(const char *t);
00086 
00090 int avahi_is_valid_service_type_strict(const char *t);
00091 
00094 int avahi_is_valid_service_subtype(const char *t);
00095 
00097 int avahi_is_valid_domain_name(const char *t);
00098 
00100 int avahi_is_valid_service_name(const char *t);
00101 
00103 int avahi_is_valid_host_name(const char *t);
00104 
00106 int avahi_is_valid_fqdn(const char *t);
00107 
00113 int avahi_service_name_join(char *p, size_t size, const char *name, const char *type, const char *domain);
00114 
00116 int avahi_service_name_split(const char *p, char *name, size_t name_size, char *type, size_t type_size, char *domain, size_t domain_size);
00117 
00123 const char *avahi_get_type_from_subtype(const char *t);
00124 
00127 AVAHI_C_DECL_END
00128 
00129 #endif