kdbus.h revision a2243d548830d2aff6b768a0b47a0f0a513012a5
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * Copyright (C) 2013-2014 Kay Sievers
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * Copyright (C) 2013-2014 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flykt * Copyright (C) 2013-2014 Linux Foundation
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * Copyright (C) 2013-2014 Lennart Poettering
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * Copyright (C) 2013-2014 Daniel Mack <daniel@zonque.org>
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * Copyright (C) 2013-2014 David Herrmann <dh.herrmann@gmail.com>
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * kdbus is free software; you can redistribute it and/or modify it under
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * the terms of the GNU Lesser General Public License as published by the
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * Free Software Foundation; either version 2.1 of the License, or (at
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * your option) any later version.
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * "Everything should be made as simple as possible, but not simpler."
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * -- Albert Einstein
3ffd4af22052963e7a29431721ee204e634bea75Lennart Poettering * struct kdbus_notify_id_change - name registry change message
c601ebf79f0c54be14d3c16f0f484c0335cdeec4Tom Gundersen * @id: New or former owner of the name
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering * @flags: flags field from KDBUS_HELLO_*
8b43440b7ef4b81c69c31de7ff820dc07a780254Lennart Poettering * Sent from kernel to userspace when the owner or activator of
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering * a well-known name changes.
76253e73f9c9c24fec755e485516f3b55d0707b4Dan Williams * Attached to:
76253e73f9c9c24fec755e485516f3b55d0707b4Dan Williams * KDBUS_ITEM_ID_ADD
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * KDBUS_ITEM_ID_REMOVE
76253e73f9c9c24fec755e485516f3b55d0707b4Dan Williams * struct kdbus_notify_name_change - name registry change message
76253e73f9c9c24fec755e485516f3b55d0707b4Dan Williams * @old_id: ID and flags of former owner of a name
76253e73f9c9c24fec755e485516f3b55d0707b4Dan Williams * @new_id: ID and flags of new owner of a name
f12abb48fc510b8b349c05e35ba048134debaf25Patrik Flykt * @name: Well-known name
346e13a25dc6f76d3bc9d8decd40dc4782b02d2aPatrik Flykt * Sent from kernel to userspace when the owner or activator of
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * a well-known name changes.
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * Attached to:
da6fe470e17fa02f3adedc779585caf8669252bdPatrik Flykt * KDBUS_ITEM_NAME_ADD
da6fe470e17fa02f3adedc779585caf8669252bdPatrik Flykt * KDBUS_ITEM_NAME_REMOVE
da6fe470e17fa02f3adedc779585caf8669252bdPatrik Flykt * KDBUS_ITEM_NAME_CHANGE
66eac1201a9c1596f5901f8dbbf24bda7e350878Dan Williams * struct kdbus_creds - process credentials
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * @uid: User ID
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * @gid: Group ID
da6fe470e17fa02f3adedc779585caf8669252bdPatrik Flykt * @pid: Process ID
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517Beniamino Galvani * @tid: Thread ID
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517Beniamino Galvani * @starttime: Starttime of the process
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517Beniamino Galvani * The starttime of the process PID. This is useful to detect PID overruns
da6fe470e17fa02f3adedc779585caf8669252bdPatrik Flykt * from the client side. i.e. if you use the PID to look something up in
da6fe470e17fa02f3adedc779585caf8669252bdPatrik Flykt * /proc/$PID/ you can afterwards check the starttime field of it, to ensure
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * you didn't run into a PID overrun.
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * Attached to:
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * KDBUS_ITEM_CREDS
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * struct kdbus_audit - audit information
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @sessionid: The audit session ID
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @loginuid: The audit login uid
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * Attached to:
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * KDBUS_ITEM_AUDIT
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * struct kdbus_timestamp
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @seqnum: Global per-domain message sequence number
3f0c075f8ef3344da5a6bda524540201f9204e61Patrik Flykt * @monotonic_ns: Monotonic timestamp, in nanoseconds
4afd3348c7506dd1d36305b7bcb9feb8952b9d6bLennart Poettering * @realtime_ns: Realtime timestamp, in nanoseconds
c3e2adeaba8e043caed0ef139eeaea016bd152d0Patrik Flykt * Attached to:
c3e2adeaba8e043caed0ef139eeaea016bd152d0Patrik Flykt * KDBUS_ITEM_TIMESTAMP
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * struct kdbus_vec - I/O vector for kdbus payload items
0ae0e5cd96813bacad43a39920a043d8d20a67dbLennart Poettering * @size: The size of the vector
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * @address: Memory address of data buffer
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * @offset: Offset in the in-message payload memory,
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * relative to the message head
d7c9c21f18704580f66a1ce73fb6b506fdf40732Patrik Flykt * Attached to:
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * KDBUS_ITEM_PAYLOAD_VEC, KDBUS_ITEM_PAYLOAD_OFF
c601ebf79f0c54be14d3c16f0f484c0335cdeec4Tom Gundersen * struct kdbus_bloom_parameter - bus-wide bloom parameters
c601ebf79f0c54be14d3c16f0f484c0335cdeec4Tom Gundersen * @size: Size of the bit field in bytes (m / 8)
c601ebf79f0c54be14d3c16f0f484c0335cdeec4Tom Gundersen * @n_hash: Number of hash functions used (k)
0ae0e5cd96813bacad43a39920a043d8d20a67dbLennart Poettering * struct kdbus_bloom_filter - bloom filter containing n elements
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * @generation: Generation of the element set in the filter
76253e73f9c9c24fec755e485516f3b55d0707b4Dan Williams * @data: Bit field, multiple of 8 bytes
76253e73f9c9c24fec755e485516f3b55d0707b4Dan Williams * struct kdbus_memfd - a kdbus memfd
76253e73f9c9c24fec755e485516f3b55d0707b4Dan Williams * @size: The memfd's size
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * @fd: The file descriptor number
76253e73f9c9c24fec755e485516f3b55d0707b4Dan Williams * @__pad: Padding to ensure proper alignment and size
76253e73f9c9c24fec755e485516f3b55d0707b4Dan Williams * Attached to:
76253e73f9c9c24fec755e485516f3b55d0707b4Dan Williams * KDBUS_ITEM_PAYLOAD_MEMFD
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * struct kdbus_name - a registered well-known name with its flags
0ae0e5cd96813bacad43a39920a043d8d20a67dbLennart Poettering * @flags: Flags from KDBUS_NAME_*
cc22955cfefb4bd6e7a135f1ec95fb5a07ba9ce3Thomas Haller * @name: Well-known name
0ae0e5cd96813bacad43a39920a043d8d20a67dbLennart Poettering * Attached to:
cc22955cfefb4bd6e7a135f1ec95fb5a07ba9ce3Thomas Haller * KDBUS_ITEM_NAME
66eac1201a9c1596f5901f8dbbf24bda7e350878Dan Williams * struct kdbus_policy_access - policy access item
66eac1201a9c1596f5901f8dbbf24bda7e350878Dan Williams * @type: One of KDBUS_POLICY_ACCESS_* types
66eac1201a9c1596f5901f8dbbf24bda7e350878Dan Williams * @access: Access to grant
d7c9c21f18704580f66a1ce73fb6b506fdf40732Patrik Flykt * @id: For KDBUS_POLICY_ACCESS_USER, the uid
d7c9c21f18704580f66a1ce73fb6b506fdf40732Patrik Flykt * For KDBUS_POLICY_ACCESS_GROUP, the gid
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * enum kdbus_item_type - item types to chain data in a list
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * @_KDBUS_ITEM_NULL: Uninitialized/invalid
764aad6258eec3bd4ae62ea341ea507bd69ce628Tom Gundersen * @_KDBUS_ITEM_USER_BASE: Start of user items
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * @KDBUS_ITEM_PAYLOAD_VEC: Vector to data
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * @KDBUS_ITEM_PAYLOAD_OFF: Data at returned offset to message head
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * @KDBUS_ITEM_PAYLOAD_MEMFD: Data as sealed memfd
764aad6258eec3bd4ae62ea341ea507bd69ce628Tom Gundersen * @KDBUS_ITEM_FDS: Attached file descriptors
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * @KDBUS_ITEM_BLOOM_PARAMETER: Bus-wide bloom parameters, used with
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * KDBUS_CMD_BUS_MAKE, carries a
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * struct kdbus_bloom_parameter
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * @KDBUS_ITEM_BLOOM_FILTER: Bloom filter carried with a message, used to
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * match against a bloom mask of a connection,
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * carries a struct kdbus_bloom_filter
fe4b2156256c5bdf52341576571ce9f095d9f085Tom Gundersen * @KDBUS_ITEM_BLOOM_MASK: Bloom mask used to match against a message's
764aad6258eec3bd4ae62ea341ea507bd69ce628Tom Gundersen * bloom filter
ebe207d4acf38165adbc45298662982eecdb9e9fTom Gundersen * @KDBUS_ITEM_DST_NAME: Destination's well-known name
764aad6258eec3bd4ae62ea341ea507bd69ce628Tom Gundersen * @KDBUS_ITEM_MAKE_NAME: Name of domain, bus, endpoint
66eac1201a9c1596f5901f8dbbf24bda7e350878Dan Williams * @KDBUS_ITEM_ATTACH_FLAGS: Attach-flags, used for updating which metadata
66eac1201a9c1596f5901f8dbbf24bda7e350878Dan Williams * a connection subscribes to
66eac1201a9c1596f5901f8dbbf24bda7e350878Dan Williams * @_KDBUS_ITEM_ATTACH_BASE: Start of metadata attach items
66eac1201a9c1596f5901f8dbbf24bda7e350878Dan Williams * @KDBUS_ITEM_NAME: Well-know name with flags
04c0136989b7eb896bfb0fb176e11233d69e1453Lennart Poettering * @KDBUS_ITEM_ID: Connection ID
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_TIMESTAMP: Timestamp
d7c9c21f18704580f66a1ce73fb6b506fdf40732Patrik Flykt * @KDBUS_ITEM_CREDS: Process credential
d7c9c21f18704580f66a1ce73fb6b506fdf40732Patrik Flykt * @KDBUS_ITEM_AUXGROUPS: Auxiliary process groups
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_PID_COMM: Process ID "comm" identifier
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_TID_COMM: Thread ID "comm" identifier
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_EXE: The path of the executable
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_CMDLINE: The process command line
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_CGROUP: The croup membership
04c0136989b7eb896bfb0fb176e11233d69e1453Lennart Poettering * @KDBUS_ITEM_CAPS: The process capabilities
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_SECLABEL: The security label
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_AUDIT: The audit IDs
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_CONN_NAME: The connection's human-readable name (debugging)
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @_KDBUS_ITEM_POLICY_BASE: Start of policy items
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_POLICY_ACCESS: Policy access block
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @_KDBUS_ITEM_KERNEL_BASE: Start of kernel-generated message items
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_NAME_ADD: Notify in struct kdbus_notify_name_change
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ITEM_NAME_REMOVE: Notify in struct kdbus_notify_name_change
0ae0e5cd96813bacad43a39920a043d8d20a67dbLennart Poettering * @KDBUS_ITEM_NAME_CHANGE: Notify in struct kdbus_notify_name_change
da6fe470e17fa02f3adedc779585caf8669252bdPatrik Flykt * @KDBUS_ITEM_ID_ADD: Notify in struct kdbus_notify_id_change
da6fe470e17fa02f3adedc779585caf8669252bdPatrik Flykt * @KDBUS_ITEM_ID_REMOVE: Notify in struct kdbus_notify_id_change
da6fe470e17fa02f3adedc779585caf8669252bdPatrik Flykt * @KDBUS_ITEM_REPLY_TIMEOUT: Timeout has been reached
da6fe470e17fa02f3adedc779585caf8669252bdPatrik Flykt * @KDBUS_ITEM_REPLY_DEAD: Destination died
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517Beniamino Galvani KDBUS_ITEM_PAYLOAD_VEC = _KDBUS_ITEM_USER_BASE,
3098562c9236fe0bd3e7d950b6c53907304d277fTom Gundersen KDBUS_ITEM_POLICY_ACCESS = _KDBUS_ITEM_POLICY_BASE,
f89087272b5561c9a3fc9d6a4e2a09f75f688fa7Thomas Haller * struct kdbus_item - chain of data blocks
4e3e6679e8f73b83d38e4b20d8b025e12991d1cbPatrik Flykt * @size: Overall data record size
f89087272b5561c9a3fc9d6a4e2a09f75f688fa7Thomas Haller * @type: Kdbus_item type of data
f89087272b5561c9a3fc9d6a4e2a09f75f688fa7Thomas Haller * @data: Generic bytes
f89087272b5561c9a3fc9d6a4e2a09f75f688fa7Thomas Haller * @data32: Generic 32 bit array
f89087272b5561c9a3fc9d6a4e2a09f75f688fa7Thomas Haller * @data64: Generic 64 bit array
f89087272b5561c9a3fc9d6a4e2a09f75f688fa7Thomas Haller * @str: Generic string
f89087272b5561c9a3fc9d6a4e2a09f75f688fa7Thomas Haller * @id: Connection ID
f89087272b5561c9a3fc9d6a4e2a09f75f688fa7Thomas Haller * @vec: KDBUS_ITEM_PAYLOAD_VEC
4e3e6679e8f73b83d38e4b20d8b025e12991d1cbPatrik Flykt * @creds: KDBUS_ITEM_CREDS
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @audit: KDBUS_ITEM_AUDIT
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @timestamp: KDBUS_ITEM_TIMESTAMP
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @name: KDBUS_ITEM_NAME
c806ffb9592fa9a2b13a1f9f9be4c77cd5b211aaZbigniew Jędrzejewski-Szmek * @bloom_parameter: KDBUS_ITEM_BLOOM_PARAMETER
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @bloom_filter: KDBUS_ITEM_BLOOM_FILTER
c3e2adeaba8e043caed0ef139eeaea016bd152d0Patrik Flykt * @memfd: KDBUS_ITEM_PAYLOAD_MEMFD
346e13a25dc6f76d3bc9d8decd40dc4782b02d2aPatrik Flykt * @name_change: KDBUS_ITEM_NAME_ADD
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * KDBUS_ITEM_NAME_REMOVE
f12abb48fc510b8b349c05e35ba048134debaf25Patrik Flykt * KDBUS_ITEM_NAME_CHANGE
f12abb48fc510b8b349c05e35ba048134debaf25Patrik Flykt * @id_change: KDBUS_ITEM_ID_ADD
f12abb48fc510b8b349c05e35ba048134debaf25Patrik Flykt * KDBUS_ITEM_ID_REMOVE
f12abb48fc510b8b349c05e35ba048134debaf25Patrik Flykt * @policy: KDBUS_ITEM_POLICY_ACCESS
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * enum kdbus_msg_flags - type of message
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @KDBUS_MSG_FLAGS_EXPECT_REPLY: Expect a reply message, used for
346e13a25dc6f76d3bc9d8decd40dc4782b02d2aPatrik Flykt * method calls. The userspace-supplied
346e13a25dc6f76d3bc9d8decd40dc4782b02d2aPatrik Flykt * cookie identifies the message and the
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * respective reply carries the cookie
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * in cookie_reply
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @KDBUS_MSG_FLAGS_SYNC_REPLY: Wait for destination connection to
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * reply to this message. The
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * KDBUS_CMD_MSG_SEND ioctl() will block
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * until the reply is received, and
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * offset_reply in struct kdbus_msg will
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * yield the offset in the sender's pool
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * where the reply can be found.
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * This flag is only valid if
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @KDBUS_MSG_FLAGS_EXPECT_REPLY is set as
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_MSG_FLAGS_NO_AUTO_START: Do not start a service, if the addressed
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * name is not currently active
926695f1b5f9395eeb416cc2f478a9cf75fdbeb4Thomas Hindoe Paaboel Andersen * enum kdbus_payload_type - type of payload carried by message
926695f1b5f9395eeb416cc2f478a9cf75fdbeb4Thomas Hindoe Paaboel Andersen * @KDBUS_PAYLOAD_KERNEL: Kernel-generated simple message
ed6ee21953dac9c78383da00bc4514ece6b75ab5Patrik Flykt * @KDBUS_PAYLOAD_DBUS: D-Bus marshalling "DBusDBus"
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * struct kdbus_msg - the representation of a kdbus message
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @size: Total size of the message
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @flags: Message flags (KDBUS_MSG_FLAGS_*)
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @priority: Message queue priority value
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @dst_id: 64-bit ID of the destination connection
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @src_id: 64-bit ID of the source connection
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * @payload_type: Payload type (KDBUS_PAYLOAD_*)
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517Beniamino Galvani * @cookie: Userspace-supplied cookie, for the connection
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * to identify its messages
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * @timeout_ns: The time to wait for a message reply from the peer.
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * If there is no reply, a kernel-generated message
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * with an attached KDBUS_ITEM_REPLY_TIMEOUT item
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * is sent to @src_id.
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * @cookie_reply: A reply to the requesting message with the same
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * cookie. The requesting connection can match its
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * request and the reply with this value
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @offset_reply: If KDBUS_MSG_FLAGS_EXPECT_REPLY, this field will
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * contain the offset in the sender's pool where the
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * reply is stored.
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @items: A list of kdbus_items containing the message payload
da6fe470e17fa02f3adedc779585caf8669252bdPatrik Flykt * enum kdbus_recv_flags - flags for de-queuing messages
cc22955cfefb4bd6e7a135f1ec95fb5a07ba9ce3Thomas Haller * @KDBUS_RECV_PEEK: Return the next queued message without
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517Beniamino Galvani * actually de-queuing it, and without installing
66eac1201a9c1596f5901f8dbbf24bda7e350878Dan Williams * any file descriptors or other resources. It is
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * usually used to determine the activating
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * connection of a bus name.
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * @KDBUS_RECV_DROP: Drop and free the next queued message and all
346e13a25dc6f76d3bc9d8decd40dc4782b02d2aPatrik Flykt * its resources without actually receiving it.
346e13a25dc6f76d3bc9d8decd40dc4782b02d2aPatrik Flykt * @KDBUS_RECV_USE_PRIORITY: Only de-queue messages with the specified or
346e13a25dc6f76d3bc9d8decd40dc4782b02d2aPatrik Flykt * higher priority (lowest values); if not set,
346e13a25dc6f76d3bc9d8decd40dc4782b02d2aPatrik Flykt * the priority value is ignored.
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * struct kdbus_cmd_recv - struct to de-queue a buffered message
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @flags: KDBUS_RECV_* flags
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @priority: Minimum priority of the messages to de-queue. Lowest
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * values have the highest priority.
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * @offset: Returned offset in the pool where the message is
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * stored. The user must use KDBUS_CMD_FREE to free
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * the allocated memory.
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt * This struct is used with the KDBUS_CMD_MSG_RECV ioctl.
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * struct kdbus_cmd_cancel - struct to cancel a synchronously pending message
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * @cookie The cookie of the pending message
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * @flags Flags for the free command. Currently unused.
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * This struct is used with the KDBUS_CMD_CANCEL ioctl.
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * struct kdbus_cmd_free - struct to free a slice of memory in the pool
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * @offset The offset of the memory slice, as returned by other
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * @flags Flags for the free command. Currently unused.
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * This struct is used with the KDBUS_CMD_FREE ioctl.
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * enum kdbus_policy_access_type - permissions of a policy record
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * @_KDBUS_POLICY_ACCESS_NULL: Uninitialized/invalid
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * @KDBUS_POLICY_ACCESS_USER: Grant access to a uid
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * @KDBUS_POLICY_ACCESS_GROUP: Grant access to gid
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_POLICY_ACCESS_WORLD: World-accessible
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * enum kdbus_policy_access_flags - mode flags
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @KDBUS_POLICY_OWN: Allow to own a well-known name
10c9ce615d98e125bc520efa94aebaef250a4061David Herrmann * Implies KDBUS_POLICY_TALK and KDBUS_POLICY_SEE
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_POLICY_TALK: Allow communication to a well-known name
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * Implies KDBUS_POLICY_SEE
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @KDBUS_POLICY_SEE: Allow to see a well-known name
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * enum kdbus_hello_flags - flags for struct kdbus_cmd_hello
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_HELLO_ACCEPT_FD: The connection allows the reception of
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * any passed file descriptors
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_HELLO_ACTIVATOR: Special-purpose connection which registers
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * a well-know name for a process to be started
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * when traffic arrives
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_HELLO_POLICY_HOLDER: Special-purpose connection which registers
4b4923e65423e60d755841b5b264730e8f3deab3Tom Gundersen * policy entries for a name. The provided name
5e91345094a9e983e7abb2313334e7808bcd2cc2Tom Gundersen * is not activated and not registered with the
513a6fa8679510ea1b55967bdb482dd5f8a39f21Ronny Chevalier * name database, it only allows unprivileged
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * connections to aquire a name, talk or discover
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_HELLO_MONITOR: Special-purpose connection to monitor
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * bus traffic
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * enum kdbus_attach_flags - flags for metadata attachments
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ATTACH_TIMESTAMP: Timestamp
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_ATTACH_CREDS: Credentials
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_ATTACH_AUXGROUPS: Auxiliary groups
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * @KDBUS_ATTACH_NAMES: Well-known names
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * @KDBUS_ATTACH_COMM_TID: The "comm" process identifier of the TID
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * @KDBUS_ATTACH_COMM_PID: The "comm" process identifier of the PID
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * @KDBUS_ATTACH_EXE: The path of the executable
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * @KDBUS_ATTACH_CMDLINE: The process command line
7246333cb803b03440d3bd0bdaa233564d09b5aePatrik Flykt * @KDBUS_ATTACH_CGROUP: The croup membership
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_ATTACH_CAPS: The process capabilities
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_ATTACH_SECLABEL: The security label
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_ATTACH_AUDIT: The audit IDs
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_ATTACH_CONN_NAME: The human-readable connection name
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @_KDBUS_ATTACH_ALL: All of the above
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * struct kdbus_cmd_hello - struct to say hello to kdbus
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @size: The total size of the structure
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @conn_flags: Connection flags (KDBUS_HELLO_*).
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @attach_flags: Mask of metadata to attach to each message sent
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * (KDBUS_ATTACH_*)
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @bus_flags: The flags field copied verbatim from the original
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * KDBUS_CMD_BUS_MAKE ioctl. It's intended to be useful
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * to do negotiation of features of the payload that is
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * transferred (kernel → userspace)
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @id: The ID of this connection (kernel → userspace)
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @pool_size: Size of the connection's buffer where the received
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * messages are placed
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * @bloom: The bloom properties of the bus, specified
3dc34fcc97b41f8b7b019027225b121dfbb9871dPatrik Flykt * by the bus creator (kernel → userspace)
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @id128: Unique 128-bit ID of the bus (kernel → userspace)
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt * @items: A list of items
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * This struct is used with the KDBUS_CMD_HELLO ioctl.
346e13a25dc6f76d3bc9d8decd40dc4782b02d2aPatrik Flykt * enum kdbus_make_flags - Flags for KDBUS_CMD_{BUS,EP,NS}_MAKE
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_MAKE_ACCESS_GROUP: Make the device node group-accessible
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_MAKE_ACCESS_WORLD: Make the device node world-accessible
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * struct kdbus_cmd_make - struct to make a bus, an endpoint or a domain
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @size: The total size of the struct
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @flags: Properties for the bus/ep/domain to create
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @items: Items describing details
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * This structure is used with the KDBUS_CMD_BUS_MAKE, KDBUS_CMD_ENDPOINT_MAKE
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * and KDBUS_CMD_DOMAIN_MAKE ioctls.
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * enum kdbus_name_flags - properties of a well-known name
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_NAME_REPLACE_EXISTING: Try to replace name of other connections
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_NAME_ALLOW_REPLACEMENT: Allow the replacement of the name
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_NAME_QUEUE: Name should be queued if busy
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_NAME_IN_QUEUE: Name is queued
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_NAME_ACTIVATOR: Name is owned by a activator connection
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * struct kdbus_cmd_name - struct to describe a well-known name
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @size: The total size of the struct
fa94c34b083b5b4019975624453e53d0cbad2a5dTom Gundersen * @flags: Flags for a name entry (KDBUS_NAME_*)
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @owner_id: The current owner of the name
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @conn_flags: The flags of the owning connection (KDBUS_HELLO_*)
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @items: Item list, containing the well-known name as
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * KDBUS_ITEM_NAME
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * This structure is used with the KDBUS_CMD_NAME_ACQUIRE ioctl.
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * enum kdbus_name_list_flags - what to include into the returned list
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_NAME_LIST_UNIQUE: All active connections
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_NAME_LIST_NAMES: All known well-known names
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_NAME_LIST_ACTIVATORS: All activator connections
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * @KDBUS_NAME_LIST_QUEUED: All queued-up names
f12abb48fc510b8b349c05e35ba048134debaf25Patrik Flykt * struct kdbus_cmd_name_list - request a list of name entries
cfb5b3805759e63dc5e0cae6e92e1df885b5c5b6Tom Gundersen * @flags: Flags for the query (KDBUS_NAME_LIST_*)
cfb5b3805759e63dc5e0cae6e92e1df885b5c5b6Tom Gundersen * @offset: The returned offset in the caller's pool buffer.
cfb5b3805759e63dc5e0cae6e92e1df885b5c5b6Tom Gundersen * The user must use KDBUS_CMD_FREE to free the
f12abb48fc510b8b349c05e35ba048134debaf25Patrik Flykt * allocated memory.
f12abb48fc510b8b349c05e35ba048134debaf25Patrik Flykt * This structure is used with the KDBUS_CMD_NAME_LIST ioctl.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * struct kdbus_name_list - information returned by KDBUS_CMD_NAME_LIST
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @size: The total size of the structure
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @names: A list of names
44481a8b537839cd9ffead4d261491641f5b5260Zbigniew Jędrzejewski-Szmek * Note that the user is responsible for freeing the allocated memory with
44481a8b537839cd9ffead4d261491641f5b5260Zbigniew Jędrzejewski-Szmek * the KDBUS_CMD_FREE ioctl.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * struct kdbus_cmd_conn_info - struct used for KDBUS_CMD_CONN_INFO ioctl
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @size: The total size of the struct
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @flags: KDBUS_ATTACH_* flags
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @id: The 64-bit ID of the connection. If set to zero, passing
66eac1201a9c1596f5901f8dbbf24bda7e350878Dan Williams * @name is required. kdbus will look up the name to
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * determine the ID in this case.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @offset: Returned offset in the caller's pool buffer where the
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * kdbus_conn_info struct result is stored. The user must
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * use KDBUS_CMD_FREE to free the allocated memory.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @name: The optional well-known name to look up. Only needed in
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * case @id is zero.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * On success, the KDBUS_CMD_CONN_INFO ioctl will return 0 and @offset will
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * tell the user the offset in the connection pool buffer at which to find the
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * result in a struct kdbus_conn_info.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * struct kdbus_conn_info - information returned by KDBUS_CMD_CONN_INFO
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @size: The total size of the struct
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @id: The connection's 64-bit ID
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @flags: The connection's flags
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517Beniamino Galvani * @items: A list of struct kdbus_item
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * Note that the user is responsible for freeing the allocated memory with
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * the KDBUS_CMD_FREE ioctl.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * struct kdbus_cmd_update - update flags of a connection
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @size: The total size of the struct
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @items: A list of struct kdbus_item
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * This struct is used with the KDBUS_CMD_CONN_UPDATE ioctl.
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * enum kdbus_cmd_match_flags - flags to control the KDBUS_CMD_MATCH_ADD ioctl
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_MATCH_REPLACE: If entries with the supplied cookie already
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * exists, remove them before installing the new
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * struct kdbus_cmd_match - struct to add or remove matches
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @size: The total size of the struct
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @cookie: Userspace supplied cookie. When removing, the cookie
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * identifies the match to remove
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @items: A list of items for additional information
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * This structure is used with the KDBUS_CMD_ADD_MATCH and
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * KDBUS_CMD_REMOVE_MATCH ioctl.
ed6ee21953dac9c78383da00bc4514ece6b75ab5Patrik Flykt * enum kdbus_ioctl_type - Ioctl API
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flykt * @KDBUS_CMD_BUS_MAKE: After opening the "control" device node, this
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517Beniamino Galvani * command creates a new bus with the specified
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flykt * name. The bus is immediately shut down and
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flykt * cleaned up when the opened "control" device node
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flykt * is closed.
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flykt * @KDBUS_CMD_DOMAIN_MAKE: Similar to KDBUS_CMD_BUS_MAKE, but it creates a
7bd8e95d44977833d0de3fc4e893eb3bc84351d6Patrik Flykt * new kdbus domain.
5da1b97f3c3d15521f2dcfbc18eccd6580122ebcPatrik Flykt * @KDBUS_CMD_ENDPOINT_MAKE: Creates a new named special endpoint to talk to
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517Beniamino Galvani * the bus. Such endpoints usually carry a more
5da1b97f3c3d15521f2dcfbc18eccd6580122ebcPatrik Flykt * restrictive policy and grant restricted access
5da1b97f3c3d15521f2dcfbc18eccd6580122ebcPatrik Flykt * to specific applications.
5da1b97f3c3d15521f2dcfbc18eccd6580122ebcPatrik Flykt * @KDBUS_CMD_HELLO: By opening the bus device node a connection is
5da1b97f3c3d15521f2dcfbc18eccd6580122ebcPatrik Flykt * created. After a HELLO the opened connection
5da1b97f3c3d15521f2dcfbc18eccd6580122ebcPatrik Flykt * becomes an active peer on the bus.
5da1b97f3c3d15521f2dcfbc18eccd6580122ebcPatrik Flykt * @KDBUS_CMD_BYEBYE: Disconnect a connection. If there are no
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517Beniamino Galvani * messages queued up in the connection's pool,
6599680e2d33597f0f11a99e1c3c957b42418568Patrik Flykt * the call succeeds, and the handle is rendered
6599680e2d33597f0f11a99e1c3c957b42418568Patrik Flykt * unusable. Otherwise, -EBUSY is returned without
6599680e2d33597f0f11a99e1c3c957b42418568Patrik Flykt * any further side-effects.
6599680e2d33597f0f11a99e1c3c957b42418568Patrik Flykt * @KDBUS_CMD_MSG_SEND: Send a message and pass data from userspace to
6599680e2d33597f0f11a99e1c3c957b42418568Patrik Flykt * the kernel.
41e4615d4f4f5c61afa84ba857f23c0ac496687bPatrik Flykt * @KDBUS_CMD_MSG_RECV: Receive a message from the kernel which is
2c1ab8ca9b5dec48c66eb25dd8af71731e70e517Beniamino Galvani * placed in the receiver's pool.
41e4615d4f4f5c61afa84ba857f23c0ac496687bPatrik Flykt * @KDBUS_CMD_MSG_CANCEL: Cancel a pending request of a message that
41e4615d4f4f5c61afa84ba857f23c0ac496687bPatrik Flykt * blocks while waiting for a reply. The parameter
41e4615d4f4f5c61afa84ba857f23c0ac496687bPatrik Flykt * denotes the cookie of the message in flight.
41e4615d4f4f5c61afa84ba857f23c0ac496687bPatrik Flykt * @KDBUS_CMD_FREE: Release the allocated memory in the receiver's
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @KDBUS_CMD_NAME_ACQUIRE: Request a well-known bus name to associate with
6599680e2d33597f0f11a99e1c3c957b42418568Patrik Flykt * the connection. Well-known names are used to
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * address a peer on the bus.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @KDBUS_CMD_NAME_RELEASE: Release a well-known name the connection
c47e8936a43ce546e8a74fa569e9fbfae6c64be7Patrik Flykt * currently owns.
c47e8936a43ce546e8a74fa569e9fbfae6c64be7Patrik Flykt * @KDBUS_CMD_NAME_LIST: Retrieve the list of all currently registered
c47e8936a43ce546e8a74fa569e9fbfae6c64be7Patrik Flykt * well-known and unique names.
c47e8936a43ce546e8a74fa569e9fbfae6c64be7Patrik Flykt * @KDBUS_CMD_CONN_INFO: Retrieve credentials and properties of the
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * initial creator of the connection. The data was
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * stored at registration time and does not
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * necessarily represent the connected process or
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * the actual state of the process.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @KDBUS_CMD_CONN_UPDATE: Update the properties of a connection. Used to
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * update the metadata subscription mask and
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_CMD_ENDPOINT_UPDATE: Update the properties of a custom enpoint. Used
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * to update the policy.
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * @KDBUS_CMD_MATCH_ADD: Install a match which broadcast messages should
bbfa43ca37df0718287c25a8e39ee7477ebf33f6Patrik Flykt * be delivered to the connection.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt * @KDBUS_CMD_MATCH_REMOVE: Remove a current match for broadcast messages.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt KDBUS_CMD_BUS_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x00,
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt KDBUS_CMD_DOMAIN_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x10,
ed6ee21953dac9c78383da00bc4514ece6b75ab5Patrik Flykt KDBUS_CMD_ENDPOINT_MAKE = _IOW(KDBUS_IOCTL_MAGIC, 0x20,
ed6ee21953dac9c78383da00bc4514ece6b75ab5Patrik Flykt KDBUS_CMD_HELLO = _IOWR(KDBUS_IOCTL_MAGIC, 0x30,
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt KDBUS_CMD_BYEBYE = _IO(KDBUS_IOCTL_MAGIC, 0x31),
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt KDBUS_CMD_MSG_SEND = _IOWR(KDBUS_IOCTL_MAGIC, 0x40,
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt KDBUS_CMD_MSG_RECV = _IOWR(KDBUS_IOCTL_MAGIC, 0x41,
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt KDBUS_CMD_MSG_CANCEL = _IOW(KDBUS_IOCTL_MAGIC, 0x42,
ed6ee21953dac9c78383da00bc4514ece6b75ab5Patrik Flykt KDBUS_CMD_NAME_ACQUIRE = _IOWR(KDBUS_IOCTL_MAGIC, 0x50,
ed6ee21953dac9c78383da00bc4514ece6b75ab5Patrik Flykt KDBUS_CMD_NAME_RELEASE = _IOW(KDBUS_IOCTL_MAGIC, 0x51,
ed6ee21953dac9c78383da00bc4514ece6b75ab5Patrik Flykt KDBUS_CMD_NAME_LIST = _IOWR(KDBUS_IOCTL_MAGIC, 0x52,
9d89d1ae71cb298218e35a69d6b70e2c94de5271Patrik Flykt KDBUS_CMD_CONN_INFO = _IOWR(KDBUS_IOCTL_MAGIC, 0x60,
a34b57c0d43b8bf819ccd4f62c314b41b625454dPatrik Flykt KDBUS_CMD_CONN_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x61,
0ae0e5cd96813bacad43a39920a043d8d20a67dbLennart Poettering KDBUS_CMD_ENDPOINT_UPDATE = _IOW(KDBUS_IOCTL_MAGIC, 0x71,
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt KDBUS_CMD_MATCH_ADD = _IOW(KDBUS_IOCTL_MAGIC, 0x80,
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt KDBUS_CMD_MATCH_REMOVE = _IOW(KDBUS_IOCTL_MAGIC, 0x81,
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flykt#endif /* _KDBUS_UAPI_H_ */