]> git.meshlink.io Git - catta/blobdiff - avahi-core/core.h
* add new macros AVAHI_IF_VALID, AVAHI_PROTO_VALID
[catta] / avahi-core / core.h
index 2f55d73b213f22ecbfcd5bae2143b837e2423b4a..abc30c00635a9c45e0ae08b656b06a7d5276845a 100644 (file)
@@ -85,6 +85,7 @@ typedef struct AvahiServerConfig {
     int 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. */
     int enable_reflector;             /**< Reflect incoming mDNS traffic to all local networks. This allows mDNS based network browsing beyond ethernet borders */
     int reflect_ipv;                  /**< if enable_reflector is 1, enable/disable reflecting between IPv4 and IPv6 */
+    int add_service_cookie;           /**< Add magic service cookie to all locally generated records implicitly */
 } AvahiServerConfig;
 
 /** Allocate a new mDNS responder object. */
@@ -506,7 +507,7 @@ typedef void (*AvahiSServiceResolverCallback)(
     AvahiSServiceResolver *r,
     AvahiIfIndex interface,
     AvahiProtocol protocol,
-    AvahiResolverEvent event,
+    AvahiResolverEvent event,  /**< Is AVAHI_RESOLVER_FOUND when the service was resolved successfully, and everytime it changes. Is AVAHI_RESOLVER_TIMOUT when the service failed to resolve or disappeared. */
     const char *name,       /**< Service name */
     const char *type,       /**< Service Type */
     const char *domain,
@@ -516,7 +517,7 @@ typedef void (*AvahiSServiceResolverCallback)(
     AvahiStringList *txt,    /**< TXT record data */
     void* userdata);
 
-/** Create a new AvahiSServiceResolver object */
+/** Create a new AvahiSServiceResolver object. The specified callback function will be called with the resolved service data. */
 AvahiSServiceResolver *avahi_s_service_resolver_new(
     AvahiServer *server,
     AvahiIfIndex interface,
@@ -564,6 +565,12 @@ void avahi_s_dns_server_browser_free(AvahiSDNSServerBrowser *b);
 /** Return the last error code */
 int avahi_server_errno(AvahiServer *s);
 
+/** Return the local service cookie */
+uint32_t avahi_server_get_local_service_cookie(AvahiServer *s);
+
+/** Return 1 if there is a local service with the specified credentials registeresd. Return 0 if not, negative on failure */
+int avahi_server_is_service_local(AvahiServer *s, AvahiIfIndex, AvahiProtocol protocol, const char *name, const char *type,  const char*domain);
+
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 AVAHI_C_DECL_END
 #endif