X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fserver.h;h=0da7c34e2c143fec9df8008c598e367548e6b718;hb=219241ab5223b705ade51485ea9227b0a6089c0d;hp=fddf17e00f88d105345852d7e637fe464b1686af;hpb=4de3df3db7df43474176533d0b5fac851dd4a9b4;p=catta diff --git a/avahi-core/server.h b/avahi-core/server.h index fddf17e..0da7c34 100644 --- a/avahi-core/server.h +++ b/avahi-core/server.h @@ -28,10 +28,25 @@ #include "llist.h" #include "timeeventq.h" #include "announce.h" -#include "subscribe.h" +#include "browse.h" #include "dns.h" #include "rrlist.h" +#define AVAHI_MAX_LEGACY_UNICAST_REFLECT_SLOTS 100 + +typedef struct AvahiLegacyUnicastReflectSlot AvahiLegacyUnicastReflectSlot; + +struct AvahiLegacyUnicastReflectSlot { + AvahiServer *server; + + guint16 id, original_id; + AvahiAddress address; + guint16 port; + gint interface; + GTimeVal elapse_time; + AvahiTimeEvent *time_event; +}; + struct AvahiEntry { AvahiServer *server; AvahiEntryGroup *group; @@ -75,18 +90,26 @@ struct AvahiServer { AVAHI_LLIST_HEAD(AvahiEntryGroup, groups); - AVAHI_LLIST_HEAD(AvahiSubscription, subscriptions); - GHashTable *subscription_hashtable; - - gboolean need_entry_cleanup, need_group_cleanup; + AVAHI_LLIST_HEAD(AvahiRecordBrowser, record_browsers); + GHashTable *record_browser_hashtable; + AVAHI_LLIST_HEAD(AvahiHostNameResolver, host_name_resolvers); + AVAHI_LLIST_HEAD(AvahiAddressResolver, address_resolvers); + AVAHI_LLIST_HEAD(AvahiDomainBrowser, domain_browsers); + AVAHI_LLIST_HEAD(AvahiServiceTypeBrowser, service_type_browsers); + AVAHI_LLIST_HEAD(AvahiServiceBrowser, service_browsers); + AVAHI_LLIST_HEAD(AvahiServiceResolver, service_resolvers); + + gboolean need_entry_cleanup, need_group_cleanup, need_browser_cleanup; AvahiTimeEventQueue *time_event_queue; gchar *host_name, *host_name_fqdn, *domain_name; - gint fd_ipv4, fd_ipv6; + gint fd_ipv4, fd_ipv6, + /* The following two sockets two are used for reflection only */ + fd_legacy_unicast_ipv4, fd_legacy_unicast_ipv6; - GPollFD pollfd_ipv4, pollfd_ipv6; + GPollFD pollfd_ipv4, pollfd_ipv6, pollfd_legacy_unicast_ipv4, pollfd_legacy_unicast_ipv6; GSource *source; AvahiServerState state; @@ -94,10 +117,17 @@ struct AvahiServer { gpointer userdata; AvahiEntryGroup *hinfo_entry_group; + AvahiEntryGroup *browse_domain_entry_group; guint n_host_rr_pending; + + AvahiTimeEvent *register_time_event; /* Used for assembling responses */ AvahiRecordList *record_list; + + /* Used for reflection of legacy unicast packets */ + AvahiLegacyUnicastReflectSlot **legacy_unicast_reflect_slots; + guint16 legacy_unicast_reflect_id; }; gboolean avahi_server_entry_match_interface(AvahiEntry *e, AvahiInterface *i);