X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flibsystemd%2Fkdbus.h;h=fe0bb48728b163a22c957d9e7223e9ef21750b03;hb=43d9c2b5848b1363b659c38443c1c94db57415fd;hp=c59bdd859d79f4c0aa4cd417ce3fe1fbc0900351;hpb=6bb648a16ae4a682ad4784412af706d2e6a3e4da;p=elogind.git diff --git a/src/libsystemd/kdbus.h b/src/libsystemd/kdbus.h index c59bdd859..fe0bb4872 100644 --- a/src/libsystemd/kdbus.h +++ b/src/libsystemd/kdbus.h @@ -9,6 +9,9 @@ * 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_H_ @@ -102,6 +105,7 @@ struct kdbus_audit { /** * struct kdbus_timestamp + * @seqnum: Global per-namespace message sequence number * @monotonic_ns: Monotonic timestamp, in nanoseconds * @realtime_ns: Realtime timestamp, in nanoseconds * @@ -109,6 +113,7 @@ struct kdbus_audit { * KDBUS_ITEM_TIMESTAMP */ struct kdbus_timestamp { + __u64 seqnum; __u64 monotonic_ns; __u64 realtime_ns; }; @@ -118,7 +123,7 @@ struct kdbus_timestamp { * @size: The size of the vector * @address: Memory address for memory addresses * @offset: Offset in the in-message payload memory, - * relative to the message head + * relative to the message head * * Attached to: * KDBUS_ITEM_PAYLOAD_VEC @@ -135,7 +140,7 @@ struct kdbus_vec { * struct kdbus_memfd - a kdbus memfd * @size: The memfd's size * @fd: The file descriptor number - * @__pad: Padding to make the struct aligned + * @__pad: Padding to ensure proper alignement and size * * Attached to: * KDBUS_ITEM_PAYLOAD_MEMFD @@ -164,7 +169,7 @@ struct kdbus_name { * @type: One of KDBUS_POLICY_ACCESS_* types * @bits: Access to grant. One of KDBUS_POLICY_* * @id: For KDBUS_POLICY_ACCESS_USER, the uid - * For KDBUS_POLICY_ACCESS_GROUP, the gid + * For KDBUS_POLICY_ACCESS_GROUP, the gid * * Embedded in: * struct kdbus_policy @@ -203,6 +208,7 @@ struct kdbus_policy { * @KDBUS_ITEM_BLOOM_SIZE: Desired bloom size, used by KDBUS_CMD_BUS_MAKE * @KDBUS_ITEM_DST_NAME: Destination's well-known name * @KDBUS_ITEM_MAKE_NAME: Name of namespace, bus, endpoint + * @KDBUS_ITEM_MEMFD_NAME: The human readable name of a memfd (debugging) * @_KDBUS_ITEM_POLICY_BASE: Start of policy items * @KDBUS_ITEM_POLICY_NAME: Policy in struct kdbus_policy * @KDBUS_ITEM_POLICY_ACCESS: Policy in struct kdbus_policy @@ -219,6 +225,7 @@ struct kdbus_policy { * @KDBUS_ITEM_CAPS: The process capabilities * @KDBUS_ITEM_SECLABEL: The security label * @KDBUS_ITEM_AUDIT: The audit IDs + * @KDBUS_ITEM_CONN_NAME: The connection's human-readable name (debugging) * @_KDBUS_ITEM_KERNEL_BASE: Start of kernel-generated message items * @KDBUS_ITEM_NAME_ADD: Notify in struct kdbus_notify_name_change * @KDBUS_ITEM_NAME_REMOVE: Notify in struct kdbus_notify_name_change @@ -239,12 +246,13 @@ enum kdbus_item_type { KDBUS_ITEM_BLOOM_SIZE, KDBUS_ITEM_DST_NAME, KDBUS_ITEM_MAKE_NAME, + KDBUS_ITEM_MEMFD_NAME, - _KDBUS_ITEM_POLICY_BASE = 0x400, + _KDBUS_ITEM_POLICY_BASE = 0x1000, KDBUS_ITEM_POLICY_NAME = _KDBUS_ITEM_POLICY_BASE, KDBUS_ITEM_POLICY_ACCESS, - _KDBUS_ITEM_ATTACH_BASE = 0x600, + _KDBUS_ITEM_ATTACH_BASE = 0x2000, KDBUS_ITEM_NAME = _KDBUS_ITEM_ATTACH_BASE, KDBUS_ITEM_ID, KDBUS_ITEM_TIMESTAMP, @@ -257,8 +265,9 @@ enum kdbus_item_type { KDBUS_ITEM_CAPS, KDBUS_ITEM_SECLABEL, KDBUS_ITEM_AUDIT, + KDBUS_ITEM_CONN_NAME, - _KDBUS_ITEM_KERNEL_BASE = 0x800, + _KDBUS_ITEM_KERNEL_BASE = 0x3000, KDBUS_ITEM_NAME_ADD = _KDBUS_ITEM_KERNEL_BASE, KDBUS_ITEM_NAME_REMOVE, KDBUS_ITEM_NAME_CHANGE, @@ -284,12 +293,12 @@ enum kdbus_item_type { * @name: KDBUS_ITEM_NAME * @memfd: KDBUS_ITEM_PAYLOAD_MEMFD * @name_change: KDBUS_ITEM_NAME_ADD - * KDBUS_ITEM_NAME_REMOVE - * KDBUS_ITEM_NAME_CHANGE + * KDBUS_ITEM_NAME_REMOVE + * KDBUS_ITEM_NAME_CHANGE * @id_change: KDBUS_ITEM_ID_ADD - * KDBUS_ITEM_ID_REMOVE + * KDBUS_ITEM_ID_REMOVE * @policy: KDBUS_ITEM_POLICY_NAME - * KDBUS_ITEM_POLICY_ACCESS + * KDBUS_ITEM_POLICY_ACCESS */ struct kdbus_item { __u64 size; @@ -317,16 +326,27 @@ struct kdbus_item { /** * enum kdbus_msg_flags - type of message * @KDBUS_MSG_FLAGS_EXPECT_REPLY: Expect a reply message, used for - * method calls. The userspace-supplied - * cookie identifies the message and the - * respective reply carries the cookie - * in cookie_reply + * method calls. The userspace-supplied + * cookie identifies the message and the + * respective reply carries the cookie + * in cookie_reply + * @KDBUS_MSG_FLAGS_SYNC_REPLY: Wait for destination connection to + * reply to this message. The + * KDBUS_CMD_MSG_SEND ioctl() will block + * until the reply is received, and + * offset_reply in struct kdbus_msg will + * yield the offset in the sender's pool + * where the reply can be found. + * This flag is only valid if + * @KDBUS_MSG_FLAGS_EXPECT_REPLY is set as + * well. * @KDBUS_MSG_FLAGS_NO_AUTO_START: Do not start a service, if the addressed - * name is not currently active + * name is not currently active */ enum kdbus_msg_flags { KDBUS_MSG_FLAGS_EXPECT_REPLY = 1 << 0, - KDBUS_MSG_FLAGS_NO_AUTO_START = 1 << 1, + KDBUS_MSG_FLAGS_SYNC_REPLY = 1 << 1, + KDBUS_MSG_FLAGS_NO_AUTO_START = 1 << 2, }; /** @@ -343,34 +363,76 @@ enum kdbus_payload_type { * struct kdbus_msg - the representation of a kdbus message * @size: Total size of the message * @flags: Message flags (KDBUS_MSG_FLAGS_*) + * @priority: Message queue priority value * @dst_id: 64-bit ID of the destination connection * @src_id: 64-bit ID of the source connection * @payload_type: Payload type (KDBUS_PAYLOAD_*) * @cookie: Userspace-supplied cookie, for the connection - * to identify its messages - * @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 + * to identify its messages * @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. + * If there is no reply, a kernel-generated message + * with an attached KDBUS_ITEM_REPLY_TIMEOUT item + * is sent to @src_id. + * @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 + * @offset_reply: If KDBUS_MSG_FLAGS_WAIT_FOR_REPLY, this field will + * contain the offset in the sender's pool where the + * reply is stored. * @items: A list of kdbus_items containing the message payload */ struct kdbus_msg { __u64 size; __u64 flags; + __s64 priority; __u64 dst_id; __u64 src_id; __u64 payload_type; __u64 cookie; union { - __u64 cookie_reply; __u64 timeout_ns; + __u64 cookie_reply; + __u64 offset_reply; }; struct kdbus_item items[0]; } __attribute__((aligned(8))); +/** + * enum kdbus_recv_flags - flags for de-queuing messages + * @KDBUS_RECV_PEEK: Return the next queued message without + * actually de-queuing it, and without installing + * any file descriptors or other resources. It is + * usually used to determine the activating + * connection of a bus name. + * @KDBUS_RECV_DROP: Drop and free the next queued message and all + * its resources without actually receiving it. + * @KDBUS_RECV_USE_PRIORITY: Only de-queue messages with the specified or + * higher priority (lowest values); if not set, + * the priority value is ignored. + */ +enum kdbus_recv_flags { + KDBUS_RECV_PEEK = 1 << 0, + KDBUS_RECV_DROP = 1 << 1, + KDBUS_RECV_USE_PRIORITY = 1 << 2, +}; + +/** + * struct kdbus_cmd_recv - struct to de-queue a buffered message + * @flags: KDBUS_RECV_* flags + * @priority: Minimum priority of the messages to de-queue. Lowest + * values have the highest priority. + * @offset: Returned offset in the pool where the message is + * stored. The user must use KDBUS_CMD_FREE to free + * the allocated memory. + * + * This struct is used with the KDBUS_CMD_MSG_RECV ioctl. + */ +struct kdbus_cmd_recv { + __u64 flags; + __s64 priority; + __u64 offset; +} __attribute__((aligned(8))); + /** * enum kdbus_policy_access_type - permissions of a policy record * @_KDBUS_POLICY_ACCESS_NULL: Uninitialized/invalid @@ -414,12 +476,12 @@ struct kdbus_cmd_policy { /** * enum kdbus_hello_flags - flags for struct kdbus_cmd_hello * @KDBUS_HELLO_ACCEPT_FD: The connection allows the receiving of - * any passed file descriptors + * 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 + * a well-know name for a process to be started + * when traffic arrives * @KDBUS_HELLO_MONITOR: Special-purpose connection to monitor - * bus traffic + * bus traffic */ enum kdbus_hello_flags { KDBUS_HELLO_ACCEPT_FD = 1 << 0, @@ -439,6 +501,7 @@ enum kdbus_hello_flags { * @KDBUS_ATTACH_CAPS: The process capabilities * @KDBUS_ATTACH_SECLABEL: The security label * @KDBUS_ATTACH_AUDIT: The audit IDs + * @KDBUS_ATTACH_CONN_NAME: The human-readable connection name */ enum kdbus_attach_flags { KDBUS_ATTACH_TIMESTAMP = 1 << 0, @@ -451,29 +514,29 @@ enum kdbus_attach_flags { KDBUS_ATTACH_CAPS = 1 << 7, KDBUS_ATTACH_SECLABEL = 1 << 8, KDBUS_ATTACH_AUDIT = 1 << 9, + KDBUS_ATTACH_CONN_NAME = 1 << 10, }; /** * struct kdbus_cmd_hello - struct to say hello to kdbus * @size: The total size of the structure * @conn_flags: Connection flags (KDBUS_HELLO_*). The kernel will - * return its capabilities in that field. + * return its capabilities in that field. * @attach_flags: Mask of metadata to attach to each message sent - * (KDBUS_ATTACH_*) + * (KDBUS_ATTACH_*) * @bus_flags: The flags field copied verbatim from the original - * KDBUS_CMD_BUS_MAKE ioctl. It's intended to be useful + * KDBUS_CMD_BUS_MAKE ioctl. It's intended to be useful * to do negotiation of features of the payload that is * transferred (kernel → userspace) * @id: The ID of this connection (kernel → userspace) * @bloom_size: The bloom filter size chosen by the owner - * (kernel → userspace) + * (kernel → userspace) * @pool_size: Size of the connection's buffer where the received - * messages are placed + * messages are placed * @id128: Unique 128-bit ID of the bus (kernel → userspace) * @items: A list of items * - * This struct is used with the KDBUS_CMD_HELLO ioctl. See the ioctl - * documentation for more information. + * This struct is used with the KDBUS_CMD_HELLO ioctl. */ struct kdbus_cmd_hello { __u64 size; @@ -530,8 +593,8 @@ enum kdbus_name_flags { * @size: The total size of the struct * @flags: Flags for a name entry (KDBUS_NAME_*) * @owner_id: The current owner of the name. For requests, - * privileged users may set this field to - * (de)register names on behalf of other connections. + * privileged users may set this field to + * (de)register names on behalf of other connections. * @conn_flags: The flags of the owning connection (KDBUS_HELLO_*) * @name: The well-known name * @@ -591,13 +654,13 @@ struct kdbus_name_list { * @size: The total size of the struct * @flags: KDBUS_ATTACH_* flags * @id: The 64-bit ID of the connection. If set to zero, passing - * @name is required. kdbus will look up the name to determine - * the ID in this case. + * @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 - * use KDBUS_CMD_FREE to free the allocated memory. + * kdbus_conn_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. + * 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 @@ -632,9 +695,9 @@ struct kdbus_conn_info { * struct kdbus_cmd_match - struct to add or remove matches * @size: The total size of the struct * @owner_id: Privileged users may (de)register matches on behalf - * of other peers + * of other peers * @cookie: Userspace supplied cookie. When removing, the cookie - * identifies the match to remove + * identifies the match to remove * @items: A list of items for additional information * * This structure is used with the KDBUS_CMD_ADD_MATCH and @@ -647,81 +710,95 @@ struct kdbus_cmd_match { struct kdbus_item items[0]; } __attribute__((aligned(8))); +/** + * struct kdbus_cmd_memfd_make - create a kdbus memfd + * @size: The total size of the struct + * @file_size: The initial file size + * @fd: The returned file descriptor number + * @__pad: Padding to ensure proper alignement + * @items: A list of items for additional information + * + * This structure is used with the KDBUS_CMD_MEMFD_NEW ioctl. + */ +struct kdbus_cmd_memfd_make { + __u64 size; + __u64 file_size; + int fd; + __u32 __pad; + struct kdbus_item items[0]; +} __attribute__((aligned(8))); + /** * enum kdbus_ioctl_type - Ioctl API * @KDBUS_CMD_BUS_MAKE: After opening the "control" device node, this - * command creates a new bus with the specified - * name. The bus is immediately shut down and - * cleaned up when the opened "control" device node - * is closed. + * command creates a new bus with the specified + * name. The bus is immediately shut down and + * cleaned up when the opened "control" device node + * is closed. * @KDBUS_CMD_NS_MAKE: Similar to KDBUS_CMD_BUS_MAKE, but it creates a - * new kdbus namespace. + * new kdbus namespace. * @KDBUS_CMD_EP_MAKE: Creates a new named special endpoint to talk to - * the bus. Such endpoints usually carry a more - * restrictive policy and grant restricted access - * to specific applications. + * the bus. Such endpoints usually carry a more + * restrictive policy and grant restricted access + * to specific applications. * @KDBUS_CMD_HELLO: By opening the bus device node a connection is - * created. After a HELLO the opened connection - * becomes an active peer on the bus. + * created. After a HELLO the opened connection + * becomes an active peer on the bus. * @KDBUS_CMD_BYEBYE: Disconnect a connection. If the connection's - * message list is empty, the calls succeeds, and - * the handle is rendered unusable. Otherwise, - * -EAGAIN is returned without any further side- - * effects. + * message list is empty, the calls succeeds, and + * the handle is rendered unusable. Otherwise, + * -EAGAIN is returned without any further side- + * effects. * @KDBUS_CMD_MSG_SEND: Send a message and pass data from userspace to - * the kernel. + * the kernel. * @KDBUS_CMD_MSG_RECV: Receive a message from the kernel which is - * placed in the receiver's pool. + * placed in the receiver's pool. * @KDBUS_CMD_FREE: Release the allocated memory in the receiver's - * pool. - * @KDBUS_CMD_DROP: Drop and free the next queued message and all - * its ressources without actually receiveing it. - * @KDBUS_CMD_SRC: Return the sender's connection ID of the next - * queued message. + * pool. * @KDBUS_CMD_NAME_ACQUIRE: Request a well-known bus name to associate with - * the connection. Well-known names are used to - * address a peer on the bus. + * the connection. Well-known names are used to + * address a peer on the bus. * @KDBUS_CMD_NAME_RELEASE: Release a well-known name the connection - * currently owns. + * currently owns. * @KDBUS_CMD_NAME_LIST: Retrieve the list of all currently registered - * well-known and unique names. + * well-known and unique names. * @KDBUS_CMD_CONN_INFO: Retrieve credentials and properties of the - * initial creator of the connection. The data was - * stored at registration time and does not - * necessarily represent the connected process or - * the actual state of the process. + * initial creator of the connection. The data was + * stored at registration time and does not + * necessarily represent the connected process or + * the actual state of the process. * @KDBUS_CMD_MATCH_ADD: Install a match which broadcast messages should - * be delivered to the connection. + * be delivered to the connection. * @KDBUS_CMD_MATCH_REMOVE: Remove a current match for broadcast messages. * @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. + * restrict the access for endpoints created with + * KDBUS_CMD_EP_MAKE. * @KDBUS_CMD_MEMFD_NEW: Return a new file descriptor which provides an - * anonymous shared memory file and which can be - * used to pass around larger chunks of data. - * Kdbus memfd files can be sealed, which allows - * the receiver to trust the data it has received. - * Kdbus memfd files expose only very limited - * operations, they can be mmap()ed, seek()ed, - * (p)read(v)() and (p)write(v)(); most other - * common file operations are not implemented. - * Special caution needs to be taken with - * read(v)()/write(v)() on a shared file; the - * underlying file position is always shared - * between all users of the file and race against - * each other, pread(v)()/pwrite(v)() avoid these - * issues. + * anonymous shared memory file and which can be + * used to pass around larger chunks of data. + * Kdbus memfd files can be sealed, which allows + * the receiver to trust the data it has received. + * Kdbus memfd files expose only very limited + * operations, they can be mmap()ed, seek()ed, + * (p)read(v)() and (p)write(v)(); most other + * common file operations are not implemented. + * Special caution needs to be taken with + * read(v)()/write(v)() on a shared file; the + * underlying file position is always shared + * between all users of the file and race against + * each other, pread(v)()/pwrite(v)() avoid these + * issues. * @KDBUS_CMD_MEMFD_SIZE_GET: Return the size of the underlying file, which - * changes with write(). + * changes with write(). * @KDBUS_CMD_MEMFD_SIZE_SET: Truncate the underlying file to the specified - * size. + * size. * @KDBUS_CMD_MEMFD_SEAL_GET: Return the state of the file sealing. * @KDBUS_CMD_MEMFD_SEAL_SET: Seal or break a seal of the file. Only files - * which are not shared with other processes and - * which are currently not mapped can be sealed. - * The current process needs to be the one and - * single owner of the file, the sealing cannot - * be changed as long as the file is shared. + * which are not shared with other processes and + * which are currently not mapped can be sealed. + * The current process needs to be the one and + * single owner of the file, the sealing cannot + * be changed as long as the file is shared. */ enum kdbus_ioctl_type { KDBUS_CMD_BUS_MAKE = _IOW (KDBUS_IOC_MAGIC, 0x00, struct kdbus_cmd_make), @@ -732,10 +809,8 @@ enum kdbus_ioctl_type { KDBUS_CMD_BYEBYE = _IO (KDBUS_IOC_MAGIC, 0x31), KDBUS_CMD_MSG_SEND = _IOW (KDBUS_IOC_MAGIC, 0x40, struct kdbus_msg), - KDBUS_CMD_MSG_RECV = _IOR (KDBUS_IOC_MAGIC, 0x41, __u64 *), + KDBUS_CMD_MSG_RECV = _IOWR(KDBUS_IOC_MAGIC, 0x41, struct kdbus_cmd_recv), KDBUS_CMD_FREE = _IOW (KDBUS_IOC_MAGIC, 0x42, __u64 *), - KDBUS_CMD_MSG_DROP = _IO (KDBUS_IOC_MAGIC, 0x43), - KDBUS_CMD_MSG_SRC = _IOR (KDBUS_IOC_MAGIC, 0x44, __u64 *), KDBUS_CMD_NAME_ACQUIRE = _IOWR(KDBUS_IOC_MAGIC, 0x50, struct kdbus_cmd_name), KDBUS_CMD_NAME_RELEASE = _IOW (KDBUS_IOC_MAGIC, 0x51, struct kdbus_cmd_name), @@ -748,75 +823,78 @@ enum kdbus_ioctl_type { KDBUS_CMD_EP_POLICY_SET = _IOW (KDBUS_IOC_MAGIC, 0x80, struct kdbus_cmd_policy), - KDBUS_CMD_MEMFD_NEW = _IOR (KDBUS_IOC_MAGIC, 0x90, int *), - KDBUS_CMD_MEMFD_SIZE_GET = _IOR (KDBUS_IOC_MAGIC, 0x91, __u64 *), - KDBUS_CMD_MEMFD_SIZE_SET = _IOW (KDBUS_IOC_MAGIC, 0x92, __u64 *), - KDBUS_CMD_MEMFD_SEAL_GET = _IOR (KDBUS_IOC_MAGIC, 0x93, int *), - KDBUS_CMD_MEMFD_SEAL_SET = _IO (KDBUS_IOC_MAGIC, 0x94), + KDBUS_CMD_MEMFD_NEW = _IOWR(KDBUS_IOC_MAGIC, 0xc0, struct kdbus_cmd_memfd_make), + KDBUS_CMD_MEMFD_SIZE_GET = _IOR (KDBUS_IOC_MAGIC, 0xc1, __u64 *), + KDBUS_CMD_MEMFD_SIZE_SET = _IOW (KDBUS_IOC_MAGIC, 0xc2, __u64 *), + KDBUS_CMD_MEMFD_SEAL_GET = _IOR (KDBUS_IOC_MAGIC, 0xc3, int *), + KDBUS_CMD_MEMFD_SEAL_SET = _IO (KDBUS_IOC_MAGIC, 0xc4), }; /* * errno - api error codes * @E2BIG: A message contains too many records or items. * @EADDRINUSE: A well-known bus name is already taken by another - * connection. + * connection. * @EADDRNOTAVAIL: A message flagged not to activate a service, addressed - * a service which is not currently running. + * a service which is not currently running. * @EAGAIN: No messages are queued at the moment. * @EBADF: File descriptors passed with the message are not valid. * @EBADFD: A bus connection is in a corrupted state. * @EBADMSG: Passed data contains a combination of conflicting or - * inconsistent types. + * inconsistent types. * @EBUSY: The user tried to say BYEBYE to a connection, but the - * connection had a non-empty message list. + * connection had a non-empty message list. * @ECONNRESET: A connection is shut down, no further operations are - * possible. + * possible. * @ECOMM: A peer does not accept the file descriptors addressed - * to it. + * to it. * @EDESTADDRREQ: The well-known bus name is required but missing. * @EDOM: The size of data does not match the expectations. Used - * for the size of the bloom filter bit field. + * for the size of the bloom filter bit field. * @EEXIST: A requested namespace, bus or endpoint with the same - * name already exists. A specific data type, which is - * only expected once, is provided multiple times. + * name already exists. A specific data type, which is + * only expected once, is provided multiple times. * @EFAULT: The supplied memory could not be accessed, or the data - * is not properly aligned. + * is not properly aligned. * @EINVAL: The provided data does not match its type or other - * expectations, like a string which is not NUL terminated, - * or a string length that points behind the first - * \0-byte in the string. + * expectations, like a string which is not NUL terminated, + * or a string length that points behind the first + * \0-byte in the string. * @EMEDIUMTYPE: A file descriptor which is not a kdbus memfd was - * refused to send as KDBUS_MSG_PAYLOAD_MEMFD. + * refused to send as KDBUS_MSG_PAYLOAD_MEMFD. * @EMFILE: Too many file descriptors have been supplied with a - * message. + * message. + * @EMLINK: Too many requests from this connection to other peers + * are queued and waiting for a reply * @EMSGSIZE: The supplied data is larger than the allowed maximum - * size. + * size. * @ENAMETOOLONG: The requested name is larger than the allowed maximum - * size. + * size. * @ENOBUFS: There is no space left for the submitted data to fit - * into the receiver's pool. + * into the receiver's pool. * @ENOENT: The name to query information about is currently not on * the bus. * @ENOMEM: Out of memory. + * @ENOMSG: The queue is not empty, but no message with a matching + * priority is currently queued. * @ENOSYS: The requested functionality is not available. - * @ENOTCONN: The addressed peer is not an active connection. * @ENOTSUPP: The feature negotiation failed, a not supported feature - * was requested, or an unknown item type was received. + * was requested, or an unknown item type was received. * @ENOTTY: An unknown ioctl command was received. * @ENOTUNIQ: A specific data type was addressed to a broadcast - * address, but only direct addresses support this kind of - * data. + * address, but only direct addresses support this kind of + * data. * @ENXIO: A unique address does not exist, or an offset in the - * receiver's pool does not represent a queued message. + * receiver's pool does not represent a queued message. * @EPERM: The policy prevented an operation. The requested - * resource is owned by another entity. + * resource is owned by another entity. * @ESHUTDOWN: A namespace or endpoint is currently shutting down; - * no further operations will be possible. + * no further operations will be possible. * @ESRCH: A requested well-known bus name is not found. * @ETXTBSY: A kdbus memfd file cannot be sealed or the seal removed, - * because it is shared with other processes or still - * mmap()ed. + * because it is shared with other processes or still + * mmap()ed. * @EXFULL: The size limits in the pool are reached, no data of - * the size tried to submit can be queued. + * the size tried to submit can be queued. */ #endif