chiark / gitweb /
sd-bus: the attach_mask kernel module parameter is 64bit now, hence initialize it...
[elogind.git] / src / libsystemd / sd-bus / bus-internal.h
index 042d3522615977e48283d599cb3b2275be2de5ba..977b3407bae4d87dfc77783e63bef3bd0561b3b4 100644 (file)
@@ -126,7 +126,6 @@ struct vtable_member {
 };
 
 typedef enum BusSlotType {
-        _BUS_SLOT_DISCONNECTED,
         BUS_REPLY_CALLBACK,
         BUS_FILTER_CALLBACK,
         BUS_MATCH_CALLBACK,
@@ -134,14 +133,16 @@ typedef enum BusSlotType {
         BUS_NODE_ENUMERATOR,
         BUS_NODE_VTABLE,
         BUS_NODE_OBJECT_MANAGER,
+        _BUS_SLOT_INVALID = -1,
 } BusSlotType;
 
 struct sd_bus_slot {
         unsigned n_ref;
         sd_bus *bus;
         void *userdata;
-        BusSlotType type;
-        bool floating;
+        BusSlotType type:5;
+        bool floating:1;
+        char *description;
 
         LIST_FIELDS(sd_bus_slot, slots);
 
@@ -205,6 +206,7 @@ struct sd_bus {
         bool nodes_modified:1;
         bool trusted:1;
         bool fake_creds_valid:1;
+        bool fake_pids_valid:1;
         bool manual_peer_interface:1;
         bool is_system:1;
         bool is_user:1;
@@ -230,19 +232,14 @@ struct sd_bus {
 
         struct bus_match_node match_callbacks;
         Prioq *reply_callbacks_prioq;
-        Hashmap *reply_callbacks;
+        OrderedHashmap *reply_callbacks;
         LIST_HEAD(struct filter_callback, filter_callbacks);
 
         Hashmap *nodes;
         Hashmap *vtable_methods;
         Hashmap *vtable_properties;
 
-        union {
-                struct sockaddr sa;
-                struct sockaddr_un un;
-                struct sockaddr_in in;
-                struct sockaddr_in6 in6;
-        } sockaddr;
+        union sockaddr_union sockaddr;
         socklen_t sockaddr_size;
 
         char *kernel;
@@ -303,16 +300,19 @@ struct sd_bus {
 
         sd_bus_message *current_message;
         sd_bus_slot *current_slot;
+        sd_bus_message_handler_t current_handler;
+        void *current_userdata;
 
         sd_bus **default_bus_ptr;
         pid_t tid;
 
         struct kdbus_creds fake_creds;
+        struct kdbus_pids fake_pids;
         char *fake_label;
 
         char *cgroup_root;
 
-        char *connection_name;
+        char *description;
 
         size_t bloom_size;
         unsigned bloom_n_hash;
@@ -342,6 +342,7 @@ struct sd_bus {
 
 bool interface_name_is_valid(const char *p) _pure_;
 bool service_name_is_valid(const char *p) _pure_;
+char* service_name_startswith(const char *a, const char *b);
 bool member_name_is_valid(const char *p) _pure_;
 bool object_path_is_valid(const char *p) _pure_;
 char *object_path_startswith(const char *a, const char *b) _pure_;
@@ -386,3 +387,5 @@ int bus_set_address_system_remote(sd_bus *b, const char *host);
 int bus_set_address_system_container(sd_bus *b, const char *machine);
 
 int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata);
+
+int bus_get_root_path(sd_bus *bus);