+ AVAHI_DNS_SERVER_RESOLVE, /**< Unicast DNS servers for normal resolves (_domain._udp)*/
+ AVAHI_DNS_SERVER_UPDATE /**< Unicast DNS servers for updates (_dns-update._udp)*/
+} AvahiDNSServerType;
+
+/** Publish the specified unicast DNS server address via mDNS. You may
+ * browse for records create this way wit
+ * avahi_s_dns_server_browser_new(). */
+int avahi_server_add_dns_server_address(
+ AvahiServer *s,
+ AvahiSEntryGroup *g,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ const char *domain,
+ AvahiDNSServerType type,
+ const AvahiAddress *address,
+ uint16_t port /** should be 53 */);
+
+/** Similar to avahi_server_add_dns_server_address(), but specify a
+host name instead of an address. The specified host name should be
+resolvable via mDNS */
+int avahi_server_add_dns_server_name(
+ AvahiServer *s,
+ AvahiSEntryGroup *g,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ const char *domain,
+ AvahiDNSServerType type,
+ const char *name,
+ uint16_t port /** should be 53 */);
+
+/** A browsing object for arbitrary RRs */
+typedef struct AvahiSRecordBrowser AvahiSRecordBrowser;
+
+/** Callback prototype for AvahiSRecordBrowser events */
+typedef void (*AvahiSRecordBrowserCallback)(
+ AvahiSRecordBrowser *b, /**< The AvahiSRecordBrowser object that is emitting this callback */
+ AvahiIfIndex interface, /**< Logical OS network interface number the record was found on */
+ AvahiProtocol protocol, /**< Protocol number the record was found. */
+ AvahiBrowserEvent event, /**< Browsing event, either AVAHI_BROWSER_NEW or AVAHI_BROWSER_REMOVE */
+ AvahiRecord *record, /**< The record that was found */
+ void* userdata /**< Arbitrary user data passed to avahi_s_record_browser_new() */ );
+
+/** Create a new browsing object for arbitrary RRs */
+AvahiSRecordBrowser *avahi_s_record_browser_new(
+ AvahiServer *server, /**< The server object to which attach this query */
+ AvahiIfIndex interface, /**< Logical OS interface number where to look for the records, or AVAHI_IF_UNSPEC to look on interfaces */
+ AvahiProtocol protocol, /**< Protocol number to use when looking for the record, or AVAHI_PROTO_UNSPEC to look on all protocols */
+ AvahiKey *key, /**< The search key */
+ AvahiSRecordBrowserCallback callback, /**< The callback to call on browsing events */
+ void* userdata /**< Arbitrary use suppliable data which is passed to the callback */);
+
+/** Free an AvahiSRecordBrowser object */
+void avahi_s_record_browser_free(AvahiSRecordBrowser *b);
+
+/** A host name to IP adddress resolver object */
+typedef struct AvahiSHostNameResolver AvahiSHostNameResolver;
+
+/** Callback prototype for AvahiSHostNameResolver events */
+typedef void (*AvahiSHostNameResolverCallback)(
+ AvahiSHostNameResolver *r,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ AvahiResolverEvent event, /**< Resolving event */
+ const char *host_name, /**< Host name which should be resolved. May differ in case from the query */
+ const AvahiAddress *a, /**< The address, or NULL if the host name couldn't be resolved. */
+ void* userdata);
+
+/** Create an AvahiSHostNameResolver object for resolving a host name to an adddress. See AvahiSRecordBrowser for more info on the paramters. */
+AvahiSHostNameResolver *avahi_s_host_name_resolver_new(
+ AvahiServer *server,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ const char *host_name, /**< The host name to look for */
+ AvahiProtocol aprotocol, /**< The address family of the desired address or AVAHI_PROTO_UNSPEC if doesn't matter. */
+ AvahiSHostNameResolverCallback calback,
+ void* userdata);
+
+/** Free a AvahiSHostNameResolver object */
+void avahi_s_host_name_resolver_free(AvahiSHostNameResolver *r);
+
+/** An IP address to host name resolver object ("reverse lookup") */
+typedef struct AvahiSAddressResolver AvahiSAddressResolver;
+
+/** Callback prototype for AvahiSAddressResolver events */
+typedef void (*AvahiSAddressResolverCallback)(
+ AvahiSAddressResolver *r,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ AvahiResolverEvent event,
+ const AvahiAddress *a,
+ const char *host_name, /**< A host name for the specified address, if one was found, i.e. event == AVAHI_RESOLVER_FOUND */
+ void* userdata);
+
+/** Create an AvahiSAddressResolver object. See AvahiSRecordBrowser for more info on the paramters. */
+AvahiSAddressResolver *avahi_s_address_resolver_new(
+ AvahiServer *server,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ const AvahiAddress *address,
+ AvahiSAddressResolverCallback calback,
+ void* userdata);
+
+/** Free an AvahiSAddressResolver object */
+void avahi_s_address_resolver_free(AvahiSAddressResolver *r);
+
+/** A local domain browsing object. May be used to enumerate domains used on the local LAN */
+typedef struct AvahiSDomainBrowser AvahiSDomainBrowser;
+
+/** Callback prototype for AvahiSDomainBrowser events */
+typedef void (*AvahiSDomainBrowserCallback)(
+ AvahiSDomainBrowser *b,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ AvahiBrowserEvent event,
+ const char *domain,
+ void* userdata);
+
+/** Create a new AvahiSDomainBrowser object */
+AvahiSDomainBrowser *avahi_s_domain_browser_new(
+ AvahiServer *server,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ const char *domain,
+ AvahiDomainBrowserType type,
+ AvahiSDomainBrowserCallback callback,
+ void* userdata);