X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flibsystemd%2Fsd-bus%2Fkdbus.h;h=2ebf405d7dfabcd4c5e3d07e84b8d898697f0506;hb=5ebe2ce782a5f4614b3381ba093cbebded3d3ce6;hp=087d50aabbadca7892ebf786a858f7cce52e4569;hpb=bc75205c773313a38a6958a6905a99bd56029196;p=elogind.git diff --git a/src/libsystemd/sd-bus/kdbus.h b/src/libsystemd/sd-bus/kdbus.h index 087d50aab..2ebf405d7 100644 --- a/src/libsystemd/sd-bus/kdbus.h +++ b/src/libsystemd/sd-bus/kdbus.h @@ -1,18 +1,8 @@ /* - * Copyright (C) 2013-2014 Kay Sievers - * Copyright (C) 2013-2014 Greg Kroah-Hartman - * Copyright (C) 2013-2014 Linux Foundation - * Copyright (C) 2013-2014 Lennart Poettering - * Copyright (C) 2013-2014 Daniel Mack - * Copyright (C) 2013-2014 David Herrmann - * * kdbus is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foundation; either version 2.1 of the License, or (at * your option) any later version. - * - * "Everything should be made as simple as possible, but not simpler." - * -- Albert Einstein */ #ifndef _KDBUS_UAPI_H_ @@ -89,6 +79,21 @@ struct kdbus_creds { __u64 starttime; }; +/** + * struct kdbus_caps - process capabilities + * @last_cap: Highest currently known capability bit + * @caps: Variable number of 32-bit capabilities flags + * + * Contains a variable number of 32-bit capabilities flags. + * + * Attached to: + * KDBUS_ITEM_CAPS + */ +struct kdbus_caps { + __u32 last_cap; + __u32 caps[0]; +}; + /** * struct kdbus_audit - audit information * @sessionid: The audit session ID @@ -322,6 +327,7 @@ struct kdbus_item { struct kdbus_vec vec; struct kdbus_creds creds; struct kdbus_audit audit; + struct kdbus_caps caps; struct kdbus_timestamp timestamp; struct kdbus_name name; struct kdbus_bloom_parameter bloom_parameter; @@ -384,7 +390,8 @@ enum kdbus_payload_type { * @timeout_ns: The time to wait for a message reply from the peer. * If there is no reply, a kernel-generated message * with an attached KDBUS_ITEM_REPLY_TIMEOUT item - * is sent to @src_id. + * is sent to @src_id. The timeout is expected in + * nanoseconds and as absolute CLOCK_MONOTONIC value. * @cookie_reply: A reply to the requesting message with the same * cookie. The requesting connection can match its * request and the reply with this value @@ -720,7 +727,7 @@ struct kdbus_name_list { }; /** - * struct kdbus_cmd_conn_info - struct used for KDBUS_CMD_CONN_INFO ioctl + * struct kdbus_cmd_info - struct used for KDBUS_CMD_CONN_INFO ioctl * @size: The total size of the struct * @flags: KDBUS_ATTACH_* flags, userspace → kernel * @kernel_flags: Supported KDBUS_ATTACH_* flags, kernel → userspace @@ -728,16 +735,17 @@ struct kdbus_name_list { * @name is required. kdbus will look up the name to * determine the ID in this case. * @offset: Returned offset in the caller's pool buffer where the - * kdbus_conn_info struct result is stored. The user must + * kdbus_info struct result is stored. The user must * use KDBUS_CMD_FREE to free the allocated memory. - * @name: The optional well-known name to look up. Only needed in - * case @id is zero. + * @items: The optional item list, containing the + * well-known name to look up as a KDBUS_ITEM_NAME. + * Only needed in case @id is zero. * * On success, the KDBUS_CMD_CONN_INFO ioctl will return 0 and @offset will * tell the user the offset in the connection pool buffer at which to find the - * result in a struct kdbus_conn_info. + * result in a struct kdbus_info. */ -struct kdbus_cmd_conn_info { +struct kdbus_cmd_info { __u64 size; __u64 flags; __u64 kernel_flags; @@ -747,16 +755,16 @@ struct kdbus_cmd_conn_info { } __attribute__((aligned(8))); /** - * struct kdbus_conn_info - information returned by KDBUS_CMD_CONN_INFO + * struct kdbus_info - information returned by KDBUS_CMD_*_INFO * @size: The total size of the struct - * @id: The connection's 64-bit ID - * @flags: The connection's flags + * @id: The connection's or bus' 64-bit ID + * @flags: The connection's or bus' flags * @items: A list of struct kdbus_item * * Note that the user is responsible for freeing the allocated memory with * the KDBUS_CMD_FREE ioctl. */ -struct kdbus_conn_info { +struct kdbus_info { __u64 size; __u64 id; __u64 flags; @@ -799,8 +807,8 @@ enum kdbus_cmd_match_flags { * @kernel_flags: Supported flags of the used command, kernel → userspace * @items: A list of items for additional information * - * This structure is used with the KDBUS_CMD_ADD_MATCH and - * KDBUS_CMD_REMOVE_MATCH ioctl. + * This structure is used with the KDBUS_CMD_MATCH_ADD and + * KDBUS_CMD_MATCH_REMOVE ioctl. */ struct kdbus_cmd_match { __u64 size; @@ -855,6 +863,8 @@ struct kdbus_cmd_match { * @KDBUS_CMD_CONN_UPDATE: Update the properties of a connection. Used to * update the metadata subscription mask and * policy. + * @KDBUS_CMD_BUS_CREATOR_INFO: Retrieve information of the creator of the bus + * a connection is attached to. * @KDBUS_CMD_ENDPOINT_UPDATE: Update the properties of a custom enpoint. Used * to update the policy. * @KDBUS_CMD_MATCH_ADD: Install a match which broadcast messages should @@ -890,9 +900,11 @@ enum kdbus_ioctl_type { struct kdbus_cmd_name_list), KDBUS_CMD_CONN_INFO = _IOWR(KDBUS_IOCTL_MAGIC, 0x60, - struct kdbus_cmd_conn_info), + struct kdbus_cmd_info), KDBUS_CMD_CONN_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x61, struct kdbus_cmd_update), + KDBUS_CMD_BUS_CREATOR_INFO = _IOWR(KDBUS_IOCTL_MAGIC, 0x62, + struct kdbus_cmd_info), KDBUS_CMD_ENDPOINT_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x71, struct kdbus_cmd_update),