svr4_ioctl.h revision 43412
143412Snewton/* 243412Snewton * Copyright (c) 1998 Mark Newton 343412Snewton * Copyright (c) 1994 Christos Zoulas 443412Snewton * All rights reserved. 543412Snewton * 643412Snewton * Redistribution and use in source and binary forms, with or without 743412Snewton * modification, are permitted provided that the following conditions 843412Snewton * are met: 943412Snewton * 1. Redistributions of source code must retain the above copyright 1043412Snewton * notice, this list of conditions and the following disclaimer. 1143412Snewton * 2. Redistributions in binary form must reproduce the above copyright 1243412Snewton * notice, this list of conditions and the following disclaimer in the 1343412Snewton * documentation and/or other materials provided with the distribution. 1443412Snewton * 3. The name of the author may not be used to endorse or promote products 1543412Snewton * derived from this software without specific prior written permission 1643412Snewton * 1743412Snewton * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1843412Snewton * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1943412Snewton * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2043412Snewton * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2143412Snewton * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2243412Snewton * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2343412Snewton * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2443412Snewton * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2543412Snewton * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2643412Snewton * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2743412Snewton */ 2843412Snewton 2943412Snewton#ifndef _SVR4_IOCTL_H_ 3043412Snewton#define _SVR4_IOCTL_H_ 3143412Snewton 3243412Snewton#define SVR4_IOC_VOID 0x20000000 3343412Snewton#define SVR4_IOC_OUT 0x40000000 3443412Snewton#define SVR4_IOC_IN 0x80000000 3543412Snewton#define SVR4_IOC_INOUT (SVR4_IOC_IN|SVR4_IOC_OUT) 3643412Snewton 3743412Snewton#define SVR4_IOC(inout,group,num,len) \ 3843412Snewton (inout | ((len & 0xff) << 16) | ((group) << 8) | (num)) 3943412Snewton 4043412Snewton#define SVR4_XIOC ('X' << 8) 4143412Snewton 4243412Snewton#define SVR4_IO(g,n) SVR4_IOC(SVR4_IOC_VOID, (g), (n), 0) 4343412Snewton#define SVR4_IOR(g,n,t) SVR4_IOC(SVR4_IOC_OUT, (g), (n), sizeof(t)) 4443412Snewton#define SVR4_IOW(g,n,t) SVR4_IOC(SVR4_IOC_IN, (g), (n), sizeof(t)) 4543412Snewton#define SVR4_IOWR(g,n,t) SVR4_IOC(SVR4_IOC_INOUT,(g), (n), sizeof(t)) 4643412Snewton 4743412Snewtonint svr4_stream_ti_ioctl __P((struct file *, struct proc *, register_t *, 4843412Snewton int, u_long, caddr_t)); 4943412Snewtonint svr4_stream_ioctl __P((struct file *, struct proc *, register_t *, 5043412Snewton int, u_long, caddr_t)); 5143412Snewtonint svr4_term_ioctl __P((struct file *, struct proc *, register_t *, 5243412Snewton int, u_long, caddr_t)); 5343412Snewtonint svr4_ttold_ioctl __P((struct file *, struct proc *, register_t *, 5443412Snewton int, u_long, caddr_t)); 5543412Snewtonint svr4_fil_ioctl __P((struct file *, struct proc *, register_t *, 5643412Snewton int, u_long, caddr_t)); 5743412Snewtonint svr4_sock_ioctl __P((struct file *, struct proc *, register_t *, 5843412Snewton int, u_long, caddr_t)); 5943412Snewton 6043412Snewton#endif /* !_SVR4_IOCTL_H_ */ 61