X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fserver.h;h=41a691e4c52040f6d604926f26eb0e51520beaaf;hb=ff4f6bf87626cdc1674e0c0c52c3692212c61116;hp=420c50158c115fbedf64f250f121adc44f740be8;hpb=f5a4db2039532ef93fbb3d98fa048be9d74a83fe;p=catta diff --git a/avahi-core/server.h b/avahi-core/server.h index 420c501..41a691e 100644 --- a/avahi-core/server.h +++ b/avahi-core/server.h @@ -28,7 +28,7 @@ #include "llist.h" #include "timeeventq.h" #include "announce.h" -#include "subscribe.h" +#include "resolve.h" #include "dns.h" #include "rrlist.h" @@ -68,35 +68,48 @@ struct AvahiServer { GMainContext *context; AvahiInterfaceMonitor *monitor; + AvahiServerConfig config; + AVAHI_LLIST_HEAD(AvahiEntry, entries); GHashTable *entries_by_key; AVAHI_LLIST_HEAD(AvahiEntryGroup, groups); - AVAHI_LLIST_HEAD(AvahiSubscription, subscriptions); - GHashTable *subscription_hashtable; + AVAHI_LLIST_HEAD(AvahiRecordResolver, record_resolvers); + GHashTable *record_resolver_hashtable; + AVAHI_LLIST_HEAD(AvahiHostNameResolver, host_name_resolvers); + AVAHI_LLIST_HEAD(AvahiAddressResolver, address_resolvers); gboolean need_entry_cleanup, need_group_cleanup; AvahiTimeEventQueue *time_event_queue; - gchar *host_name, *host_name_fqdn, *domain; + gchar *host_name, *host_name_fqdn, *domain_name; gint fd_ipv4, fd_ipv6; GPollFD pollfd_ipv4, pollfd_ipv6; GSource *source; - gboolean ignore_bad_ttl; + AvahiServerState state; + AvahiServerCallback callback; + gpointer userdata; + + AvahiEntryGroup *hinfo_entry_group; + AvahiEntryGroup *browse_domain_entry_group; + guint n_host_rr_pending; - AvahiRecordList *record_list; /* Used for assembling responses */ + AvahiTimeEvent *register_time_event; + + /* Used for assembling responses */ + AvahiRecordList *record_list; }; gboolean avahi_server_entry_match_interface(AvahiEntry *e, AvahiInterface *i); void avahi_server_post_query(AvahiServer *s, gint interface, guchar protocol, AvahiKey *key); -void avahi_server_prepare_response(AvahiServer *s, AvahiInterface *i, AvahiEntry *e, gboolean unicast_response); +void avahi_server_prepare_response(AvahiServer *s, AvahiInterface *i, AvahiEntry *e, gboolean unicast_response, gboolean auxiliary); void avahi_server_prepare_matching_responses(AvahiServer *s, AvahiInterface *i, AvahiKey *k, gboolean unicast_response); void avahi_server_generate_response(AvahiServer *s, AvahiInterface *i, AvahiDnsPacket *p, const AvahiAddress *a, guint16 port, gboolean legacy_unicast); @@ -104,4 +117,11 @@ void avahi_entry_group_change_state(AvahiEntryGroup *g, AvahiEntryGroupState sta gboolean avahi_entry_commited(AvahiEntry *e); +void avahi_server_enumerate_aux_records(AvahiServer *s, AvahiInterface *i, AvahiRecord *r, void (*callback)(AvahiServer *s, AvahiRecord *r, gboolean flush_cache, gpointer userdata), gpointer userdata); + +void avahi_host_rr_entry_group_callback(AvahiServer *s, AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata); + +void avahi_server_decrease_host_rr_pending(AvahiServer *s); +void avahi_server_increase_host_rr_pending(AvahiServer *s); + #endif