]> git.meshlink.io Git - catta/blobdiff - avahi-core/internal.h
Remove C Nokia notice that actually remained from the copyright boilerplate
[catta] / avahi-core / internal.h
index 47a9c8465ad2a43e80c1a6e4b4acb7b9e4ce5c84..d0a10d665161b2b2c3f2bd022db619e007c0cdda 100644 (file)
@@ -41,12 +41,12 @@ typedef struct AvahiEntry AvahiEntry;
 #include "multicast-lookup.h"
 #include "dns-srv-rr.h"
 
-#define AVAHI_MAX_LEGACY_UNICAST_REFLECT_SLOTS 100
+#define AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX 100
 
 #define AVAHI_FLAGS_VALID(flags, max) (!((flags) & ~(max)))
 
 #define AVAHI_RR_HOLDOFF_MSEC 1000
-#define AVAHI_RR_HOLDOFF_MSEC_RATE_LIMIT 60000
+#define AVAHI_RR_HOLDOFF_MSEC_RATE_LIMIT 20000
 #define AVAHI_RR_RATE_LIMIT_COUNT 15
 
 typedef struct AvahiLegacyUnicastReflectSlot AvahiLegacyUnicastReflectSlot;
@@ -180,6 +180,9 @@ void avahi_server_decrease_host_rr_pending(AvahiServer *s);
 
 int avahi_server_set_errno(AvahiServer *s, int error);
 
+int avahi_server_is_service_local(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, const char *name);
+int avahi_server_is_record_local(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, AvahiRecord *record);
+
 int avahi_server_add_ptr(
     AvahiServer *s,
     AvahiSEntryGroup *g,
@@ -190,6 +193,10 @@ int avahi_server_add_ptr(
     const char *name,      
     const char *dest);
 
+#define AVAHI_CHECK_VALIDITY(server, expression, error) { \
+        if (!(expression)) \
+            return avahi_server_set_errno((server), (error)); \
+}
 
 #define AVAHI_CHECK_VALIDITY_RETURN_NULL(server, expression, error) { \
         if (!(expression)) { \
@@ -205,4 +212,14 @@ int avahi_server_add_ptr(
     } \
 }
 
+#define AVAHI_ASSERT_TRUE(expression) { \
+    int __tmp = !!(expression); \
+    assert(__tmp); \
+}
+
+#define AVAHI_ASSERT_SUCCESS(expression) { \
+    int __tmp = (expression); \
+    assert(__tmp == 0); \
+}
+
 #endif