]> git.meshlink.io Git - catta/blobdiff - server.h
* add announcing/goodbye
[catta] / server.h
index 45669260d97f75b84d91ad8d1bdf16a7d752de8f..b7addf641b313cac15e0607696e20477453530ba 100644 (file)
--- a/server.h
+++ b/server.h
@@ -1,16 +1,16 @@
 #ifndef fooflxserverhfoo
 #define fooflxserverhfoo
 
-typedef struct _flxEntry flxEntry;
-typedef struct _flxResponseJob flxResponseJob;
+typedef struct _flxServerEntry flxServerEntry;
 
 #include "flx.h"
 #include "iface.h"
 #include "prioq.h"
 #include "llist.h"
 #include "timeeventq.h"
+#include "announce.h"
 
-struct _flxEntry {
+struct _flxServerEntry {
     flxRecord *record;
     gint id;
     gint interface;
@@ -18,15 +18,11 @@ struct _flxEntry {
 
     gboolean unique;
 
-    FLX_LLIST_FIELDS(flxEntry, entry);
-    FLX_LLIST_FIELDS(flxEntry, by_name);
-    FLX_LLIST_FIELDS(flxEntry, by_id);
-};
-
-struct _flxResponseJob {
-    flxTimeEvent *time_event;
-    flxRecord *record;
-    FLX_LLIST_FIELDS(flxResponseJob, response);
+    FLX_LLIST_FIELDS(flxServerEntry, entry);
+    FLX_LLIST_FIELDS(flxServerEntry, by_key);
+    FLX_LLIST_FIELDS(flxServerEntry, by_id);
+    
+    FLX_LLIST_HEAD(flxAnnouncement, announcements);
 };
 
 struct _flxServer {
@@ -36,9 +32,9 @@ struct _flxServer {
     gint current_id;
     
     GHashTable *rrset_by_id;
-    GHashTable *rrset_by_name;
+    GHashTable *rrset_by_key;
 
-    FLX_LLIST_HEAD(flxEntry, entries);
+    FLX_LLIST_HEAD(flxServerEntry, entries);
 
     flxTimeEventQueue *time_event_queue;
     
@@ -48,7 +44,9 @@ struct _flxServer {
 
     GPollFD pollfd_ipv4, pollfd_ipv6;
     GSource *source;
+    
 };
 
+gboolean flx_server_entry_match_interface(flxServerEntry *e, flxInterface *i);
 
 #endif