xref: /netbsd-src/sys/compat/freebsd/freebsd_ioctl.h (revision 1fbab01a9353563bcc435f692ca5268e5626005a)
1*1fbab01aSdholland /*	$NetBSD: freebsd_ioctl.h,v 1.7 2015/09/06 06:00:59 dholland Exp $	*/
263bb46e7Smycroft 
363bb46e7Smycroft /*
463bb46e7Smycroft  * Copyright (c) 1995 Frank van der Linden
563bb46e7Smycroft  * All rights reserved.
663bb46e7Smycroft  *
763bb46e7Smycroft  * Redistribution and use in source and binary forms, with or without
863bb46e7Smycroft  * modification, are permitted provided that the following conditions
963bb46e7Smycroft  * are met:
1063bb46e7Smycroft  * 1. Redistributions of source code must retain the above copyright
1163bb46e7Smycroft  *    notice, this list of conditions and the following disclaimer.
1263bb46e7Smycroft  * 2. Redistributions in binary form must reproduce the above copyright
1363bb46e7Smycroft  *    notice, this list of conditions and the following disclaimer in the
1463bb46e7Smycroft  *    documentation and/or other materials provided with the distribution.
1563bb46e7Smycroft  * 3. All advertising materials mentioning features or use of this software
1663bb46e7Smycroft  *    must display the following acknowledgement:
1763bb46e7Smycroft  *      This product includes software developed for the NetBSD Project
1863bb46e7Smycroft  *      by Frank van der Linden
1963bb46e7Smycroft  * 4. The name of the author may not be used to endorse or promote products
2063bb46e7Smycroft  *    derived from this software without specific prior written permission
2163bb46e7Smycroft  *
2263bb46e7Smycroft  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2363bb46e7Smycroft  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2463bb46e7Smycroft  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2563bb46e7Smycroft  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2663bb46e7Smycroft  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2763bb46e7Smycroft  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2863bb46e7Smycroft  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2963bb46e7Smycroft  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3063bb46e7Smycroft  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3163bb46e7Smycroft  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3263bb46e7Smycroft  */
3363bb46e7Smycroft 
3463bb46e7Smycroft #ifndef _FREEBSD_IOCTL_H
3563bb46e7Smycroft #define _FREEBSD_IOCTL_H
3663bb46e7Smycroft 
37*1fbab01aSdholland #include <sys/ioccom.h>
38*1fbab01aSdholland 
3932801cf3Saugustss #define	FREEBSD_IOCGROUP(x)	(((x) >> 8) & 0xff)
4032801cf3Saugustss 
417d386f10Saugustss #define FREEBSD_IOC_DIRMASK	0xe0000000
427d386f10Saugustss #define FREEBSD_IOC_VOID	0x20000000
437d386f10Saugustss #define FREEBSD_IOC_OUT		0x40000000
447d386f10Saugustss #define FREEBSD_IOC_IN		0x80000000
457d386f10Saugustss #define FREEBSD_IOC_INOUT	(FREEBSD_IOC_IN|FREEBSD_IOC_OUT)
467d386f10Saugustss 
47eb1f8f2aSonoe #define FREEBSD_SIOCALIFADDR	 _IOW('i', 27, struct if_laddrreq)
48eb1f8f2aSonoe #define FREEBSD_SIOCGLIFADDR	_IOWR('i', 28, struct if_laddrreq)
49eb1f8f2aSonoe #define FREEBSD_SIOCDLIFADDR	 _IOW('i', 29, struct if_laddrreq)
5020bfd989Schristos #define FREEBSD_SIOCGIFMTU	_IOWR('i', 51, struct oifreq)
5120bfd989Schristos #define FREEBSD_SIOCSIFMTU	 _IOW('i', 52, struct oifreq)
52eb1f8f2aSonoe 
5363bb46e7Smycroft #endif /* !_FREEBSD_IOCTL_H */
54