kdbus.h revision affc7fe9e1295e209c332a26acbbc992b710fe82
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * kdbus is free software; you can redistribute it and/or modify it under
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * the terms of the GNU Lesser General Public License as published by the
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * Free Software Foundation; either version 2.1 of the License, or (at
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * your option) any later version.
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek#define KDBUS_MATCH_ID_ANY (~0ULL)
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek#define KDBUS_DST_ID_BROADCAST (~0ULL)
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek#define KDBUS_FLAG_KERNEL (1ULL << 63)
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering * struct kdbus_notify_id_change - name registry change message
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @id: New or former owner of the name
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @flags: flags field from KDBUS_HELLO_*
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * Sent from kernel to userspace when the owner or activator of
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering * a well-known name changes.
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * Attached to:
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_ID_ADD
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_ID_REMOVE
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * struct kdbus_notify_name_change - name registry change message
892213bf1fd23e48d64a407ece6e10b07bef1926Zbigniew Jędrzejewski-Szmek * @old_id: ID and flags of former owner of a name
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @new_id: ID and flags of new owner of a name
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @name: Well-known name
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * Sent from kernel to userspace when the owner or activator of
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * a well-known name changes.
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_NAME_ADD
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_NAME_REMOVE
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_NAME_CHANGE
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek struct kdbus_notify_id_change old_id;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * struct kdbus_creds - process credentials
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * @euid: Effective UID
29a5ca9baa58e55c4d9e1d008cdd014aa9c3c3e1Lennart Poettering * @suid: Saved UID
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @fsuid: Filesystem UID
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @gid: Group ID
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @egid: Effective GID
eb56eb9b40950f1edcffdb7313f8de4f8572a6d5Michal Schmidt * @sgid: Saved GID
eb56eb9b40950f1edcffdb7313f8de4f8572a6d5Michal Schmidt * @fsgid: Filesystem GID
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * Attached to:
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_CREDS
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek * struct kdbus_pids - process identifiers
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek * @pid: Process ID
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek * @tid: Thread ID
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek * @starttime: Starttime of the process
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek * The PID, TID and starttime of a process. The start tmie is useful to detect
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek * PID overruns from the client side. i.e. if you use the PID to look something
fff40a51ccbb02e8dec4ff2ee505bc84f75e445cZbigniew Jędrzejewski-Szmek * up in /proc/$PID/ you can afterwards check the starttime field of it, to
fff40a51ccbb02e8dec4ff2ee505bc84f75e445cZbigniew Jędrzejewski-Szmek * ensure you didn't run into a PID overrun.
fff40a51ccbb02e8dec4ff2ee505bc84f75e445cZbigniew Jędrzejewski-Szmek * KDBUS_ITEM_PIDS
175a3d25d0e8596d4ba0759aea3f89ee228e7d6dLennart Poettering * struct kdbus_caps - process capabilities
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @last_cap: Highest currently known capability bit
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @caps: Variable number of 32-bit capabilities flags
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek * Contains a variable number of 32-bit capabilities flags.
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_CAPS
2c408cb6276e3b8d18fb4e2a81a1128d8bbaa70dLennart Poettering * struct kdbus_audit - audit information
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * @sessionid: The audit session ID
29a5ca9baa58e55c4d9e1d008cdd014aa9c3c3e1Lennart Poettering * @loginuid: The audit login uid
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_AUDIT
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * struct kdbus_timestamp
7fd1b19bc9e9f5574f2877936b8ac267c7706947Harald Hoyer * @seqnum: Global per-domain message sequence number
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * @monotonic_ns: Monotonic timestamp, in nanoseconds
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * @realtime_ns: Realtime timestamp, in nanoseconds
892213bf1fd23e48d64a407ece6e10b07bef1926Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_TIMESTAMP
5e65c93a433447b15180249166f7b3944c3e6156Zbigniew Jędrzejewski-Szmek * struct kdbus_vec - I/O vector for kdbus payload items
5e65c93a433447b15180249166f7b3944c3e6156Zbigniew Jędrzejewski-Szmek * @size: The size of the vector
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @address: Memory address of data buffer
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @offset: Offset in the in-message payload memory,
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * relative to the message head
23ea3dab15181a3966ec45fa2ccbb81e59d2e0a7Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_PAYLOAD_VEC, KDBUS_ITEM_PAYLOAD_OFF
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * struct kdbus_bloom_parameter - bus-wide bloom parameters
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @size: Size of the bit field in bytes (m / 8)
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @n_hash: Number of hash functions used (k)
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * struct kdbus_bloom_filter - bloom filter containing n elements
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @generation: Generation of the element set in the filter
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @data: Bit field, multiple of 8 bytes
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * struct kdbus_memfd - a kdbus memfd
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @size: The memfd's size
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @fd: The file descriptor number
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @__pad: Padding to ensure proper alignment and size
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * Attached to:
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * KDBUS_ITEM_PAYLOAD_MEMFD
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * struct kdbus_name - a registered well-known name with its flags
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @flags: Flags from KDBUS_NAME_*
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @name: Well-known name
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * Attached to:
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_OWNED_NAME
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * struct kdbus_policy_access - policy access item
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @type: One of KDBUS_POLICY_ACCESS_* types
4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4fMichal Schmidt * @access: Access to grant
4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4fMichal Schmidt * @id: For KDBUS_POLICY_ACCESS_USER, the uid
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * For KDBUS_POLICY_ACCESS_GROUP, the gid
56f64d95763a799ba4475daf44d8e9f72a1bd474Michal Schmidt * enum kdbus_item_type - item types to chain data in a list
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @_KDBUS_ITEM_NULL: Uninitialized/invalid
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @_KDBUS_ITEM_USER_BASE: Start of user items
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_PAYLOAD_VEC: Vector to data
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_PAYLOAD_OFF: Data at returned offset to message head
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_PAYLOAD_MEMFD: Data as sealed memfd
56f64d95763a799ba4475daf44d8e9f72a1bd474Michal Schmidt * @KDBUS_ITEM_FDS: Attached file descriptors
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_BLOOM_PARAMETER: Bus-wide bloom parameters, used with
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_CMD_BUS_MAKE, carries a
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * struct kdbus_bloom_parameter
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_BLOOM_FILTER: Bloom filter carried with a message,
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * used to match against a bloom mask of a
56f64d95763a799ba4475daf44d8e9f72a1bd474Michal Schmidt * connection, carries a struct
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * kdbus_bloom_filter
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_BLOOM_MASK: Bloom mask used to match against a
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * message'sbloom filter
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_DST_NAME: Destination's well-known name
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_MAKE_NAME: Name of domain, bus, endpoint
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_ATTACH_FLAGS_SEND: Attach-flags, used for updating which
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * metadata a connection opts in to send
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_ATTACH_FLAGS_RECV: Attach-flags, used for updating which
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * metadata a connection requests to
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * receive for each reeceived message
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_ID: Connection ID
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_NAME: Well-know name with flags
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @_KDBUS_ITEM_ATTACH_BASE: Start of metadata attach items
56f64d95763a799ba4475daf44d8e9f72a1bd474Michal Schmidt * @KDBUS_ITEM_TIMESTAMP: Timestamp
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_CREDS: Process credentials
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_PIDS: Process identifiers
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_AUXGROUPS: Auxiliary process groups
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_OWNED_NAME: A name owned by the associated
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_TID_COMM: Thread ID "comm" identifier
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * (Don't trust this, see below.)
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_PID_COMM: Process ID "comm" identifier
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * (Don't trust this, see below.)
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * @KDBUS_ITEM_EXE: The path of the executable
aa44499da15a8fa7026463555a7a27e55e4e24a8Philippe De Swert * (Don't trust this, see below.)
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_CMDLINE: The process command line
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * (Don't trust this, see below.)
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_CGROUP: The croup membership
56f64d95763a799ba4475daf44d8e9f72a1bd474Michal Schmidt * @KDBUS_ITEM_CAPS: The process capabilities
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_SECLABEL: The security label
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_AUDIT: The audit IDs
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_CONN_DESCRIPTION: The connection's human-readable name
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * @_KDBUS_ITEM_POLICY_BASE: Start of policy items
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * @KDBUS_ITEM_POLICY_ACCESS: Policy access block
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @_KDBUS_ITEM_KERNEL_BASE: Start of kernel-generated message items
30374ebe5e9f0b37e99dcbdc965c00fcf542f89dLennart Poettering * @KDBUS_ITEM_NAME_ADD: Notification in kdbus_notify_name_change
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_NAME_REMOVE: Notification in kdbus_notify_name_change
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_NAME_CHANGE: Notification in kdbus_notify_name_change
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_ITEM_ID_ADD: Notification in kdbus_notify_id_change
e9c1ea9de87d4d508ac38ce87a2fa56e7529a91aJason St. John * @KDBUS_ITEM_ID_REMOVE: Notification in kdbus_notify_id_change
9d458c0902cdc5d993fd2f78d36fb83a8130c81bLennart Poettering * @KDBUS_ITEM_REPLY_TIMEOUT: Timeout has been reached
9d458c0902cdc5d993fd2f78d36fb83a8130c81bLennart Poettering * @KDBUS_ITEM_REPLY_DEAD: Destination died
e9c1ea9de87d4d508ac38ce87a2fa56e7529a91aJason St. John * N.B: The process and thread COMM fields, as well as the CMDLINE and
e9c1ea9de87d4d508ac38ce87a2fa56e7529a91aJason St. John * EXE fields may be altered by unprivileged processes und should
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * hence *not* used for security decisions. Peers should make use of
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * these items only for informational purposes, such as generating log
c099716487df4a4f5394e57e7ca14da1d358166aZbigniew Jędrzejewski-Szmek KDBUS_ITEM_PAYLOAD_VEC = _KDBUS_ITEM_USER_BASE,
892213bf1fd23e48d64a407ece6e10b07bef1926Zbigniew Jędrzejewski-Szmek /* keep these item types in sync with KDBUS_ATTACH_* flags */
892213bf1fd23e48d64a407ece6e10b07bef1926Zbigniew Jędrzejewski-Szmek _KDBUS_ITEM_ATTACH_BASE = 0x1000,
892213bf1fd23e48d64a407ece6e10b07bef1926Zbigniew Jędrzejewski-Szmek KDBUS_ITEM_TIMESTAMP = _KDBUS_ITEM_ATTACH_BASE,
892213bf1fd23e48d64a407ece6e10b07bef1926Zbigniew Jędrzejewski-Szmek _KDBUS_ITEM_POLICY_BASE = 0x2000,
892213bf1fd23e48d64a407ece6e10b07bef1926Zbigniew Jędrzejewski-Szmek KDBUS_ITEM_POLICY_ACCESS = _KDBUS_ITEM_POLICY_BASE,
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering KDBUS_ITEM_NAME_ADD = _KDBUS_ITEM_KERNEL_BASE,
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * struct kdbus_item - chain of data blocks
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @size: Overall data record size
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek * @type: Kdbus_item type of data
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek * @data: Generic bytes
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @data32: Generic 32 bit array
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @data64: Generic 64 bit array
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering * @str: Generic string
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @id: Connection ID
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @vec: KDBUS_ITEM_PAYLOAD_VEC
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @creds: KDBUS_ITEM_CREDS
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @audit: KDBUS_ITEM_AUDIT
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @timestamp: KDBUS_ITEM_TIMESTAMP
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @name: KDBUS_ITEM_NAME
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @bloom_parameter: KDBUS_ITEM_BLOOM_PARAMETER
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @bloom_filter: KDBUS_ITEM_BLOOM_FILTER
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @memfd: KDBUS_ITEM_PAYLOAD_MEMFD
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @name_change: KDBUS_ITEM_NAME_ADD
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_NAME_REMOVE
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_ITEM_NAME_CHANGE
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * @id_change: KDBUS_ITEM_ID_ADD
8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0eLennart Poettering * KDBUS_ITEM_ID_REMOVE
5e65c93a433447b15180249166f7b3944c3e6156Zbigniew Jędrzejewski-Szmek * @policy: KDBUS_ITEM_POLICY_ACCESS
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek struct kdbus_timestamp timestamp;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek struct kdbus_bloom_parameter bloom_parameter;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek struct kdbus_bloom_filter bloom_filter;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek struct kdbus_notify_name_change name_change;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek struct kdbus_notify_id_change id_change;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek struct kdbus_policy_access policy_access;
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * enum kdbus_msg_flags - type of message
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_MSG_FLAGS_EXPECT_REPLY: Expect a reply message, used for
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * method calls. The userspace-supplied
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * cookie identifies the message and the
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * respective reply carries the cookie
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * in cookie_reply
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_MSG_FLAGS_SYNC_REPLY: Wait for destination connection to
eceb8483e5a02e8e337486b89719a3b99cfcb7ceLennart Poettering * reply to this message. The
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * KDBUS_CMD_MSG_SEND ioctl() will block
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * until the reply is received, and
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * offset_reply in struct kdbus_msg will
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * yield the offset in the sender's pool
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * where the reply can be found.
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * This flag is only valid if
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_MSG_FLAGS_EXPECT_REPLY is set as
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_MSG_FLAGS_NO_AUTO_START: Do not start a service, if the addressed
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * name is not currently active
2c408cb6276e3b8d18fb4e2a81a1128d8bbaa70dLennart Poettering KDBUS_MSG_FLAGS_EXPECT_REPLY = 1ULL << 0,
2c408cb6276e3b8d18fb4e2a81a1128d8bbaa70dLennart Poettering KDBUS_MSG_FLAGS_NO_AUTO_START = 1ULL << 2,
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * enum kdbus_payload_type - type of payload carried by message
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_PAYLOAD_KERNEL: Kernel-generated simple message
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @KDBUS_PAYLOAD_DBUS: D-Bus marshalling "DBusDBus"
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek KDBUS_PAYLOAD_DBUS = 0x4442757344427573ULL,
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * struct kdbus_msg - the representation of a kdbus message
2c408cb6276e3b8d18fb4e2a81a1128d8bbaa70dLennart Poettering * @size: Total size of the message
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @flags: Message flags (KDBUS_MSG_FLAGS_*), userspace → kernel
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @kernel_flags: Supported message flags, kernel → userspace
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @priority: Message queue priority value
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @dst_id: 64-bit ID of the destination connection
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @src_id: 64-bit ID of the source connection
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @payload_type: Payload type (KDBUS_PAYLOAD_*)
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @cookie: Userspace-supplied cookie, for the connection
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * to identify its messages
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * @timeout_ns: The time to wait for a message reply from the peer.
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * If there is no reply, a kernel-generated message
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * with an attached KDBUS_ITEM_REPLY_TIMEOUT item
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * is sent to @src_id. The timeout is expected in
2ca0435be9359bde3020eeb528c2a6d72ac1e0b0Zbigniew Jędrzejewski-Szmek * nanoseconds and as absolute CLOCK_MONOTONIC value.
struct kdbus_msg {
enum kdbus_recv_flags {
struct kdbus_cmd_recv {
struct kdbus_cmd_cancel {
struct kdbus_cmd_free {
* @_KDBUS_POLICY_ACCESS_NULL: Uninitialized/invalid
enum kdbus_policy_access_type {
enum kdbus_policy_type {
KDBUS_POLICY_SEE = 0,
enum kdbus_hello_flags {
enum kdbus_attach_flags {
struct kdbus_cmd_hello {
enum kdbus_make_flags {
struct kdbus_cmd_make {
enum kdbus_name_flags {
struct kdbus_cmd_name {
struct kdbus_name_info {
enum kdbus_name_list_flags {
struct kdbus_cmd_name_list {
struct kdbus_name_list {
struct kdbus_cmd_info {
struct kdbus_info {
struct kdbus_cmd_update {
enum kdbus_cmd_match_flags {
struct kdbus_cmd_match {
struct kdbus_cmd_make)
struct kdbus_cmd_make)
struct kdbus_cmd_hello)
struct kdbus_msg)
struct kdbus_cmd_recv)
struct kdbus_cmd_cancel)
struct kdbus_cmd_free)
struct kdbus_cmd_name)
struct kdbus_cmd_name)
struct kdbus_cmd_name_list)
struct kdbus_cmd_info)
struct kdbus_cmd_update)
struct kdbus_cmd_info)
struct kdbus_cmd_update)
struct kdbus_cmd_match)
struct kdbus_cmd_match)