0 +ˆÉÐ ƒ}—Ï¿Ò$˜+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR CDDL-1.0) */ /* * VBoxGuest - VirtualBox Guest Additions Driver Interface. * * Copyright (C) 2006-2016 Oracle Corporation */ #ifndef __UAPI_VBOXGUEST_H__ #define __UAPI_VBOXGUEST_H__ #include #include #include #include /* Version of vbg_ioctl_hdr structure. */ #define VBG_IOCTL_HDR_VERSION 0x10001 /* Default request type. Use this for non-VMMDev requests. */ #define VBG_IOCTL_HDR_TYPE_DEFAULT 0 /** * Common ioctl header. * * This is a mirror of vmmdev_request_header to prevent duplicating data and * needing to verify things multiple times. */ struct vbg_ioctl_hdr { /** IN: The request input size, and output size if size_out is zero. */ __u32 size_in; /** IN: Structure version (VBG_IOCTL_HDR_VERSION) */ __u32 version; /** IN: The VMMDev request type or VBG_IOCTL_HDR_TYPE_DEFAULT. */ __u32 type; /** * OUT: The VBox status code of the operation, out direction only. * This is a VINF_ or VERR_ value as defined in vbox_err.h. */ __s32 rc; /** IN: Output size. Set to zero to use size_in as output size. */ __u32 size_out; /** Reserved, MBZ. */ __u32 reserved; }; VMMDEV_ASSERT_SIZE(vbg_ioctl_hdr, 24); /* * The VBoxGuest I/O control version. * * As usual, the high word contains the major version and changes to it * signifies incompatible changes. * * The lower word is the minor version number, it is increased when new * functions are added or existing changed in a backwards compatible manner. */ #define VBG_IOC_VERSION 0x00010000u /** * VBG_IOCTL_DRIVER_VERSION_INFO data structure * * Note VBG_IOCTL_DRIVER_VERSION_INFO may switch the session to a backwards * compatible interface version if uClientVersion indicates older client code. */ struct vbg_ioctl_driver_version_info { /** The header. */ struct vbg_ioctl_hdr hdr; union { struct { /** Requested interface version (VBG_IOC_VERSION). */ __u32 req_version; /** * Minimum interface version number (typically the * major version part of VBG_IOC_VERSION). */ __u32 min_version; /** Reserved, MBZ. */ __u32 reserved1; /** Reserved, MBZ. */ __u32 reserved2; } in; struct { /** Version for this session (typ. VBG_IOC_VERSION). */ __u32 session_version; /** Version of the IDC interface (VBG_IOC_VERSION). */ __u32 driver_version; /** The SVN revision of the driver, or 0. */ __u32 driver_revision; /** Reserved \#1 (zero until defined). */ __u32 reserved1; /** Reserved \#2 (zero until defined). */ __u32 reserved2; } out; } u; }; VMMDEV_ASSERT_SIZE(vbg_ioctl_driver_version_info, 24 + 20); #define VBG_IOCTL_DRIVER_VERSION_INFO \ _IOWR('V', 0, struct vbg_ioctl_driver_version_info) /* IOCTL to perform a VMM Device request less than 1KB in size. */ #define VBG_IOCTL_VMMDEV_REQUEST(s) _IOC(_IOC_READ | _IOC_WRITE, 'V', 2, s) /* IOCTL to perform a VMM Device request larger then 1KB. */ #define VBG_IOCTL_VMMDEV_REQUEST_BIG _IO('V', 3) /** VBG_IOCTL_HGCM_CONNECT data structure. */ struct vbg_ioctl_hgcm_connect { struct vbg_ioctl_hdr hdr; union { struct { struct vmmdev_hgcm_service_location loc; } in; struct { __u32 client_id; } out; } u; }; VMMDEV_ASSERT_SIZE(vbg_ioctl_hgcm_connect, 24 + 132); #define VBG_IOCTL_HGCM_CONNECT \ _IOWR('V', 4, struct vbg_ioctl_hgcm_connect) /** VBG_IOCTL_HGCM_DISCONNECT data structure. */ struct vbg_ioctl_hgcm_disconnect { struct vbg_ioctl_hdr hdr; union { struct { __u32 client_id; } in; } u; }; VMMDEV_ASSERT_SIZE(vbg_ioctl_hgcm_disconnect, 24 + 4); #define VBG_IOCTL_HGCM_DISCONNECT \ _IOWR('V', 5, struct vbg_ioctl_hgcm_disconnect) /** VBG_IOCTL_HGCM_CALL data structure. */ struct vbg_ioctl_hgcm_call { /** The header. */ struct vbg_ioctl_hdr hdr; /** Input: The id of the caller. */ __u32 client_id; /** Input: Function number. */ __u32 function; /** * Input: How long to wait (milliseconds) for completion before * cancell