6 typedef struct _flxInterfaceMonitor flxInterfaceMonitor;
7 typedef struct _flxInterfaceAddress flxInterfaceAddress;
8 typedef struct _flxInterface flxInterface;
9 typedef struct _flxHwInterface flxHwInterface;
20 struct _flxInterfaceMonitor {
23 GHashTable *hash_table;
25 FLX_LLIST_HEAD(flxInterface, interfaces);
26 FLX_LLIST_HEAD(flxHwInterface, hw_interfaces);
28 guint query_addr_seq, query_link_seq;
37 struct _flxHwInterface {
38 FLX_LLIST_FIELDS(flxHwInterface, hardware);
39 flxInterfaceMonitor *monitor;
46 FLX_LLIST_HEAD(flxInterface, interfaces);
49 struct _flxInterface {
50 FLX_LLIST_FIELDS(flxInterface, interface);
51 FLX_LLIST_FIELDS(flxInterface, by_hardware);
52 flxInterfaceMonitor *monitor;
54 flxHwInterface *hardware;
59 flxPacketScheduler *scheduler;
61 FLX_LLIST_HEAD(flxInterfaceAddress, addresses);
62 FLX_LLIST_HEAD(flxAnnouncement, announcements);
65 struct _flxInterfaceAddress {
66 FLX_LLIST_FIELDS(flxInterfaceAddress, address);
67 flxInterfaceMonitor *monitor;
74 flxInterface *interface;
77 flxInterfaceMonitor *flx_interface_monitor_new(flxServer *server);
78 void flx_interface_monitor_free(flxInterfaceMonitor *m);
80 flxInterface* flx_interface_monitor_get_interface(flxInterfaceMonitor *m, gint index, guchar protocol);
81 flxHwInterface* flx_interface_monitor_get_hw_interface(flxInterfaceMonitor *m, gint index);
83 void flx_interface_send_packet(flxInterface *i, flxDnsPacket *p);
85 void flx_interface_post_query(flxInterface *i, flxKey *k);
86 void flx_interface_post_response(flxInterface *i, flxRecord *rr);
88 void flx_dump_caches(flxInterfaceMonitor *m, FILE *f);
90 gboolean flx_interface_relevant(flxInterface *i);
91 gboolean flx_interface_address_relevant(flxInterfaceAddress *a);
93 gboolean flx_interface_match(flxInterface *i, gint index, guchar protocol);
95 typedef void (*flxInterfaceMonitorWalkCallback)(flxInterfaceMonitor *m, flxInterface *i, gpointer userdata);
97 void flx_interface_monitor_walk(flxInterfaceMonitor *m, gint index, guchar protocol, flxInterfaceMonitorWalkCallback callback, gpointer userdata);