chiark / gitweb /
event: rework sd-event exit logic
[elogind.git] / src / libsystemd-rtnl / rtnl-internal.h
index a229ae77ad1ae9b85163049f9daaf1894bd3d4aa..a1050a07fa7fb2ca9bb70e76de86e31fc947df5f 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "refcnt.h"
 #include "prioq.h"
+#include "list.h"
 
 #include "sd-rtnl.h"
 
@@ -36,6 +37,14 @@ struct reply_callback {
         unsigned prioq_idx;
 };
 
+struct match_callback {
+        sd_rtnl_message_handler_t callback;
+        uint16_t types;
+        void *userdata;
+
+        LIST_FIELDS(struct match_callback, match_callbacks);
+};
+
 struct sd_rtnl {
         RefCount n_ref;
 
@@ -59,11 +68,13 @@ struct sd_rtnl {
         struct Prioq *reply_callbacks_prioq;
         Hashmap *reply_callbacks;
 
+        LIST_HEAD(struct match_callback, match_callbacks);
+
         pid_t original_pid;
 
         sd_event_source *io_event_source;
         sd_event_source *time_event_source;
-        sd_event_source *quit_event_source;
+        sd_event_source *exit_event_source;
         sd_event *event;
 };