X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flibsystemd%2Fsd-bus%2Fbus-internal.h;h=bebb2c2fac37ec2aee4c96b8605d1a1381670959;hp=042d3522615977e48283d599cb3b2275be2de5ba;hb=c0765ddb74f20046c406a3ac99f34719d767f151;hpb=19befb2d5fc087f96e40ddc432b2cc9385666209 diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h index 042d35226..bebb2c2fa 100644 --- a/src/libsystemd/sd-bus/bus-internal.h +++ b/src/libsystemd/sd-bus/bus-internal.h @@ -31,6 +31,7 @@ #include "list.h" #include "util.h" #include "refcnt.h" +#include "socket-util.h" #include "sd-bus.h" #include "bus-error.h" @@ -126,7 +127,6 @@ struct vtable_member { }; typedef enum BusSlotType { - _BUS_SLOT_DISCONNECTED, BUS_REPLY_CALLBACK, BUS_FILTER_CALLBACK, BUS_MATCH_CALLBACK, @@ -134,14 +134,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,9 +207,11 @@ 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; + bool allow_interactive_authorization:1; int use_memfd; @@ -230,23 +234,19 @@ 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; char *machine; + pid_t nspid; sd_id128_t server_id; @@ -303,16 +303,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 +345,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_; @@ -383,6 +387,8 @@ char *bus_address_escape(const char *v); int bus_set_address_system(sd_bus *bus); int bus_set_address_user(sd_bus *bus); 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_set_address_system_machine(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);