Annotation of sys/compat/bsdos/bsdos_ioctl.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: bsdos_ioctl.h,v 1.3 2003/06/17 21:56:25 millert Exp $ */
2:
3: /*
4: * Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com>
5: *
6: * Permission to use, copy, modify, and distribute this software for any
7: * purpose with or without fee is hereby granted, provided that the above
8: * copyright notice and this permission notice appear in all copies.
9: *
10: * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11: * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12: * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13: * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14: * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15: * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16: * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17: */
18:
19: #ifndef _BSDOS_IOCTL_H
20: #define _BSDOS_IOCTL_H
21:
22: struct bsdos_audio_buf_info {
23: int fragments;
24: int fragsize;
25: int bytes;
26: };
27:
28: #define BSDOS_IOCPARM_MASK 0x1fff
29: #define BSDOS_IOCGROUP(x) (((x) >> 8) & 0xff)
30:
31: #define BSDOS_IOC_VOID (unsigned long)0x20000000
32: #define BSDOS_IOC_OUT (unsigned long)0x40000000
33: #define BSDOS_IOC_IN (unsigned long)0x80000000
34: #define BSDOS_IOC_INOUT (BSDOS_IOC_IN|BSDOS_IOC_OUT)
35: #define BSDOS_IOC_DIRMASK (unsigned long)0xe0000000
36:
37: #define _BSDOS_IOC(inout,group,num,len) \
38: (inout | ((len & BSDOS_IOCPARM_MASK) << 16) | ((group) << 8) | (num))
39: #define _BSDOS_IOR(g,n,t) _BSDOS_IOC(BSDOS_IOC_OUT, (g), (n), sizeof(t))
40:
41: #define BSDOS_SNDCTL_DSP_GETOSPACE _BSDOS_IOR('P', 12, struct bsdos_audio_buf_info)
42: #define BSDOS_SNDCTL_DSP_GETISPACE _BSDOS_IOR('P', 13, struct bsdos_audio_buf_info)
43:
44: #endif /* _BSDOS_IOCTL_H */
CVSweb