chiark / gitweb /
bus: when entering an existing namespace to connect to a container's system bus also...
[elogind.git] / src / libsystemd-bus / kdbus.h
index dcd29359f5c11b0338a259e7973d7b1e32671dad..f3159501315c79ba8d4de3af5afbd94f26e505c5 100644 (file)
@@ -371,7 +371,7 @@ struct kdbus_msg {
                __u64 timeout_ns;
        };
        struct kdbus_item items[0];
-};
+} __attribute__((aligned(8)));
 
 /**
  * enum kdbus_policy_access_type - permissions of a policy record
@@ -410,18 +410,22 @@ enum kdbus_policy_type {
 struct kdbus_cmd_policy {
        __u64 size;
        struct kdbus_item policies[0];
-};
+} __attribute__((aligned(8)));
 
 /**
  * enum kdbus_hello_flags - flags for struct kdbus_cmd_hello
- * @KDBUS_HELLO_ACTIVATOR:             The connection registers a name for activation
- *                             by well-know name
  * @KDBUS_HELLO_ACCEPT_FD:     The connection allows the receiving of
  *                             any passed file descriptors
+ * @KDBUS_HELLO_ACTIVATOR:     Special-purpose connection which registers
+ *                             a well-know name for a process to be started
+ *                             when traffic arrives
+ * @KDBUS_HELLO_MONITOR:       Special-purpose connection to monitor
+ *                             bus traffic
  */
 enum kdbus_hello_flags {
-       KDBUS_HELLO_ACTIVATOR           =  1 <<  0,
-       KDBUS_HELLO_ACCEPT_FD           =  1 <<  1,
+       KDBUS_HELLO_ACCEPT_FD           =  1 <<  0,
+       KDBUS_HELLO_ACTIVATOR           =  1 <<  1,
+       KDBUS_HELLO_MONITOR             =  1 <<  2,
 };
 
 /**
@@ -481,7 +485,7 @@ struct kdbus_cmd_hello {
        __u64 pool_size;
        __u8 id128[16];
        struct kdbus_item items[0];
-};
+} __attribute__((aligned(8)));
 
 /* Flags for KDBUS_CMD_{BUS,EP,NS}_MAKE */
 enum kdbus_make_flags {
@@ -504,7 +508,7 @@ struct kdbus_cmd_bus_make {
        __u64 flags;
        __u64 bloom_size;
        struct kdbus_item items[0];
-};
+} __attribute__((aligned(8)));
 
 /**
  * struct kdbus_cmd_ep_make - struct to make an endpoint
@@ -519,7 +523,7 @@ struct kdbus_cmd_ep_make {
        __u64 size;
        __u64 flags;
        struct kdbus_item items[0];
-};
+} __attribute__((aligned(8)));
 
 /**
  * struct kdbus_cmd_ns_make - struct to make a namespace
@@ -534,7 +538,7 @@ struct kdbus_cmd_ns_make {
        __u64 size;
        __u64 flags;
        struct kdbus_item items[0];
-};
+} __attribute__((aligned(8)));
 
 /**
  * enum kdbus_name_flags - properties of a well-known name
@@ -569,7 +573,7 @@ struct kdbus_cmd_name {
        __u64 id;
        __u64 conn_flags;
        char name[0];
-};
+} __attribute__((aligned(8)));
 
 /**
  * enum kdbus_name_list_flags - what to include into the returned list
@@ -597,7 +601,7 @@ enum kdbus_name_list_flags {
 struct kdbus_cmd_name_list {
        __u64 flags;
        __u64 offset;
-};
+} __attribute__((aligned(8)));
 
 /**
  * struct kdbus_name_list - information returned by KDBUS_CMD_NAME_LIST
@@ -635,7 +639,7 @@ struct kdbus_cmd_conn_info {
        __u64 id;
        __u64 offset;
        char name[0];
-};
+} __attribute__((aligned(8)));
 
 /**
  * struct kdbus_conn_info - information returned by KDBUS_CMD_CONN_INFO
@@ -696,28 +700,7 @@ struct kdbus_cmd_match {
        __u64 cookie;
        __u64 src_id;
        struct kdbus_item items[0];
-};
-
-/**
- * enum kdbus_monitor_flags - flags for monitoring
- * @KDBUS_MONITOR_ENABLE:      Enable monitoring
- */
-enum kdbus_monitor_flags {
-       KDBUS_MONITOR_ENABLE            = 1 <<  0,
-};
-
-/**
- * struct kdbus_cmd_monitor - struct to enable or disable eavesdropping
- * @id:                        Privileged users may enable or disable the monitor feature
- *                     on behalf of other peers
- * @flags:             Use KDBUS_MONITOR_ENABLE to enable eavesdropping
- *
- * This structure is used with the KDBUS_CMD_MONITOR ioctl.
- */
-struct kdbus_cmd_monitor {
-       __u64 id;
-       __u64 flags;
-};
+} __attribute__((aligned(8)));
 
 /**
  * enum kdbus_ioctl_type - Ioctl API
@@ -756,9 +739,6 @@ struct kdbus_cmd_monitor {
  * @KDBUS_CMD_MATCH_ADD:       Install a match which broadcast messages should
  *                             be delivered to the connection.
  * @KDBUS_CMD_MATCH_REMOVE:    Remove a current match for broadcast messages.
- * @KDBUS_CMD_MONITOR:         Monitor the bus and receive all transmitted
- *                             messages. Privileges are required for this
- *                             operation.
  * @KDBUS_CMD_EP_POLICY_SET:   Set the policy of an endpoint. It is used to
  *                             restrict the access for endpoints created with
  *                             KDBUS_CMD_EP_MAKE.
@@ -808,7 +788,6 @@ enum kdbus_ioctl_type {
 
        KDBUS_CMD_MATCH_ADD =           _IOW (KDBUS_IOC_MAGIC, 0x70, struct kdbus_cmd_match),
        KDBUS_CMD_MATCH_REMOVE =        _IOW (KDBUS_IOC_MAGIC, 0x71, struct kdbus_cmd_match),
-       KDBUS_CMD_MONITOR =             _IOW (KDBUS_IOC_MAGIC, 0x72, struct kdbus_cmd_monitor),
 
        KDBUS_CMD_EP_POLICY_SET =       _IOW (KDBUS_IOC_MAGIC, 0x80, struct kdbus_cmd_policy),