__u64 loginuid;
};
+struct kdbus_timestamp {
+ __u64 monotonic_ns;
+ __u64 realtime_ns;
+};
+
#define KDBUS_SRC_ID_KERNEL (0)
#define KDBUS_DST_ID_WELL_KNOWN_NAME (0)
#define KDBUS_MATCH_SRC_ID_ANY (~0ULL)
#define KDBUS_DST_ID_BROADCAST (~0ULL)
-/* Message Data Types */
+/* Message Item Types */
enum {
/* Filled in by userspace */
KDBUS_MSG_NULL, /* empty record */
/* Filled in by kernelspace */
KDBUS_MSG_SRC_NAMES = 0x200,/* NUL separated string list with well-known names of source */
- KDBUS_MSG_TIMESTAMP, /* .ts_ns of CLOCK_MONOTONIC */
+ KDBUS_MSG_TIMESTAMP, /* .timestamp */
KDBUS_MSG_SRC_CREDS, /* .creds */
KDBUS_MSG_SRC_PID_COMM, /* optional, in .str */
KDBUS_MSG_SRC_TID_COMM, /* optional, in .str */
};
/**
- * struct kdbus_msg_data - chain of data blocks
+ * struct kdbus_msg_item - chain of data blocks
*
* size: overall data record size
- * type: kdbus_msg_data_type of data
+ * type: kdbus_msg_item type of data
*/
-struct kdbus_msg_data {
+struct kdbus_msg_item {
__u64 size;
__u64 type;
union {
/* inline data */
__u8 data[0];
+ __u32 data32[0];
+ __u64 data64[0];
char str[0];
- __u32 data_u32[0];
- __u64 data_u64[0];
/* data vector */
struct kdbus_vec vec;
/* specific fields */
int fds[0]; /* int array of file descriptors */
- __u64 ts_ns; /* timestamp in nanoseconds */
struct kdbus_creds creds;
struct kdbus_audit audit;
+ struct kdbus_timestamp timestamp;
struct kdbus_manager_msg_name_change name_change;
struct kdbus_manager_msg_id_change id_change;
};
* set by userspace:
* dst_id: destination id
* flags: KDBUS_MSG_FLAGS_*
- * data_size: overall message size
- * data: data records
+ * items: data records
*
* set by kernel:
* src_id: who sent the message
__u64 cookie_reply; /* cookie we reply to */
__u64 timeout_ns; /* timespan to wait for reply */
};
- struct kdbus_msg_data data[0];
+ struct kdbus_msg_item items[0];
};
enum {
struct kdbus_cmd_name_info_item {
__u64 size;
__u64 type;
- __u8 data[0];
+ __u8 items[0];
};
struct kdbus_cmd_name_info {
struct kdbus_cmd_match_item {
__u64 size;
__u64 type;
- __u8 data[0];
+ union {
+ __u64 id;
+ __u8 data[0];
+ char str[0];
+ };
};
struct kdbus_cmd_match {