chiark / gitweb /
rtnl: add callback support
[elogind.git] / src / libsystemd-rtnl / rtnl-internal.h
index a229ae77ad1ae9b85163049f9daaf1894bd3d4aa..dabf12d37fbde95203392696227ebc257b7577fc 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,6 +68,8 @@ 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;