6 typedef struct _AvahiInterfaceMonitor AvahiInterfaceMonitor;
7 typedef struct _AvahiInterfaceAddress AvahiInterfaceAddress;
8 typedef struct _AvahiInterface AvahiInterface;
9 typedef struct _AvahiHwInterface AvahiHwInterface;
20 struct _AvahiInterfaceMonitor {
22 AvahiNetlink *netlink;
23 GHashTable *hash_table;
25 AVAHI_LLIST_HEAD(AvahiInterface, interfaces);
26 AVAHI_LLIST_HEAD(AvahiHwInterface, hw_interfaces);
28 guint query_addr_seq, query_link_seq;
37 struct _AvahiHwInterface {
38 AVAHI_LLIST_FIELDS(AvahiHwInterface, hardware);
39 AvahiInterfaceMonitor *monitor;
46 AVAHI_LLIST_HEAD(AvahiInterface, interfaces);
49 struct _AvahiInterface {
50 AVAHI_LLIST_FIELDS(AvahiInterface, interface);
51 AVAHI_LLIST_FIELDS(AvahiInterface, by_hardware);
52 AvahiInterfaceMonitor *monitor;
54 AvahiHwInterface *hardware;
59 AvahiPacketScheduler *scheduler;
61 AVAHI_LLIST_HEAD(AvahiInterfaceAddress, addresses);
62 AVAHI_LLIST_HEAD(AvahiAnnouncement, announcements);
65 struct _AvahiInterfaceAddress {
66 AVAHI_LLIST_FIELDS(AvahiInterfaceAddress, address);
67 AvahiInterfaceMonitor *monitor;
73 AvahiEntryGroup *entry_group;
74 AvahiInterface *interface;
77 AvahiInterfaceMonitor *avahi_interface_monitor_new(AvahiServer *server);
78 void avahi_interface_monitor_free(AvahiInterfaceMonitor *m);
80 void avahi_interface_monitor_sync(AvahiInterfaceMonitor *m);
82 AvahiInterface* avahi_interface_monitor_get_interface(AvahiInterfaceMonitor *m, gint index, guchar protocol);
83 AvahiHwInterface* avahi_interface_monitor_get_hw_interface(AvahiInterfaceMonitor *m, gint index);
85 void avahi_interface_send_packet(AvahiInterface *i, AvahiDnsPacket *p);
87 void avahi_interface_post_query(AvahiInterface *i, AvahiKey *k, gboolean immediately);
88 void avahi_interface_post_probe(AvahiInterface *i, AvahiRecord *p, gboolean immediately);
89 void avahi_interface_post_response(AvahiInterface *i, const AvahiAddress *a, AvahiRecord *record, gboolean flush_cache, gboolean immediately);
91 void avahi_dump_caches(AvahiInterfaceMonitor *m, FILE *f);
93 gboolean avahi_interface_relevant(AvahiInterface *i);
94 gboolean avahi_interface_address_relevant(AvahiInterfaceAddress *a);
96 gboolean avahi_interface_match(AvahiInterface *i, gint index, guchar protocol);
98 typedef void (*AvahiInterfaceMonitorWalkCallback)(AvahiInterfaceMonitor *m, AvahiInterface *i, gpointer userdata);
100 void avahi_interface_monitor_walk(AvahiInterfaceMonitor *m, gint index, guchar protocol, AvahiInterfaceMonitorWalkCallback callback, gpointer userdata);