]> git.meshlink.io Git - catta/blob - server.h
fbd5715445c392891b2e146ab4f4d6c333c223c8
[catta] / server.h
1 #ifndef fooflxserverhfoo
2 #define fooflxserverhfoo
3
4 typedef struct _flxEntry flxEntry;
5
6 #include "flx.h"
7 #include "iface.h"
8 #include "prioq.h"
9 #include "llist.h"
10 #include "timeeventq.h"
11
12 struct _flxEntry {
13     flxRecord *record;
14     gint id;
15     gint interface;
16     guchar protocol;
17
18     gboolean unique;
19
20     FLX_LLIST_FIELDS(flxEntry, entry);
21     FLX_LLIST_FIELDS(flxEntry, by_name);
22     FLX_LLIST_FIELDS(flxEntry, by_id);
23 };
24
25 struct _flxServer {
26     GMainContext *context;
27     flxInterfaceMonitor *monitor;
28
29     gint current_id;
30     
31     GHashTable *rrset_by_id;
32     GHashTable *rrset_by_name;
33
34     FLX_LLIST_HEAD(flxEntry, entries);
35
36     flxTimeEventQueue *time_event_queue;
37     
38     gchar *hostname;
39
40     gint fd_ipv4, fd_ipv6;
41
42     GPollFD pollfd_ipv4, pollfd_ipv6;
43     GSource *source;
44     
45 };
46
47
48 #endif