7 This file is part of avahi.
9 avahi is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as
11 published by the Free Software Foundation; either version 2.1 of the
12 License, or (at your option) any later version.
14 avahi is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
17 Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with avahi; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
29 #include "timeeventq.h"
31 #include "subscribe.h"
36 AvahiEntryGroup *group;
40 AvahiEntryFlags flags;
45 AVAHI_LLIST_FIELDS(AvahiEntry, entries);
46 AVAHI_LLIST_FIELDS(AvahiEntry, by_key);
47 AVAHI_LLIST_FIELDS(AvahiEntry, by_group);
49 AVAHI_LLIST_HEAD(AvahiAnnouncement, announcements);
52 struct AvahiEntryGroup {
56 AvahiEntryGroupState state;
58 AvahiEntryGroupCallback callback;
62 AVAHI_LLIST_FIELDS(AvahiEntryGroup, groups);
63 AVAHI_LLIST_HEAD(AvahiEntry, entries);
67 GMainContext *context;
68 AvahiInterfaceMonitor *monitor;
70 AVAHI_LLIST_HEAD(AvahiEntry, entries);
71 GHashTable *entries_by_key;
73 AVAHI_LLIST_HEAD(AvahiEntryGroup, groups);
75 AVAHI_LLIST_HEAD(AvahiSubscription, subscriptions);
76 GHashTable *subscription_hashtable;
78 gboolean need_entry_cleanup, need_group_cleanup;
80 AvahiTimeEventQueue *time_event_queue;
84 gint fd_ipv4, fd_ipv6;
86 GPollFD pollfd_ipv4, pollfd_ipv6;
89 gboolean ignore_bad_ttl;
91 AvahiDnsPacket *unicast_packet;
94 gboolean avahi_server_entry_match_interface(AvahiEntry *e, AvahiInterface *i);
96 void avahi_server_post_query(AvahiServer *s, gint interface, guchar protocol, AvahiKey *key);
97 void avahi_server_post_response(AvahiServer *s, gint interface, guchar protocol, AvahiRecord *record, gboolean flush_cache);
99 void avahi_entry_group_change_state(AvahiEntryGroup *g, AvahiEntryGroupState state);
101 gboolean avahi_entry_commited(AvahiEntry *e);