]> git.meshlink.io Git - catta/blobdiff - avahi-core/internal.h
forgot to pull the publish_no_reverse change to the example.
[catta] / avahi-core / internal.h
index 8f18219723f8ad4eccf97c352b1598cdbbc42bfb..b8f930269c5b2fdf9679eacd2c12b065602e1fcf 100644 (file)
@@ -1,21 +1,19 @@
 #ifndef foointernalhfoo
 #define foointernalhfoo
 
-/* $Id$ */
-
 /***
   This file is part of avahi.
+
   avahi is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1 of the
   License, or (at your option) any later version.
+
   avahi is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
   Public License for more details.
+
   You should have received a copy of the GNU Lesser General Public
   License along with avahi; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -27,6 +25,7 @@ typedef struct AvahiEntry AvahiEntry;
 
 #include <avahi-common/llist.h>
 #include <avahi-common/watch.h>
+#include <avahi-common/timeval.h>
 
 #include "core.h"
 #include "iface.h"
@@ -41,19 +40,19 @@ 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;
 
 struct AvahiLegacyUnicastReflectSlot {
     AvahiServer *server;
-    
+
     uint16_t id, original_id;
     AvahiAddress address;
     uint16_t port;
@@ -67,7 +66,7 @@ struct AvahiEntry {
     AvahiSEntryGroup *group;
 
     int dead;
-    
+
     AvahiPublishFlags flags;
     AvahiRecord *record;
     AvahiIfIndex interface;
@@ -76,7 +75,7 @@ struct AvahiEntry {
     AVAHI_LLIST_FIELDS(AvahiEntry, entries);
     AVAHI_LLIST_FIELDS(AvahiEntry, by_key);
     AVAHI_LLIST_FIELDS(AvahiEntry, by_group);
-    
+
     AVAHI_LLIST_HEAD(AvahiAnnouncer, announcers);
 };
 
@@ -89,20 +88,20 @@ struct AvahiSEntryGroup {
     AvahiSEntryGroupCallback callback;
 
     unsigned n_probing;
-    
+
     unsigned n_register_try;
     struct timeval register_time;
     AvahiTimeEvent *register_time_event;
 
     struct timeval established_at;
-    
+
     AVAHI_LLIST_FIELDS(AvahiSEntryGroup, groups);
     AVAHI_LLIST_HEAD(AvahiEntry, entries);
 };
 
 struct AvahiServer {
     const AvahiPoll *poll_api;
-    
+
     AvahiInterfaceMonitor *monitor;
     AvahiServerConfig config;
 
@@ -110,7 +109,7 @@ struct AvahiServer {
     AvahiHashmap *entries_by_key;
 
     AVAHI_LLIST_HEAD(AvahiSEntryGroup, groups);
-    
+
     AVAHI_LLIST_HEAD(AvahiSRecordBrowser, record_browsers);
     AvahiHashmap *record_browser_hashmap;
     AVAHI_LLIST_HEAD(AvahiSHostNameResolver, host_name_resolvers);
@@ -122,9 +121,12 @@ struct AvahiServer {
     AVAHI_LLIST_HEAD(AvahiSDNSServerBrowser, dns_server_browsers);
 
     int need_entry_cleanup, need_group_cleanup, need_browser_cleanup;
-    
+
+    /* Used for scheduling RR cleanup */
+    AvahiTimeEvent *cleanup_time_event;
+
     AvahiTimeEventQueue *time_event_queue;
-    
+
     char *host_name, *host_name_fqdn, *domain_name;
 
     int fd_ipv4, fd_ipv6,
@@ -189,11 +191,10 @@ int avahi_server_add_ptr(
     AvahiIfIndex interface,
     AvahiProtocol protocol,
     AvahiPublishFlags flags,
-    uint32_t ttl,          
-    const char *name,      
+    uint32_t ttl,
+    const char *name,
     const char *dest);
 
-
 #define AVAHI_CHECK_VALIDITY(server, expression, error) { \
         if (!(expression)) \
             return avahi_server_set_errno((server), (error)); \