]> git.meshlink.io Git - catta/blob - avahi-core/rr-util.h
forgot to pull the publish_no_reverse change to the example.
[catta] / avahi-core / rr-util.h
1 #ifndef foorrutilhfoo
2 #define foorrutilhfoo
3
4 /***
5   This file is part of avahi.
6
7   avahi is free software; you can redistribute it and/or modify it
8   under the terms of the GNU Lesser General Public License as
9   published by the Free Software Foundation; either version 2.1 of the
10   License, or (at your option) any later version.
11
12   avahi is distributed in the hope that it will be useful, but WITHOUT
13   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
15   Public License for more details.
16
17   You should have received a copy of the GNU Lesser General Public
18   License along with avahi; if not, write to the Free Software
19   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20   USA.
21 ***/
22
23 #include "rr.h"
24
25 AVAHI_C_DECL_BEGIN
26
27 /** Creaze new AvahiKey object based on an existing key but replaceing the type by CNAME */
28 AvahiKey *avahi_key_new_cname(AvahiKey *key);
29
30 /** Match a key to a key pattern. The pattern has a type of
31 AVAHI_DNS_CLASS_ANY, the classes are taken to be equal. Same for the
32 type. If the pattern has neither class nor type with ANY constants,
33 this function is identical to avahi_key_equal(). In contrast to
34 avahi_equal() this function is not commutative. */
35 int avahi_key_pattern_match(const AvahiKey *pattern, const AvahiKey *k);
36
37 /** Check whether a key is a pattern key, i.e. the class/type has a
38  * value of AVAHI_DNS_CLASS_ANY/AVAHI_DNS_TYPE_ANY */
39 int avahi_key_is_pattern(const AvahiKey *k);
40
41 /** Returns a maximum estimate for the space that is needed to store
42  * this key in a DNS packet. */
43 size_t avahi_key_get_estimate_size(AvahiKey *k);
44
45 /** Returns a maximum estimate for the space that is needed to store
46  * the record in a DNS packet. */
47 size_t avahi_record_get_estimate_size(AvahiRecord *r);
48
49 /** Do a mDNS spec conforming lexicographical comparison of the two
50  * records. Return a negative value if a < b, a positive if a > b,
51  * zero if equal. */
52 int avahi_record_lexicographical_compare(AvahiRecord *a, AvahiRecord *b);
53
54 /** Return 1 if the specified record is an mDNS goodbye record. i.e. TTL is zero. */
55 int avahi_record_is_goodbye(AvahiRecord *r);
56
57 /** Make a deep copy of an AvahiRecord object */
58 AvahiRecord *avahi_record_copy(AvahiRecord *r);
59
60 AVAHI_C_DECL_END
61
62 #endif