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
28 /** \file core.h The Avahi Multicast DNS and DNS Service Discovery implmentation. */
30 #include <avahi-common/cdecl.h>
34 /** An mDNS responder object */
35 typedef struct AvahiServer AvahiServer;
37 /** A locally registered DNS resource record */
38 typedef struct AvahiEntry AvahiEntry;
40 /** A group of locally registered DNS RRs */
41 typedef struct AvahiEntryGroup AvahiEntryGroup;
45 #include <avahi-common/address.h>
46 #include <avahi-common/rr.h>
47 #include <avahi-common/alternative.h>
51 /** States of a server object */
53 AVAHI_SERVER_INVALID = -1, /**< Invalid state (initial) */
54 AVAHI_SERVER_REGISTERING = 0, /**< Host RRs are being registered */
55 AVAHI_SERVER_RUNNING, /**< All host RRs have been established */
56 AVAHI_SERVER_COLLISION, /**< There is a collision with a host RR. All host RRs have been withdrawn, the user should set a new host name via avahi_server_set_host_name() */
57 AVAHI_SERVER_SLEEPING /**< The host or domain name has changed and the server waits for old entries to be expired */
60 /** Flags for server entries */
62 AVAHI_ENTRY_NULL = 0, /**< No special flags */
63 AVAHI_ENTRY_UNIQUE = 1, /**< The RRset is intended to be unique */
64 AVAHI_ENTRY_NOPROBE = 2, /**< Though the RRset is intended to be unique no probes shall be sent */
65 AVAHI_ENTRY_NOANNOUNCE = 4, /**< Do not announce this RR to other hosts */
66 AVAHI_ENTRY_ALLOWMUTIPLE = 8 /**< Allow multiple local records of this type, even if they are intended to be unique */
69 /** States of an entry group object */
71 AVAHI_ENTRY_GROUP_UNCOMMITED = -1, /**< The group has not yet been commited, the user must still call avahi_entry_group_commit() */
72 AVAHI_ENTRY_GROUP_REGISTERING = 0, /**< The entries of the group are currently being registered */
73 AVAHI_ENTRY_GROUP_ESTABLISHED, /**< The entries have successfully been established */
74 AVAHI_ENTRY_GROUP_COLLISION /**< A name collision for one of the entries in the group has been detected, the entries have been withdrawn */
75 } AvahiEntryGroupState;
77 /** Prototype for callback functions which are called whenever the state of an AvahiServer object changes */
78 typedef void (*AvahiServerCallback) (AvahiServer *s, AvahiServerState state, gpointer userdata);
80 /** Prototype for callback functions which are called whenever the state of an AvahiEntryGroup object changes */
81 typedef void (*AvahiEntryGroupCallback) (AvahiServer *s, AvahiEntryGroup *g, AvahiEntryGroupState state, gpointer userdata);
83 /** Stores configuration options for a server instance */
84 typedef struct AvahiServerConfig {
85 gchar *host_name; /**< Default host name. If left empty defaults to the result of gethostname(2) of the libc */
86 gchar *domain_name; /**< Default domain name. If left empty defaults to .local */
87 gboolean use_ipv4; /**< Enable IPv4 support */
88 gboolean use_ipv6; /**< Enable IPv6 support */
89 gboolean publish_hinfo; /**< Register a HINFO record for the host containing the local OS and CPU type */
90 gboolean publish_addresses; /**< Register A, AAAA and PTR records for all local IP addresses */
91 gboolean publish_workstation; /**< Register a _workstation._tcp service */
92 gboolean publish_domain; /**< Announce the local domain for browsing */
93 gboolean check_response_ttl; /**< If enabled the server ignores all incoming responses with IP TTL != 255. Newer versions of the RFC do no longer contain this check, so it is disabled by default. */
94 gboolean use_iff_running; /**< Require IFF_RUNNING on local network interfaces. This is the official way to check for link beat. Unfortunately this doesn't work with all drivers. So bettere leave this off. */
95 gboolean enable_reflector; /**< Reflect incoming mDNS traffic to all local networks. This allows mDNS based network browsing beyond ethernet borders */
96 gboolean reflect_ipv; /**< if enable_reflector is TRUE, enable/disable reflecting between IPv4 and IPv6 */
99 /** Allocate a new mDNS responder object. */
100 AvahiServer *avahi_server_new(
101 GMainContext *c, /**< The GLIB main loop context to attach to */
102 const AvahiServerConfig *sc, /**< If non-NULL a pointer to a configuration structure for the server. The server makes an internal deep copy of this structure, so you may free it using avahi_server_config_done() immediately after calling this function. */
103 AvahiServerCallback callback, /**< A callback which is called whenever the state of the server changes */
104 gpointer userdata /**< An opaque pointer which is passed to the callback function */);
106 /** Free an mDNS responder object */
107 void avahi_server_free(AvahiServer* s);
109 /** Fill in default values for a server configuration structure. If you
110 * make use of an AvahiServerConfig structure be sure to initialize
111 * it with this function for the sake of upwards library
112 * compatibility. This call may allocate strings on the heap. To
113 * release this memory make sure to call
114 * avahi_server_config_done(). If you want to replace any strings in
115 * the structure be sure to free the strings filled in by this
116 * function with g_free() first and allocate the replacements with
117 * g_malloc() (or g_strdup()).*/
118 AvahiServerConfig* avahi_server_config_init(
119 AvahiServerConfig *c /**< A structure which shall be filled in */ );
121 /** Make a deep copy of the configuration structure *c to *ret. */
122 AvahiServerConfig* avahi_server_config_copy(
123 AvahiServerConfig *ret /**< destination */,
124 const AvahiServerConfig *c /**< source */);
126 /** Free the data in a server configuration structure. */
127 void avahi_server_config_free(AvahiServerConfig *c);
129 /** Return the currently chosen domain name of the server object. The
130 * return value points to an internally allocated string. Be sure to
131 * make a copy of the string before calling any other library
133 const gchar* avahi_server_get_domain_name(AvahiServer *s);
135 /** Return the currently chosen host name. The return value points to a internally allocated string. */
136 const gchar* avahi_server_get_host_name(AvahiServer *s);
138 /** Return the currently chosen host name as a FQDN ("fully qualified
139 * domain name", i.e. the concatenation of the host and domain
140 * name). The return value points to a internally allocated string. */
141 const gchar* avahi_server_get_host_name_fqdn(AvahiServer *s);
143 /** Change the host name of a running mDNS responder. This will drop
144 all automicatilly generated RRs and readd them with the new
145 name. Since the responder has to probe for the new RRs this function
146 takes some time to take effect altough it returns immediately. This
147 function is intended to be called when a host name conflict is
148 reported using AvahiServerCallback. The caller should readd all user
149 defined RRs too since they otherwise continue to point to the outdated
151 gint avahi_server_set_host_name(AvahiServer *s, const gchar *host_name);
153 /** Change the domain name of a running mDNS responder. The same rules
154 * as with avahi_server_set_host_name() apply. */
155 gint avahi_server_set_domain_name(AvahiServer *s, const gchar *domain_name);
157 /** Return the opaque user data pointer attached to a server object */
158 gpointer avahi_server_get_data(AvahiServer *s);
160 /** Change the opaque user data pointer attached to a server object */
161 void avahi_server_set_data(AvahiServer *s, gpointer userdata);
163 /** Return the current state of the server object */
164 AvahiServerState avahi_server_get_state(AvahiServer *s);
166 /** Iterate through all local entries of the server. (when g is NULL)
167 * or of a specified entry group. At the first call state should point
168 * to a NULL initialized void pointer, That pointer is used to track
169 * the current iteration. It is not safe to call any other
170 * avahi_server_xxx() function during the iteration. If the last entry
171 * has been read, NULL is returned. */
172 const AvahiRecord *avahi_server_iterate(AvahiServer *s, AvahiEntryGroup *g, void **state);
174 /** Dump the current server status to the specified FILE object */
175 void avahi_server_dump(AvahiServer *s, FILE *f);
177 /** Create a new entry group. The specified callback function is
178 * called whenever the state of the group changes. Use entry group
179 * objects to keep track of you RRs. Add new RRs to a group using
180 * avahi_server_add_xxx(). Make sure to call avahi_entry_group_commit()
181 * to start the registration process for your RRs */
182 AvahiEntryGroup *avahi_entry_group_new(AvahiServer *s, AvahiEntryGroupCallback callback, gpointer userdata);
184 /** Free an entry group. All RRs assigned to the group are removed from the server */
185 void avahi_entry_group_free(AvahiEntryGroup *g);
187 /** Commit an entry group. This starts the probing and registration process for all RRs in the group */
188 gint avahi_entry_group_commit(AvahiEntryGroup *g);
190 /** Return the current state of the specified entry group */
191 AvahiEntryGroupState avahi_entry_group_get_state(AvahiEntryGroup *g);
193 /** Change the opaque user data pointer attached to an entry group object */
194 void avahi_entry_group_set_data(AvahiEntryGroup *g, gpointer userdata);
196 /** Return the opaque user data pointer currently set for the entry group object */
197 gpointer avahi_entry_group_get_data(AvahiEntryGroup *g);
199 /** Add a new resource record to the server. Returns 0 on success, negative otherwise. */
200 gint avahi_server_add(
201 AvahiServer *s, /**< The server object to add this record to */
202 AvahiEntryGroup *g, /**< An entry group object if this new record shall be attached to one, or NULL. If you plan to remove the record sometime later you a required to pass an entry group object here. */
203 AvahiIfIndex interface, /**< A numeric index of a network interface to attach this record to, or AVAHI_IF_UNSPEC to attach this record to all interfaces */
204 AvahiProtocol protocol, /**< A protocol family to attach this record to. One of the AVAHI_PROTO_xxx constants. Use AVAHI_PROTO_UNSPEC to make this record available on all protocols (wich means on both IPv4 and IPv6). */
205 AvahiEntryFlags flags, /**< Special flags for this record */
206 AvahiRecord *r /**< The record to add. This function increases the reference counter of this object. */ );
208 /** Add a PTR RR to the server. See avahi_server_add() for more information. */
209 gint avahi_server_add_ptr(
212 AvahiIfIndex interface,
213 AvahiProtocol protocol,
214 AvahiEntryFlags flags,
215 guint32 ttl, /**< DNS TTL for this record */
216 const gchar *name, /**< PTR record name */
217 const gchar *dest /**< pointer destination */ );
219 /** Add a PTR RR to the server. See avahi_server_add() for more information. */
220 gint avahi_server_add_txt(
223 AvahiIfIndex interface,
224 AvahiProtocol protocol,
225 AvahiEntryFlags flags,
226 guint32 ttl, /**< DNS TTL for this record */
227 const gchar *name, /**< TXT record name */
228 ... /**< Text record data, terminated by NULL */);
230 /** Add a PTR RR to the server. Mostly identical to
231 * avahi_server_add_text but takes a va_list instead of a variable
232 * number of arguments */
233 gint avahi_server_add_txt_va(
236 AvahiIfIndex interface,
237 AvahiProtocol protocol,
238 AvahiEntryFlags flags,
243 /** Add a PTR RR to the server. Mostly identical to
244 * avahi_server_add_text but takes an AvahiStringList record instead of a variable
245 * number of arguments. */
246 gint avahi_server_add_txt_strlst(
249 AvahiIfIndex interface,
250 AvahiProtocol protocol,
251 AvahiEntryFlags flags,
254 AvahiStringList *strlst /**< TXT decord data as a AvahiString. Only the pointer to the object and not the object itself is copied into the RR. Therefore you should not free the strlst object yourself, this will be done by the library. If you want to add multiple records with the same RR data you MUST copy the strlst object prior to calling this function with avahi_strlst_copy(). */ );
256 /** Add an IP address mapping to the server. This will add both the
257 * host-name-to-address and the reverse mapping to the server. See
258 * avahi_server_add() for more information. If adding one of the RRs
259 * fails, the function returns with an error, but it is not defined if
260 * the other RR is deleted from the server or not. Therefore, you have
261 * to free the AvahiEntryGroup and create a new one before
263 gint avahi_server_add_address(
266 AvahiIfIndex interface,
267 AvahiProtocol protocol,
268 AvahiEntryFlags flags,
272 /** Add an DNS-SD service to the Server. This will add all required
273 * RRs to the server. See avahi_server_add() for more information. If
274 * adding one of the RRs fails, the function returns with an error,
275 * but it is not defined if the other RR is deleted from the server or
276 * not. Therefore, you have to free the AvahiEntryGroup and create a
277 * new one before proceeding. */
278 gint avahi_server_add_service(
281 AvahiIfIndex interface,
282 AvahiProtocol protocol,
283 const gchar *type, /**< DNS-SD type, e.g. "_http._tcp" */
284 const gchar *name, /**< Service name, e.g. "Lennart's Files" */
286 const gchar *host, /**< Host name where this servcie resides, or NULL if on the local host */
287 guint16 port, /**< Port number of the service */
288 ... /**< Text records, terminated by NULL */);
290 /** Mostly identical to avahi_server_add_service(), but takes an va_list for the TXT records. */
291 gint avahi_server_add_service_va(
294 AvahiIfIndex interface,
295 AvahiProtocol protocol,
303 /** Mostly identical to avahi_server_add_service(), but takes an AvahiStringList object for the TXT records. The AvahiStringList object is not copied. You need to make a copy if this object if you want to reuse it. The object is freed if the RR is removed from the server. */
304 gint avahi_server_add_service_strlst(
307 AvahiIfIndex interface,
308 AvahiProtocol protocol,
314 AvahiStringList *strlst);
316 /** The type of DNS server */
318 AVAHI_DNS_SERVER_RESOLVE, /**< Unicast DNS servers for normal resolves (_domain._udp)*/
319 AVAHI_DNS_SERVER_UPDATE /**< Unicast DNS servers for updates (_dns-update._udp)*/
320 } AvahiDNSServerType;
322 /** Publish the specified unicast DNS server address via mDNS. You may
323 * browse for records create this way wit
324 * avahi_dns_server_browser_new(). */
325 gint avahi_server_add_dns_server_address(
328 AvahiIfIndex interface,
329 AvahiProtocol protocol,
331 AvahiDNSServerType type,
332 const AvahiAddress *address,
333 guint16 port /** should be 53 */);
335 /** Similar to avahi_server_add_dns_server_address(), but specify a
336 host name instead of an address. The specified host name should be
337 resolvable via mDNS */
338 gint avahi_server_add_dns_server_name(
341 AvahiIfIndex interface,
342 AvahiProtocol protocol,
344 AvahiDNSServerType type,
346 guint16 port /** should be 53 */);
348 /** Type of callback event when browsing */
350 AVAHI_BROWSER_NEW = 0, /**< The object is new on the network */
351 AVAHI_BROWSER_REMOVE = -1 /**< The object has been removed from the network */
354 /** Type of callback event when resolving */
356 AVAHI_RESOLVER_FOUND = 0, /**< RR found, resolving successful */
357 AVAHI_RESOLVER_TIMEOUT = -1 /**< Noone responded within the timeout, resolving failed */
358 } AvahiResolverEvent;
360 /** A browsing object for arbitrary RRs */
361 typedef struct AvahiRecordBrowser AvahiRecordBrowser;
363 /** Callback prototype for AvahiRecordBrowser events */
364 typedef void (*AvahiRecordBrowserCallback)(
365 AvahiRecordBrowser *b, /**< The AvahiRecordBrowser object that is emitting this callback */
366 AvahiIfIndex interface, /**< Logical OS network interface number the record was found on */
367 AvahiProtocol protocol, /**< Protocol number the record was found. */
368 AvahiBrowserEvent event, /**< Browsing event, either AVAHI_BROWSER_NEW or AVAHI_BROWSER_REMOVE */
369 AvahiRecord *record, /**< The record that was found */
370 gpointer userdata /**< Arbitrary user data passed to avahi_record_browser_new() */ );
372 /** Create a new browsing object for arbitrary RRs */
373 AvahiRecordBrowser *avahi_record_browser_new(
374 AvahiServer *server, /**< The server object to which attach this query */
375 AvahiIfIndex interface, /**< Logical OS interface number where to look for the records, or AVAHI_IF_UNSPEC to look on interfaces */
376 AvahiProtocol protocol, /**< Protocol number to use when looking for the record, or AVAHI_PROTO_UNSPEC to look on all protocols */
377 AvahiKey *key, /**< The search key */
378 AvahiRecordBrowserCallback callback, /**< The callback to call on browsing events */
379 gpointer userdata /**< Arbitrary use suppliable data which is passed to the callback */);
381 /** Free an AvahiRecordBrowser object */
382 void avahi_record_browser_free(AvahiRecordBrowser *b);
384 /** A host name to IP adddress resolver object */
385 typedef struct AvahiHostNameResolver AvahiHostNameResolver;
387 /** Callback prototype for AvahiHostNameResolver events */
388 typedef void (*AvahiHostNameResolverCallback)(
389 AvahiHostNameResolver *r,
390 AvahiIfIndex interface,
391 AvahiProtocol protocol,
392 AvahiResolverEvent event, /**< Resolving event */
393 const gchar *host_name, /**< Host name which should be resolved. May differ in case from the query */
394 const AvahiAddress *a, /**< The address, or NULL if the host name couldn't be resolved. */
397 /** Create an AvahiHostNameResolver object for resolving a host name to an adddress. See AvahiRecordBrowser for more info on the paramters. */
398 AvahiHostNameResolver *avahi_host_name_resolver_new(
400 AvahiIfIndex interface,
401 AvahiProtocol protocol,
402 const gchar *host_name, /**< The host name to look for */
403 AvahiProtocol aprotocol, /**< The address family of the desired address or AVAHI_PROTO_UNSPEC if doesn't matter. */
404 AvahiHostNameResolverCallback calback,
407 /** Free a AvahiHostNameResolver object */
408 void avahi_host_name_resolver_free(AvahiHostNameResolver *r);
410 /** An IP address to host name resolver object ("reverse lookup") */
411 typedef struct AvahiAddressResolver AvahiAddressResolver;
413 /** Callback prototype for AvahiAddressResolver events */
414 typedef void (*AvahiAddressResolverCallback)(
415 AvahiAddressResolver *r,
416 AvahiIfIndex interface,
417 AvahiProtocol protocol,
418 AvahiResolverEvent event,
419 const AvahiAddress *a,
420 const gchar *host_name, /**< A host name for the specified address, if one was found, i.e. event == AVAHI_RESOLVER_FOUND */
423 /** Create an AvahiAddressResolver object. See AvahiRecordBrowser for more info on the paramters. */
424 AvahiAddressResolver *avahi_address_resolver_new(
426 AvahiIfIndex interface,
427 AvahiProtocol protocol,
428 const AvahiAddress *address,
429 AvahiAddressResolverCallback calback,
432 /** Free an AvahiAddressResolver object */
433 void avahi_address_resolver_free(AvahiAddressResolver *r);
435 /** The type of domain to browse for */
437 AVAHI_DOMAIN_BROWSER_REGISTER, /**< Browse for a list of available registering domains */
438 AVAHI_DOMAIN_BROWSER_REGISTER_DEFAULT, /**< Browse for the default registering domain */
439 AVAHI_DOMAIN_BROWSER_BROWSE, /**< Browse for a list of available browsing domains */
440 AVAHI_DOMAIN_BROWSER_BROWSE_DEFAULT, /**< Browse for the default browsing domain */
441 AVAHI_DOMAIN_BROWSER_BROWSE_LEGACY /**< Legacy browse domain - see DNS-SD spec for more information */
442 } AvahiDomainBrowserType;
444 /** A local domain browsing object. May be used to enumerate domains used on the local LAN */
445 typedef struct AvahiDomainBrowser AvahiDomainBrowser;
447 /** Callback prototype for AvahiDomainBrowser events */
448 typedef void (*AvahiDomainBrowserCallback)(
449 AvahiDomainBrowser *b,
450 AvahiIfIndex interface,
451 AvahiProtocol protocol,
452 AvahiBrowserEvent event,
456 /** Create a new AvahiDomainBrowser object */
457 AvahiDomainBrowser *avahi_domain_browser_new(
459 AvahiIfIndex interface,
460 AvahiProtocol protocol,
462 AvahiDomainBrowserType type,
463 AvahiDomainBrowserCallback callback,
466 /** Free an AvahiDomainBrowser object */
467 void avahi_domain_browser_free(AvahiDomainBrowser *b);
469 /** A DNS-SD service type browsing object. May be used to enumerate the service types of all available services on the local LAN */
470 typedef struct AvahiServiceTypeBrowser AvahiServiceTypeBrowser;
472 /** Callback prototype for AvahiServiceTypeBrowser events */
473 typedef void (*AvahiServiceTypeBrowserCallback)(
474 AvahiServiceTypeBrowser *b,
475 AvahiIfIndex interface,
476 AvahiProtocol protocol,
477 AvahiBrowserEvent event,
482 /** Create a new AvahiServiceTypeBrowser object. */
483 AvahiServiceTypeBrowser *avahi_service_type_browser_new(
485 AvahiIfIndex interface,
486 AvahiProtocol protocol,
488 AvahiServiceTypeBrowserCallback callback,
491 /** Free an AvahiServiceTypeBrowser object */
492 void avahi_service_type_browser_free(AvahiServiceTypeBrowser *b);
494 /** A DNS-SD service browser. Use this to enumerate available services of a certain kind on the local LAN. Use AvahiServiceResolver to get specific service data like address and port for a service. */
495 typedef struct AvahiServiceBrowser AvahiServiceBrowser;
497 /** Callback prototype for AvahiServiceBrowser events */
498 typedef void (*AvahiServiceBrowserCallback)(
499 AvahiServiceBrowser *b,
500 AvahiIfIndex interface,
501 AvahiProtocol protocol,
502 AvahiBrowserEvent event,
503 const gchar *name, /**< Service name, e.g. "Lennart's Files" */
504 const gchar *type, /**< DNS-SD type, e.g. "_http._tcp" */
505 const gchar *domain, /**< Domain of this service, e.g. "local" */
508 /** Create a new AvahiServiceBrowser object. */
509 AvahiServiceBrowser *avahi_service_browser_new(
511 AvahiIfIndex interface,
512 AvahiProtocol protocol,
513 const gchar *service_type, /** DNS-SD service type, e.g. "_http._tcp" */
515 AvahiServiceBrowserCallback callback,
518 /** Free an AvahiServiceBrowser object */
519 void avahi_service_browser_free(AvahiServiceBrowser *b);
521 /** A DNS-SD service resolver. Use this to retrieve addres, port and TXT data for a DNS-SD service */
522 typedef struct AvahiServiceResolver AvahiServiceResolver;
524 /** Callback prototype for AvahiServiceResolver events */
525 typedef void (*AvahiServiceResolverCallback)(
526 AvahiServiceResolver *r,
527 AvahiIfIndex interface,
528 AvahiProtocol protocol,
529 AvahiResolverEvent event,
530 const gchar *name, /**< Service name */
531 const gchar *type, /**< Service Type */
533 const gchar *host_name, /**< Host name of the service */
534 const AvahiAddress *a, /**< The resolved host name */
535 guint16 port, /**< Service name */
536 AvahiStringList *txt, /**< TXT record data */
539 /** Create a new AvahiServiceResolver object */
540 AvahiServiceResolver *avahi_service_resolver_new(
542 AvahiIfIndex interface,
543 AvahiProtocol protocol,
547 AvahiProtocol aprotocol, /**< Address family of the desired service address. Use AVAHI_PROTO_UNSPEC if you don't care */
548 AvahiServiceResolverCallback calback,
551 /** Free an AvahiServiceResolver object */
552 void avahi_service_resolver_free(AvahiServiceResolver *r);
554 /** A domain service browser object. Use this to browse for
555 * conventional unicast DNS servers which may be used to resolve
556 * conventional domain names */
557 typedef struct AvahiDNSServerBrowser AvahiDNSServerBrowser;
559 /** Callback prototype for AvahiDNSServerBrowser events */
560 typedef void (*AvahiDNSServerBrowserCallback)(
561 AvahiDNSServerBrowser *b,
562 AvahiIfIndex interface,
563 AvahiProtocol protocol,
564 AvahiBrowserEvent event,
565 const gchar *host_name, /**< Host name of the DNS server, probably useless */
566 const AvahiAddress *a, /**< Address of the DNS server */
567 guint16 port, /**< Port number of the DNS servers, probably 53 */
570 /** Create a new AvahiDNSServerBrowser object */
571 AvahiDNSServerBrowser *avahi_dns_server_browser_new(
573 AvahiIfIndex interface,
574 AvahiProtocol protocol,
576 AvahiDNSServerType type,
577 AvahiProtocol aprotocol, /**< Address protocol for the DNS server */
578 AvahiDNSServerBrowserCallback callback,
581 /** Free an AvahiDNSServerBrowser object */
582 void avahi_dns_server_browser_free(AvahiDNSServerBrowser *b);