7 This file is part of avahi.
9 avahi is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as
11 published by the Free Software Foundation; either version 2.1 of the
12 License, or (at your option) any later version.
14 avahi is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
17 Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with avahi; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
25 /** \file avahi-core/dns-srv-rr.h Functions for announcing and browsing for unicast DNS servers via mDNS */
27 /** A domain service browser object. Use this to browse for
28 * conventional unicast DNS servers which may be used to resolve
29 * conventional domain names */
30 typedef struct AvahiSDNSServerBrowser AvahiSDNSServerBrowser;
32 #include <avahi-common/cdecl.h>
33 #include <avahi-common/defs.h>
34 #include <avahi-core/core.h>
35 #include <avahi-core/publish.h>
39 /** The type of DNS server */
41 AVAHI_DNS_SERVER_RESOLVE, /**< Unicast DNS servers for normal resolves (_domain._udp)*/
42 AVAHI_DNS_SERVER_UPDATE, /**< Unicast DNS servers for updates (_dns-update._udp)*/
46 /** Publish the specified unicast DNS server address via mDNS. You may
47 * browse for records create this way wit
48 * avahi_s_dns_server_browser_new(). */
49 int avahi_server_add_dns_server_address(
52 AvahiIfIndex interface,
53 AvahiProtocol protocol,
54 AvahiPublishFlags flags,
56 AvahiDNSServerType type,
57 const AvahiAddress *address,
58 uint16_t port /** should be 53 */);
60 /** Callback prototype for AvahiSDNSServerBrowser events */
61 typedef void (*AvahiSDNSServerBrowserCallback)(
62 AvahiSDNSServerBrowser *b,
63 AvahiIfIndex interface,
64 AvahiProtocol protocol,
65 AvahiBrowserEvent event,
66 const char *host_name, /**< Host name of the DNS server, probably useless */
67 const AvahiAddress *a, /**< Address of the DNS server */
68 uint16_t port, /**< Port number of the DNS servers, probably 53 */
69 AvahiLookupResultFlags flags, /**< Lookup flags */
72 /** Create a new AvahiSDNSServerBrowser object */
73 AvahiSDNSServerBrowser *avahi_s_dns_server_browser_new(
75 AvahiIfIndex interface,
76 AvahiProtocol protocol,
78 AvahiDNSServerType type,
79 AvahiProtocol aprotocol, /**< Address protocol for the DNS server */
80 AvahiLookupFlags flags, /**< Lookup flags. */
81 AvahiSDNSServerBrowserCallback callback,
84 /** Free an AvahiSDNSServerBrowser object */
85 void avahi_s_dns_server_browser_free(AvahiSDNSServerBrowser *b);