minix/include/minix/vboxtype.h
David van Moolenbroek 6aa61efd09 VBOX: add host/guest communication interface
This interface can be used by other system processes by means of the
newly provided vbox API in libsys.
2012-04-09 15:56:20 +02:00

36 lines
862 B
C

#ifndef _MINIX_VBOXTYPE_H
#define _MINIX_VBOXTYPE_H
/* This header declares the type definitions shared between VBOX driver, the
* interface in libsys, and any caller of those interface functions.
*/
/* Call parameter type. */
typedef enum {
VBOX_TYPE_INVALID, /* invalid type */
VBOX_TYPE_U32, /* 32-bit value */
VBOX_TYPE_U64, /* 64-bit value */
VBOX_TYPE_PTR /* pointer to granted memory area */
} vbox_type_t;
/* Call parameter transfer direction. */
#define VBOX_DIR_IN 0x01 /* from host to guest */
#define VBOX_DIR_OUT 0x02 /* from guest to host */
#define VBOX_DIR_INOUT (VBOX_DIR_IN | VBOX_DIR_OUT)
/* Call parameter. */
typedef struct {
vbox_type_t type;
union {
u32_t u32;
u64_t u64;
struct {
cp_grant_id_t grant;
size_t off;
size_t size;
unsigned int dir;
} ptr;
};
} vbox_param_t;
#endif /*_MINIX_VBOXTYPE_H */