X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fserver.h;h=ad8576df264f6364133595d26a8602ed01505074;hb=9f9f4f6ea2405edc642d322c19f6f13e31920046;hp=60737cea4d999af3db9adf1ffd3510a5a8da462b;hpb=630a3e58e8fbed70d2e5aa7a3cf07067954b3cd3;p=catta diff --git a/avahi-core/server.h b/avahi-core/server.h index 60737ce..ad8576d 100644 --- a/avahi-core/server.h +++ b/avahi-core/server.h @@ -32,6 +32,21 @@ #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; @@ -81,6 +96,9 @@ struct AvahiServer { 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); + AVAHI_LLIST_HEAD(AvahiDNSServerBrowser, dns_server_browsers); gboolean need_entry_cleanup, need_group_cleanup, need_browser_cleanup; @@ -88,9 +106,11 @@ struct AvahiServer { 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; @@ -105,6 +125,10 @@ struct AvahiServer { /* 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);