ioctl.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
0N/A/* $Id$ */
1451N/A/** @file
0N/A * VBox L4/OSS audio - header for Linux IoCtls.
0N/A */
0N/A
0N/A/*
0N/A * Copyright (C) 2006 InnoTek Systemberatung GmbH
0N/A *
0N/A * This file is part of VirtualBox Open Source Edition (OSE), as
0N/A * available from http://www.virtualbox.org. This file is free software;
0N/A * you can redistribute it and/or modify it under the terms of the GNU
0N/A * General Public License as published by the Free Software Foundation,
0N/A * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
0N/A * distribution. VirtualBox OSE is distributed in the hope that it will
0N/A * be useful, but WITHOUT ANY WARRANTY of any kind.
0N/A *
0N/A * If you received this file as part of a commercial VirtualBox
0N/A * distribution, then only the terms of your commercial VirtualBox
553N/A * license agreement apply instead of the previous paragraph.
553N/A */
553N/A
0N/A#ifndef __VBOX_L4_OSS_IOCTL
0N/A#define __VBOX_L4_OSS_IOCTL
0N/A
0N/A#define IOCPARM_MASK 0x3fff /* parameters must be < 16383 bytes */
0N/A#define IOC_VOID 0U << 30 /* no parameters */
0N/A#define IOC_IN 1U << 30 /* copy out parameters */
0N/A#define IOC_OUT 2U << 30 /* copy in parameters */
0N/A#define IOC_INOUT (IOC_IN|IOC_OUT)
1451N/A/* the 0x20000000 is so we can distinguish new ioctl's from old */
0N/A#define _IO(x,y) ((int)(IOC_VOID|(x<<8)|y))
0N/A#define _IOR(x,y,t) ((int)(IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y))
0N/A#define _IOW(x,y,t) ((int)(IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y))
0N/A/* this should be _IORW, but stdio got there first */
0N/A#define _IOWR(x,y,t) ((int)(IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y))
0N/A#define _IOC_SIZE(x) ((x>>16)&IOCPARM_MASK)
0N/A#define _IOC_DIR(x) (x & 0xf0000000)
0N/A#define _IOC_NONE IOC_VOID
0N/A#define _IOC_READ IOC_OUT
0N/A#define _IOC_WRITE IOC_IN
0N/A
0N/A#endif /* __VBOX_L4_OSS_IOCTL */
0N/A
0N/A