/** A group of locally registered DNS RRs */
typedef struct AvahiEntryGroup AvahiEntryGroup;
-#include <avahi-core/address.h>
-#include <avahi-core/rr.h>
+#include <avahi-common/address.h>
+#include <avahi-common/rr.h>
+#include <avahi-common/alternative.h>
/** States of a server object */
typedef enum {
AVAHI_ENTRY_NULL = 0, /**< No special flags */
AVAHI_ENTRY_UNIQUE = 1, /**< The RRset is intended to be unique */
AVAHI_ENTRY_NOPROBE = 2, /**< Though the RRset is intended to be unique no probes shall be sent */
- AVAHI_ENTRY_NOANNOUNCE = 4 /**< Do not announce this RR to other hosts */
+ AVAHI_ENTRY_NOANNOUNCE = 4, /**< Do not announce this RR to other hosts */
+ AVAHI_ENTRY_ALLOWMUTIPLE = 8 /**< Allow multiple local records of this type, even if they are intended to be unique */
} AvahiEntryFlags;
/** States of an entry group object */
gchar *domain_name; /**< Default domain name. If left empty defaults to .local */
gboolean use_ipv4; /**< Enable IPv4 support */
gboolean use_ipv6; /**< Enable IPv6 support */
- gboolean register_hinfo; /**< Register a HINFO record for the host containing the local OS and CPU type */
- gboolean register_addresses; /**< Register A, AAAA and PTR records for all local IP addresses */
- gboolean register_workstation; /**< Register a _workstation._tcp service */
+ gboolean publish_hinfo; /**< Register a HINFO record for the host containing the local OS and CPU type */
+ gboolean publish_addresses; /**< Register A, AAAA and PTR records for all local IP addresses */
+ gboolean publish_workstation; /**< Register a _workstation._tcp service */
+ gboolean publish_domain; /**< Announce the local domain for browsing */
gboolean check_response_ttl; /**< If enabled the server ignores all incoming responses with IP TTL != 255 */
- gboolean announce_domain; /**< Announce the local domain for browsing */
- 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. */
+ 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. */
gboolean enable_reflector; /**< Reflect incoming mDNS traffic to all local networks. This allows mDNS based network browsing beyond ethernet borders */
- gboolean ipv_reflect; /**< if enable_reflector is TRUE, enable/disable reflecting between IPv4 and IPv6 */
+ gboolean reflect_ipv; /**< if enable_reflector is TRUE, enable/disable reflecting between IPv4 and IPv6 */
} AvahiServerConfig;
/** Allocate a new mDNS responder object. */
guint16 port,
AvahiStringList *strlst);
+/** The type of DNS server */
+typedef enum {
+ 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_dns_server_browser_new(). */
+gint avahi_server_add_dns_server_address(
+ AvahiServer *s,
+ AvahiEntryGroup *g,
+ gint interface,
+ guchar protocol,
+ const gchar *domain,
+ AvahiDNSServerType type,
+ const AvahiAddress *address,
+ guint16 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 */
+gint avahi_server_add_dns_server_name(
+ AvahiServer *s,
+ AvahiEntryGroup *g,
+ gint interface,
+ guchar protocol,
+ const gchar *domain,
+ AvahiDNSServerType type,
+ const gchar *name,
+ guint16 port /** should be 53 */);
+
typedef enum {
AVAHI_BROWSER_NEW = 0,
AVAHI_BROWSER_REMOVE = -1
AVAHI_DOMAIN_BROWSER_REGISTER, /**< Browse for a list of available registering domains */
AVAHI_DOMAIN_BROWSER_REGISTER_DEFAULT, /**< Browse for the default registering domain */
AVAHI_DOMAIN_BROWSER_BROWSE, /**< Browse for a list of available browsing domains */
- AVAHI_DOMAIN_BROWSER_BROWSE_DEFAULT /**< Browse for the default browsing domain */
+ AVAHI_DOMAIN_BROWSER_BROWSE_DEFAULT, /**< Browse for the default browsing domain */
+ AVAHI_DOMAIN_BROWSER_BROWSE_LEGACY /**< Legacy browse domain - see DNS-SD spec for more information */
} AvahiDomainBrowserType;
typedef struct AvahiDomainBrowser AvahiDomainBrowser;
AvahiServiceResolver *avahi_service_resolver_new(AvahiServer *server, gint interface, guchar protocol, const gchar *name, const gchar *type, const gchar *domain, guchar aprotocol, AvahiServiceResolverCallback calback, gpointer userdata);
void avahi_service_resolver_free(AvahiServiceResolver *r);
+
+/** A domain service browser object. Use this to browse for
+ * conventional unicast DNS servers which may be used to resolve
+ * conventional domain names */
+typedef struct AvahiDNSServerBrowser AvahiDNSServerBrowser;
+typedef void (*AvahiDNSServerBrowserCallback)(AvahiDNSServerBrowser *b, gint interface, guchar protocol, AvahiBrowserEvent event, const gchar *host_name, const AvahiAddress *a, guint16 port, gpointer userdata);
+AvahiDNSServerBrowser *avahi_dns_server_browser_new(AvahiServer *server, gint interface, guchar protocol, const gchar *domain, AvahiDNSServerType type, guchar aprotocol, AvahiDNSServerBrowserCallback callback, gpointer userdata);
+void avahi_dns_server_browser_free(AvahiDNSServerBrowser *b);
+
#endif