svr4_ioctl.h revision 43412
175900Sjoe/*
275900Sjoe * Copyright (c) 1998 Mark Newton
375900Sjoe * Copyright (c) 1994 Christos Zoulas
475900Sjoe * All rights reserved.
575900Sjoe *
675900Sjoe * Redistribution and use in source and binary forms, with or without
775900Sjoe * modification, are permitted provided that the following conditions
875900Sjoe * are met:
975900Sjoe * 1. Redistributions of source code must retain the above copyright
1075900Sjoe *    notice, this list of conditions and the following disclaimer.
1175900Sjoe * 2. Redistributions in binary form must reproduce the above copyright
1275900Sjoe *    notice, this list of conditions and the following disclaimer in the
1375900Sjoe *    documentation and/or other materials provided with the distribution.
1475900Sjoe * 3. The name of the author may not be used to endorse or promote products
1575900Sjoe *    derived from this software without specific prior written permission
1675900Sjoe *
1775900Sjoe * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1875900Sjoe * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1975900Sjoe * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2075900Sjoe * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2175900Sjoe * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2275900Sjoe * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2375900Sjoe * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2475900Sjoe * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2575900Sjoe * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2675900Sjoe * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2775900Sjoe */
2875900Sjoe
2975900Sjoe#ifndef	_SVR4_IOCTL_H_
3075900Sjoe#define	_SVR4_IOCTL_H_
3175900Sjoe
3275900Sjoe#define	SVR4_IOC_VOID	0x20000000
3375900Sjoe#define	SVR4_IOC_OUT	0x40000000
3475900Sjoe#define	SVR4_IOC_IN	0x80000000
3575900Sjoe#define	SVR4_IOC_INOUT	(SVR4_IOC_IN|SVR4_IOC_OUT)
3675900Sjoe
3775900Sjoe#define	SVR4_IOC(inout,group,num,len) \
3875900Sjoe	(inout | ((len & 0xff) << 16) | ((group) << 8) | (num))
3975900Sjoe
40#define SVR4_XIOC	('X' << 8)
41
42#define	SVR4_IO(g,n)		SVR4_IOC(SVR4_IOC_VOID,	(g), (n), 0)
43#define	SVR4_IOR(g,n,t)		SVR4_IOC(SVR4_IOC_OUT,	(g), (n), sizeof(t))
44#define	SVR4_IOW(g,n,t)		SVR4_IOC(SVR4_IOC_IN,	(g), (n), sizeof(t))
45#define	SVR4_IOWR(g,n,t)	SVR4_IOC(SVR4_IOC_INOUT,(g), (n), sizeof(t))
46
47int	svr4_stream_ti_ioctl __P((struct file *, struct proc *, register_t *,
48			          int, u_long, caddr_t));
49int	svr4_stream_ioctl    __P((struct file *, struct proc *, register_t *,
50				  int, u_long, caddr_t));
51int	svr4_term_ioctl      __P((struct file *, struct proc *, register_t *,
52				  int, u_long, caddr_t));
53int	svr4_ttold_ioctl     __P((struct file *, struct proc *, register_t *,
54				  int, u_long, caddr_t));
55int	svr4_fil_ioctl	     __P((struct file *, struct proc *, register_t *,
56				  int, u_long, caddr_t));
57int	svr4_sock_ioctl	     __P((struct file *, struct proc *, register_t *,
58				  int, u_long, caddr_t));
59
60#endif /* !_SVR4_IOCTL_H_ */
61