+ * This structure is used with the KDBUS_CMD_MONITOR ioctl.
+ * Refer to the documentation for more information.
+ */
+struct kdbus_cmd_monitor {
+ __u64 id;
+ __u64 flags;
+};
+
+/**
+ * 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.
+ * @KDBUS_CMD_NS_MAKE: Similar to KDBUS_CMD_BUS_MAKE, but it creates a
+ * 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.
+ * @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.
+ * @KDBUS_CMD_MSG_SEND: Send a message and pass data from userspace to
+ * the kernel.
+ * @KDBUS_CMD_MSG_RECV: Receive a message from the kernel which is
+ * placed in the receiver's pool.
+ * @KDBUS_CMD_FREE: Release the allocated memory in the receiver's
+ * 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.
+ * @KDBUS_CMD_NAME_RELEASE: Release a well-known name the connection
+ * currently owns.
+ * @KDBUS_CMD_NAME_LIST: Retrieve the list of all currently registered
+ * 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
+ * neccessarily 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.
+ * @KDBUS_CMD_MATCH_REMOVE: Remove a current match for broadcast messages.
+ * @KDBUS_CMD_MONITOR: Monitor the bus and receive all transmitted
+ * messages. Privileges are required for this
+ * operation.
+ * @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.
+ * @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.
+ * @KDBUS_CMD_MEMFD_SIZE_GET: Return the size of the underlying file, which
+ * changes with write().
+ * @KDBUS_CMD_MEMFD_SIZE_SET: Truncate the underlying file to the specified
+ * 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.
+ */
+enum kdbus_ioctl_type {
+ KDBUS_CMD_BUS_MAKE = _IOW (KDBUS_IOC_MAGIC, 0x00, struct kdbus_cmd_bus_make),
+ KDBUS_CMD_NS_MAKE = _IOR (KDBUS_IOC_MAGIC, 0x10, struct kdbus_cmd_ns_make),
+
+ KDBUS_CMD_EP_MAKE = _IOW (KDBUS_IOC_MAGIC, 0x20, struct kdbus_cmd_ep_make),