xref: /onnv-gate/usr/src/cmd/truss/codes.c (revision 13095:eb7af425d949)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
51544Seschrock  * Common Development and Distribution License (the "License").
61544Seschrock  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
2112789SRoger.Faulkner@Oracle.COM 
220Sstevel@tonic-gate /*
2312789SRoger.Faulkner@Oracle.COM  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
270Sstevel@tonic-gate /*	  All Rights Reserved  	*/
280Sstevel@tonic-gate 
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #include <stdio.h>
310Sstevel@tonic-gate #include <stdlib.h>
320Sstevel@tonic-gate #include <unistd.h>
330Sstevel@tonic-gate #include <sys/types.h>
340Sstevel@tonic-gate #include <libproc.h>
350Sstevel@tonic-gate 
360Sstevel@tonic-gate #include <ctype.h>
370Sstevel@tonic-gate #include <string.h>
380Sstevel@tonic-gate #include <sys/dlpi.h>
390Sstevel@tonic-gate #include <sys/ipc.h>
400Sstevel@tonic-gate #include <sys/ipc_impl.h>
410Sstevel@tonic-gate #include <sys/msg.h>
420Sstevel@tonic-gate #include <sys/sem.h>
430Sstevel@tonic-gate #include <sys/shm.h>
440Sstevel@tonic-gate #include <sys/fstyp.h>
450Sstevel@tonic-gate #if defined(__i386) || defined(__amd64)
460Sstevel@tonic-gate #include <sys/sysi86.h>
470Sstevel@tonic-gate #endif /* __i386 */
480Sstevel@tonic-gate #include <sys/unistd.h>
490Sstevel@tonic-gate #include <sys/file.h>
500Sstevel@tonic-gate #include <sys/tiuser.h>
510Sstevel@tonic-gate #include <sys/timod.h>
520Sstevel@tonic-gate #include <sys/stream.h>
530Sstevel@tonic-gate #include <sys/stropts.h>
540Sstevel@tonic-gate #include <sys/termios.h>
550Sstevel@tonic-gate #include <sys/termiox.h>
560Sstevel@tonic-gate #include <sys/jioctl.h>
570Sstevel@tonic-gate #include <sys/filio.h>
580Sstevel@tonic-gate #include <fcntl.h>
590Sstevel@tonic-gate #include <sys/termio.h>
600Sstevel@tonic-gate #include <sys/stermio.h>
610Sstevel@tonic-gate #include <sys/ttold.h>
620Sstevel@tonic-gate #include <sys/mount.h>
630Sstevel@tonic-gate #include <sys/utssys.h>
640Sstevel@tonic-gate #include <sys/sysconfig.h>
650Sstevel@tonic-gate #include <sys/statvfs.h>
660Sstevel@tonic-gate #include <sys/kstat.h>
670Sstevel@tonic-gate #include <sys/audio.h>
680Sstevel@tonic-gate #include <sys/mixer.h>
690Sstevel@tonic-gate #include <sys/cpc_impl.h>
700Sstevel@tonic-gate #include <sys/devpoll.h>
710Sstevel@tonic-gate #include <sys/strredir.h>
720Sstevel@tonic-gate #include <sys/sockio.h>
730Sstevel@tonic-gate #include <netinet/ip_mroute.h>
740Sstevel@tonic-gate #include <net/if.h>
750Sstevel@tonic-gate #include <net/if_arp.h>
760Sstevel@tonic-gate #include <sys/ptyvar.h>
770Sstevel@tonic-gate #include <sys/des.h>
780Sstevel@tonic-gate #include <sys/prnio.h>
790Sstevel@tonic-gate #include <sys/dtrace.h>
800Sstevel@tonic-gate #include <sys/crypto/ioctladmin.h>
810Sstevel@tonic-gate #include <sys/crypto/ioctl.h>
820Sstevel@tonic-gate #include <sys/kbio.h>
830Sstevel@tonic-gate #include <sys/ptms.h>
840Sstevel@tonic-gate #include <sys/aggr.h>
850Sstevel@tonic-gate #include <sys/dld.h>
869815SRishi.Srivatsavai@Sun.COM #include <net/simnet.h>
878275SEric Cheng #include <sys/vnic.h>
88789Sahrens #include <sys/fs/zfs.h>
891400Skrishna #include <inet/kssl/kssl.h>
906318Sedp #include <sys/dkio.h>
918863SEdward.Pilatowicz@Sun.COM #include <sys/fdio.h>
928863SEdward.Pilatowicz@Sun.COM #include <sys/cdio.h>
938863SEdward.Pilatowicz@Sun.COM #include <sys/scsi/impl/uscsi.h>
948863SEdward.Pilatowicz@Sun.COM #include <sys/devinfo_impl.h>
956318Sedp #include <sys/dumpadm.h>
966318Sedp #include <sys/mntio.h>
9710616SSebastien.Roy@Sun.COM #include <inet/iptun.h>
988770SJordan.Vaughan@Sun.com #include <sys/zcons.h>
9910153SAaron.Zang@Sun.COM #include <sys/usb/clients/hid/hid.h>
10010492SMargot.Miller@Sun.COM #include <sys/pm.h>
10110494SGarrett.Damore@Sun.COM #include <sys/soundcard.h>
1020Sstevel@tonic-gate 
1030Sstevel@tonic-gate #include "ramdata.h"
1040Sstevel@tonic-gate #include "proto.h"
1050Sstevel@tonic-gate 
1060Sstevel@tonic-gate #define	FCNTLMIN	F_DUPFD
1078646Sdp@eng.sun.com #define	FCNTLMAX	F_BADFD
1080Sstevel@tonic-gate const char *const FCNTLname[] = {
1090Sstevel@tonic-gate 	"F_DUPFD",
1100Sstevel@tonic-gate 	"F_GETFD",
1110Sstevel@tonic-gate 	"F_SETFD",
1120Sstevel@tonic-gate 	"F_GETFL",
1130Sstevel@tonic-gate 	"F_SETFL",
1140Sstevel@tonic-gate 	"F_O_GETLK",
1150Sstevel@tonic-gate 	"F_SETLK",
1160Sstevel@tonic-gate 	"F_SETLKW",
1170Sstevel@tonic-gate 	"F_CHKFL",
1180Sstevel@tonic-gate 	"F_DUP2FD",
1190Sstevel@tonic-gate 	"F_ALLOCSP",
1200Sstevel@tonic-gate 	"F_FREESP",
1210Sstevel@tonic-gate 	NULL,		/* 12 */
1220Sstevel@tonic-gate 	NULL,		/* 13 */
1230Sstevel@tonic-gate 	"F_GETLK",
1240Sstevel@tonic-gate 	NULL,		/* 15 */
1250Sstevel@tonic-gate 	NULL,		/* 16 */
1260Sstevel@tonic-gate 	NULL,		/* 17 */
1270Sstevel@tonic-gate 	NULL,		/* 18 */
1280Sstevel@tonic-gate 	NULL,		/* 19 */
1290Sstevel@tonic-gate 	NULL,		/* 20 */
1300Sstevel@tonic-gate 	NULL,		/* 21 */
1310Sstevel@tonic-gate 	NULL,		/* 22 */
1320Sstevel@tonic-gate 	"F_GETOWN",
1330Sstevel@tonic-gate 	"F_SETOWN",
1340Sstevel@tonic-gate 	"F_REVOKE",
1350Sstevel@tonic-gate 	"F_HASREMOTELOCKS",
1360Sstevel@tonic-gate 	"F_FREESP64",
1370Sstevel@tonic-gate 	NULL,		/* 28 */
1380Sstevel@tonic-gate 	NULL,		/* 29 */
1390Sstevel@tonic-gate 	NULL,		/* 30 */
1400Sstevel@tonic-gate 	NULL,		/* 31 */
1410Sstevel@tonic-gate 	NULL,		/* 32 */
1420Sstevel@tonic-gate 	"F_GETLK64",
1430Sstevel@tonic-gate 	"F_SETLK64",
1440Sstevel@tonic-gate 	"F_SETLKW64",
1450Sstevel@tonic-gate 	NULL,		/* 36 */
1460Sstevel@tonic-gate 	NULL,		/* 37 */
1470Sstevel@tonic-gate 	NULL,		/* 38 */
1480Sstevel@tonic-gate 	NULL,		/* 39 */
1490Sstevel@tonic-gate 	"F_SHARE",
1500Sstevel@tonic-gate 	"F_UNSHARE",
1510Sstevel@tonic-gate 	"F_SETLK_NBMAND",
1520Sstevel@tonic-gate 	"F_SHARE_NBMAND",
1538646Sdp@eng.sun.com 	"F_SETLK64_NBMAND",
1548646Sdp@eng.sun.com 	NULL,		/* 45 */
1558646Sdp@eng.sun.com 	"F_BADFD"
1560Sstevel@tonic-gate };
1570Sstevel@tonic-gate 
1580Sstevel@tonic-gate #define	SYSFSMIN	GETFSIND
1590Sstevel@tonic-gate #define	SYSFSMAX	GETNFSTYP
1600Sstevel@tonic-gate const char *const SYSFSname[] = {
1610Sstevel@tonic-gate 	"GETFSIND",
1620Sstevel@tonic-gate 	"GETFSTYP",
1630Sstevel@tonic-gate 	"GETNFSTYP"
1640Sstevel@tonic-gate };
1650Sstevel@tonic-gate 
1660Sstevel@tonic-gate #define	SCONFMIN	_CONFIG_NGROUPS
1678646Sdp@eng.sun.com #define	SCONFMAX	_CONFIG_EPHID_MAX
1680Sstevel@tonic-gate const char *const SCONFname[] = {
1690Sstevel@tonic-gate 	"_CONFIG_NGROUPS",		/*  2 */
1700Sstevel@tonic-gate 	"_CONFIG_CHILD_MAX",		/*  3 */
1710Sstevel@tonic-gate 	"_CONFIG_OPEN_FILES",		/*  4 */
1720Sstevel@tonic-gate 	"_CONFIG_POSIX_VER",		/*  5 */
1730Sstevel@tonic-gate 	"_CONFIG_PAGESIZE",		/*  6 */
1740Sstevel@tonic-gate 	"_CONFIG_CLK_TCK",		/*  7 */
1750Sstevel@tonic-gate 	"_CONFIG_XOPEN_VER",		/*  8 */
1760Sstevel@tonic-gate 	"_CONFIG_HRESCLK_TCK",		/*  9 */
1770Sstevel@tonic-gate 	"_CONFIG_PROF_TCK",		/* 10 */
1780Sstevel@tonic-gate 	"_CONFIG_NPROC_CONF",		/* 11 */
1790Sstevel@tonic-gate 	"_CONFIG_NPROC_ONLN",		/* 12 */
1800Sstevel@tonic-gate 	"_CONFIG_AIO_LISTIO_MAX",	/* 13 */
1810Sstevel@tonic-gate 	"_CONFIG_AIO_MAX",		/* 14 */
1820Sstevel@tonic-gate 	"_CONFIG_AIO_PRIO_DELTA_MAX",	/* 15 */
1830Sstevel@tonic-gate 	"_CONFIG_DELAYTIMER_MAX",	/* 16 */
1840Sstevel@tonic-gate 	"_CONFIG_MQ_OPEN_MAX",		/* 17 */
1850Sstevel@tonic-gate 	"_CONFIG_MQ_PRIO_MAX",		/* 18 */
1860Sstevel@tonic-gate 	"_CONFIG_RTSIG_MAX",		/* 19 */
1870Sstevel@tonic-gate 	"_CONFIG_SEM_NSEMS_MAX",	/* 20 */
1880Sstevel@tonic-gate 	"_CONFIG_SEM_VALUE_MAX",	/* 21 */
1890Sstevel@tonic-gate 	"_CONFIG_SIGQUEUE_MAX",		/* 22 */
1900Sstevel@tonic-gate 	"_CONFIG_SIGRT_MIN",		/* 23 */
1910Sstevel@tonic-gate 	"_CONFIG_SIGRT_MAX",		/* 24 */
1920Sstevel@tonic-gate 	"_CONFIG_TIMER_MAX",		/* 25 */
1930Sstevel@tonic-gate 	"_CONFIG_PHYS_PAGES",		/* 26 */
1940Sstevel@tonic-gate 	"_CONFIG_AVPHYS_PAGES",		/* 27 */
1950Sstevel@tonic-gate 	"_CONFIG_COHERENCY",		/* 28 */
1960Sstevel@tonic-gate 	"_CONFIG_SPLIT_CACHE",		/* 29 */
1970Sstevel@tonic-gate 	"_CONFIG_ICACHESZ",		/* 30 */
1980Sstevel@tonic-gate 	"_CONFIG_DCACHESZ",		/* 31 */
1990Sstevel@tonic-gate 	"_CONFIG_ICACHELINESZ",		/* 32 */
2000Sstevel@tonic-gate 	"_CONFIG_DCACHELINESZ",		/* 33 */
2010Sstevel@tonic-gate 	"_CONFIG_ICACHEBLKSZ",		/* 34 */
2020Sstevel@tonic-gate 	"_CONFIG_DCACHEBLKSZ",		/* 35 */
2030Sstevel@tonic-gate 	"_CONFIG_DCACHETBLKSZ",		/* 36 */
2040Sstevel@tonic-gate 	"_CONFIG_ICACHE_ASSOC",		/* 37 */
2050Sstevel@tonic-gate 	"_CONFIG_DCACHE_ASSOC",		/* 38 */
2060Sstevel@tonic-gate 	NULL,				/* 39 */
2070Sstevel@tonic-gate 	NULL,				/* 40 */
2080Sstevel@tonic-gate 	NULL,				/* 41 */
2090Sstevel@tonic-gate 	"_CONFIG_MAXPID",		/* 42 */
2100Sstevel@tonic-gate 	"_CONFIG_STACK_PROT",		/* 43 */
2110Sstevel@tonic-gate 	"_CONFIG_NPROC_MAX",		/* 44 */
2128646Sdp@eng.sun.com 	"_CONFIG_CPUID_MAX",		/* 45 */
2138646Sdp@eng.sun.com 	"_CONFIG_SYMLOOP_MAX",		/* 46 */
2148646Sdp@eng.sun.com 	"_CONFIG_EPHID_MAX",		/* 47 */
2150Sstevel@tonic-gate };
2160Sstevel@tonic-gate 
2170Sstevel@tonic-gate #define	PATHCONFMIN	_PC_LINK_MAX
2188646Sdp@eng.sun.com #define	PATHCONFMAX	_PC_XATTR_EXISTS
2190Sstevel@tonic-gate const char *const PATHCONFname[] = {
2208646Sdp@eng.sun.com 	"_PC_LINK_MAX",			/*  1 */
2218646Sdp@eng.sun.com 	"_PC_MAX_CANON",		/*  2 */
2228646Sdp@eng.sun.com 	"_PC_MAX_INPUT",		/*  3 */
2238646Sdp@eng.sun.com 	"_PC_NAME_MAX",			/*  4 */
2248646Sdp@eng.sun.com 	"_PC_PATH_MAX",			/*  5 */
2258646Sdp@eng.sun.com 	"_PC_PIPE_BUF",			/*  6 */
2268646Sdp@eng.sun.com 	"_PC_NO_TRUNC",			/*  7 */
2278646Sdp@eng.sun.com 	"_PC_VDISABLE",			/*  8 */
2288646Sdp@eng.sun.com 	"_PC_CHOWN_RESTRICTED",		/*  9 */
2298646Sdp@eng.sun.com 	"_PC_ASYNC_IO",			/* 10 */
2308646Sdp@eng.sun.com 	"_PC_PRIO_IO",			/* 11 */
2318646Sdp@eng.sun.com 	"_PC_SYNC_IO",			/* 12 */
2328646Sdp@eng.sun.com 	"_PC_ALLOC_SIZE_MIN",		/* 13 */
2338646Sdp@eng.sun.com 	"_PC_REC_INCR_XFER_SIZE",	/* 14 */
2348646Sdp@eng.sun.com 	"_PC_REC_MAX_XFER_SIZE",	/* 15 */
2358646Sdp@eng.sun.com 	"_PC_REC_MIN_XFER_SIZE",	/* 16 */
2368646Sdp@eng.sun.com 	"_PC_REC_XFER_ALIGN",		/* 17 */
2378646Sdp@eng.sun.com 	"_PC_SYMLINK_MAX",		/* 18 */
2388646Sdp@eng.sun.com 	"_PC_2_SYMLINKS",		/* 19 */
2398646Sdp@eng.sun.com 	"_PC_ACL_ENABLED",		/* 20 */
2408646Sdp@eng.sun.com 	"_PC_MIN_HOLE_SIZE",		/* 21 */
2418646Sdp@eng.sun.com 	"_PC_CASE_BEHAVIOR",		/* 22 */
2428646Sdp@eng.sun.com 	"_PC_SATTR_ENABLED",		/* 23 */
2438646Sdp@eng.sun.com 	"_PC_SATTR_EXISTS",		/* 24 */
2449749STim.Haley@Sun.COM 	"_PC_ACCESS_FILTERING",		/* 25 */
24510440SRoger.Faulkner@Sun.COM 	"_PC_TIMESTAMP_RESOLUTION",	/* 26 */
2468646Sdp@eng.sun.com 	NULL,				/* 27 */
2478646Sdp@eng.sun.com 	NULL,				/* 28 */
2488646Sdp@eng.sun.com 	NULL,				/* 29 */
2498646Sdp@eng.sun.com 	NULL,				/* 30 */
2508646Sdp@eng.sun.com 	NULL,				/* 31 */
2518646Sdp@eng.sun.com 	NULL,				/* 32 */
2528646Sdp@eng.sun.com 	NULL,				/* 33 */
2538646Sdp@eng.sun.com 	NULL,				/* 34 */
2548646Sdp@eng.sun.com 	NULL,				/* 35 */
2558646Sdp@eng.sun.com 	NULL,				/* 36 */
2568646Sdp@eng.sun.com 	NULL,				/* 37 */
2578646Sdp@eng.sun.com 	NULL,				/* 38 */
2588646Sdp@eng.sun.com 	NULL,				/* 39 */
2598646Sdp@eng.sun.com 	NULL,				/* 40 */
2608646Sdp@eng.sun.com 	NULL,				/* 41 */
2618646Sdp@eng.sun.com 	NULL,				/* 42 */
2628646Sdp@eng.sun.com 	NULL,				/* 43 */
2638646Sdp@eng.sun.com 	NULL,				/* 44 */
2648646Sdp@eng.sun.com 	NULL,				/* 45 */
2658646Sdp@eng.sun.com 	NULL,				/* 46 */
2668646Sdp@eng.sun.com 	NULL,				/* 47 */
2678646Sdp@eng.sun.com 	NULL,				/* 48 */
2688646Sdp@eng.sun.com 	NULL,				/* 49 */
2698646Sdp@eng.sun.com 	NULL,				/* 50 */
2708646Sdp@eng.sun.com 	NULL,				/* 51 */
2718646Sdp@eng.sun.com 	NULL,				/* 52 */
2728646Sdp@eng.sun.com 	NULL,				/* 53 */
2738646Sdp@eng.sun.com 	NULL,				/* 54 */
2748646Sdp@eng.sun.com 	NULL,				/* 55 */
2758646Sdp@eng.sun.com 	NULL,				/* 56 */
2768646Sdp@eng.sun.com 	NULL,				/* 57 */
2778646Sdp@eng.sun.com 	NULL,				/* 58 */
2788646Sdp@eng.sun.com 	NULL,				/* 59 */
2798646Sdp@eng.sun.com 	NULL,				/* 60 */
2808646Sdp@eng.sun.com 	NULL,				/* 61 */
2818646Sdp@eng.sun.com 	NULL,				/* 62 */
2828646Sdp@eng.sun.com 	NULL,				/* 63 */
2838646Sdp@eng.sun.com 	NULL,				/* 64 */
2848646Sdp@eng.sun.com 	NULL,				/* 65 */
2858646Sdp@eng.sun.com 	NULL,				/* 66 */
2868646Sdp@eng.sun.com 	"_PC_FILESIZEBITS",		/* 67 */
2878646Sdp@eng.sun.com 	NULL,				/* 68 */
2888646Sdp@eng.sun.com 	NULL,				/* 69 */
2898646Sdp@eng.sun.com 	NULL,				/* 70 */
2908646Sdp@eng.sun.com 	NULL,				/* 71 */
2918646Sdp@eng.sun.com 	NULL,				/* 72 */
2928646Sdp@eng.sun.com 	NULL,				/* 73 */
2938646Sdp@eng.sun.com 	NULL,				/* 74 */
2948646Sdp@eng.sun.com 	NULL,				/* 75 */
2958646Sdp@eng.sun.com 	NULL,				/* 76 */
2968646Sdp@eng.sun.com 	NULL,				/* 77 */
2978646Sdp@eng.sun.com 	NULL,				/* 78 */
2988646Sdp@eng.sun.com 	NULL,				/* 79 */
2998646Sdp@eng.sun.com 	NULL,				/* 80 */
3008646Sdp@eng.sun.com 	NULL,				/* 81 */
3018646Sdp@eng.sun.com 	NULL,				/* 82 */
3028646Sdp@eng.sun.com 	NULL,				/* 83 */
3038646Sdp@eng.sun.com 	NULL,				/* 84 */
3048646Sdp@eng.sun.com 	NULL,				/* 85 */
3058646Sdp@eng.sun.com 	NULL,				/* 86 */
3068646Sdp@eng.sun.com 	NULL,				/* 87 */
3078646Sdp@eng.sun.com 	NULL,				/* 88 */
3088646Sdp@eng.sun.com 	NULL,				/* 89 */
3098646Sdp@eng.sun.com 	NULL,				/* 90 */
3108646Sdp@eng.sun.com 	NULL,				/* 91 */
3118646Sdp@eng.sun.com 	NULL,				/* 92 */
3128646Sdp@eng.sun.com 	NULL,				/* 93 */
3138646Sdp@eng.sun.com 	NULL,				/* 94 */
3148646Sdp@eng.sun.com 	NULL,				/* 95 */
3158646Sdp@eng.sun.com 	NULL,				/* 96 */
3168646Sdp@eng.sun.com 	NULL,				/* 97 */
3178646Sdp@eng.sun.com 	NULL,				/* 98 */
3188646Sdp@eng.sun.com 	NULL,				/* 99 */
3198646Sdp@eng.sun.com 	"_PC_XATTR_ENABLED",		/* 100 */
3208646Sdp@eng.sun.com 	"_PC_XATTR_EXISTS",		/* 101, _PC_LAST */
3210Sstevel@tonic-gate };
3220Sstevel@tonic-gate 
3230Sstevel@tonic-gate const struct ioc {
3240Sstevel@tonic-gate 	uint_t	code;
3250Sstevel@tonic-gate 	const char *name;
3260Sstevel@tonic-gate 	const char *datastruct;
3270Sstevel@tonic-gate } ioc[] = {
3280Sstevel@tonic-gate 	{ (uint_t)TCGETA,	"TCGETA",	NULL },
3290Sstevel@tonic-gate 	{ (uint_t)TCSETA,	"TCSETA",	NULL },
3300Sstevel@tonic-gate 	{ (uint_t)TCSETAW,	"TCSETAW",	NULL },
3310Sstevel@tonic-gate 	{ (uint_t)TCSETAF,	"TCSETAF",	NULL },
3320Sstevel@tonic-gate 	{ (uint_t)TCFLSH,	"TCFLSH",	NULL },
3330Sstevel@tonic-gate 	{ (uint_t)TIOCKBON,	"TIOCKBON",	NULL },
3340Sstevel@tonic-gate 	{ (uint_t)TIOCKBOF,	"TIOCKBOF",	NULL },
3350Sstevel@tonic-gate 	{ (uint_t)KBENABLED,	"KBENABLED",	NULL },
3360Sstevel@tonic-gate 	{ (uint_t)TCGETS,	"TCGETS",	NULL },
3370Sstevel@tonic-gate 	{ (uint_t)TCSETS,	"TCSETS",	NULL },
3380Sstevel@tonic-gate 	{ (uint_t)TCSETSW,	"TCSETSW",	NULL },
3390Sstevel@tonic-gate 	{ (uint_t)TCSETSF,	"TCSETSF",	NULL },
3400Sstevel@tonic-gate 	{ (uint_t)TCXONC,	"TCXONC",	NULL },
3410Sstevel@tonic-gate 	{ (uint_t)TCSBRK,	"TCSBRK",	NULL },
3420Sstevel@tonic-gate 	{ (uint_t)TCDSET,	"TCDSET",	NULL },
3430Sstevel@tonic-gate 	{ (uint_t)RTS_TOG,	"RTS_TOG",	NULL },
3440Sstevel@tonic-gate 	{ (uint_t)TIOCSWINSZ,	"TIOCSWINSZ",	NULL },
3450Sstevel@tonic-gate 	{ (uint_t)TIOCGWINSZ,	"TIOCGWINSZ",	NULL },
3460Sstevel@tonic-gate 	{ (uint_t)TIOCGETD,	"TIOCGETD",	NULL },
3470Sstevel@tonic-gate 	{ (uint_t)TIOCSETD,	"TIOCSETD",	NULL },
3480Sstevel@tonic-gate 	{ (uint_t)TIOCHPCL,	"TIOCHPCL",	NULL },
3490Sstevel@tonic-gate 	{ (uint_t)TIOCGETP,	"TIOCGETP",	NULL },
3500Sstevel@tonic-gate 	{ (uint_t)TIOCSETP,	"TIOCSETP",	NULL },
3510Sstevel@tonic-gate 	{ (uint_t)TIOCSETN,	"TIOCSETN",	NULL },
3520Sstevel@tonic-gate 	{ (uint_t)TIOCEXCL,	"TIOCEXCL",	NULL },
3530Sstevel@tonic-gate 	{ (uint_t)TIOCNXCL,	"TIOCNXCL",	NULL },
3540Sstevel@tonic-gate 	{ (uint_t)TIOCFLUSH,	"TIOCFLUSH",	NULL },
3550Sstevel@tonic-gate 	{ (uint_t)TIOCSETC,	"TIOCSETC",	NULL },
3560Sstevel@tonic-gate 	{ (uint_t)TIOCGETC,	"TIOCGETC",	NULL },
3570Sstevel@tonic-gate 	{ (uint_t)TIOCGPGRP,	"TIOCGPGRP",	NULL },
3580Sstevel@tonic-gate 	{ (uint_t)TIOCSPGRP,	"TIOCSPGRP",	NULL },
3590Sstevel@tonic-gate 	{ (uint_t)TIOCGSID,	"TIOCGSID",	NULL },
3600Sstevel@tonic-gate 	{ (uint_t)TIOCSTI,	"TIOCSTI",	NULL },
3610Sstevel@tonic-gate 	{ (uint_t)TIOCMSET,	"TIOCMSET",	NULL },
3620Sstevel@tonic-gate 	{ (uint_t)TIOCMBIS,	"TIOCMBIS",	NULL },
3630Sstevel@tonic-gate 	{ (uint_t)TIOCMBIC,	"TIOCMBIC",	NULL },
3640Sstevel@tonic-gate 	{ (uint_t)TIOCMGET,	"TIOCMGET",	NULL },
3650Sstevel@tonic-gate 	{ (uint_t)TIOCREMOTE,	"TIOCREMOTE",	NULL },
3660Sstevel@tonic-gate 	{ (uint_t)TIOCSIGNAL,	"TIOCSIGNAL",	NULL },
3670Sstevel@tonic-gate 	{ (uint_t)TIOCSTART,	"TIOCSTART",	NULL },
3680Sstevel@tonic-gate 	{ (uint_t)TIOCSTOP,	"TIOCSTOP",	NULL },
3690Sstevel@tonic-gate 	{ (uint_t)TIOCNOTTY,	"TIOCNOTTY",	NULL },
3709354STim.Marsland@Sun.COM 	{ (uint_t)TIOCSCTTY,	"TIOCSCTTY",	NULL },
3710Sstevel@tonic-gate 	{ (uint_t)TIOCOUTQ,	"TIOCOUTQ",	NULL },
3720Sstevel@tonic-gate 	{ (uint_t)TIOCGLTC,	"TIOCGLTC",	NULL },
3730Sstevel@tonic-gate 	{ (uint_t)TIOCSLTC,	"TIOCSLTC",	NULL },
3740Sstevel@tonic-gate 	{ (uint_t)TIOCCDTR,	"TIOCCDTR",	NULL },
3750Sstevel@tonic-gate 	{ (uint_t)TIOCSDTR,	"TIOCSDTR",	NULL },
3760Sstevel@tonic-gate 	{ (uint_t)TIOCCBRK,	"TIOCCBRK",	NULL },
3770Sstevel@tonic-gate 	{ (uint_t)TIOCSBRK,	"TIOCSBRK",	NULL },
3780Sstevel@tonic-gate 	{ (uint_t)TIOCLGET,	"TIOCLGET",	NULL },
3790Sstevel@tonic-gate 	{ (uint_t)TIOCLSET,	"TIOCLSET",	NULL },
3800Sstevel@tonic-gate 	{ (uint_t)TIOCLBIC,	"TIOCLBIC",	NULL },
3810Sstevel@tonic-gate 	{ (uint_t)TIOCLBIS,	"TIOCLBIS",	NULL },
3820Sstevel@tonic-gate 
3839354STim.Marsland@Sun.COM 	{ (uint_t)TIOCSILOOP,	"TIOCSILOOP",	NULL },
3849354STim.Marsland@Sun.COM 	{ (uint_t)TIOCCILOOP,	"TIOCSILOOP",	NULL },
3859354STim.Marsland@Sun.COM 
3869354STim.Marsland@Sun.COM 	{ (uint_t)TIOCGPPS,	"TIOCGPPS",	NULL },
3879354STim.Marsland@Sun.COM 	{ (uint_t)TIOCSPPS,	"TIOCSPPS",	NULL },
3889354STim.Marsland@Sun.COM 	{ (uint_t)TIOCGPPSEV,	"TIOCGPPSEV",	NULL },
3899354STim.Marsland@Sun.COM 
3900Sstevel@tonic-gate 	{ (uint_t)TIOCPKT,	"TIOCPKT",	NULL },	/* ptyvar.h */
3910Sstevel@tonic-gate 	{ (uint_t)TIOCUCNTL,	"TIOCUCNTL",	NULL },
3920Sstevel@tonic-gate 	{ (uint_t)TIOCTCNTL,	"TIOCTCNTL",	NULL },
3930Sstevel@tonic-gate 	{ (uint_t)TIOCISPACE,	"TIOCISPACE",	NULL },
3940Sstevel@tonic-gate 	{ (uint_t)TIOCISIZE,	"TIOCISIZE",	NULL },
3950Sstevel@tonic-gate 	{ (uint_t)TIOCSSIZE,	"TIOCSSIZE",	"ttysize" },
3960Sstevel@tonic-gate 	{ (uint_t)TIOCGSIZE,	"TIOCGSIZE",	"ttysize" },
3970Sstevel@tonic-gate 
3980Sstevel@tonic-gate 	/*
3993147Sxc151355 	 * Unfortunately, the DLIOC and LDIOC codes overlap.  Since the LDIOC
4000Sstevel@tonic-gate 	 * ioctls (for xenix compatibility) are far less likely to be used, we
4013147Sxc151355 	 * give preference to DLIOC.
4020Sstevel@tonic-gate 	 */
4030Sstevel@tonic-gate 	{ (uint_t)DLIOCRAW,	"DLIOCRAW",	NULL },
4043147Sxc151355 	{ (uint_t)DLIOCNATIVE,	"DLIOCNATIVE",	NULL },
4058023SPhil.Kirk@Sun.COM 	{ (uint_t)DLIOCIPNETINFO, "DLIOCIPNETINFO", NULL},
40610491SRishi.Srivatsavai@Sun.COM 	{ (uint_t)DLIOCLOWLINK,	"DLIOCLOWLINK",	NULL },
4070Sstevel@tonic-gate 
4080Sstevel@tonic-gate 	{ (uint_t)LDOPEN,	"LDOPEN",	NULL },
4090Sstevel@tonic-gate 	{ (uint_t)LDCLOSE,	"LDCLOSE",	NULL },
4100Sstevel@tonic-gate 	{ (uint_t)LDCHG,	"LDCHG",	NULL },
4110Sstevel@tonic-gate 	{ (uint_t)LDGETT,	"LDGETT",	NULL },
4120Sstevel@tonic-gate 	{ (uint_t)LDSETT,	"LDSETT",	NULL },
4130Sstevel@tonic-gate 	{ (uint_t)LDSMAP,	"LDSMAP",	NULL },
4140Sstevel@tonic-gate 	{ (uint_t)LDGMAP,	"LDGMAP",	NULL },
4150Sstevel@tonic-gate 	{ (uint_t)LDNMAP,	"LDNMAP",	NULL },
4160Sstevel@tonic-gate 	{ (uint_t)TCGETX,	"TCGETX",	NULL },
4170Sstevel@tonic-gate 	{ (uint_t)TCSETX,	"TCSETX",	NULL },
4180Sstevel@tonic-gate 	{ (uint_t)TCSETXW,	"TCSETXW",	NULL },
4190Sstevel@tonic-gate 	{ (uint_t)TCSETXF,	"TCSETXF",	NULL },
4200Sstevel@tonic-gate 	{ (uint_t)FIORDCHK,	"FIORDCHK",	NULL },
4210Sstevel@tonic-gate 	{ (uint_t)FIOCLEX,	"FIOCLEX",	NULL },
4220Sstevel@tonic-gate 	{ (uint_t)FIONCLEX,	"FIONCLEX",	NULL },
4230Sstevel@tonic-gate 	{ (uint_t)FIONREAD,	"FIONREAD",	NULL },
4240Sstevel@tonic-gate 	{ (uint_t)FIONBIO,	"FIONBIO",	NULL },
4250Sstevel@tonic-gate 	{ (uint_t)FIOASYNC,	"FIOASYNC",	NULL },
4260Sstevel@tonic-gate 	{ (uint_t)FIOSETOWN,	"FIOSETOWN",	NULL },
4270Sstevel@tonic-gate 	{ (uint_t)FIOGETOWN,	"FIOGETOWN",	NULL },
4280Sstevel@tonic-gate #ifdef DIOCGETP
4290Sstevel@tonic-gate 	{ (uint_t)DIOCGETP,	"DIOCGETP",	NULL },
4300Sstevel@tonic-gate 	{ (uint_t)DIOCSETP,	"DIOCSETP",	NULL },
4310Sstevel@tonic-gate #endif
4320Sstevel@tonic-gate #ifdef DIOCGETC
4330Sstevel@tonic-gate 	{ (uint_t)DIOCGETC,	"DIOCGETC",	NULL },
4340Sstevel@tonic-gate 	{ (uint_t)DIOCGETB,	"DIOCGETB",	NULL },
4350Sstevel@tonic-gate 	{ (uint_t)DIOCSETE,	"DIOCSETE",	NULL },
4360Sstevel@tonic-gate #endif
4370Sstevel@tonic-gate #ifdef IFFORMAT
4380Sstevel@tonic-gate 	{ (uint_t)IFFORMAT,	"IFFORMAT",	NULL },
4390Sstevel@tonic-gate 	{ (uint_t)IFBCHECK,	"IFBCHECK",	NULL },
4400Sstevel@tonic-gate 	{ (uint_t)IFCONFIRM,	"IFCONFIRM",	NULL },
4410Sstevel@tonic-gate #endif
4420Sstevel@tonic-gate #ifdef LIOCGETP
4430Sstevel@tonic-gate 	{ (uint_t)LIOCGETP,	"LIOCGETP",	NULL },
4440Sstevel@tonic-gate 	{ (uint_t)LIOCSETP,	"LIOCSETP",	NULL },
4450Sstevel@tonic-gate 	{ (uint_t)LIOCGETS,	"LIOCGETS",	NULL },
4460Sstevel@tonic-gate 	{ (uint_t)LIOCSETS,	"LIOCSETS",	NULL },
4470Sstevel@tonic-gate #endif
4480Sstevel@tonic-gate #ifdef JBOOT
4490Sstevel@tonic-gate 	{ (uint_t)JBOOT,	"JBOOT",	NULL },
4500Sstevel@tonic-gate 	{ (uint_t)JTERM,	"JTERM",	NULL },
4510Sstevel@tonic-gate 	{ (uint_t)JMPX,		"JMPX",	NULL },
4520Sstevel@tonic-gate #ifdef JTIMO
4530Sstevel@tonic-gate 	{ (uint_t)JTIMO,	"JTIMO",	NULL },
4540Sstevel@tonic-gate #endif
4550Sstevel@tonic-gate 	{ (uint_t)JWINSIZE,	"JWINSIZE",	NULL },
4560Sstevel@tonic-gate 	{ (uint_t)JTIMOM,	"JTIMOM",	NULL },
4570Sstevel@tonic-gate 	{ (uint_t)JZOMBOOT,	"JZOMBOOT",	NULL },
4580Sstevel@tonic-gate 	{ (uint_t)JAGENT,	"JAGENT",	NULL },
4590Sstevel@tonic-gate 	{ (uint_t)JTRUN,	"JTRUN",	NULL },
4600Sstevel@tonic-gate 	{ (uint_t)JXTPROTO,	"JXTPROTO",	NULL },
4610Sstevel@tonic-gate #endif
4620Sstevel@tonic-gate 	{ (uint_t)KSTAT_IOC_CHAIN_ID,	"KSTAT_IOC_CHAIN_ID",	NULL },
4630Sstevel@tonic-gate 	{ (uint_t)KSTAT_IOC_READ,	"KSTAT_IOC_READ",	NULL },
4640Sstevel@tonic-gate 	{ (uint_t)KSTAT_IOC_WRITE,	"KSTAT_IOC_WRITE",	NULL },
4650Sstevel@tonic-gate 	{ (uint_t)STGET,	"STGET",	NULL },
4660Sstevel@tonic-gate 	{ (uint_t)STSET,	"STSET",	NULL },
4670Sstevel@tonic-gate 	{ (uint_t)STTHROW,	"STTHROW",	NULL },
4680Sstevel@tonic-gate 	{ (uint_t)STWLINE,	"STWLINE",	NULL },
4690Sstevel@tonic-gate 	{ (uint_t)STTSV,	"STTSV",	NULL },
4700Sstevel@tonic-gate 	{ (uint_t)I_NREAD,	"I_NREAD",	NULL },
4710Sstevel@tonic-gate 	{ (uint_t)I_PUSH,	"I_PUSH",	NULL },
4720Sstevel@tonic-gate 	{ (uint_t)I_POP,	"I_POP",	NULL },
4730Sstevel@tonic-gate 	{ (uint_t)I_LOOK,	"I_LOOK",	NULL },
4740Sstevel@tonic-gate 	{ (uint_t)I_FLUSH,	"I_FLUSH",	NULL },
4750Sstevel@tonic-gate 	{ (uint_t)I_SRDOPT,	"I_SRDOPT",	NULL },
4760Sstevel@tonic-gate 	{ (uint_t)I_GRDOPT,	"I_GRDOPT",	NULL },
4770Sstevel@tonic-gate 	{ (uint_t)I_STR,	"I_STR",	NULL },
4780Sstevel@tonic-gate 	{ (uint_t)I_SETSIG,	"I_SETSIG",	NULL },
4790Sstevel@tonic-gate 	{ (uint_t)I_GETSIG,	"I_GETSIG",	NULL },
4800Sstevel@tonic-gate 	{ (uint_t)I_FIND,	"I_FIND",	NULL },
4810Sstevel@tonic-gate 	{ (uint_t)I_LINK,	"I_LINK",	NULL },
4820Sstevel@tonic-gate 	{ (uint_t)I_UNLINK,	"I_UNLINK",	NULL },
4830Sstevel@tonic-gate 	{ (uint_t)I_PEEK,	"I_PEEK",	NULL },
4840Sstevel@tonic-gate 	{ (uint_t)I_FDINSERT,	"I_FDINSERT",	NULL },
4850Sstevel@tonic-gate 	{ (uint_t)I_SENDFD,	"I_SENDFD",	NULL },
4860Sstevel@tonic-gate 	{ (uint_t)I_RECVFD,	"I_RECVFD",	NULL },
4870Sstevel@tonic-gate 	{ (uint_t)I_SWROPT,	"I_SWROPT",	NULL },
4880Sstevel@tonic-gate 	{ (uint_t)I_GWROPT,	"I_GWROPT",	NULL },
4890Sstevel@tonic-gate 	{ (uint_t)I_LIST,	"I_LIST",	NULL },
4900Sstevel@tonic-gate 	{ (uint_t)I_PLINK,	"I_PLINK",	NULL },
4910Sstevel@tonic-gate 	{ (uint_t)I_PUNLINK,	"I_PUNLINK",	NULL },
4920Sstevel@tonic-gate 	{ (uint_t)I_FLUSHBAND,	"I_FLUSHBAND",	NULL },
4930Sstevel@tonic-gate 	{ (uint_t)I_CKBAND,	"I_CKBAND",	NULL },
4940Sstevel@tonic-gate 	{ (uint_t)I_GETBAND,	"I_GETBAND",	NULL },
4950Sstevel@tonic-gate 	{ (uint_t)I_ATMARK,	"I_ATMARK",	NULL },
4960Sstevel@tonic-gate 	{ (uint_t)I_SETCLTIME,	"I_SETCLTIME",	NULL },
4970Sstevel@tonic-gate 	{ (uint_t)I_GETCLTIME,	"I_GETCLTIME",	NULL },
4980Sstevel@tonic-gate 	{ (uint_t)I_CANPUT,	"I_CANPUT",	NULL },
4990Sstevel@tonic-gate 	{ (uint_t)I_ANCHOR,	"I_ANCHOR",	NULL },
5008752SPeter.Memishian@Sun.COM 	{ (uint_t)_I_CMD,	"_I_CMD",	NULL },
5010Sstevel@tonic-gate #ifdef TI_GETINFO
5020Sstevel@tonic-gate 	{ (uint_t)TI_GETINFO,	"TI_GETINFO",	NULL },
5030Sstevel@tonic-gate 	{ (uint_t)TI_OPTMGMT,	"TI_OPTMGMT",	NULL },
5040Sstevel@tonic-gate 	{ (uint_t)TI_BIND,	"TI_BIND",	NULL },
5050Sstevel@tonic-gate 	{ (uint_t)TI_UNBIND,	"TI_UNBIND",	NULL },
5060Sstevel@tonic-gate #endif
5070Sstevel@tonic-gate #ifdef	TI_CAPABILITY
5080Sstevel@tonic-gate 	{ (uint_t)TI_CAPABILITY,	"TI_CAPABILITY",	NULL },
5090Sstevel@tonic-gate #endif
5100Sstevel@tonic-gate #ifdef TI_GETMYNAME
5110Sstevel@tonic-gate 	{ (uint_t)TI_GETMYNAME,		"TI_GETMYNAME",		NULL },
5120Sstevel@tonic-gate 	{ (uint_t)TI_GETPEERNAME,	"TI_GETPEERNAME",	NULL },
5130Sstevel@tonic-gate 	{ (uint_t)TI_SETMYNAME,		"TI_SETMYNAME",		NULL },
5140Sstevel@tonic-gate 	{ (uint_t)TI_SETPEERNAME,	"TI_SETPEERNAME",	NULL },
5150Sstevel@tonic-gate #endif
5160Sstevel@tonic-gate #ifdef V_PREAD
5170Sstevel@tonic-gate 	{ (uint_t)V_PREAD,	"V_PREAD",	NULL },
5180Sstevel@tonic-gate 	{ (uint_t)V_PWRITE,	"V_PWRITE",	NULL },
5190Sstevel@tonic-gate 	{ (uint_t)V_PDREAD,	"V_PDREAD",	NULL },
5200Sstevel@tonic-gate 	{ (uint_t)V_PDWRITE,	"V_PDWRITE",	NULL },
5210Sstevel@tonic-gate #if !defined(__i386) && !defined(__amd64)
5220Sstevel@tonic-gate 	{ (uint_t)V_GETSSZ,	"V_GETSSZ",	NULL },
5230Sstevel@tonic-gate #endif /* !__i386 */
5240Sstevel@tonic-gate #endif
5250Sstevel@tonic-gate 	/* audio */
5260Sstevel@tonic-gate 	{ (uint_t)AUDIO_GETINFO,	"AUDIO_GETINFO",	NULL },
5270Sstevel@tonic-gate 	{ (uint_t)AUDIO_SETINFO,	"AUDIO_SETINFO",	NULL },
5280Sstevel@tonic-gate 	{ (uint_t)AUDIO_DRAIN,		"AUDIO_DRAIN",		NULL },
5290Sstevel@tonic-gate 	{ (uint_t)AUDIO_GETDEV,		"AUDIO_GETDEV",		NULL },
5300Sstevel@tonic-gate 	{ (uint_t)AUDIO_DIAG_LOOPBACK,	"AUDIO_DIAG_LOOPBACK",	NULL },
5310Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_CH_NUMBER,	"AUDIO_GET_CH_NUMBER",	NULL },
5320Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_CH_TYPE,	"AUDIO_GET_CH_TYPE",	NULL },
5330Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_NUM_CHS,	"AUDIO_GET_NUM_CHS",	NULL },
5340Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_AD_DEV,	"AUDIO_GET_AD_DEV",	NULL },
5350Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_APM_DEV,	"AUDIO_GET_APM_DEV",	NULL },
5360Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_AS_DEV,	"AUDIO_GET_AS_DEV",	NULL },
5370Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXER_MULTIPLE_OPEN,	"AUDIO_MIXER_MULTIPLE_OPEN",
5380Sstevel@tonic-gate 	    NULL },
5390Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXER_SINGLE_OPEN,	"AUDIO_MIXER_SINGLE_OPEN",
5400Sstevel@tonic-gate 	    NULL },
5410Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXER_GET_SAMPLE_RATES,	"AUDIO_MIXER_GET_SAMPLE_RATES",
5420Sstevel@tonic-gate 	    NULL },
5430Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_GETINFO,	"AUDIO_MIXERCTL_GETINFO",
5440Sstevel@tonic-gate 	    NULL },
5450Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_SETINFO,	"AUDIO_MIXERCTL_SETINFO",
5460Sstevel@tonic-gate 	    NULL },
5470Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_GET_CHINFO,	"AUDIO_MIXERCTL_GET_CHINFO",
5480Sstevel@tonic-gate 	    NULL },
5490Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_SET_CHINFO,	"AUDIO_MIXERCTL_SET_CHINFO",
5500Sstevel@tonic-gate 	    NULL },
5510Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_GET_MODE,	"AUDIO_MIXERCTL_GET_MODE",
5520Sstevel@tonic-gate 	    NULL },
5530Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_SET_MODE,	"AUDIO_MIXERCTL_SET_MODE",
5540Sstevel@tonic-gate 	    NULL },
55510494SGarrett.Damore@Sun.COM 	/* new style Boomer (OSS) ioctls */
55610494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_SYSINFO,	"SNDCTL_SYSINFO",	NULL },
55710494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_AUDIOINFO,	"SNDCTL_AUDIOINFO",	NULL },
55810494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_AUDIOINFO_EX,	"SNDCTL_AUDIOINFO_EX",	NULL },
55910494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_MIXERINFO,	"SNDCTL_MIXERINFO",	NULL },
56010494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_CARDINFO,	"SNDCTL_CARDINFO",	NULL },
56110494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_ENGINEINFO,	"SNDCTL_ENGINEINFO",	NULL },
56210494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_MIX_NRMIX,	"SNDCTL_MIX_NRMIX",	NULL },
56310494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_MIX_NREXT,	"SNDCTL_MIX_NREXT",	NULL },
56410494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_MIX_EXTINFO,	"SNDCTL_MIX_EXTINFO",	NULL },
56510494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_MIX_READ,	"SNDCTL_MIX_READ",	NULL },
56610494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_MIX_WRITE,	"SNDCTL_MIX_WRITE",	NULL },
56710494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_MIX_ENUMINFO,	"SNDCTL_MIX_ENUMINFO",	NULL },
56810494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_MIX_DESCRIPTION,	"SNDCTL_MIX_DESCRIPTION",
56910494SGarrett.Damore@Sun.COM 	    NULL },
57010494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_SETSONG,	"SNDCTL_SETSONG",	NULL },
57110494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_GETSONG,	"SNDCTL_GETSONG",	NULL },
57210494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_SETNAME,	"SNDCTL_SETNAME",	NULL },
57310494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_SETLABEL,	"SNDCTL_SETLABEL",	NULL },
57410494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_GETLABEL,	"SNDCTL_GETLABEL",	NULL },
57510494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_HALT,	"SNDCTL_DSP_HALT",	NULL },
57610494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_RESET,	"SNDCTL_DSP_RESET",	NULL },
57710494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SYNC,	"SNDCTL_DSP_SYNC",	NULL },
57810494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SPEED,	"SNDCTL_DSP_SPEED",	NULL },
57910494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_STEREO,	"SNDCTL_DSP_STEREO",	NULL },
58010494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETBLKSIZE,	"SNDCTL_DSP_GETBLKSIZE",
58110494SGarrett.Damore@Sun.COM 	    NULL },
58210494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SAMPLESIZE,	"SNDCTL_DSP_SAMPLESIZE",
58310494SGarrett.Damore@Sun.COM 	    NULL },
58410494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_CHANNELS,	"SNDCTL_DSP_CHANNELS",  NULL },
58510494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_POST,	"SNDCTL_DSP_POST",	NULL },
58610494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SUBDIVIDE,	"SNDCTL_DSP_SUBDIVIDE",	NULL },
58710494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SETFRAGMENT,	"SNDCTL_DSP_SETFRAGMENT",
58810494SGarrett.Damore@Sun.COM 	    NULL },
58910494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETFMTS,	"SNDCTL_DSP_GETFMTS",	NULL },
59010494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SETFMT,	"SNDCTL_DSP_SETFMT",	NULL },
59110494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETOSPACE,	"SNDCTL_DSP_GETOSPACE",	NULL },
59210494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETISPACE,	"SNDCTL_DSP_GETISPACE",	NULL },
59310494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETCAPS,	"SNDCTL_DSP_CAPS",	NULL },
59410494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETTRIGGER,	"SNDCTL_DSP_GETTRIGGER",
59510494SGarrett.Damore@Sun.COM 	    NULL },
59610494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SETTRIGGER,	"SNDCTL_DSP_SETTRIGGER",
59710494SGarrett.Damore@Sun.COM 	    NULL },
59810494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETIPTR,	"SNDCTL_DSP_GETIPTR",	NULL },
59910494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETOPTR,	"SNDCTL_DSP_GETOPTR",	NULL },
60010494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SETSYNCRO,	"SNDCTL_DSP_SETSYNCRO",	NULL },
60110494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SETDUPLEX,	"SNDCTL_DSP_SETDUPLEX",	NULL },
60210494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_PROFILE,	"SNDCTL_DSP_PROFILE",	NULL },
60310494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETODELAY,	"SNDCTL_DSP_GETODELAY",	NULL },
60410494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETPLAYVOL,	"SNDCTL_DSP_GETPLAYVOL",
60510494SGarrett.Damore@Sun.COM 	    NULL },
60610494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SETPLAYVOL,	"SNDCTL_DSP_SETPLAYVOL",
60710494SGarrett.Damore@Sun.COM 	    NULL },
60810494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETERROR,	"SNDCTL_DSP_GETERROR",	NULL },
60910494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_READCTL,	"SNDCTL_DSP_READCTL",	NULL },
61010494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_WRITECTL,	"SNDCTL_DSP_WRITECTL",	NULL },
61110494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SYNCGROUP,	"SNDCTL_DSP_SYNCGROUP",	NULL },
61210494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SYNCSTART,	"SNDCTL_DSP_SYNCSTART",	NULL },
61310494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_COOKEDMODE,	"SNDCTL_DSP_COOKEDMODE",
61410494SGarrett.Damore@Sun.COM 	    NULL },
61510494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SILENCE,	"SNDCTL_DSP_SILENCE",	NULL },
61610494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SKIP,	"SNDCTL_DSP_SKIP",	NULL },
61710494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_HALT_INPUT,	"SNDCTL_DSP_HALT_INPUT",
61810494SGarrett.Damore@Sun.COM 	    NULL },
61910494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_HALT_OUTPUT,	"SNDCTL_DSP_HALT_OUTPUT",
62010494SGarrett.Damore@Sun.COM 	    NULL },
62110494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_LOW_WATER,	"SNDCTL_DSP_LOW_WATER",	NULL },
62210494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_CURRENT_OPTR,	"SNDCTL_DSP_CURRENT_OPTR",
62310494SGarrett.Damore@Sun.COM 	    NULL },
62410494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_CURRENT_IPTR,	"SNDCTL_DSP_CURRENT_IPTR",
62510494SGarrett.Damore@Sun.COM 	    NULL },
62610494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GET_RECSRC_NAMES,	"SNDCTL_DSP_GET_RECSRC_NAMES",
62710494SGarrett.Damore@Sun.COM 	    NULL },
62810494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GET_RECSRC,	"SNDCTL_DSP_GET_RECSRC",
62910494SGarrett.Damore@Sun.COM 	    NULL },
63010494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SET_RECSRC,	"SNDCTL_DSP_SET_RECSRC",
63110494SGarrett.Damore@Sun.COM 	    NULL },
63210494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GET_PLAYTGT_NAMES,	"SNDCTL_DSP_GET_PLAYTGT_NAMES",
63310494SGarrett.Damore@Sun.COM 	    NULL },
63410494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GET_PLAYTGT,	"SNDCTL_DSP_GET_PLAYTGT",
63510494SGarrett.Damore@Sun.COM 	    NULL },
63610494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SET_PLAYTGT,	"SNDCTL_DSP_SET_PLAYTGT",
63710494SGarrett.Damore@Sun.COM 	    NULL },
63810494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETRECVOL,		"SNDCTL_DSP_GETRECVOL",
63910494SGarrett.Damore@Sun.COM 	    NULL },
64010494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SETRECVOL,		"SNDCTL_DSP_SETRECVOL",
64110494SGarrett.Damore@Sun.COM 	    NULL },
64210494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GET_CHNORDER,	"SNDCTL_DSP_GET_CHNORDER",
64310494SGarrett.Damore@Sun.COM 	    NULL },
64410494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_SET_CHNORDER,	"SNDCTL_DSP_SET_CHNORDER",
64510494SGarrett.Damore@Sun.COM 	    NULL },
64610494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETIPEAKS,	"SNDCTL_DSP_GETIPEAKS",	NULL },
64710494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETOPEAKS,	"SNDCTL_DSP_GETOPEAKS",	NULL },
64810494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_POLICY,	"SNDCTL_DSP_POLICY",	NULL },
64910494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_GETCHANNELMASK,	"SNDCTL_DSP_GETCHANNELMASK",
65010494SGarrett.Damore@Sun.COM 	    NULL },
65110494SGarrett.Damore@Sun.COM 	{ (uint_t)SNDCTL_DSP_BIND_CHANNEL,	"SNDCTL_DSP_BIND_CHANNEL",
65210494SGarrett.Damore@Sun.COM 	    NULL },
65310494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_VOLUME,	"SOUND_MIXER_READ_VOLUME",
65410494SGarrett.Damore@Sun.COM 	    NULL },
65510494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_OGAIN,	"SOUND_MIXER_READ_OGAIN",
65610494SGarrett.Damore@Sun.COM 	    NULL },
65710494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_PCM,	"SOUND_MIXER_READ_PCM",	NULL },
65810494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_IGAIN,	"SOUND_MIXER_READ_IGAIN",
65910494SGarrett.Damore@Sun.COM 	    NULL },
66010494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_RECLEV,	"SOUND_MIXER_READ_RECLEV",
66110494SGarrett.Damore@Sun.COM 	    NULL },
66210494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_RECSRC,	"SOUND_MIXER_READ_RECSRC",
66310494SGarrett.Damore@Sun.COM 	    NULL },
66410494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_DEVMASK,	"SOUND_MIXER_READ_DEVMASK",
66510494SGarrett.Damore@Sun.COM 	    NULL },
66610494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_RECMASK,	"SOUND_MIXER_READ_RECMASK",
66710494SGarrett.Damore@Sun.COM 	    NULL },
66810494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_CAPS,	"SOUND_MIXER_READ_CAPS",
66910494SGarrett.Damore@Sun.COM 	    NULL },
67010494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_STEREODEVS,	"SOUND_MIXER_READ_STEREODEVS",
67110494SGarrett.Damore@Sun.COM 	    NULL },
67210494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_RECGAIN,	"SOUND_MIXER_READ_RECGAIN",
67310494SGarrett.Damore@Sun.COM 	    NULL },
67410494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_READ_MONGAIN,	"SOUND_MIXER_READ_MONGAIN",
67510494SGarrett.Damore@Sun.COM 	    NULL },
67610494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_WRITE_VOLUME,	"SOUND_MIXER_WRITE_VOLUME",
67710494SGarrett.Damore@Sun.COM 	    NULL },
67810494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_WRITE_OGAIN,	"SOUND_MIXER_WRITE_OGAIN",
67910494SGarrett.Damore@Sun.COM 	    NULL },
68010494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_WRITE_PCM,	"SOUND_MIXER_WRITE_PCM",
68110494SGarrett.Damore@Sun.COM 	    NULL },
68210494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_WRITE_IGAIN,	"SOUND_MIXER_WRITE_IGAIN",
68310494SGarrett.Damore@Sun.COM 	    NULL },
68410494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_WRITE_RECLEV,	"SOUND_MIXER_WRITE_RECLEV",
68510494SGarrett.Damore@Sun.COM 	    NULL },
68610494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_WRITE_RECSRC,	"SOUND_MIXER_WRITE_RECSRC",
68710494SGarrett.Damore@Sun.COM 	    NULL },
68810494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_WRITE_RECGAIN,	"SOUND_MIXER_WRITE_RECGAIN",
68910494SGarrett.Damore@Sun.COM 	    NULL },
69010494SGarrett.Damore@Sun.COM 	{ (uint_t)SOUND_MIXER_WRITE_MONGAIN,	"SOUND_MIXER_WRITE_MONGAIN",
69110494SGarrett.Damore@Sun.COM 	    NULL },
69210494SGarrett.Damore@Sun.COM 
6930Sstevel@tonic-gate 	/* STREAMS redirection ioctls */
6940Sstevel@tonic-gate 	{ (uint_t)SRIOCSREDIR,		"SRIOCSREDIR",	NULL },
6950Sstevel@tonic-gate 	{ (uint_t)SRIOCISREDIR,		"SRIOCISREDIR",	NULL },
6960Sstevel@tonic-gate 	{ (uint_t)CPCIO_BIND,		"CPCIO_BIND",		NULL },
6970Sstevel@tonic-gate 	{ (uint_t)CPCIO_SAMPLE,		"CPCIO_SAMPLE",		NULL },
6980Sstevel@tonic-gate 	{ (uint_t)CPCIO_RELE,		"CPCIO_RELE",		NULL },
6990Sstevel@tonic-gate 	/* /dev/poll ioctl() control codes */
7000Sstevel@tonic-gate 	{ (uint_t)DP_POLL,	"DP_POLL",	NULL },
7010Sstevel@tonic-gate 	{ (uint_t)DP_ISPOLLED,	"DP_ISPOLLED",	NULL },
7020Sstevel@tonic-gate 	/* the old /proc ioctl() control codes */
7030Sstevel@tonic-gate #define	PIOC	('q'<<8)
7040Sstevel@tonic-gate 	{ (uint_t)(PIOC|1),	"PIOCSTATUS",	NULL },
7050Sstevel@tonic-gate 	{ (uint_t)(PIOC|2),	"PIOCSTOP",	NULL },
7060Sstevel@tonic-gate 	{ (uint_t)(PIOC|3),	"PIOCWSTOP",	NULL },
7070Sstevel@tonic-gate 	{ (uint_t)(PIOC|4),	"PIOCRUN",	NULL },
7080Sstevel@tonic-gate 	{ (uint_t)(PIOC|5),	"PIOCGTRACE",	NULL },
7090Sstevel@tonic-gate 	{ (uint_t)(PIOC|6),	"PIOCSTRACE",	NULL },
7100Sstevel@tonic-gate 	{ (uint_t)(PIOC|7),	"PIOCSSIG",	NULL },
7110Sstevel@tonic-gate 	{ (uint_t)(PIOC|8),	"PIOCKILL",	NULL },
7120Sstevel@tonic-gate 	{ (uint_t)(PIOC|9),	"PIOCUNKILL",	NULL },
7130Sstevel@tonic-gate 	{ (uint_t)(PIOC|10),	"PIOCGHOLD",	NULL },
7140Sstevel@tonic-gate 	{ (uint_t)(PIOC|11),	"PIOCSHOLD",	NULL },
7150Sstevel@tonic-gate 	{ (uint_t)(PIOC|12),	"PIOCMAXSIG",	NULL },
7160Sstevel@tonic-gate 	{ (uint_t)(PIOC|13),	"PIOCACTION",	NULL },
7170Sstevel@tonic-gate 	{ (uint_t)(PIOC|14),	"PIOCGFAULT",	NULL },
7180Sstevel@tonic-gate 	{ (uint_t)(PIOC|15),	"PIOCSFAULT",	NULL },
7190Sstevel@tonic-gate 	{ (uint_t)(PIOC|16),	"PIOCCFAULT",	NULL },
7200Sstevel@tonic-gate 	{ (uint_t)(PIOC|17),	"PIOCGENTRY",	NULL },
7210Sstevel@tonic-gate 	{ (uint_t)(PIOC|18),	"PIOCSENTRY",	NULL },
7220Sstevel@tonic-gate 	{ (uint_t)(PIOC|19),	"PIOCGEXIT",	NULL },
7230Sstevel@tonic-gate 	{ (uint_t)(PIOC|20),	"PIOCSEXIT",	NULL },
7240Sstevel@tonic-gate 	{ (uint_t)(PIOC|21),	"PIOCSFORK",	NULL },
7250Sstevel@tonic-gate 	{ (uint_t)(PIOC|22),	"PIOCRFORK",	NULL },
7260Sstevel@tonic-gate 	{ (uint_t)(PIOC|23),	"PIOCSRLC",	NULL },
7270Sstevel@tonic-gate 	{ (uint_t)(PIOC|24),	"PIOCRRLC",	NULL },
7280Sstevel@tonic-gate 	{ (uint_t)(PIOC|25),	"PIOCGREG",	NULL },
7290Sstevel@tonic-gate 	{ (uint_t)(PIOC|26),	"PIOCSREG",	NULL },
7300Sstevel@tonic-gate 	{ (uint_t)(PIOC|27),	"PIOCGFPREG",	NULL },
7310Sstevel@tonic-gate 	{ (uint_t)(PIOC|28),	"PIOCSFPREG",	NULL },
7320Sstevel@tonic-gate 	{ (uint_t)(PIOC|29),	"PIOCNICE",	NULL },
7330Sstevel@tonic-gate 	{ (uint_t)(PIOC|30),	"PIOCPSINFO",	NULL },
7340Sstevel@tonic-gate 	{ (uint_t)(PIOC|31),	"PIOCNMAP",	NULL },
7350Sstevel@tonic-gate 	{ (uint_t)(PIOC|32),	"PIOCMAP",	NULL },
7360Sstevel@tonic-gate 	{ (uint_t)(PIOC|33),	"PIOCOPENM",	NULL },
7370Sstevel@tonic-gate 	{ (uint_t)(PIOC|34),	"PIOCCRED",	NULL },
7380Sstevel@tonic-gate 	{ (uint_t)(PIOC|35),	"PIOCGROUPS",	NULL },
7390Sstevel@tonic-gate 	{ (uint_t)(PIOC|36),	"PIOCGETPR",	NULL },
7400Sstevel@tonic-gate 	{ (uint_t)(PIOC|37),	"PIOCGETU",	NULL },
7410Sstevel@tonic-gate 	{ (uint_t)(PIOC|38),	"PIOCSET",	NULL },
7420Sstevel@tonic-gate 	{ (uint_t)(PIOC|39),	"PIOCRESET",	NULL },
7430Sstevel@tonic-gate 	{ (uint_t)(PIOC|43),	"PIOCUSAGE",	NULL },
7440Sstevel@tonic-gate 	{ (uint_t)(PIOC|44),	"PIOCOPENPD",	NULL },
7450Sstevel@tonic-gate 	{ (uint_t)(PIOC|45),	"PIOCLWPIDS",	NULL },
7460Sstevel@tonic-gate 	{ (uint_t)(PIOC|46),	"PIOCOPENLWP",	NULL },
7470Sstevel@tonic-gate 	{ (uint_t)(PIOC|47),	"PIOCLSTATUS",	NULL },
7480Sstevel@tonic-gate 	{ (uint_t)(PIOC|48),	"PIOCLUSAGE",	NULL },
7490Sstevel@tonic-gate 	{ (uint_t)(PIOC|49),	"PIOCNAUXV",	NULL },
7500Sstevel@tonic-gate 	{ (uint_t)(PIOC|50),	"PIOCAUXV",	NULL },
7510Sstevel@tonic-gate 	{ (uint_t)(PIOC|51),	"PIOCGXREGSIZE",	NULL },
7520Sstevel@tonic-gate 	{ (uint_t)(PIOC|52),	"PIOCGXREG",	NULL },
7530Sstevel@tonic-gate 	{ (uint_t)(PIOC|53),	"PIOCSXREG",	NULL },
7540Sstevel@tonic-gate 	{ (uint_t)(PIOC|101),	"PIOCGWIN",	NULL },
7550Sstevel@tonic-gate 	{ (uint_t)(PIOC|103),	"PIOCNLDT",	NULL },
7560Sstevel@tonic-gate 	{ (uint_t)(PIOC|104),	"PIOCLDT",	NULL },
7570Sstevel@tonic-gate 
7580Sstevel@tonic-gate 	/* ioctl's applicable on sockets */
7590Sstevel@tonic-gate 	{ (uint_t)SIOCSHIWAT,	"SIOCSHIWAT",	NULL },
7600Sstevel@tonic-gate 	{ (uint_t)SIOCGHIWAT,	"SIOCGHIWAT",	NULL },
7610Sstevel@tonic-gate 	{ (uint_t)SIOCSLOWAT,	"SIOCSLOWAT",	NULL },
7620Sstevel@tonic-gate 	{ (uint_t)SIOCGLOWAT,	"SIOCGLOWAT",	NULL },
7630Sstevel@tonic-gate 	{ (uint_t)SIOCATMARK,	"SIOCATMARK",	NULL },
7640Sstevel@tonic-gate 	{ (uint_t)SIOCSPGRP,	"SIOCSPGRP",	NULL },
7650Sstevel@tonic-gate 	{ (uint_t)SIOCGPGRP,	"SIOCGPGRP",	NULL },
7660Sstevel@tonic-gate 	{ (uint_t)SIOCADDRT,	"SIOCADDRT",	"rtentry" },
7670Sstevel@tonic-gate 	{ (uint_t)SIOCDELRT,	"SIOCDELRT",	"rtentry" },
7680Sstevel@tonic-gate 	{ (uint_t)SIOCGETVIFCNT,	"SIOCGETVIFCNT", "sioc_vif_req" },
7690Sstevel@tonic-gate 	{ (uint_t)SIOCGETSGCNT,	"SIOCGETSGCNT",	"sioc_sg_req" },
7700Sstevel@tonic-gate 	{ (uint_t)SIOCGETLSGCNT,	"SIOCGETLSGCNT", "sioc_lsg_req" },
7710Sstevel@tonic-gate 	{ (uint_t)SIOCSIFADDR,	"SIOCSIFADDR",	"ifreq" },
7720Sstevel@tonic-gate 	{ (uint_t)SIOCGIFADDR,	"SIOCGIFADDR",	"ifreq" },
7730Sstevel@tonic-gate 	{ (uint_t)SIOCSIFDSTADDR,	"SIOCSIFDSTADDR", "ifreq" },
7740Sstevel@tonic-gate 	{ (uint_t)SIOCGIFDSTADDR,	"SIOCGIFDSTADDR", "ifreq" },
7750Sstevel@tonic-gate 	{ (uint_t)SIOCSIFFLAGS,	"SIOCSIFFLAGS",	"ifreq" },
7760Sstevel@tonic-gate 	{ (uint_t)SIOCGIFFLAGS,	"SIOCGIFFLAGS",	"ifreq" },
7770Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMEM,	"SIOCSIFMEM",	"ifreq" },
7780Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMEM,	"SIOCGIFMEM",	"ifreq" },
7790Sstevel@tonic-gate 	{ (uint_t)SIOCGIFCONF,	"SIOCGIFCONF",	"ifconf" },
7800Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMTU,	"SIOCSIFMTU",	"ifreq" },
7810Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMTU,	"SIOCGIFMTU",	"ifreq" },
7820Sstevel@tonic-gate 	{ (uint_t)SIOCGIFBRDADDR,	"SIOCGIFBRDADDR",	"ifreq" },
7830Sstevel@tonic-gate 	{ (uint_t)SIOCSIFBRDADDR,	"SIOCSIFBRDADDR",	"ifreq" },
7840Sstevel@tonic-gate 	{ (uint_t)SIOCGIFNETMASK,	"SIOCGIFNETMASK",	"ifreq" },
7850Sstevel@tonic-gate 	{ (uint_t)SIOCSIFNETMASK,	"SIOCSIFNETMASK",	"ifreq" },
7860Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMETRIC,	"SIOCGIFMETRIC",	"ifreq" },
7870Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMETRIC,	"SIOCSIFMETRIC",	"ifreq" },
7880Sstevel@tonic-gate 	{ (uint_t)SIOCSARP,	"SIOCSARP",	"arpreq" },
7890Sstevel@tonic-gate 	{ (uint_t)SIOCGARP,	"SIOCGARP",	"arpreq" },
7900Sstevel@tonic-gate 	{ (uint_t)SIOCDARP,	"SIOCDARP",	"arpreq" },
7910Sstevel@tonic-gate 	{ (uint_t)SIOCUPPER,	"SIOCUPPER",	"ifreq" },
7920Sstevel@tonic-gate 	{ (uint_t)SIOCLOWER,	"SIOCLOWER",	"ifreq" },
7930Sstevel@tonic-gate 	{ (uint_t)SIOCSETSYNC,	"SIOCSETSYNC",	"ifreq" },
7940Sstevel@tonic-gate 	{ (uint_t)SIOCGETSYNC,	"SIOCGETSYNC",	"ifreq" },
7950Sstevel@tonic-gate 	{ (uint_t)SIOCSSDSTATS,	"SIOCSSDSTATS",	"ifreq" },
7960Sstevel@tonic-gate 	{ (uint_t)SIOCSSESTATS,	"SIOCSSESTATS",	"ifreq" },
7970Sstevel@tonic-gate 	{ (uint_t)SIOCSPROMISC,	"SIOCSPROMISC",	NULL },
7980Sstevel@tonic-gate 	{ (uint_t)SIOCADDMULTI,	"SIOCADDMULTI",	"ifreq" },
7990Sstevel@tonic-gate 	{ (uint_t)SIOCDELMULTI,	"SIOCDELMULTI",	"ifreq" },
8000Sstevel@tonic-gate 	{ (uint_t)SIOCGETNAME,	"SIOCGETNAME",	"sockaddr" },
8010Sstevel@tonic-gate 	{ (uint_t)SIOCGETPEER,	"SIOCGETPEER",	"sockaddr" },
8020Sstevel@tonic-gate 	{ (uint_t)IF_UNITSEL,	"IF_UNITSEL",	NULL },
8030Sstevel@tonic-gate 	{ (uint_t)SIOCXPROTO,	"SIOCXPROTO",	NULL },
8040Sstevel@tonic-gate 	{ (uint_t)SIOCIFDETACH,	"SIOCIFDETACH",	"ifreq" },
8050Sstevel@tonic-gate 	{ (uint_t)SIOCGENPSTATS,	"SIOCGENPSTATS",	"ifreq" },
8060Sstevel@tonic-gate 	{ (uint_t)SIOCX25XMT,	"SIOCX25XMT",	"ifreq" },
8070Sstevel@tonic-gate 	{ (uint_t)SIOCX25RCV,	"SIOCX25RCV",	"ifreq" },
8080Sstevel@tonic-gate 	{ (uint_t)SIOCX25TBL,	"SIOCX25TBL",	"ifreq" },
8090Sstevel@tonic-gate 	{ (uint_t)SIOCSLGETREQ,	"SIOCSLGETREQ",	"ifreq" },
8100Sstevel@tonic-gate 	{ (uint_t)SIOCSLSTAT,	"SIOCSLSTAT",	"ifreq" },
8110Sstevel@tonic-gate 	{ (uint_t)SIOCSIFNAME,	"SIOCSIFNAME",	"ifreq" },
8120Sstevel@tonic-gate 	{ (uint_t)SIOCGENADDR,	"SIOCGENADDR",	"ifreq" },
8130Sstevel@tonic-gate 	{ (uint_t)SIOCGIFNUM,	"SIOCGIFNUM",	NULL },
8140Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMUXID,	"SIOCGIFMUXID",	"ifreq" },
8150Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMUXID,	"SIOCSIFMUXID",	"ifreq" },
8160Sstevel@tonic-gate 	{ (uint_t)SIOCGIFINDEX,	"SIOCGIFINDEX",	"ifreq" },
8170Sstevel@tonic-gate 	{ (uint_t)SIOCSIFINDEX,	"SIOCSIFINDEX",	"ifreq" },
8180Sstevel@tonic-gate 	{ (uint_t)SIOCLIFREMOVEIF,	"SIOCLIFREMOVEIF",	"lifreq" },
8190Sstevel@tonic-gate 	{ (uint_t)SIOCLIFADDIF,		"SIOCLIFADDIF",		"lifreq" },
8200Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFADDR,		"SIOCSLIFADDR",		"lifreq" },
8210Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFADDR,		"SIOCGLIFADDR",		"lifreq" },
8220Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFDSTADDR,	"SIOCSLIFDSTADDR",	"lifreq" },
8230Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFDSTADDR,	"SIOCGLIFDSTADDR",	"lifreq" },
8240Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFFLAGS,	"SIOCSLIFFLAGS",	"lifreq" },
8250Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFFLAGS,	"SIOCGLIFFLAGS",	"lifreq" },
8260Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFCONF,		"SIOCGLIFCONF",		"lifconf" },
8270Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFMTU,		"SIOCSLIFMTU",		"lifreq" },
8280Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFMTU,		"SIOCGLIFMTU",		"lifreq" },
8290Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFBRDADDR,	"SIOCGLIFBRDADDR",	"lifreq" },
8300Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFBRDADDR,	"SIOCSLIFBRDADDR",	"lifreq" },
8310Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFNETMASK,	"SIOCGLIFNETMASK",	"lifreq" },
8320Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFNETMASK,	"SIOCSLIFNETMASK",	"lifreq" },
8330Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFMETRIC,	"SIOCGLIFMETRIC",	"lifreq" },
8340Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFMETRIC,	"SIOCSLIFMETRIC",	"lifreq" },
8350Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFNAME,		"SIOCSLIFNAME",		"lifreq" },
8360Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFNUM,		"SIOCGLIFNUM",		"lifnum" },
8370Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFMUXID,	"SIOCGLIFMUXID",	"lifreq" },
8380Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFMUXID,	"SIOCSLIFMUXID",	"lifreq" },
8390Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFINDEX,	"SIOCGLIFINDEX",	"lifreq" },
8400Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFINDEX,	"SIOCSLIFINDEX",	"lifreq" },
8410Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFTOKEN,	"SIOCSLIFTOKEN",	"lifreq" },
8420Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFTOKEN,	"SIOCGLIFTOKEN",	"lifreq" },
8430Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFSUBNET,	"SIOCSLIFSUBNET",	"lifreq" },
8440Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFSUBNET,	"SIOCGLIFSUBNET",	"lifreq" },
8450Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFLNKINFO,	"SIOCSLIFLNKINFO",	"lifreq" },
8460Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFLNKINFO,	"SIOCGLIFLNKINFO",	"lifreq" },
8470Sstevel@tonic-gate 	{ (uint_t)SIOCLIFDELND,		"SIOCLIFDELND",		"lifreq" },
8480Sstevel@tonic-gate 	{ (uint_t)SIOCLIFGETND,		"SIOCLIFGETND",		"lifreq" },
8490Sstevel@tonic-gate 	{ (uint_t)SIOCLIFSETND,		"SIOCLIFSETND",		"lifreq" },
8500Sstevel@tonic-gate 	{ (uint_t)SIOCTMYADDR,		"SIOCTMYADDR",	"sioc_addrreq" },
8510Sstevel@tonic-gate 	{ (uint_t)SIOCTONLINK,		"SIOCTONLINK",	"sioc_addrreq" },
8520Sstevel@tonic-gate 	{ (uint_t)SIOCTMYSITE,		"SIOCTMYSITE",	"sioc_addrreq" },
8530Sstevel@tonic-gate 	{ (uint_t)SIOCFIPSECONFIG,	"SIOCFIPSECONFIG",	NULL },
8540Sstevel@tonic-gate 	{ (uint_t)SIOCSIPSECONFIG,	"SIOCSIPSECONFIG",	NULL },
8550Sstevel@tonic-gate 	{ (uint_t)SIOCDIPSECONFIG,	"SIOCDIPSECONFIG",	NULL },
8560Sstevel@tonic-gate 	{ (uint_t)SIOCLIPSECONFIG,	"SIOCLIPSECONFIG",	NULL },
8578485SPeter.Memishian@Sun.COM 	{ (uint_t)SIOCGLIFBINDING,	"SIOCGLIFBINDING",	"lifreq" },
8580Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFGROUPNAME,	"SIOCSLIFGROUPNAME",	"lifreq" },
8590Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFGROUPNAME,	"SIOCGLIFGROUPNAME",	"lifreq" },
8608485SPeter.Memishian@Sun.COM 	{ (uint_t)SIOCGLIFGROUPINFO,	"SIOCGLIFGROUPINFO", "lifgroupinfo" },
8610Sstevel@tonic-gate 	{ (uint_t)SIOCGDSTINFO,		"SIOCGDSTINFO",		NULL },
8620Sstevel@tonic-gate 	{ (uint_t)SIOCGIP6ADDRPOLICY,	"SIOCGIP6ADDRPOLICY",	NULL },
8630Sstevel@tonic-gate 	{ (uint_t)SIOCSIP6ADDRPOLICY,	"SIOCSIP6ADDRPOLICY", 	NULL },
8640Sstevel@tonic-gate 	{ (uint_t)SIOCSXARP,		"SIOCSXARP",		"xarpreq" },
8650Sstevel@tonic-gate 	{ (uint_t)SIOCGXARP,		"SIOCGXARP",		"xarpreq" },
8660Sstevel@tonic-gate 	{ (uint_t)SIOCDXARP,		"SIOCDXARP",		"xarpreq" },
8670Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFZONE,		"SIOCGLIFZONE",		"lifreq" },
8680Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFZONE,		"SIOCSLIFZONE",		"lifreq" },
8690Sstevel@tonic-gate 	{ (uint_t)SIOCSCTPSOPT,		"SIOCSCTPSOPT",		NULL },
8700Sstevel@tonic-gate 	{ (uint_t)SIOCSCTPGOPT,		"SIOCSCTPGOPT",		NULL },
8710Sstevel@tonic-gate 	{ (uint_t)SIOCSCTPPEELOFF,	"SIOPCSCTPPEELOFF",	"int" },
8720Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFUSESRC,	"SIOCGLIFUSESRC",	"lifreq" },
8730Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFUSESRC,	"SIOCSLIFUSESRC",	"lifreq" },
8740Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFSRCOF,	"SIOCGLIFSRCOF",	"lifsrcof" },
8750Sstevel@tonic-gate 	{ (uint_t)SIOCGMSFILTER,	"SIOCGMSFILTER",    "group_filter" },
8760Sstevel@tonic-gate 	{ (uint_t)SIOCSMSFILTER,	"SIOCSMSFILTER",    "group_filter" },
8770Sstevel@tonic-gate 	{ (uint_t)SIOCGIPMSFILTER,	"SIOCGIPMSFILTER",  "ip_msfilter" },
8780Sstevel@tonic-gate 	{ (uint_t)SIOCSIPMSFILTER,	"SIOCSIPMSFILTER",  "ip_msfilter" },
87912016SGirish.Moodalbail@Sun.COM 	{ (uint_t)SIOCGLIFDADSTATE,	"SIOCGLIFDADSTATE",  "lifreq" },
88012016SGirish.Moodalbail@Sun.COM 	{ (uint_t)SIOCSLIFPREFIX,	"SIOCSLIFPREFIX", "lifreq" },
881*13095SDarren.Reed@Oracle.COM 	{ (uint_t)SIOCGSTAMP,		"SIOCGSTAMP",		"timeval" },
882*13095SDarren.Reed@Oracle.COM 	{ (uint_t)SIOCGIFHWADDR,	"SIOCGIFHWADDR",	"ifreq" },
883*13095SDarren.Reed@Oracle.COM 	{ (uint_t)SIOCGLIFHWADDR,	"SIOCGLIFHWADDR",	"lifreq" },
8840Sstevel@tonic-gate 
8850Sstevel@tonic-gate 	/* DES encryption */
8860Sstevel@tonic-gate 	{ (uint_t)DESIOCBLOCK,	"DESIOCBLOCK", 	"desparams" },
8870Sstevel@tonic-gate 	{ (uint_t)DESIOCQUICK,	"DESIOCQUICK", 	"desparams" },
8880Sstevel@tonic-gate 
8890Sstevel@tonic-gate 	/* Printing system */
8900Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_IFCAP,	"PRNIOC_GET_IFCAP", 	NULL },
8910Sstevel@tonic-gate 	{ (uint_t)PRNIOC_SET_IFCAP,	"PRNIOC_SET_IFCAP", 	NULL },
8920Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_IFINFO,	"PRNIOC_GET_IFINFO",
8930Sstevel@tonic-gate 	    "prn_interface_info" },
8940Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_STATUS,	"PRNIOC_GET_STATUS", 	NULL },
8950Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_1284_DEVID,	"PRNIOC_GET_1284_DEVID",
8960Sstevel@tonic-gate 	    "prn_1284_device_id" },
8970Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_1284_STATUS,
8980Sstevel@tonic-gate 	    "PRNIOC_GET_IFCANIOC_GET_1284_STATUS", NULL },
8990Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_TIMEOUTS,	"PRNIOC_GET_TIMEOUTS",
9000Sstevel@tonic-gate 	    "prn_timeouts" },
9010Sstevel@tonic-gate 	{ (uint_t)PRNIOC_SET_TIMEOUTS,	"PRNIOC_SET_TIMEOUTS",
9020Sstevel@tonic-gate 	    "prn_timeouts" },
9030Sstevel@tonic-gate 	{ (uint_t)PRNIOC_RESET,	"PRNIOC_RESET", 	NULL },
9040Sstevel@tonic-gate 
9050Sstevel@tonic-gate 	/* DTrace */
9060Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROVIDER,	"DTRACEIOC_PROVIDER",	NULL },
9070Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROBES,	"DTRACEIOC_PROBES",	NULL },
9080Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_BUFSNAP,	"DTRACEIOC_BUFSNAP",	NULL },
9090Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROBEMATCH,	"DTRACEIOC_PROBEMATCH",	NULL },
9100Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_ENABLE,	"DTRACEIOC_ENABLE",	NULL },
9110Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_AGGSNAP,	"DTRACEIOC_AGGSNAP",	NULL },
9120Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_EPROBE,	"DTRACEIOC_EPROBE",	NULL },
9130Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROBEARG,   "DTRACEIOC_PROBEARG",   NULL },
9140Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_CONF,	"DTRACEIOC_CONF",	NULL },
9150Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_STATUS,	"DTRACEIOC_STATUS",	NULL },
9160Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_GO,		"DTRACEIOC_GO",		NULL },
9170Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_STOP,	"DTRACEIOC_STOP",	NULL },
9180Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_AGGDESC,	"DTRACEIOC_AGGDESC",	NULL },
9190Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_FORMAT,	"DTRACEIOC_FORMAT",	NULL },
9200Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_DOFGET,	"DTRACEIOC_DOFGET",	NULL },
9210Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_REPLICATE,	"DTRACEIOC_REPLICATE",	NULL },
9220Sstevel@tonic-gate 
9230Sstevel@tonic-gate 	{ (uint_t)DTRACEHIOC_ADD,	"DTRACEHIOC_ADD",	NULL },
9240Sstevel@tonic-gate 	{ (uint_t)DTRACEHIOC_REMOVE,	"DTRACEHIOC_REMOVE",	NULL },
9250Sstevel@tonic-gate 	{ (uint_t)DTRACEHIOC_ADDDOF,	"DTRACEHIOC_ADDDOF",	NULL },
9260Sstevel@tonic-gate 
9270Sstevel@tonic-gate 	/* /dev/cryptoadm ioctl() control codes */
9280Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_VERSION,	"CRYPTO_GET_VERSION",	NULL },
9290Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_DEV_LIST,	"CRYPTO_GET_DEV_LIST",	NULL },
9300Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_SOFT_LIST,	"CRYPTO_GET_SOFT_LIST",	NULL },
9310Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_DEV_INFO,	"CRYPTO_GET_DEV_INFO",	NULL },
9320Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_SOFT_INFO,	"CRYPTO_GET_SOFT_INFO",	NULL },
9330Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_DEV_DISABLED,	"CRYPTO_LOAD_DEV_DISABLED",
9340Sstevel@tonic-gate 	    NULL },
9350Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_SOFT_DISABLED,	"CRYPTO_LOAD_SOFT_DISABLED",
9360Sstevel@tonic-gate 	    NULL },
9370Sstevel@tonic-gate 	{ (uint_t)CRYPTO_UNLOAD_SOFT_MODULE,	"CRYPTO_UNLOAD_SOFT_MODULE",
9380Sstevel@tonic-gate 	    NULL },
9390Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_SOFT_CONFIG,	"CRYPTO_LOAD_SOFT_CONFIG",
9400Sstevel@tonic-gate 	    NULL },
9410Sstevel@tonic-gate 	{ (uint_t)CRYPTO_POOL_CREATE,	"CRYPTO_POOL_CREATE",	NULL },
9420Sstevel@tonic-gate 	{ (uint_t)CRYPTO_POOL_WAIT,	"CRYPTO_POOL_WAIT",	NULL },
9430Sstevel@tonic-gate 	{ (uint_t)CRYPTO_POOL_RUN,	"CRYPTO_POOL_RUN",	NULL },
9440Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_DOOR,	"CRYPTO_LOAD_DOOR",	NULL },
9450Sstevel@tonic-gate 
9460Sstevel@tonic-gate 	/* /dev/crypto ioctl() control codes */
9470Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_FUNCTION_LIST,	"CRYPTO_GET_FUNCTION_LIST",
9480Sstevel@tonic-gate 	    NULL },
9490Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_MECHANISM_NUMBER,	"CRYPTO_GET_MECHANISM_NUMBER",
9500Sstevel@tonic-gate 	    NULL },
9510Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OPEN_SESSION,	"CRYPTO_OPEN_SESSION",	NULL },
9520Sstevel@tonic-gate 	{ (uint_t)CRYPTO_CLOSE_SESSION,	"CRYPTO_CLOSE_SESSION",	NULL },
9530Sstevel@tonic-gate 	{ (uint_t)CRYPTO_CLOSE_ALL_SESSIONS,	"CRYPTO_CLOSE_ALL_SESSIONS",
9540Sstevel@tonic-gate 	    NULL },
9550Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOGIN,		"CRYPTO_LOGIN",		NULL },
9560Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOGOUT,	"CRYPTO_LOGOUT",	NULL },
9570Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT,	"CRYPTO_ENCRYPT",	NULL },
9580Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT_INIT,	"CRYPTO_ENCRYPT_INIT",	NULL },
9590Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT_UPDATE,	"CRYPTO_ENCRYPT_UPDATE",
9600Sstevel@tonic-gate 	    NULL },
9610Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT_FINAL,	"CRYPTO_ENCRYPT_FINAL",	NULL },
9620Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT,	"CRYPTO_DECRYPT",	NULL },
9630Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_INIT,	"CRYPTO_DECRYPT_INIT",	NULL },
9640Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_UPDATE,	"CRYPTO_DECRYPT_UPDATE",
9650Sstevel@tonic-gate 	    NULL },
9660Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_FINAL,	"CRYPTO_DECRYPT_FINAL",	NULL },
9670Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST,	"CRYPTO_DIGEST",	NULL },
9680Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_INIT,	"CRYPTO_DIGEST_INIT",	NULL },
9690Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_UPDATE,	"CRYPTO_DIGEST_UPDATE",	NULL },
9700Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_KEY,	"CRYPTO_DIGEST_KEY",	NULL },
9710Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_FINAL,	"CRYPTO_DIGEST_FINAL",	NULL },
9720Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC,		"CRYPTO_MAC",		NULL },
9730Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC_INIT,	"CRYPTO_MAC_INIT",	NULL },
9740Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC_UPDATE,	"CRYPTO_MAC_UPDATE",	NULL },
9750Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC_FINAL,	"CRYPTO_MAC_FINAL",	NULL },
9760Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN,		"CRYPTO_SIGN",		NULL },
9770Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_INIT,	"CRYPTO_SIGN_INIT",	NULL },
9780Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_UPDATE,	"CRYPTO_SIGN_UPDATE",	NULL },
9790Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_FINAL,	"CRYPTO_SIGN_FINAL",	NULL },
9800Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_RECOVER_INIT,	"CRYPTO_SIGN_RECOVER_INIT",
9810Sstevel@tonic-gate 	    NULL },
9820Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_RECOVER,	"CRYPTO_SIGN_RECOVER",	NULL },
9830Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY,	"CRYPTO_VERIFY",	NULL },
9840Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_INIT,	"CRYPTO_VERIFY_INIT",	NULL },
9850Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_UPDATE,	"CRYPTO_VERIFY_UPDATE",	NULL },
9860Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_FINAL,	"CRYPTO_VERIFY_FINAL",	NULL },
9870Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_RECOVER_INIT,	"CRYPTO_VERIFY_RECOVER_INIT",
9880Sstevel@tonic-gate 	    NULL },
9890Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_RECOVER,	"CRYPTO_VERIFY_RECOVER",
9900Sstevel@tonic-gate 	    NULL },
9910Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_ENCRYPT_UPDATE,	"CRYPTO_DIGEST_ENCRYPT_UPDATE",
9920Sstevel@tonic-gate 	    NULL },
9930Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_DIGEST_UPDATE,	"CRYPTO_DECRYPT_DIGEST_UPDATE",
9940Sstevel@tonic-gate 	    NULL },
9950Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_ENCRYPT_UPDATE,	"CRYPTO_SIGN_ENCRYPT_UPDATE",
9960Sstevel@tonic-gate 	    NULL },
9970Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_VERIFY_UPDATE,	"CRYPTO_DECRYPT_VERIFY_UPDATE",
9980Sstevel@tonic-gate 	    NULL },
9990Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SEED_RANDOM,	"CRYPTO_SEED_RANDOM",	NULL },
10000Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GENERATE_RANDOM,	"CRYPTO_GENERATE_RANDOM",
10010Sstevel@tonic-gate 	    NULL },
10020Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_CREATE,	"CRYPTO_OBJECT_CREATE",	NULL },
10030Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_COPY,	"CRYPTO_OBJECT_COPY",	NULL },
10040Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_DESTROY,	"CRYPTO_OBJECT_DESTROY",
10050Sstevel@tonic-gate 	    NULL },
10060Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_GET_ATTRIBUTE_VALUE,
10070Sstevel@tonic-gate 	    "CRYPTO_OBJECT_GET_ATTRIBUTE_VALUE",	NULL },
10080Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_GET_SIZE, "CRYPTO_OBJECT_GET_SIZE",	NULL },
10090Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_SET_ATTRIBUTE_VALUE,
10100Sstevel@tonic-gate 	    "CRYPTO_OBJECT_SET_ATTRIBUTE_VALUE",	NULL },
10110Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_FIND_INIT,	"CRYPTO_OBJECT_FIND_INIT",
10120Sstevel@tonic-gate 	    NULL },
10130Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_FIND_UPDATE,	"CRYPTO_OBJECT_FIND_UPDATE",
10140Sstevel@tonic-gate 	    NULL },
10150Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_FIND_FINAL,	"CRYPTO_OBJECT_FIND_FINAL",
10160Sstevel@tonic-gate 	    NULL },
10170Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GENERATE_KEY,	"CRYPTO_GENERATE_KEY",	NULL },
10180Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GENERATE_KEY_PAIR,	"CRYPTO_GENERATE_KEY_PAIR",
10190Sstevel@tonic-gate 	    NULL },
10200Sstevel@tonic-gate 	{ (uint_t)CRYPTO_WRAP_KEY,	"CRYPTO_WRAP_KEY",	NULL },
10210Sstevel@tonic-gate 	{ (uint_t)CRYPTO_UNWRAP_KEY,	"CRYPTO_UNWRAP_KEY",	NULL },
10220Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DERIVE_KEY,	"CRYPTO_DERIVE_KEY",	NULL },
10230Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_LIST,	"CRYPTO_GET_PROVIDER_LIST",
10240Sstevel@tonic-gate 	    NULL },
10250Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_INFO,	"CRYPTO_GET_PROVIDER_INFO",
10260Sstevel@tonic-gate 	    NULL },
10270Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_MECHANISMS,
10280Sstevel@tonic-gate 	    "CRYPTO_GET_PROVIDER_MECHANISMS",	NULL },
10290Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_MECHANISM_INFO,
10300Sstevel@tonic-gate 	    "CRYPTO_GET_PROVIDER_MECHANISM_INFO",	NULL },
10310Sstevel@tonic-gate 	{ (uint_t)CRYPTO_INIT_TOKEN,	"CRYPTO_INIT_TOKEN",	NULL },
10320Sstevel@tonic-gate 	{ (uint_t)CRYPTO_INIT_PIN,	"CRYPTO_INIT_PIN",	NULL },
10330Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SET_PIN,	"CRYPTO_SET_PIN",	NULL },
10344219Smcpowers 	{ (uint_t)CRYPTO_NOSTORE_GENERATE_KEY,
10354219Smcpowers 	    "CRYPTO_NOSTORE_GENERATE_KEY",	NULL },
10364219Smcpowers 	{ (uint_t)CRYPTO_NOSTORE_GENERATE_KEY_PAIR,
10374219Smcpowers 	    "CRYPTO_NOSTORE_GENERATE_KEY_PAIR",	NULL },
10384219Smcpowers 	{ (uint_t)CRYPTO_NOSTORE_DERIVE_KEY,
10394219Smcpowers 	    "CRYPTO_NOSTORE_DERIVE_KEY",	NULL },
104010732SAnthony.Scarpino@Sun.COM 	{ (uint_t)CRYPTO_FIPS140_STATUS,	"CRYPTO_FIPS140_STATUS", NULL },
104110732SAnthony.Scarpino@Sun.COM 	{ (uint_t)CRYPTO_FIPS140_SET,	"CRYPTO_FIPS140_SET",	NULL },
10420Sstevel@tonic-gate 
10430Sstevel@tonic-gate 	/* kbio ioctls */
10440Sstevel@tonic-gate 	{ (uint_t)KIOCTRANS,		"KIOCTRANS",	NULL },
10450Sstevel@tonic-gate 	{ (uint_t)KIOCGTRANS,		"KIOCGTRANS",	NULL },
10460Sstevel@tonic-gate 	{ (uint_t)KIOCTRANSABLE,	"KIOCTRANSABLE",	NULL },
10470Sstevel@tonic-gate 	{ (uint_t)KIOCGTRANSABLE,	"KIOCGTRANSABLE",	NULL },
10480Sstevel@tonic-gate 	{ (uint_t)KIOCSETKEY,		"KIOCSETKEY",	NULL },
10490Sstevel@tonic-gate 	{ (uint_t)KIOCGETKEY,		"KIOCGETKEY",	NULL },
10500Sstevel@tonic-gate 	{ (uint_t)KIOCCMD,		"KIOCCMD",	NULL },
10510Sstevel@tonic-gate 	{ (uint_t)KIOCTYPE,		"KIOCTYPE",	NULL },
10520Sstevel@tonic-gate 	{ (uint_t)KIOCSDIRECT,		"KIOCSDIRECT",	NULL },
10530Sstevel@tonic-gate 	{ (uint_t)KIOCGDIRECT,		"KIOCGDIRECT",	NULL },
10540Sstevel@tonic-gate 	{ (uint_t)KIOCSKEY,		"KIOCSKEY",	NULL },
10550Sstevel@tonic-gate 	{ (uint_t)KIOCGKEY,		"KIOCGKEY",	NULL },
10560Sstevel@tonic-gate 	{ (uint_t)KIOCSLED,		"KIOCSLED",	NULL },
10570Sstevel@tonic-gate 	{ (uint_t)KIOCGLED,		"KIOCGLED",	NULL },
10580Sstevel@tonic-gate 	{ (uint_t)KIOCSCOMPAT,		"KIOCSCOMPAT",	NULL },
10590Sstevel@tonic-gate 	{ (uint_t)KIOCGCOMPAT,		"KIOCGCOMPAT",	NULL },
10600Sstevel@tonic-gate 	{ (uint_t)KIOCSLAYOUT,		"KIOCSLAYOUT",	NULL },
10610Sstevel@tonic-gate 	{ (uint_t)KIOCLAYOUT,		"KIOCLAYOUT",	NULL },
10620Sstevel@tonic-gate 	{ (uint_t)KIOCSKABORTEN,	"KIOCSKABORTEN",	NULL },
10630Sstevel@tonic-gate 	{ (uint_t)KIOCGRPTDELAY,	"KIOCGRPTDELAY",	NULL },
10640Sstevel@tonic-gate 	{ (uint_t)KIOCSRPTDELAY,	"KIOCSRPTDELAY",	NULL },
10650Sstevel@tonic-gate 	{ (uint_t)KIOCGRPTRATE,		"KIOCGRPTRATE",	NULL },
10660Sstevel@tonic-gate 	{ (uint_t)KIOCSRPTRATE,		"KIOCSRPTRATE",	NULL },
10673497Srz201010 	{ (uint_t)KIOCSETFREQ,		"KIOCSETFREQ",	NULL },
10685129Smarx 	{ (uint_t)KIOCMKTONE,		"KIOCMKTONE",	NULL },
10690Sstevel@tonic-gate 
10700Sstevel@tonic-gate 	/* ptm/pts driver I_STR ioctls */
10710Sstevel@tonic-gate 	{ (uint_t)ISPTM,		"ISPTM",		NULL},
10720Sstevel@tonic-gate 	{ (uint_t)UNLKPT,		"UNLKPT",		NULL},
10730Sstevel@tonic-gate 	{ (uint_t)PTSSTTY,		"PTSSTTY",		NULL},
10740Sstevel@tonic-gate 	{ (uint_t)ZONEPT,		"ZONEPT",		NULL},
10753442Svikram 	{ (uint_t)OWNERPT,		"OWNERPT",		NULL},
10760Sstevel@tonic-gate 
10770Sstevel@tonic-gate 	/* aggr link aggregation pseudo driver ioctls */
10780Sstevel@tonic-gate 	{ (uint_t)LAIOC_CREATE,		"LAIOC_CREATE",		"laioc_create"},
10790Sstevel@tonic-gate 	{ (uint_t)LAIOC_DELETE,		"LAIOC_DELETE",		"laioc_delete"},
10800Sstevel@tonic-gate 	{ (uint_t)LAIOC_INFO,		"LAIOC_INFO",		"laioc_info"},
10810Sstevel@tonic-gate 	{ (uint_t)LAIOC_ADD,		"LAIOC_ADD",
10820Sstevel@tonic-gate 	    "laioc_add_rem"},
10830Sstevel@tonic-gate 	{ (uint_t)LAIOC_REMOVE,		"LAIOC_REMOVE",
10840Sstevel@tonic-gate 	    "laioc_add_rem"},
10850Sstevel@tonic-gate 	{ (uint_t)LAIOC_MODIFY,		"LAIOC_MODIFY",		"laioc_modify"},
10860Sstevel@tonic-gate 
1087269Sericheng 	/* dld data-link ioctls */
10885895Syz147064 	{ (uint_t)DLDIOC_ATTR,		"DLDIOC_ATTR",		"dld_ioc_attr"},
10895895Syz147064 	{ (uint_t)DLDIOC_PHYS_ATTR,	"DLDIOC_PHYS_ATTR",
10905895Syz147064 		"dld_ioc_phys_attr"},
10918275SEric Cheng 	{ (uint_t)DLDIOC_DOORSERVER,	"DLDIOC_DOORSERVER", "dld_ioc_door"},
10928275SEric Cheng 	{ (uint_t)DLDIOC_RENAME,	"DLDIOC_RENAME", "dld_ioc_rename"},
10938275SEric Cheng 	{ (uint_t)DLDIOC_SECOBJ_GET,		"DLDIOC_SECOBJ_GET",
10948275SEric Cheng 		"dld_ioc_secobj_get"},
10958275SEric Cheng 	{ (uint_t)DLDIOC_SECOBJ_SET,		"DLDIOC_SECOBJ_SET",
10968275SEric Cheng 		"dld_ioc_secobj_set"},
10978275SEric Cheng 	{ (uint_t)DLDIOC_SECOBJ_UNSET,		"DLDIOC_SECOBJ_UNSET",
10988275SEric Cheng 		"dld_ioc_secobj_unset"},
10998275SEric Cheng 	{ (uint_t)DLDIOC_MACADDRGET,		"DLDIOC_MACADDRGET",
11008275SEric Cheng 		"dld_ioc_macaddrget"},
11018275SEric Cheng 	{ (uint_t)DLDIOC_SETMACPROP,		"DLDIOC_SETMACPROP",
11028275SEric Cheng 		"dld_ioc_macprop_s"},
11038275SEric Cheng 	{ (uint_t)DLDIOC_GETMACPROP,		"DLDIOC_GETMACPROP",
11047342SAruna.Ramakrishna@Sun.COM 		"dld_ioc_macprop_s"},
11058275SEric Cheng 	{ (uint_t)DLDIOC_ADDFLOW,		"DLDIOC_ADDFLOW",
11068275SEric Cheng 		"dld_ioc_addflow"},
11078275SEric Cheng 	{ (uint_t)DLDIOC_REMOVEFLOW,		"DLDIOC_REMOVEFLOW",
11088275SEric Cheng 		"dld_ioc_removeflow"},
11098275SEric Cheng 	{ (uint_t)DLDIOC_MODIFYFLOW,		"DLDIOC_MODIFYFLOW",
11108275SEric Cheng 		"dld_ioc_modifyflow"},
11118275SEric Cheng 	{ (uint_t)DLDIOC_WALKFLOW,		"DLDIOC_WALKFLOW",
11128275SEric Cheng 		"dld_ioc_walkflow"},
11138275SEric Cheng 	{ (uint_t)DLDIOC_USAGELOG,		"DLDIOC_USAGELOG",
11148275SEric Cheng 		"dld_ioc_usagelog"},
11158275SEric Cheng 
11169815SRishi.Srivatsavai@Sun.COM 	/* simnet ioctls */
11179815SRishi.Srivatsavai@Sun.COM 	{ (uint_t)SIMNET_IOC_CREATE,		"SIMNET_IOC_CREATE",
11189815SRishi.Srivatsavai@Sun.COM 		"simnet_ioc_create"},
11199815SRishi.Srivatsavai@Sun.COM 	{ (uint_t)SIMNET_IOC_DELETE,		"SIMNET_IOC_DELETE",
11209815SRishi.Srivatsavai@Sun.COM 		"simnet_ioc_delete"},
11219815SRishi.Srivatsavai@Sun.COM 	{ (uint_t)SIMNET_IOC_INFO,		"SIMNET_IOC_INFO",
11229815SRishi.Srivatsavai@Sun.COM 		"simnet_ioc_info"},
11239815SRishi.Srivatsavai@Sun.COM 	{ (uint_t)SIMNET_IOC_MODIFY,		"SIMNET_IOC_MODIFY",
11249815SRishi.Srivatsavai@Sun.COM 		"simnet_ioc_info"},
11259815SRishi.Srivatsavai@Sun.COM 
11268275SEric Cheng 	/* vnic ioctls */
11278275SEric Cheng 	{ (uint_t)VNIC_IOC_CREATE,		"VNIC_IOC_CREATE",
11288275SEric Cheng 		"vnic_ioc_create"},
11298275SEric Cheng 	{ (uint_t)VNIC_IOC_DELETE,		"VNIC_IOC_DELETE",
11308275SEric Cheng 		"vnic_ioc_delete"},
11318275SEric Cheng 	{ (uint_t)VNIC_IOC_INFO,		"VNIC_IOC_INFO",
11328275SEric Cheng 		"vnic_ioc_info"},
1133789Sahrens 
1134789Sahrens 	/* ZFS ioctls */
1135789Sahrens 	{ (uint_t)ZFS_IOC_POOL_CREATE,		"ZFS_IOC_POOL_CREATE",
1136789Sahrens 		"zfs_cmd_t" },
1137789Sahrens 	{ (uint_t)ZFS_IOC_POOL_DESTROY,		"ZFS_IOC_POOL_DESTROY",
1138789Sahrens 		"zfs_cmd_t" },
1139789Sahrens 	{ (uint_t)ZFS_IOC_POOL_IMPORT,		"ZFS_IOC_POOL_IMPORT",
1140789Sahrens 		"zfs_cmd_t" },
1141789Sahrens 	{ (uint_t)ZFS_IOC_POOL_EXPORT,		"ZFS_IOC_POOL_EXPORT",
1142789Sahrens 		"zfs_cmd_t" },
1143789Sahrens 	{ (uint_t)ZFS_IOC_POOL_CONFIGS,		"ZFS_IOC_POOL_CONFIGS",
1144789Sahrens 		"zfs_cmd_t" },
1145789Sahrens 	{ (uint_t)ZFS_IOC_POOL_STATS,		"ZFS_IOC_POOL_STATS",
1146789Sahrens 		"zfs_cmd_t" },
1147789Sahrens 	{ (uint_t)ZFS_IOC_POOL_TRYIMPORT,	"ZFS_IOC_POOL_TRYIMPORT",
1148789Sahrens 		"zfs_cmd_t" },
114912296SLin.Ling@Sun.COM 	{ (uint_t)ZFS_IOC_POOL_SCAN,		"ZFS_IOC_POOL_SCAN",
1150789Sahrens 		"zfs_cmd_t" },
1151789Sahrens 	{ (uint_t)ZFS_IOC_POOL_FREEZE,		"ZFS_IOC_POOL_FREEZE",
1152789Sahrens 		"zfs_cmd_t" },
11531760Seschrock 	{ (uint_t)ZFS_IOC_POOL_UPGRADE,		"ZFS_IOC_POOL_UPGRADE",
11541760Seschrock 		"zfs_cmd_t" },
11552926Sek110237 	{ (uint_t)ZFS_IOC_POOL_GET_HISTORY,	"ZFS_IOC_POOL_GET_HISTORY",
11562926Sek110237 		"zfs_cmd_t" },
1157789Sahrens 	{ (uint_t)ZFS_IOC_VDEV_ADD,		"ZFS_IOC_VDEV_ADD",
1158789Sahrens 		"zfs_cmd_t" },
1159789Sahrens 	{ (uint_t)ZFS_IOC_VDEV_REMOVE,		"ZFS_IOC_VDEV_REMOVE",
1160789Sahrens 		"zfs_cmd_t" },
11614451Seschrock 	{ (uint_t)ZFS_IOC_VDEV_SET_STATE,	"ZFS_IOC_VDEV_SET_STATE",
1162789Sahrens 		"zfs_cmd_t" },
1163789Sahrens 	{ (uint_t)ZFS_IOC_VDEV_ATTACH,		"ZFS_IOC_VDEV_ATTACH",
1164789Sahrens 		"zfs_cmd_t" },
1165789Sahrens 	{ (uint_t)ZFS_IOC_VDEV_DETACH,		"ZFS_IOC_VDEV_DETACH",
1166789Sahrens 		"zfs_cmd_t" },
11671354Seschrock 	{ (uint_t)ZFS_IOC_VDEV_SETPATH,		"ZFS_IOC_VDEV_SETPATH",
11681354Seschrock 		"zfs_cmd_t" },
11699425SEric.Schrock@Sun.COM 	{ (uint_t)ZFS_IOC_VDEV_SETFRU,		"ZFS_IOC_VDEV_SETFRU",
11709425SEric.Schrock@Sun.COM 		"zfs_cmd_t" },
1171789Sahrens 	{ (uint_t)ZFS_IOC_OBJSET_STATS,		"ZFS_IOC_OBJSET_STATS",
1172789Sahrens 		"zfs_cmd_t" },
11738761STim.Haley@Sun.COM 	{ (uint_t)ZFS_IOC_OBJSET_ZPLPROPS,	"ZFS_IOC_OBJSET_ZPLPROPS",
11748761STim.Haley@Sun.COM 		"zfs_cmd_t" },
1175789Sahrens 	{ (uint_t)ZFS_IOC_DATASET_LIST_NEXT,	"ZFS_IOC_DATASET_LIST_NEXT",
1176789Sahrens 		"zfs_cmd_t" },
1177789Sahrens 	{ (uint_t)ZFS_IOC_SNAPSHOT_LIST_NEXT,	"ZFS_IOC_SNAPSHOT_LIST_NEXT",
1178789Sahrens 		"zfs_cmd_t" },
1179789Sahrens 	{ (uint_t)ZFS_IOC_SET_PROP,		"ZFS_IOC_SET_PROP",
1180789Sahrens 		"zfs_cmd_t" },
1181789Sahrens 	{ (uint_t)ZFS_IOC_CREATE,		"ZFS_IOC_CREATE",
1182789Sahrens 		"zfs_cmd_t" },
1183789Sahrens 	{ (uint_t)ZFS_IOC_DESTROY,		"ZFS_IOC_DESTROY",
1184789Sahrens 		"zfs_cmd_t" },
1185789Sahrens 	{ (uint_t)ZFS_IOC_ROLLBACK,		"ZFS_IOC_ROLLBACK",
1186789Sahrens 		"zfs_cmd_t" },
1187789Sahrens 	{ (uint_t)ZFS_IOC_RENAME,		"ZFS_IOC_RENAME",
1188789Sahrens 		"zfs_cmd_t" },
11895367Sahrens 	{ (uint_t)ZFS_IOC_RECV,			"ZFS_IOC_RECV",
1190789Sahrens 		"zfs_cmd_t" },
11915367Sahrens 	{ (uint_t)ZFS_IOC_SEND,			"ZFS_IOC_SEND",
1192789Sahrens 		"zfs_cmd_t" },
11931544Seschrock 	{ (uint_t)ZFS_IOC_INJECT_FAULT,		"ZFS_IOC_INJECT_FAULT",
11941544Seschrock 		"zfs_cmd_t" },
11951544Seschrock 	{ (uint_t)ZFS_IOC_CLEAR_FAULT,		"ZFS_IOC_CLEAR_FAULT",
11961544Seschrock 		"zfs_cmd_t" },
11971544Seschrock 	{ (uint_t)ZFS_IOC_INJECT_LIST_NEXT,	"ZFS_IOC_INJECT_LIST_NEXT",
11981544Seschrock 		"zfs_cmd_t" },
11991544Seschrock 	{ (uint_t)ZFS_IOC_ERROR_LOG,		"ZFS_IOC_ERROR_LOG",
12001544Seschrock 		"zfs_cmd_t" },
12011544Seschrock 	{ (uint_t)ZFS_IOC_CLEAR,		"ZFS_IOC_CLEAR",
12021544Seschrock 		"zfs_cmd_t" },
12032082Seschrock 	{ (uint_t)ZFS_IOC_PROMOTE,		"ZFS_IOC_PROMOTE",
12042082Seschrock 		"zfs_cmd_t" },
12052199Sahrens 	{ (uint_t)ZFS_IOC_DESTROY_SNAPS,	"ZFS_IOC_DESTROY_SNAPS",
12062199Sahrens 		"zfs_cmd_t" },
12072199Sahrens 	{ (uint_t)ZFS_IOC_SNAPSHOT,		"ZFS_IOC_SNAPSHOT",
12082199Sahrens 		"zfs_cmd_t" },
12093444Sek110237 	{ (uint_t)ZFS_IOC_DSOBJ_TO_DSNAME,	"ZFS_IOC_DSOBJ_TO_DSNAME",
12103444Sek110237 		"zfs_cmd_t" },
12113444Sek110237 	{ (uint_t)ZFS_IOC_OBJ_TO_PATH,		"ZFS_IOC_OBJ_TO_PATH",
12123444Sek110237 		"zfs_cmd_t" },
12133912Slling 	{ (uint_t)ZFS_IOC_POOL_SET_PROPS,	"ZFS_IOC_POOL_SET_PROPS",
12143912Slling 		"zfs_cmd_t" },
12153912Slling 	{ (uint_t)ZFS_IOC_POOL_GET_PROPS,	"ZFS_IOC_POOL_GET_PROPS",
12163912Slling 		"zfs_cmd_t" },
12174543Smarks 	{ (uint_t)ZFS_IOC_SET_FSACL,		"ZFS_IOC_SET_FSACL",
12184543Smarks 		"zfs_cmd_t" },
12194543Smarks 	{ (uint_t)ZFS_IOC_GET_FSACL,		"ZFS_IOC_GET_FSACL",
12204543Smarks 		"zfs_cmd_t" },
12214543Smarks 	{ (uint_t)ZFS_IOC_SHARE,		"ZFS_IOC_SHARE",
12224543Smarks 		"zfs_cmd_t" },
12234849Sahrens 	{ (uint_t)ZFS_IOC_INHERIT_PROP,		"ZFS_IOC_INHERIT_PROP",
12244849Sahrens 		"zfs_cmd_t" },
12258845Samw@Sun.COM 	{ (uint_t)ZFS_IOC_SMB_ACL,		"ZFS_IOC_SMB_ACL",
12268845Samw@Sun.COM 		"zfs_cmd_t" },
12279396SMatthew.Ahrens@Sun.COM 	{ (uint_t)ZFS_IOC_USERSPACE_ONE,	"ZFS_IOC_USERSPACE_ONE",
12289396SMatthew.Ahrens@Sun.COM 		"zfs_cmd_t" },
12299396SMatthew.Ahrens@Sun.COM 	{ (uint_t)ZFS_IOC_USERSPACE_MANY,	"ZFS_IOC_USERSPACE_MANY",
12309396SMatthew.Ahrens@Sun.COM 		"zfs_cmd_t" },
12319396SMatthew.Ahrens@Sun.COM 	{ (uint_t)ZFS_IOC_USERSPACE_UPGRADE,	"ZFS_IOC_USERSPACE_UPGRADE",
12329396SMatthew.Ahrens@Sun.COM 		"zfs_cmd_t" },
123310242Schris.kirby@sun.com 	{ (uint_t)ZFS_IOC_HOLD,			"ZFS_IOC_HOLD",
123410242Schris.kirby@sun.com 		"zfs_cmd_t" },
123510242Schris.kirby@sun.com 	{ (uint_t)ZFS_IOC_RELEASE,		"ZFS_IOC_RELEASE",
123610242Schris.kirby@sun.com 		"zfs_cmd_t" },
123710242Schris.kirby@sun.com 	{ (uint_t)ZFS_IOC_GET_HOLDS,		"ZFS_IOC_GET_HOLDS",
123810242Schris.kirby@sun.com 		"zfs_cmd_t" },
123911022STom.Erickson@Sun.COM 	{ (uint_t)ZFS_IOC_OBJSET_RECVD_PROPS,	"ZFS_IOC_OBJSET_RECVD_PROPS",
124011022STom.Erickson@Sun.COM 		"zfs_cmd_t" },
124112527SChris.Kirby@oracle.com 	{ (uint_t)ZFS_IOC_VDEV_SPLIT,		"ZFS_IOC_VDEV_SPLIT",
124212527SChris.Kirby@oracle.com 		"zfs_cmd_t" },
124313043STim.Haley@Sun.COM 	{ (uint_t)ZFS_IOC_NEXT_OBJ,		"ZFS_IOC_NEXT_OBJ",
124413043STim.Haley@Sun.COM 		"zfs_cmd_t" },
124513043STim.Haley@Sun.COM 	{ (uint_t)ZFS_IOC_DIFF,			"ZFS_IOC_DIFF",
124613043STim.Haley@Sun.COM 		"zfs_cmd_t" },
124713043STim.Haley@Sun.COM 	{ (uint_t)ZFS_IOC_TMP_SNAPSHOT,		"ZFS_IOC_TMP_SNAPSHOT",
124813043STim.Haley@Sun.COM 		"zfs_cmd_t" },
124913043STim.Haley@Sun.COM 	{ (uint_t)ZFS_IOC_OBJ_TO_STATS,		"ZFS_IOC_OBJ_TO_STATS",
125013043STim.Haley@Sun.COM 		"zfs_cmd_t" },
1251789Sahrens 
12521400Skrishna 	/* kssl ioctls */
12531400Skrishna 	{ (uint_t)KSSL_ADD_ENTRY,		"KSSL_ADD_ENTRY",
12541400Skrishna 		"kssl_params_t"},
12551400Skrishna 	{ (uint_t)KSSL_DELETE_ENTRY,		"KSSL_DELETE_ENTRY",
12561400Skrishna 		"sockaddr_in"},
12571400Skrishna 
12588863SEdward.Pilatowicz@Sun.COM 	/* disk ioctls - (0x04 << 8) - dkio.h */
12596318Sedp 	{ (uint_t)DKIOCGGEOM,		"DKIOCGGEOM",
12606318Sedp 		"struct dk_geom"},
12616318Sedp 	{ (uint_t)DKIOCINFO,		"DKIOCINFO",
12626318Sedp 		"struct dk_info"},
12638863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCEJECT,		"DKIOCEJECT",
12648863SEdward.Pilatowicz@Sun.COM 		NULL},
12656318Sedp 	{ (uint_t)DKIOCGVTOC,		"DKIOCGVTOC",
12666318Sedp 		"struct vtoc"},
12676318Sedp 	{ (uint_t)DKIOCSVTOC,		"DKIOCSVTOC",
12686318Sedp 		"struct vtoc"},
12698863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGEXTVTOC,	"DKIOCGEXTVTOC",
12708863SEdward.Pilatowicz@Sun.COM 		"struct extvtoc"},
12718863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSEXTVTOC,	"DKIOCSEXTVTOC",
12728863SEdward.Pilatowicz@Sun.COM 		"struct extvtoc"},
12738863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCFLUSHWRITECACHE,	"DKIOCFLUSHWRITECACHE",
12748863SEdward.Pilatowicz@Sun.COM 		NULL},
12758863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGETWCE,		"DKIOCGETWCE",
12766318Sedp 		NULL},
12778863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSETWCE,		"DKIOCSETWCE",
12788863SEdward.Pilatowicz@Sun.COM 		NULL},
12798863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSGEOM,		"DKIOCSGEOM",
12808863SEdward.Pilatowicz@Sun.COM 		"struct dk_geom"},
12818863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSAPART,		"DKIOCSAPART",
12828863SEdward.Pilatowicz@Sun.COM 		"struct dk_allmap"},
12838863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGAPART,		"DKIOCGAPART",
12848863SEdward.Pilatowicz@Sun.COM 		"struct dk_allmap"},
12856318Sedp 	{ (uint_t)DKIOCG_PHYGEOM,	"DKIOCG_PHYGEOM",
12866318Sedp 		"struct dk_geom"},
12876318Sedp 	{ (uint_t)DKIOCG_VIRTGEOM,	"DKIOCG_VIRTGEOM",
12886318Sedp 		"struct dk_geom"},
12898863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCLOCK,		"DKIOCLOCK",
12908863SEdward.Pilatowicz@Sun.COM 		NULL},
12918863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCUNLOCK,		"DKIOCUNLOCK",
12928863SEdward.Pilatowicz@Sun.COM 		NULL},
12938863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSTATE,		"DKIOCSTATE",
12948863SEdward.Pilatowicz@Sun.COM 		NULL},
12958863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCREMOVABLE,	"DKIOCREMOVABLE",
12968863SEdward.Pilatowicz@Sun.COM 		NULL},
12978863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCHOTPLUGGABLE,	"DKIOCHOTPLUGGABLE",
12988863SEdward.Pilatowicz@Sun.COM 		NULL},
12998863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCADDBAD,		"DKIOCADDBAD",
13008863SEdward.Pilatowicz@Sun.COM 		NULL},
13018863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGETDEF,		"DKIOCGETDEF",
13028863SEdward.Pilatowicz@Sun.COM 		NULL},
13038863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCPARTINFO,	"DKIOCPARTINFO",
13048863SEdward.Pilatowicz@Sun.COM 		"struct part_info"},
13058863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCEXTPARTINFO,	"DKIOCEXTPARTINFO",
13068863SEdward.Pilatowicz@Sun.COM 		"struct extpart_info"},
13076318Sedp 	{ (uint_t)DKIOCGMEDIAINFO,	"DKIOCGMEDIAINFO",
13086318Sedp 		"struct dk_minfo"},
13098863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGMBOOT,		"DKIOCGMBOOT",
13108863SEdward.Pilatowicz@Sun.COM 		NULL},
13118863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSMBOOT,		"DKIOCSMBOOT",
13128863SEdward.Pilatowicz@Sun.COM 		NULL},
13138863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSETEFI,		"DKIOCSETEFI",
13148863SEdward.Pilatowicz@Sun.COM 		"struct dk_efi"},
13158863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGETEFI,		"DKIOCGETEFI",
13168863SEdward.Pilatowicz@Sun.COM 		"struct dk_efi"},
13178863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCPARTITION,	"DKIOCPARTITION",
13188863SEdward.Pilatowicz@Sun.COM 		"struct partition64"},
13198863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGETVOLCAP,	"DKIOCGETVOLCAP",
13208863SEdward.Pilatowicz@Sun.COM 		"struct volcap_t"},
13218863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSETVOLCAP,	"DKIOCSETVOLCAP",
13228863SEdward.Pilatowicz@Sun.COM 		"struct volcap_t"},
13238863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCDMR,		"DKIOCDMR",
13248863SEdward.Pilatowicz@Sun.COM 		"struct vol_directed_rd"},
13258863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCDUMPINIT,	"DKIOCDUMPINIT",
13268863SEdward.Pilatowicz@Sun.COM 		NULL},
13278863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCDUMPFINI,	"DKIOCDUMPFINI",
13288863SEdward.Pilatowicz@Sun.COM 		NULL},
132911329Sgdamore@opensolaris.org 	{ (uint_t)DKIOCREADONLY,	"DKIOCREADONLY",
133011329Sgdamore@opensolaris.org 		NULL},
13318863SEdward.Pilatowicz@Sun.COM 
13328863SEdward.Pilatowicz@Sun.COM 	/* disk ioctls - (0x04 << 8) - fdio.h */
13338863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDIOGCHAR,		"FDIOGCHAR",
13348863SEdward.Pilatowicz@Sun.COM 		"struct fd_char"},
13358863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDIOSCHAR,		"FDIOSCHAR",
13368863SEdward.Pilatowicz@Sun.COM 		"struct fd_char"},
13378863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDEJECT,		"FDEJECT",
13388863SEdward.Pilatowicz@Sun.COM 		NULL},
13398863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDGETCHANGE,		"FDGETCHANGE",
13408863SEdward.Pilatowicz@Sun.COM 		NULL},
13418863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDGETDRIVECHAR,	"FDGETDRIVECHAR",
13428863SEdward.Pilatowicz@Sun.COM 		"struct fd_drive"},
13438863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDSETDRIVECHAR,	"FDSETDRIVECHAR",
13448863SEdward.Pilatowicz@Sun.COM 		"struct fd_drive"},
13458863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDGETSEARCH,		"FDGETSEARCH",
13468863SEdward.Pilatowicz@Sun.COM 		NULL},
13478863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDSETSEARCH,		"FDSETSEARCH",
13488863SEdward.Pilatowicz@Sun.COM 		NULL},
13498863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDIOCMD,		"FDIOCMD",
13508863SEdward.Pilatowicz@Sun.COM 		"struct fd_cmd"},
13518863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDRAW,		"FDRAW",
13528863SEdward.Pilatowicz@Sun.COM 		"struct fd_raw"},
13538863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDDEFGEOCHAR,		"FDDEFGEOCHAR",
13548863SEdward.Pilatowicz@Sun.COM 		NULL},
13558863SEdward.Pilatowicz@Sun.COM 
13568863SEdward.Pilatowicz@Sun.COM 	/* disk ioctls - (0x04 << 8) - cdio.h */
13578863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMPAUSE,		"CDROMPAUSE",
13588863SEdward.Pilatowicz@Sun.COM 		NULL},
13598863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMRESUME,		"CDROMRESUME",
13608863SEdward.Pilatowicz@Sun.COM 		NULL},
13618863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMPLAYMSF,		"CDROMPLAYMSF",
13628863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_msf"},
13638863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMPLAYTRKIND,	"CDROMPLAYTRKIND",
13648863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_ti"},
13658863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMREADTOCHDR,	"CDROMREADTOCHDR",
13668863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_tochdr"},
13678863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMREADTOCENTRY,	"CDROMREADTOCENTRY",
13688863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_tocentry"},
13698863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSTOP,		"CDROMSTOP",
13708863SEdward.Pilatowicz@Sun.COM 		NULL},
13718863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSTART,		"CDROMSTART",
13728863SEdward.Pilatowicz@Sun.COM 		NULL},
13738863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMEJECT,		"CDROMEJECT",
13748863SEdward.Pilatowicz@Sun.COM 		NULL},
13758863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMVOLCTRL,		"CDROMVOLCTRL",
13768863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_volctrl"},
13778863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSUBCHNL,		"CDROMSUBCHNL",
13788863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_subchnl"},
13798863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMREADMODE2,	"CDROMREADMODE2",
13808863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_read"},
13818863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMREADMODE1,	"CDROMREADMODE1",
13828863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_read"},
13838863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMREADOFFSET,	"CDROMREADOFFSET",
13848863SEdward.Pilatowicz@Sun.COM 		NULL},
13858863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMGBLKMODE,	"CDROMGBLKMODE",
13868863SEdward.Pilatowicz@Sun.COM 		NULL},
13878863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSBLKMODE,	"CDROMSBLKMODE",
13888863SEdward.Pilatowicz@Sun.COM 		NULL},
13898863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMCDDA,		"CDROMCDDA",
13908863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_cdda"},
13918863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMCDXA,		"CDROMCDXA",
13928863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_cdxa"},
13938863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSUBCODE,		"CDROMSUBCODE",
13948863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_subcode"},
13958863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMGDRVSPEED,	"CDROMGDRVSPEED",
13968863SEdward.Pilatowicz@Sun.COM 		NULL},
13978863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSDRVSPEED,	"CDROMSDRVSPEED",
13988863SEdward.Pilatowicz@Sun.COM 		NULL},
13998863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMCLOSETRAY,	"CDROMCLOSETRAY",
14008863SEdward.Pilatowicz@Sun.COM 		NULL},
14018863SEdward.Pilatowicz@Sun.COM 
14028863SEdward.Pilatowicz@Sun.COM 	/* disk ioctls - (0x04 << 8) - uscsi.h */
14038863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)USCSICMD,		"USCSICMD",
14048863SEdward.Pilatowicz@Sun.COM 		"struct uscsi_cmd"},
14056318Sedp 
14066318Sedp 	/* dumpadm ioctls - (0xdd << 8) */
14076318Sedp 	{ (uint_t)DIOCGETDEV,	"DIOCGETDEV",
14088863SEdward.Pilatowicz@Sun.COM 		NULL},
14096318Sedp 
14106318Sedp 	/* mntio ioctls - ('m' << 8) */
141110910SRobert.Harris@Sun.COM 	{ (uint_t)MNTIOC_NMNTS,		"MNTIOC_NMNTS",
141210910SRobert.Harris@Sun.COM 		NULL},
141310910SRobert.Harris@Sun.COM 	{ (uint_t)MNTIOC_GETDEVLIST,	"MNTIOC_GETDEVLIST",
141410910SRobert.Harris@Sun.COM 		NULL},
141510910SRobert.Harris@Sun.COM 	{ (uint_t)MNTIOC_SETTAG,	"MNTIOC_SETTAG",
141610910SRobert.Harris@Sun.COM 		"struct mnttagdesc"},
141710910SRobert.Harris@Sun.COM 	{ (uint_t)MNTIOC_CLRTAG,	"MNTIOC_CLRTAG",
141810910SRobert.Harris@Sun.COM 		"struct mnttagdesc"},
141910910SRobert.Harris@Sun.COM 	{ (uint_t)MNTIOC_SHOWHIDDEN,	"MNTIOC_SHOWHIDDEN",
142010910SRobert.Harris@Sun.COM 		NULL},
14216318Sedp 	{ (uint_t)MNTIOC_GETMNTENT,	"MNTIOC_GETMNTENT",
142210910SRobert.Harris@Sun.COM 		"struct mnttab"},
142310910SRobert.Harris@Sun.COM 	{ (uint_t)MNTIOC_GETEXTMNTENT,	"MNTIOC_GETEXTMNTENT",
14246318Sedp 		"struct extmnttab"},
142510910SRobert.Harris@Sun.COM 	{ (uint_t)MNTIOC_GETMNTANY,	"MNTIOC_GETMNTANY",
142610910SRobert.Harris@Sun.COM 		"struct mnttab"},
14276318Sedp 
14288863SEdward.Pilatowicz@Sun.COM 	/* devinfo ioctls - ('df' << 8) - devinfo_impl.h */
14298863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DINFOUSRLD,		"DINFOUSRLD",
14308863SEdward.Pilatowicz@Sun.COM 		NULL},
14318863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DINFOLODRV,		"DINFOLODRV",
14328863SEdward.Pilatowicz@Sun.COM 		NULL},
14338863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DINFOIDENT,		"DINFOIDENT",
14348863SEdward.Pilatowicz@Sun.COM 		NULL},
14358863SEdward.Pilatowicz@Sun.COM 
143610616SSebastien.Roy@Sun.COM 	{ (uint_t)IPTUN_CREATE,	"IPTUN_CREATE",	"iptun_kparams_t"},
143710616SSebastien.Roy@Sun.COM 	{ (uint_t)IPTUN_DELETE,	"IPTUN_DELETE", "datalink_id_t"},
143810616SSebastien.Roy@Sun.COM 	{ (uint_t)IPTUN_MODIFY, "IPTUN_MODIFY", "iptun_kparams_t"},
143910616SSebastien.Roy@Sun.COM 	{ (uint_t)IPTUN_INFO,	"IPTUN_INFO",	NULL},
144010616SSebastien.Roy@Sun.COM 	{ (uint_t)IPTUN_SET_6TO4RELAY, "IPTUN_SET_6TO4RELAY",	NULL},
144110616SSebastien.Roy@Sun.COM 	{ (uint_t)IPTUN_GET_6TO4RELAY, "IPTUN_GET_6TO4RELAY",	NULL},
144210616SSebastien.Roy@Sun.COM 
14438770SJordan.Vaughan@Sun.com 	/* zcons ioctls */
14448770SJordan.Vaughan@Sun.com 	{ (uint_t)ZC_HOLDSLAVE,		"ZC_HOLDSLAVE",		NULL },
14458770SJordan.Vaughan@Sun.com 	{ (uint_t)ZC_RELEASESLAVE,	"ZC_RELEASESLAVE",	NULL },
14468770SJordan.Vaughan@Sun.com 
144710153SAaron.Zang@Sun.COM 	/* hid ioctls - ('h' << 8) - hid.h */
144810153SAaron.Zang@Sun.COM 	{ (uint_t)HIDIOCKMGDIRECT,	"HIDIOCKMGDIRECT",	NULL },
144910153SAaron.Zang@Sun.COM 	{ (uint_t)HIDIOCKMSDIRECT,	"HIDIOCKMSDIRECT",	NULL },
145010153SAaron.Zang@Sun.COM 
145110492SMargot.Miller@Sun.COM 	/* pm ioctls */
145210492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SCHEDULE,		"PM_SCHEDULE",		NULL },
145310492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_IDLE_TIME,	"PM_GET_IDLE_TIME",	NULL },
145410492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_NUM_CMPTS,	"PM_GET_NUM_CMPTS",	NULL },
145510492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_THRESHOLD,	"PM_GET_THRESHOLD",	NULL },
145610492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SET_THRESHOLD,	"PM_SET_THRESHOLD",	NULL },
145710492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_NORM_PWR,	"PM_GET_NORM_PWR",	NULL },
145810492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SET_CUR_PWR,	"PM_SET_CUR_PWR",	NULL },
145910492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_CUR_PWR,	"PM_GET_CUR_PWR",	NULL },
146010492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_NUM_DEPS,	"PM_GET_NUM_DEPS",	NULL },
146110492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_DEP,		"PM_GET_DEP",		NULL },
146210492SMargot.Miller@Sun.COM 	{ (uint_t)PM_ADD_DEP,		"PM_ADD_DEP",		NULL },
146310492SMargot.Miller@Sun.COM 	{ (uint_t)PM_REM_DEP,		"PM_REM_DEP",		NULL },
146410492SMargot.Miller@Sun.COM 	{ (uint_t)PM_REM_DEVICE,	"PM_REM_DEVICE",	NULL },
146510492SMargot.Miller@Sun.COM 	{ (uint_t)PM_REM_DEVICES,	"PM_REM_DEVICES",	NULL },
146610492SMargot.Miller@Sun.COM 	{ (uint_t)PM_DISABLE_AUTOPM,	"PM_DISABLE_AUTOPM",	NULL },
146710492SMargot.Miller@Sun.COM 	{ (uint_t)PM_REENABLE_AUTOPM,	"PM_REENABLE_AUTOPM",	NULL },
146810492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SET_NORM_PWR,	"PM_SET_NORM_PWR",	NULL },
146910492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_SYSTEM_THRESHOLD,	"PM_GET_SYSTEM_THRESHOLD",
147010492SMargot.Miller@Sun.COM 		NULL },
147110492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_DEFAULT_SYSTEM_THRESHOLD,
147210492SMargot.Miller@Sun.COM 		"PM_GET_DEFAULT_SYSTEM_THRESHOLD", NULL },
147310492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SET_SYSTEM_THRESHOLD,	"PM_SET_SYSTEM_THRESHOLD",
147410492SMargot.Miller@Sun.COM 		NULL },
147510492SMargot.Miller@Sun.COM 	{ (uint_t)PM_START_PM,		"PM_START_PM",		NULL },
147610492SMargot.Miller@Sun.COM 	{ (uint_t)PM_STOP_PM,		"PM_STOP_PM",		NULL },
147710492SMargot.Miller@Sun.COM 	{ (uint_t)PM_RESET_PM,		"PM_RESET_PM",		NULL },
147810492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_PM_STATE,	"PM_GET_PM_STATE",	NULL },
147910492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_AUTOS3_STATE,	"PM_GET_AUTOS3_STATE",	NULL },
148010492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_S3_SUPPORT_STATE,	"PM_GET_S3_SUPPORT_STATE",
148110492SMargot.Miller@Sun.COM 		NULL },
148210492SMargot.Miller@Sun.COM 	{ (uint_t)PM_IDLE_DOWN,		"PM_IDLE_DOWN",		NULL },
148310492SMargot.Miller@Sun.COM 	{ (uint_t)PM_START_CPUPM,	"PM_START_CPUPM",	NULL },
148410492SMargot.Miller@Sun.COM 	{ (uint_t)PM_START_CPUPM_EV,	"PM_START_CPUPM_EV",	NULL },
148510492SMargot.Miller@Sun.COM 	{ (uint_t)PM_START_CPUPM_POLL,	"PM_START_CPUPM_POLL",	NULL },
148610492SMargot.Miller@Sun.COM 	{ (uint_t)PM_STOP_CPUPM,	"PM_STOP_CPUPM",	NULL },
148710492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_CPU_THRESHOLD,	"PM_GET_CPU_THRESHOLD",	NULL },
148810492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SET_CPU_THRESHOLD,	"PM_SET_CPU_THRESHOLD",	NULL },
148910492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_CPUPM_STATE,	"PM_GET_CPUPM_STATE",	NULL },
149010492SMargot.Miller@Sun.COM 	{ (uint_t)PM_START_AUTOS3,	"PM_START_AUTOS3",	NULL },
149110492SMargot.Miller@Sun.COM 	{ (uint_t)PM_STOP_AUTOS3,	"PM_STOP_AUTOS3",	NULL },
149210492SMargot.Miller@Sun.COM 	{ (uint_t)PM_ENABLE_S3,		"PM_ENABLE_S3",		NULL },
149310492SMargot.Miller@Sun.COM 	{ (uint_t)PM_DISABLE_S3,	"PM_DISABLE_S3",	NULL },
149410492SMargot.Miller@Sun.COM 	{ (uint_t)PM_ENTER_S3,		"PM_ENTER_S3",		NULL },
149510492SMargot.Miller@Sun.COM 	{ (uint_t)PM_DISABLE_CPU_DEEP_IDLE,	"PM_DISABLE_CPU_DEEP_IDLE",
149610492SMargot.Miller@Sun.COM 		NULL },
149710492SMargot.Miller@Sun.COM 	{ (uint_t)PM_ENABLE_CPU_DEEP_IDLE,	"PM_START_CPU_DEEP_IDLE",
149810492SMargot.Miller@Sun.COM 		NULL },
149910492SMargot.Miller@Sun.COM 	{ (uint_t)PM_DEFAULT_CPU_DEEP_IDLE,	"PM_DFLT_CPU_DEEP_IDLE",
150010492SMargot.Miller@Sun.COM 		NULL },
150110492SMargot.Miller@Sun.COM #ifdef _SYSCALL32
150210492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_STATE_CHANGE,		"PM_GET_STATE_CHANGE",
150310492SMargot.Miller@Sun.COM 		"pm_state_change32_t" },
150410492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_STATE_CHANGE_WAIT,	"PM_GET_STATE_CHANGE_WAIT",
150510492SMargot.Miller@Sun.COM 		"pm_state_change32_t" },
150610492SMargot.Miller@Sun.COM 	{ (uint_t)PM_DIRECT_NOTIFY,		"PM_DIRECT_NOTIFY",
150710492SMargot.Miller@Sun.COM 		"pm_state_change32_t" },
150810492SMargot.Miller@Sun.COM 	{ (uint_t)PM_DIRECT_NOTIFY_WAIT,	"PM_DIRECT_NOTIFY_WAIT",
150910492SMargot.Miller@Sun.COM 		"pm_state_change32_t" },
151010492SMargot.Miller@Sun.COM 	{ (uint_t)PM_REPARSE_PM_PROPS,		"PM_REPARSE_PM_PROPS",
151110492SMargot.Miller@Sun.COM 		"pm_req32_t" },
151210492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SET_DEVICE_THRESHOLD,	"PM_SET_DEVICE_THRESHOLD",
151310492SMargot.Miller@Sun.COM 		"pm_req32_t" },
151410492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_STATS,			"PM_GET_STATS",
151510492SMargot.Miller@Sun.COM 		"pm_req32_t" },
151610492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_DEVICE_THRESHOLD,	"PM_GET_DEVICE_THRESHOLD",
151710492SMargot.Miller@Sun.COM 		"pm_req32_t" },
151810492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_POWER_NAME,		"PM_GET_POWER_NAME",
151910492SMargot.Miller@Sun.COM 		"pm_req32_t" },
152010492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_POWER_LEVELS,		"PM_GET_POWER_LEVELS",
152110492SMargot.Miller@Sun.COM 		"pm_req32_t" },
152210492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_NUM_COMPONENTS,	"PM_GET_NUM_COMPONENTS",
152310492SMargot.Miller@Sun.COM 		"pm_req32_t" },
152410492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_COMPONENT_NAME,	"PM_GET_COMPONENT_NAME",
152510492SMargot.Miller@Sun.COM 		"pm_req32_t" },
152610492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_NUM_POWER_LEVELS,	"PM_GET_NUM_POWER_LEVELS",
152710492SMargot.Miller@Sun.COM 		"pm_req32_t" },
152810492SMargot.Miller@Sun.COM 	{ (uint_t)PM_DIRECT_PM,			"PM_DIRECT_PM",
152910492SMargot.Miller@Sun.COM 		"pm_req32_t" },
153010492SMargot.Miller@Sun.COM 	{ (uint_t)PM_RELEASE_DIRECT_PM,		"PM_RELEASE_DIRECT_PM",
153110492SMargot.Miller@Sun.COM 		"pm_req32_t" },
153210492SMargot.Miller@Sun.COM 	{ (uint_t)PM_RESET_DEVICE_THRESHOLD,	"PM_RESET_DEVICE_THRESHOLD",
153310492SMargot.Miller@Sun.COM 		"pm_req32_t" },
153410492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_DEVICE_TYPE,		"PM_GET_DEVICE_TYPE",
153510492SMargot.Miller@Sun.COM 		"pm_req32_t" },
153610492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SET_COMPONENT_THRESHOLDS,	"PM_SET_COMPONENT_THRESHOLDS",
153710492SMargot.Miller@Sun.COM 		"pm_req32_t" },
153810492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_COMPONENT_THRESHOLDS,	"PM_GET_COMPONENT_THRESHOLDS",
153910492SMargot.Miller@Sun.COM 		"pm_req32_t" },
154010492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_DEVICE_THRESHOLD_BASIS,
154110492SMargot.Miller@Sun.COM 		"PM_GET_DEVICE_THRESHOLD_BASIS",	"pm_req32_t" },
154210492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SET_CURRENT_POWER,		"PM_SET_CURRENT_POWER",
154310492SMargot.Miller@Sun.COM 		"pm_req32_t" },
154410492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_CURRENT_POWER,		"PM_GET_CURRENT_POWER",
154510492SMargot.Miller@Sun.COM 		"pm_req32_t" },
154610492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_FULL_POWER,		"PM_GET_FULL_POWER",
154710492SMargot.Miller@Sun.COM 		"pm_req32_t" },
154810492SMargot.Miller@Sun.COM 	{ (uint_t)PM_ADD_DEPENDENT,		"PM_ADD_DEPENDENT",
154910492SMargot.Miller@Sun.COM 		"pm_req32_t" },
155010492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_TIME_IDLE,		"PM_GET_TIME_IDLE",
155110492SMargot.Miller@Sun.COM 		"pm_req32_t" },
155210492SMargot.Miller@Sun.COM 	{ (uint_t)PM_ADD_DEPENDENT_PROPERTY,	"PM_ADD_DEPENDENT_PROPERTY",
155310492SMargot.Miller@Sun.COM 		"pm_req32_t" },
155410492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_CMD_NAME,		"PM_GET_CMD_NAME",
155510492SMargot.Miller@Sun.COM 		"pm_req32_t" },
155610492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SEARCH_LIST,		"PM_SEARCH_LIST",
155710492SMargot.Miller@Sun.COM 		"pm_searchargs32_t" },
155810492SMargot.Miller@Sun.COM #else  /* _SYSCALL32 */
155910492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_STATE_CHANGE,		"PM_GET_STATE_CHANGE",
156010492SMargot.Miller@Sun.COM 		"pm_state_change_t" },
156110492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_STATE_CHANGE_WAIT,	"PM_GET_STATE_CHANGE_WAIT",
156210492SMargot.Miller@Sun.COM 		"pm_state_change_t" },
156310492SMargot.Miller@Sun.COM 	{ (uint_t)PM_DIRECT_NOTIFY,		"PM_DIRECT_NOTIFY",
156410492SMargot.Miller@Sun.COM 		"pm_state_change_t" },
156510492SMargot.Miller@Sun.COM 	{ (uint_t)PM_DIRECT_NOTIFY_WAIT,	"PM_DIRECT_NOTIFY_WAIT",
156610492SMargot.Miller@Sun.COM 		"pm_state_change_t" },
156710492SMargot.Miller@Sun.COM 	{ (uint_t)PM_REPARSE_PM_PROPS,		"PM_REPARSE_PM_PROPS",
156810492SMargot.Miller@Sun.COM 		"pm_req_t" },
156910492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SET_DEVICE_THRESHOLD,	"PM_SET_DEVICE_THRESHOLD",
157010492SMargot.Miller@Sun.COM 		"pm_req_t" },
157110492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_STATS,			"PM_GET_STATS",
157210492SMargot.Miller@Sun.COM 		"pm_req_t" },
157310492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_DEVICE_THRESHOLD,	"PM_GET_DEVICE_THRESHOLD",
157410492SMargot.Miller@Sun.COM 		"pm_req_t" },
157510492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_POWER_NAME,		"PM_GET_POWER_NAME",
157610492SMargot.Miller@Sun.COM 		"pm_req_t" },
157710492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_POWER_LEVELS,		"PM_GET_POWER_LEVELS",
157810492SMargot.Miller@Sun.COM 		"pm_req_t" },
157910492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_NUM_COMPONENTS,	"PM_GET_NUM_COMPONENTS",
158010492SMargot.Miller@Sun.COM 		"pm_req_t" },
158110492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_COMPONENT_NAME,	"PM_GET_COMPONENT_NAME",
158210492SMargot.Miller@Sun.COM 		"pm_req_t" },
158310492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_NUM_POWER_LEVELS,	"PM_GET_NUM_POWER_LEVELS",
158410492SMargot.Miller@Sun.COM 		"pm_req_t" },
158510492SMargot.Miller@Sun.COM 	{ (uint_t)PM_DIRECT_PM,			"PM_DIRECT_PM",
158610492SMargot.Miller@Sun.COM 		"pm_req_t" },
158710492SMargot.Miller@Sun.COM 	{ (uint_t)PM_RELEASE_DIRECT_PM,		"PM_RELEASE_DIRECT_PM",
158810492SMargot.Miller@Sun.COM 		"pm_req_t" },
158910492SMargot.Miller@Sun.COM 	{ (uint_t)PM_RESET_DEVICE_THRESHOLD,	"PM_RESET_DEVICE_THRESHOLD",
159010492SMargot.Miller@Sun.COM 		"pm_req_t" },
159110492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_DEVICE_TYPE,		"PM_GET_DEVICE_TYPE",
159210492SMargot.Miller@Sun.COM 		"pm_req_t" },
159310492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SET_COMPONENT_THRESHOLDS,	"PM_SET_COMPONENT_THRESHOLDS",
159410492SMargot.Miller@Sun.COM 		"pm_req_t" },
159510492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_COMPONENT_THRESHOLDS,	"PM_GET_COMPONENT_THRESHOLDS",
159610492SMargot.Miller@Sun.COM 		"pm_req_t" },
159710492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_DEVICE_THRESHOLD_BASIS,
159810492SMargot.Miller@Sun.COM 		"PM_GET_DEVICE_THRESHOLD_BASIS",	"pm_req_t" },
159910492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SET_CURRENT_POWER,		"PM_SET_CURRENT_POWER",
160010492SMargot.Miller@Sun.COM 		"pm_req_t" },
160110492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_CURRENT_POWER,		"PM_GET_CURRENT_POWER",
160210492SMargot.Miller@Sun.COM 		"pm_req_t" },
160310492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_FULL_POWER,		"PM_GET_FULL_POWER",
160410492SMargot.Miller@Sun.COM 		"pm_req_t" },
160510492SMargot.Miller@Sun.COM 	{ (uint_t)PM_ADD_DEPENDENT,		"PM_ADD_DEPENDENT",
160610492SMargot.Miller@Sun.COM 		"pm_req_t" },
160710492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_TIME_IDLE,		"PM_GET_TIME_IDLE",
160810492SMargot.Miller@Sun.COM 		"pm_req_t" },
160910492SMargot.Miller@Sun.COM 	{ (uint_t)PM_ADD_DEPENDENT_PROPERTY,	"PM_ADD_DEPENDENT_PROPERTY",
161010492SMargot.Miller@Sun.COM 		"pm_req_t" },
161110492SMargot.Miller@Sun.COM 	{ (uint_t)PM_GET_CMD_NAME,		"PM_GET_CMD_NAME",
161210492SMargot.Miller@Sun.COM 		"pm_req_t" },
161310492SMargot.Miller@Sun.COM 	{ (uint_t)PM_SEARCH_LIST,	"PM_SEARCH_LIST",
161410492SMargot.Miller@Sun.COM 		"pm_searchargs_t" },
161510492SMargot.Miller@Sun.COM #endif /* _SYSCALL */
161610492SMargot.Miller@Sun.COM 
16170Sstevel@tonic-gate 	{ (uint_t)0, NULL, NULL	}
16180Sstevel@tonic-gate };
16190Sstevel@tonic-gate 
16200Sstevel@tonic-gate void
ioctl_ioccom(char * buf,size_t size,uint_t code,int nbytes,int x,int y)16210Sstevel@tonic-gate ioctl_ioccom(char *buf, size_t size, uint_t code, int nbytes, int x, int y)
16220Sstevel@tonic-gate {
16230Sstevel@tonic-gate 	const char *inoutstr;
16240Sstevel@tonic-gate 
16250Sstevel@tonic-gate 	if (code & IOC_VOID)
16260Sstevel@tonic-gate 		inoutstr = "";
16270Sstevel@tonic-gate 	else if ((code & IOC_INOUT) == IOC_INOUT)
16280Sstevel@tonic-gate 		inoutstr = "WR";
16290Sstevel@tonic-gate 	else
16300Sstevel@tonic-gate 		inoutstr = code & IOC_IN ? "W" : "R";
16310Sstevel@tonic-gate 
16320Sstevel@tonic-gate 	if (isascii(x) && isprint(x))
16330Sstevel@tonic-gate 		(void) snprintf(buf, size, "_IO%sN('%c', %d, %d)", inoutstr,
16340Sstevel@tonic-gate 		    x, y, nbytes);
16350Sstevel@tonic-gate 	else
16360Sstevel@tonic-gate 		(void) snprintf(buf, size, "_IO%sN(0x%x, %d, %d)", inoutstr,
16370Sstevel@tonic-gate 		    x, y, nbytes);
16380Sstevel@tonic-gate }
16390Sstevel@tonic-gate 
16400Sstevel@tonic-gate 
16410Sstevel@tonic-gate const char *
ioctlname(private_t * pri,uint_t code)16420Sstevel@tonic-gate ioctlname(private_t *pri, uint_t code)
16430Sstevel@tonic-gate {
16440Sstevel@tonic-gate 	const struct ioc *ip;
16450Sstevel@tonic-gate 	const char *str = NULL;
16460Sstevel@tonic-gate 
16470Sstevel@tonic-gate 	for (ip = &ioc[0]; ip->name; ip++) {
16480Sstevel@tonic-gate 		if (code == ip->code) {
16490Sstevel@tonic-gate 			str = ip->name;
16500Sstevel@tonic-gate 			break;
16510Sstevel@tonic-gate 		}
16520Sstevel@tonic-gate 	}
16530Sstevel@tonic-gate 
16540Sstevel@tonic-gate 	/*
16550Sstevel@tonic-gate 	 * Developers hide ascii ioctl names in the ioctl subcode; for example
16560Sstevel@tonic-gate 	 * 0x445210 should be printed 'D'<<16|'R'<<8|10.  We allow for all
16570Sstevel@tonic-gate 	 * three high order bytes (called hi, mid and lo) to contain ascii
16580Sstevel@tonic-gate 	 * characters.
16590Sstevel@tonic-gate 	 */
16600Sstevel@tonic-gate 	if (str == NULL) {
16610Sstevel@tonic-gate 		int c_hi = code >> 24;
16620Sstevel@tonic-gate 		int c_mid = (code >> 16) & 0xff;
16630Sstevel@tonic-gate 		int c_mid_nm = (code >> 16);
16640Sstevel@tonic-gate 		int c_lo = (code >> 8) & 0xff;
16650Sstevel@tonic-gate 		int c_lo_nm = code >> 8;
16660Sstevel@tonic-gate 
16670Sstevel@tonic-gate 		if (isascii(c_lo) && isprint(c_lo) &&
16680Sstevel@tonic-gate 		    isascii(c_mid) && isprint(c_mid) &&
16690Sstevel@tonic-gate 		    isascii(c_hi) && isprint(c_hi))
16700Sstevel@tonic-gate 			(void) sprintf(pri->code_buf,
16710Sstevel@tonic-gate 			    "(('%c'<<24)|('%c'<<16)|('%c'<<8)|%d)",
16720Sstevel@tonic-gate 			    c_hi, c_mid, c_lo, code & 0xff);
16730Sstevel@tonic-gate 		else if (isascii(c_lo) && isprint(c_lo) &&
16740Sstevel@tonic-gate 		    isascii(c_mid_nm) && isprint(c_mid_nm))
16750Sstevel@tonic-gate 			(void) sprintf(pri->code_buf,
16760Sstevel@tonic-gate 			    "(('%c'<<16)|('%c'<<8)|%d)", c_mid, c_lo,
16770Sstevel@tonic-gate 			    code & 0xff);
16780Sstevel@tonic-gate 		else if (isascii(c_lo_nm) && isprint(c_lo_nm))
16790Sstevel@tonic-gate 			(void) sprintf(pri->code_buf, "(('%c'<<8)|%d)",
16803912Slling 			    c_lo_nm, code & 0xff);
16810Sstevel@tonic-gate 		else if (code & (IOC_VOID|IOC_INOUT))
16820Sstevel@tonic-gate 			ioctl_ioccom(pri->code_buf, sizeof (pri->code_buf),
16830Sstevel@tonic-gate 			    code, c_mid, c_lo, code & 0xff);
16840Sstevel@tonic-gate 		else
16850Sstevel@tonic-gate 			(void) sprintf(pri->code_buf, "0x%.4X", code);
16860Sstevel@tonic-gate 		str = (const char *)pri->code_buf;
16870Sstevel@tonic-gate 	}
16880Sstevel@tonic-gate 
16890Sstevel@tonic-gate 	return (str);
16900Sstevel@tonic-gate }
16910Sstevel@tonic-gate 
16920Sstevel@tonic-gate 
16930Sstevel@tonic-gate const char *
ioctldatastruct(uint_t code)16940Sstevel@tonic-gate ioctldatastruct(uint_t code)
16950Sstevel@tonic-gate {
16960Sstevel@tonic-gate 	const struct ioc *ip;
16970Sstevel@tonic-gate 	const char *str = NULL;
16980Sstevel@tonic-gate 
16990Sstevel@tonic-gate 	for (ip = &ioc[0]; ip->name != NULL; ip++) {
17000Sstevel@tonic-gate 		if (code == ip->code) {
17010Sstevel@tonic-gate 			str = ip->datastruct;
17020Sstevel@tonic-gate 			break;
17030Sstevel@tonic-gate 		}
17040Sstevel@tonic-gate 	}
17050Sstevel@tonic-gate 	return (str);
17060Sstevel@tonic-gate }
17070Sstevel@tonic-gate 
17080Sstevel@tonic-gate 
17090Sstevel@tonic-gate const char *
fcntlname(int code)17100Sstevel@tonic-gate fcntlname(int code)
17110Sstevel@tonic-gate {
17120Sstevel@tonic-gate 	const char *str = NULL;
17130Sstevel@tonic-gate 
17140Sstevel@tonic-gate 	if (code >= FCNTLMIN && code <= FCNTLMAX)
17150Sstevel@tonic-gate 		str = FCNTLname[code-FCNTLMIN];
17160Sstevel@tonic-gate 	return (str);
17170Sstevel@tonic-gate }
17180Sstevel@tonic-gate 
17190Sstevel@tonic-gate const char *
sfsname(int code)17200Sstevel@tonic-gate sfsname(int code)
17210Sstevel@tonic-gate {
17220Sstevel@tonic-gate 	const char *str = NULL;
17230Sstevel@tonic-gate 
17240Sstevel@tonic-gate 	if (code >= SYSFSMIN && code <= SYSFSMAX)
17250Sstevel@tonic-gate 		str = SYSFSname[code-SYSFSMIN];
17260Sstevel@tonic-gate 	return (str);
17270Sstevel@tonic-gate }
17280Sstevel@tonic-gate 
17290Sstevel@tonic-gate /* ARGSUSED */
17300Sstevel@tonic-gate const char *
si86name(int code)17310Sstevel@tonic-gate si86name(int code)
17320Sstevel@tonic-gate {
17330Sstevel@tonic-gate 	const char *str = NULL;
17340Sstevel@tonic-gate 
17350Sstevel@tonic-gate #if defined(__i386) || defined(__amd64)
17360Sstevel@tonic-gate 	switch (code) {
17370Sstevel@tonic-gate 	case SI86SWPI:		str = "SI86SWPI";	break;
17380Sstevel@tonic-gate 	case SI86SYM:		str = "SI86SYM";	break;
17390Sstevel@tonic-gate 	case SI86CONF:		str = "SI86CONF";	break;
17400Sstevel@tonic-gate 	case SI86BOOT:		str = "SI86BOOT";	break;
17410Sstevel@tonic-gate 	case SI86AUTO:		str = "SI86AUTO";	break;
17420Sstevel@tonic-gate 	case SI86EDT:		str = "SI86EDT";	break;
17430Sstevel@tonic-gate 	case SI86SWAP:		str = "SI86SWAP";	break;
17440Sstevel@tonic-gate 	case SI86FPHW:		str = "SI86FPHW";	break;
17450Sstevel@tonic-gate 	case SI86FPSTART:	str = "SI86FPSTART";	break;
17460Sstevel@tonic-gate 	case GRNON:		str = "GRNON";		break;
17470Sstevel@tonic-gate 	case GRNFLASH:		str = "GRNFLASH";	break;
17480Sstevel@tonic-gate 	case STIME:		str = "STIME";		break;
17490Sstevel@tonic-gate 	case SETNAME:		str = "SETNAME";	break;
17500Sstevel@tonic-gate 	case RNVR:		str = "RNVR";		break;
17510Sstevel@tonic-gate 	case WNVR:		str = "WNVR";		break;
17520Sstevel@tonic-gate 	case RTODC:		str = "RTODC";		break;
17530Sstevel@tonic-gate 	case CHKSER:		str = "CHKSER";		break;
17540Sstevel@tonic-gate 	case SI86NVPRT:		str = "SI86NVPRT";	break;
17550Sstevel@tonic-gate 	case SANUPD:		str = "SANUPD";		break;
17560Sstevel@tonic-gate 	case SI86KSTR:		str = "SI86KSTR";	break;
17570Sstevel@tonic-gate 	case SI86MEM:		str = "SI86MEM";	break;
17580Sstevel@tonic-gate 	case SI86TODEMON:	str = "SI86TODEMON";	break;
17590Sstevel@tonic-gate 	case SI86CCDEMON:	str = "SI86CCDEMON";	break;
17600Sstevel@tonic-gate 	case SI86CACHE:		str = "SI86CACHE";	break;
17610Sstevel@tonic-gate 	case SI86DELMEM:	str = "SI86DELMEM";	break;
17620Sstevel@tonic-gate 	case SI86ADDMEM:	str = "SI86ADDMEM";	break;
17630Sstevel@tonic-gate /* 71 through 74 reserved for VPIX */
17640Sstevel@tonic-gate 	case SI86V86: 		str = "SI86V86";	break;
17650Sstevel@tonic-gate 	case SI86SLTIME:	str = "SI86SLTIME";	break;
17660Sstevel@tonic-gate 	case SI86DSCR:		str = "SI86DSCR";	break;
17670Sstevel@tonic-gate 	case RDUBLK:		str = "RDUBLK";		break;
17680Sstevel@tonic-gate /* NFA entry point */
17690Sstevel@tonic-gate 	case SI86NFA:		str = "SI86NFA";	break;
17700Sstevel@tonic-gate 	case SI86VM86:		str = "SI86VM86";	break;
17710Sstevel@tonic-gate 	case SI86VMENABLE:	str = "SI86VMENABLE";	break;
17720Sstevel@tonic-gate 	case SI86LIMUSER:	str = "SI86LIMUSER";	break;
17730Sstevel@tonic-gate 	case SI86RDID: 		str = "SI86RDID";	break;
17740Sstevel@tonic-gate 	case SI86RDBOOT:	str = "SI86RDBOOT";	break;
17750Sstevel@tonic-gate /* Merged Product defines */
17760Sstevel@tonic-gate 	case SI86SHFIL:		str = "SI86SHFIL";	break;
17770Sstevel@tonic-gate 	case SI86PCHRGN:	str = "SI86PCHRGN";	break;
17780Sstevel@tonic-gate 	case SI86BADVISE:	str = "SI86BADVISE";	break;
17790Sstevel@tonic-gate 	case SI86SHRGN:		str = "SI86SHRGN";	break;
17800Sstevel@tonic-gate 	case SI86CHIDT:		str = "SI86CHIDT";	break;
17810Sstevel@tonic-gate 	case SI86EMULRDA: 	str = "SI86EMULRDA";	break;
17828646Sdp@eng.sun.com /* RTC commands */
17838646Sdp@eng.sun.com 	case WTODC:		str = "WTODC";		break;
17848646Sdp@eng.sun.com 	case SGMTL:		str = "SGMTL";		break;
17858646Sdp@eng.sun.com 	case GGMTL:		str = "GGMTL";		break;
17868646Sdp@eng.sun.com 	case RTCSYNC:		str = "RTCSYNC";	break;
17870Sstevel@tonic-gate 	}
17880Sstevel@tonic-gate #endif /* __i386 */
17890Sstevel@tonic-gate 
17900Sstevel@tonic-gate 	return (str);
17910Sstevel@tonic-gate }
17920Sstevel@tonic-gate 
17930Sstevel@tonic-gate const char *
utscode(int code)17940Sstevel@tonic-gate utscode(int code)
17950Sstevel@tonic-gate {
17960Sstevel@tonic-gate 	const char *str = NULL;
17970Sstevel@tonic-gate 
17980Sstevel@tonic-gate 	switch (code) {
17990Sstevel@tonic-gate 	case UTS_UNAME:		str = "UNAME";	break;
18000Sstevel@tonic-gate 	case UTS_USTAT:		str = "USTAT";	break;
18010Sstevel@tonic-gate 	case UTS_FUSERS:	str = "FUSERS";	break;
18020Sstevel@tonic-gate 	}
18030Sstevel@tonic-gate 
18040Sstevel@tonic-gate 	return (str);
18050Sstevel@tonic-gate }
18060Sstevel@tonic-gate 
18070Sstevel@tonic-gate const char *
rctlsyscode(int code)18082447Snf202958 rctlsyscode(int code)
18092447Snf202958 {
18102447Snf202958 	const char *str = NULL;
18112447Snf202958 	switch (code) {
18122447Snf202958 	case 0:		str = "GETRCTL";	break;
18132447Snf202958 	case 1:		str = "SETRCTL";	break;
18142447Snf202958 	case 2:		str = "RCTLSYS_LST";	break;
18152447Snf202958 	case 3:		str = "RCTLSYS_CTL";	break;
18163684Srd117015 	case 4:		str = "RCTLSYS_SETPROJ";	break;
18172447Snf202958 	default:	str = "UNKNOWN";	break;
18182447Snf202958 	}
18192447Snf202958 	return (str);
18202447Snf202958 }
18212447Snf202958 
18222447Snf202958 const char *
rctl_local_action(private_t * pri,uint_t val)18232447Snf202958 rctl_local_action(private_t *pri, uint_t val)
18242447Snf202958 {
18252447Snf202958 	uint_t action = val & (~RCTL_LOCAL_ACTION_MASK);
18262447Snf202958 
18272447Snf202958 	char *s = pri->code_buf;
18282447Snf202958 
18292447Snf202958 	*s = '\0';
18302447Snf202958 
18312447Snf202958 	if (action & RCTL_LOCAL_NOACTION) {
18322447Snf202958 		action ^= RCTL_LOCAL_NOACTION;
18332447Snf202958 		(void) strlcat(s, "|RCTL_LOCAL_NOACTION",
18342447Snf202958 		    sizeof (pri->code_buf));
18352447Snf202958 	}
18362447Snf202958 	if (action & RCTL_LOCAL_SIGNAL) {
18372447Snf202958 		action ^= RCTL_LOCAL_SIGNAL;
18382447Snf202958 		(void) strlcat(s, "|RCTL_LOCAL_SIGNAL",
18392447Snf202958 		    sizeof (pri->code_buf));
18402447Snf202958 	}
18412447Snf202958 	if (action & RCTL_LOCAL_DENY) {
18422447Snf202958 		action ^= RCTL_LOCAL_DENY;
18432447Snf202958 		(void) strlcat(s, "|RCTL_LOCAL_DENY",
18442447Snf202958 		    sizeof (pri->code_buf));
18452447Snf202958 	}
18462447Snf202958 
18472447Snf202958 	if ((action & (~RCTL_LOCAL_ACTION_MASK)) != 0)
18482447Snf202958 		return (NULL);
18492447Snf202958 	else if (*s != '\0')
18502447Snf202958 		return (s+1);
18512447Snf202958 	else
18522447Snf202958 		return (NULL);
18532447Snf202958 }
18542447Snf202958 
18552447Snf202958 
18562447Snf202958 const char *
rctl_local_flags(private_t * pri,uint_t val)18572447Snf202958 rctl_local_flags(private_t *pri, uint_t val)
18582447Snf202958 {
18592447Snf202958 	uint_t pval = val & RCTL_LOCAL_ACTION_MASK;
18602447Snf202958 	char *s = pri->code_buf;
18612447Snf202958 
18622447Snf202958 	*s = '\0';
18632447Snf202958 
18642447Snf202958 	if (pval & RCTL_LOCAL_MAXIMAL) {
18652447Snf202958 		pval ^= RCTL_LOCAL_MAXIMAL;
18662447Snf202958 		(void) strlcat(s, "|RCTL_LOCAL_MAXIMAL",
18672447Snf202958 		    sizeof (pri->code_buf));
18682447Snf202958 	}
18692447Snf202958 
18702447Snf202958 	if ((pval & RCTL_LOCAL_ACTION_MASK) != 0)
18712447Snf202958 		return (NULL);
18722447Snf202958 	else if (*s != '\0')
18732447Snf202958 		return (s+1);
18742447Snf202958 	else
18752447Snf202958 		return (NULL);
18762447Snf202958 }
18772447Snf202958 
18782447Snf202958 
18792447Snf202958 const char *
sconfname(int code)18800Sstevel@tonic-gate sconfname(int code)
18810Sstevel@tonic-gate {
18820Sstevel@tonic-gate 	const char *str = NULL;
18830Sstevel@tonic-gate 
18840Sstevel@tonic-gate 	if (code >= SCONFMIN && code <= SCONFMAX)
18850Sstevel@tonic-gate 		str = SCONFname[code-SCONFMIN];
18860Sstevel@tonic-gate 	return (str);
18870Sstevel@tonic-gate }
18880Sstevel@tonic-gate 
18890Sstevel@tonic-gate const char *
pathconfname(int code)18900Sstevel@tonic-gate pathconfname(int code)
18910Sstevel@tonic-gate {
18920Sstevel@tonic-gate 	const char *str = NULL;
18930Sstevel@tonic-gate 
18940Sstevel@tonic-gate 	if (code >= PATHCONFMIN && code <= PATHCONFMAX)
18950Sstevel@tonic-gate 		str = PATHCONFname[code-PATHCONFMIN];
18960Sstevel@tonic-gate 	return (str);
18970Sstevel@tonic-gate }
18980Sstevel@tonic-gate 
18990Sstevel@tonic-gate #define	ALL_O_FLAGS \
19000Sstevel@tonic-gate 	(O_NDELAY|O_APPEND|O_SYNC|O_DSYNC|O_NONBLOCK|O_CREAT|O_TRUNC\
190111798SRoger.Faulkner@Sun.COM 	|O_EXCL|O_NOCTTY|O_LARGEFILE|O_RSYNC|O_XATTR|O_NOFOLLOW|O_NOLINKS\
190211798SRoger.Faulkner@Sun.COM 	|FXATTRDIROPEN)
19030Sstevel@tonic-gate 
19040Sstevel@tonic-gate const char *
openarg(private_t * pri,int arg)19050Sstevel@tonic-gate openarg(private_t *pri, int arg)
19060Sstevel@tonic-gate {
19070Sstevel@tonic-gate 	char *str = pri->code_buf;
19080Sstevel@tonic-gate 
190912789SRoger.Faulkner@Oracle.COM 	if ((arg & ~(O_ACCMODE | ALL_O_FLAGS)) != 0)
191012789SRoger.Faulkner@Oracle.COM 		return (NULL);
191112789SRoger.Faulkner@Oracle.COM 
191212789SRoger.Faulkner@Oracle.COM 	switch (arg & O_ACCMODE) {
19130Sstevel@tonic-gate 	default:
191412789SRoger.Faulkner@Oracle.COM 		return (NULL);
19150Sstevel@tonic-gate 	case O_RDONLY:
19160Sstevel@tonic-gate 		(void) strcpy(str, "O_RDONLY");
19170Sstevel@tonic-gate 		break;
19180Sstevel@tonic-gate 	case O_WRONLY:
19190Sstevel@tonic-gate 		(void) strcpy(str, "O_WRONLY");
19200Sstevel@tonic-gate 		break;
19210Sstevel@tonic-gate 	case O_RDWR:
19220Sstevel@tonic-gate 		(void) strcpy(str, "O_RDWR");
19230Sstevel@tonic-gate 		break;
192412789SRoger.Faulkner@Oracle.COM 	case O_SEARCH:
192512789SRoger.Faulkner@Oracle.COM 		(void) strcpy(str, "O_SEARCH");
192612789SRoger.Faulkner@Oracle.COM 		break;
192712789SRoger.Faulkner@Oracle.COM 	case O_EXEC:
192812789SRoger.Faulkner@Oracle.COM 		(void) strcpy(str, "O_EXEC");
192912789SRoger.Faulkner@Oracle.COM 		break;
19300Sstevel@tonic-gate 	}
19310Sstevel@tonic-gate 
19320Sstevel@tonic-gate 	if (arg & O_NDELAY)
19330Sstevel@tonic-gate 		(void) strlcat(str, "|O_NDELAY", sizeof (pri->code_buf));
19340Sstevel@tonic-gate 	if (arg & O_APPEND)
19350Sstevel@tonic-gate 		(void) strlcat(str, "|O_APPEND", sizeof (pri->code_buf));
19360Sstevel@tonic-gate 	if (arg & O_SYNC)
19370Sstevel@tonic-gate 		(void) strlcat(str, "|O_SYNC", sizeof (pri->code_buf));
19380Sstevel@tonic-gate 	if (arg & O_DSYNC)
19390Sstevel@tonic-gate 		(void) strlcat(str, "|O_DSYNC", sizeof (pri->code_buf));
19400Sstevel@tonic-gate 	if (arg & O_NONBLOCK)
19410Sstevel@tonic-gate 		(void) strlcat(str, "|O_NONBLOCK", sizeof (pri->code_buf));
19420Sstevel@tonic-gate 	if (arg & O_CREAT)
19430Sstevel@tonic-gate 		(void) strlcat(str, "|O_CREAT", sizeof (pri->code_buf));
19440Sstevel@tonic-gate 	if (arg & O_TRUNC)
19450Sstevel@tonic-gate 		(void) strlcat(str, "|O_TRUNC", sizeof (pri->code_buf));
19460Sstevel@tonic-gate 	if (arg & O_EXCL)
19470Sstevel@tonic-gate 		(void) strlcat(str, "|O_EXCL", sizeof (pri->code_buf));
19480Sstevel@tonic-gate 	if (arg & O_NOCTTY)
19490Sstevel@tonic-gate 		(void) strlcat(str, "|O_NOCTTY", sizeof (pri->code_buf));
19500Sstevel@tonic-gate 	if (arg & O_LARGEFILE)
19510Sstevel@tonic-gate 		(void) strlcat(str, "|O_LARGEFILE", sizeof (pri->code_buf));
19520Sstevel@tonic-gate 	if (arg & O_RSYNC)
19530Sstevel@tonic-gate 		(void) strlcat(str, "|O_RSYNC", sizeof (pri->code_buf));
19540Sstevel@tonic-gate 	if (arg & O_XATTR)
19550Sstevel@tonic-gate 		(void) strlcat(str, "|O_XATTR", sizeof (pri->code_buf));
19560Sstevel@tonic-gate 	if (arg & O_NOFOLLOW)
19570Sstevel@tonic-gate 		(void) strlcat(str, "|O_NOFOLLOW", sizeof (pri->code_buf));
19580Sstevel@tonic-gate 	if (arg & O_NOLINKS)
19590Sstevel@tonic-gate 		(void) strlcat(str, "|O_NOLINKS", sizeof (pri->code_buf));
196011798SRoger.Faulkner@Sun.COM 	if (arg & FXATTRDIROPEN)
196111798SRoger.Faulkner@Sun.COM 		(void) strlcat(str, "|FXATTRDIROPEN", sizeof (pri->code_buf));
19620Sstevel@tonic-gate 
19630Sstevel@tonic-gate 	return ((const char *)str);
19640Sstevel@tonic-gate }
19650Sstevel@tonic-gate 
19660Sstevel@tonic-gate const char *
whencearg(int arg)19670Sstevel@tonic-gate whencearg(int arg)
19680Sstevel@tonic-gate {
19690Sstevel@tonic-gate 	const char *str = NULL;
19700Sstevel@tonic-gate 
19710Sstevel@tonic-gate 	switch (arg) {
19720Sstevel@tonic-gate 	case SEEK_SET:	str = "SEEK_SET";	break;
19730Sstevel@tonic-gate 	case SEEK_CUR:	str = "SEEK_CUR";	break;
19740Sstevel@tonic-gate 	case SEEK_END:	str = "SEEK_END";	break;
19750Sstevel@tonic-gate 	case SEEK_DATA:	str = "SEEK_DATA";	break;
19760Sstevel@tonic-gate 	case SEEK_HOLE:	str = "SEEK_HOLE";	break;
19770Sstevel@tonic-gate 	}
19780Sstevel@tonic-gate 
19790Sstevel@tonic-gate 	return (str);
19800Sstevel@tonic-gate }
19810Sstevel@tonic-gate 
19820Sstevel@tonic-gate #define	IPC_FLAGS	(IPC_ALLOC|IPC_CREAT|IPC_EXCL|IPC_NOWAIT)
19830Sstevel@tonic-gate 
19840Sstevel@tonic-gate char *
ipcflags(private_t * pri,int arg)19850Sstevel@tonic-gate ipcflags(private_t *pri, int arg)
19860Sstevel@tonic-gate {
19870Sstevel@tonic-gate 	char *str = pri->code_buf;
19880Sstevel@tonic-gate 
19890Sstevel@tonic-gate 	if (arg & 0777)
19900Sstevel@tonic-gate 		(void) sprintf(str, "0%.3o", arg&0777);
19910Sstevel@tonic-gate 	else
19920Sstevel@tonic-gate 		*str = '\0';
19930Sstevel@tonic-gate 
19940Sstevel@tonic-gate 	if (arg & IPC_ALLOC)
19950Sstevel@tonic-gate 		(void) strcat(str, "|IPC_ALLOC");
19960Sstevel@tonic-gate 	if (arg & IPC_CREAT)
19970Sstevel@tonic-gate 		(void) strcat(str, "|IPC_CREAT");
19980Sstevel@tonic-gate 	if (arg & IPC_EXCL)
19990Sstevel@tonic-gate 		(void) strcat(str, "|IPC_EXCL");
20000Sstevel@tonic-gate 	if (arg & IPC_NOWAIT)
20010Sstevel@tonic-gate 		(void) strcat(str, "|IPC_NOWAIT");
20020Sstevel@tonic-gate 
20030Sstevel@tonic-gate 	return (str);
20040Sstevel@tonic-gate }
20050Sstevel@tonic-gate 
20060Sstevel@tonic-gate const char *
msgflags(private_t * pri,int arg)20070Sstevel@tonic-gate msgflags(private_t *pri, int arg)
20080Sstevel@tonic-gate {
20090Sstevel@tonic-gate 	char *str;
20100Sstevel@tonic-gate 
20110Sstevel@tonic-gate 	if (arg == 0 || (arg & ~(IPC_FLAGS|MSG_NOERROR|0777)) != 0)
20120Sstevel@tonic-gate 		return ((char *)NULL);
20130Sstevel@tonic-gate 
20140Sstevel@tonic-gate 	str = ipcflags(pri, arg);
20150Sstevel@tonic-gate 
20160Sstevel@tonic-gate 	if (arg & MSG_NOERROR)
20170Sstevel@tonic-gate 		(void) strcat(str, "|MSG_NOERROR");
20180Sstevel@tonic-gate 
20190Sstevel@tonic-gate 	if (*str == '|')
20200Sstevel@tonic-gate 		str++;
20210Sstevel@tonic-gate 	return ((const char *)str);
20220Sstevel@tonic-gate }
20230Sstevel@tonic-gate 
20240Sstevel@tonic-gate const char *
semflags(private_t * pri,int arg)20250Sstevel@tonic-gate semflags(private_t *pri, int arg)
20260Sstevel@tonic-gate {
20270Sstevel@tonic-gate 	char *str;
20280Sstevel@tonic-gate 
20290Sstevel@tonic-gate 	if (arg == 0 || (arg & ~(IPC_FLAGS|SEM_UNDO|0777)) != 0)
20300Sstevel@tonic-gate 		return ((char *)NULL);
20310Sstevel@tonic-gate 
20320Sstevel@tonic-gate 	str = ipcflags(pri, arg);
20330Sstevel@tonic-gate 
20340Sstevel@tonic-gate 	if (arg & SEM_UNDO)
20350Sstevel@tonic-gate 		(void) strcat(str, "|SEM_UNDO");
20360Sstevel@tonic-gate 
20370Sstevel@tonic-gate 	if (*str == '|')
20380Sstevel@tonic-gate 		str++;
20390Sstevel@tonic-gate 	return ((const char *)str);
20400Sstevel@tonic-gate }
20410Sstevel@tonic-gate 
20420Sstevel@tonic-gate const char *
shmflags(private_t * pri,int arg)20430Sstevel@tonic-gate shmflags(private_t *pri, int arg)
20440Sstevel@tonic-gate {
20450Sstevel@tonic-gate 	char *str;
20460Sstevel@tonic-gate 
20470Sstevel@tonic-gate 	if (arg == 0 || (arg & ~(IPC_FLAGS|SHM_RDONLY|SHM_RND|0777)) != 0)
20480Sstevel@tonic-gate 		return ((char *)NULL);
20490Sstevel@tonic-gate 
20500Sstevel@tonic-gate 	str = ipcflags(pri, arg);
20510Sstevel@tonic-gate 
20520Sstevel@tonic-gate 	if (arg & SHM_RDONLY)
20530Sstevel@tonic-gate 		(void) strcat(str, "|SHM_RDONLY");
20540Sstevel@tonic-gate 	if (arg & SHM_RND)
20550Sstevel@tonic-gate 		(void) strcat(str, "|SHM_RND");
20560Sstevel@tonic-gate 
20570Sstevel@tonic-gate 	if (*str == '|')
20580Sstevel@tonic-gate 		str++;
20590Sstevel@tonic-gate 	return ((const char *)str);
20600Sstevel@tonic-gate }
20610Sstevel@tonic-gate 
20620Sstevel@tonic-gate #define	MSGCMDMIN	0
20630Sstevel@tonic-gate #define	MSGCMDMAX	IPC_STAT64
20640Sstevel@tonic-gate const char *const MSGCMDname[MSGCMDMAX+1] = {
20650Sstevel@tonic-gate 	NULL, NULL, NULL, NULL, NULL,
20660Sstevel@tonic-gate 	NULL, NULL, NULL, NULL, NULL,
20670Sstevel@tonic-gate 	"IPC_RMID",	/* 10 */
20680Sstevel@tonic-gate 	"IPC_SET",	/* 11 */
20690Sstevel@tonic-gate 	"IPC_STAT",	/* 12 */
20700Sstevel@tonic-gate 	"IPC_SET64",	/* 13 */
20710Sstevel@tonic-gate 	"IPC_STAT64",	/* 14 */
20720Sstevel@tonic-gate };
20730Sstevel@tonic-gate 
20740Sstevel@tonic-gate #define	SEMCMDMIN	0
20750Sstevel@tonic-gate #define	SEMCMDMAX	IPC_STAT64
20760Sstevel@tonic-gate const char *const SEMCMDname[SEMCMDMAX+1] = {
20770Sstevel@tonic-gate 	NULL,		/* 0 */
20780Sstevel@tonic-gate 	NULL,		/* 1 */
20790Sstevel@tonic-gate 	NULL,		/* 2 */
20800Sstevel@tonic-gate 	"GETNCNT",	/* 3 */
20810Sstevel@tonic-gate 	"GETPID",	/* 4 */
20820Sstevel@tonic-gate 	"GETVAL",	/* 5 */
20830Sstevel@tonic-gate 	"GETALL",	/* 6 */
20840Sstevel@tonic-gate 	"GETZCNT",	/* 7 */
20850Sstevel@tonic-gate 	"SETVAL",	/* 8 */
20860Sstevel@tonic-gate 	"SETALL",	/* 9 */
20870Sstevel@tonic-gate 	"IPC_RMID",	/* 10 */
20880Sstevel@tonic-gate 	"IPC_SET",	/* 11 */
20890Sstevel@tonic-gate 	"IPC_STAT",	/* 12 */
20900Sstevel@tonic-gate 	"IPC_SET64",	/* 13 */
20910Sstevel@tonic-gate 	"IPC_STAT64",	/* 14 */
20920Sstevel@tonic-gate };
20930Sstevel@tonic-gate 
20940Sstevel@tonic-gate #define	SHMCMDMIN	0
20950Sstevel@tonic-gate #define	SHMCMDMAX	IPC_STAT64
20960Sstevel@tonic-gate const char *const SHMCMDname[SHMCMDMAX+1] = {
20970Sstevel@tonic-gate 	NULL,		/* 0 */
20980Sstevel@tonic-gate 	NULL,		/* 1 */
20990Sstevel@tonic-gate 	NULL,		/* 2 */
21000Sstevel@tonic-gate 	"SHM_LOCK",	/* 3 */
21010Sstevel@tonic-gate 	"SHM_UNLOCK",	/* 4 */
21020Sstevel@tonic-gate 	NULL, NULL, NULL, NULL, NULL,			/* 5 NULLs */
21030Sstevel@tonic-gate 	"IPC_RMID",	/* 10 */
21040Sstevel@tonic-gate 	"IPC_SET",	/* 11 */
21050Sstevel@tonic-gate 	"IPC_STAT",	/* 12 */
21060Sstevel@tonic-gate 	"IPC_SET64",	/* 13 */
21070Sstevel@tonic-gate 	"IPC_STAT64",	/* 14 */
21080Sstevel@tonic-gate };
21090Sstevel@tonic-gate 
21100Sstevel@tonic-gate const char *
msgcmd(int arg)21110Sstevel@tonic-gate msgcmd(int arg)
21120Sstevel@tonic-gate {
21130Sstevel@tonic-gate 	const char *str = NULL;
21140Sstevel@tonic-gate 
21150Sstevel@tonic-gate 	if (arg >= MSGCMDMIN && arg <= MSGCMDMAX)
21160Sstevel@tonic-gate 		str = MSGCMDname[arg-MSGCMDMIN];
21170Sstevel@tonic-gate 	return (str);
21180Sstevel@tonic-gate }
21190Sstevel@tonic-gate 
21200Sstevel@tonic-gate const char *
semcmd(int arg)21210Sstevel@tonic-gate semcmd(int arg)
21220Sstevel@tonic-gate {
21230Sstevel@tonic-gate 	const char *str = NULL;
21240Sstevel@tonic-gate 
21250Sstevel@tonic-gate 	if (arg >= SEMCMDMIN && arg <= SEMCMDMAX)
21260Sstevel@tonic-gate 		str = SEMCMDname[arg-SEMCMDMIN];
21270Sstevel@tonic-gate 	return (str);
21280Sstevel@tonic-gate }
21290Sstevel@tonic-gate 
21300Sstevel@tonic-gate const char *
shmcmd(int arg)21310Sstevel@tonic-gate shmcmd(int arg)
21320Sstevel@tonic-gate {
21330Sstevel@tonic-gate 	const char *str = NULL;
21340Sstevel@tonic-gate 
21350Sstevel@tonic-gate 	if (arg >= SHMCMDMIN && arg <= SHMCMDMAX)
21360Sstevel@tonic-gate 		str = SHMCMDname[arg-SHMCMDMIN];
21370Sstevel@tonic-gate 	return (str);
21380Sstevel@tonic-gate }
21390Sstevel@tonic-gate 
21400Sstevel@tonic-gate const char *
strrdopt(int arg)21410Sstevel@tonic-gate strrdopt(int arg)	/* streams read option (I_SRDOPT I_GRDOPT) */
21420Sstevel@tonic-gate {
21430Sstevel@tonic-gate 	const char *str = NULL;
21440Sstevel@tonic-gate 
21450Sstevel@tonic-gate 	switch (arg) {
21460Sstevel@tonic-gate 	case RNORM:	str = "RNORM";		break;
21470Sstevel@tonic-gate 	case RMSGD:	str = "RMSGD";		break;
21480Sstevel@tonic-gate 	case RMSGN:	str = "RMSGN";		break;
21490Sstevel@tonic-gate 	}
21500Sstevel@tonic-gate 
21510Sstevel@tonic-gate 	return (str);
21520Sstevel@tonic-gate }
21530Sstevel@tonic-gate 
21540Sstevel@tonic-gate /* bit map of streams events (I_SETSIG & I_GETSIG) */
21550Sstevel@tonic-gate const char *
strevents(private_t * pri,int arg)21560Sstevel@tonic-gate strevents(private_t *pri, int arg)
21570Sstevel@tonic-gate {
21580Sstevel@tonic-gate 	char *str = pri->code_buf;
21590Sstevel@tonic-gate 
21600Sstevel@tonic-gate 	if (arg & ~(S_INPUT|S_HIPRI|S_OUTPUT|S_MSG|S_ERROR|S_HANGUP))
21610Sstevel@tonic-gate 		return ((char *)NULL);
21620Sstevel@tonic-gate 
21630Sstevel@tonic-gate 	*str = '\0';
21640Sstevel@tonic-gate 	if (arg & S_INPUT)
21650Sstevel@tonic-gate 		(void) strcat(str, "|S_INPUT");
21660Sstevel@tonic-gate 	if (arg & S_HIPRI)
21670Sstevel@tonic-gate 		(void) strcat(str, "|S_HIPRI");
21680Sstevel@tonic-gate 	if (arg & S_OUTPUT)
21690Sstevel@tonic-gate 		(void) strcat(str, "|S_OUTPUT");
21700Sstevel@tonic-gate 	if (arg & S_MSG)
21710Sstevel@tonic-gate 		(void) strcat(str, "|S_MSG");
21720Sstevel@tonic-gate 	if (arg & S_ERROR)
21730Sstevel@tonic-gate 		(void) strcat(str, "|S_ERROR");
21740Sstevel@tonic-gate 	if (arg & S_HANGUP)
21750Sstevel@tonic-gate 		(void) strcat(str, "|S_HANGUP");
21760Sstevel@tonic-gate 
21770Sstevel@tonic-gate 	return ((const char *)(str+1));
21780Sstevel@tonic-gate }
21790Sstevel@tonic-gate 
21800Sstevel@tonic-gate const char *
tiocflush(private_t * pri,int arg)21810Sstevel@tonic-gate tiocflush(private_t *pri, int arg)	/* bit map passsed by TIOCFLUSH */
21820Sstevel@tonic-gate {
21830Sstevel@tonic-gate 	char *str = pri->code_buf;
21840Sstevel@tonic-gate 
21850Sstevel@tonic-gate 	if (arg & ~(FREAD|FWRITE))
21860Sstevel@tonic-gate 		return ((char *)NULL);
21870Sstevel@tonic-gate 
21880Sstevel@tonic-gate 	*str = '\0';
21890Sstevel@tonic-gate 	if (arg & FREAD)
21900Sstevel@tonic-gate 		(void) strcat(str, "|FREAD");
21910Sstevel@tonic-gate 	if (arg & FWRITE)
21920Sstevel@tonic-gate 		(void) strcat(str, "|FWRITE");
21930Sstevel@tonic-gate 
21940Sstevel@tonic-gate 	return ((const char *)(str+1));
21950Sstevel@tonic-gate }
21960Sstevel@tonic-gate 
21970Sstevel@tonic-gate const char *
strflush(int arg)21980Sstevel@tonic-gate strflush(int arg)	/* streams flush option (I_FLUSH) */
21990Sstevel@tonic-gate {
22000Sstevel@tonic-gate 	const char *str = NULL;
22010Sstevel@tonic-gate 
22020Sstevel@tonic-gate 	switch (arg) {
22030Sstevel@tonic-gate 	case FLUSHR:	str = "FLUSHR";		break;
22040Sstevel@tonic-gate 	case FLUSHW:	str = "FLUSHW";		break;
22050Sstevel@tonic-gate 	case FLUSHRW:	str = "FLUSHRW";	break;
22060Sstevel@tonic-gate 	}
22070Sstevel@tonic-gate 
22080Sstevel@tonic-gate 	return (str);
22090Sstevel@tonic-gate }
22100Sstevel@tonic-gate 
22110Sstevel@tonic-gate #define	ALL_MOUNT_FLAGS	(MS_RDONLY|MS_FSS|MS_DATA|MS_NOSUID|MS_REMOUNT| \
22120Sstevel@tonic-gate 	MS_NOTRUNC|MS_OVERLAY|MS_OPTIONSTR|MS_GLOBAL|MS_FORCE|MS_NOMNTTAB)
22130Sstevel@tonic-gate 
22140Sstevel@tonic-gate const char *
mountflags(private_t * pri,int arg)22150Sstevel@tonic-gate mountflags(private_t *pri, int arg)	/* bit map of mount syscall flags */
22160Sstevel@tonic-gate {
22170Sstevel@tonic-gate 	char *str = pri->code_buf;
22180Sstevel@tonic-gate 	size_t used = 0;
22190Sstevel@tonic-gate 
22200Sstevel@tonic-gate 	if (arg & ~ALL_MOUNT_FLAGS)
22210Sstevel@tonic-gate 		return ((char *)NULL);
22220Sstevel@tonic-gate 
22230Sstevel@tonic-gate 	*str = '\0';
22240Sstevel@tonic-gate 	if (arg & MS_RDONLY)
22250Sstevel@tonic-gate 		used = strlcat(str, "|MS_RDONLY", sizeof (pri->code_buf));
22260Sstevel@tonic-gate 	if (arg & MS_FSS)
22270Sstevel@tonic-gate 		used = strlcat(str, "|MS_FSS", sizeof (pri->code_buf));
22280Sstevel@tonic-gate 	if (arg & MS_DATA)
22290Sstevel@tonic-gate 		used = strlcat(str, "|MS_DATA", sizeof (pri->code_buf));
22300Sstevel@tonic-gate 	if (arg & MS_NOSUID)
22310Sstevel@tonic-gate 		used = strlcat(str, "|MS_NOSUID", sizeof (pri->code_buf));
22320Sstevel@tonic-gate 	if (arg & MS_REMOUNT)
22330Sstevel@tonic-gate 		used = strlcat(str, "|MS_REMOUNT", sizeof (pri->code_buf));
22340Sstevel@tonic-gate 	if (arg & MS_NOTRUNC)
22350Sstevel@tonic-gate 		used = strlcat(str, "|MS_NOTRUNC", sizeof (pri->code_buf));
22360Sstevel@tonic-gate 	if (arg & MS_OVERLAY)
22370Sstevel@tonic-gate 		used = strlcat(str, "|MS_OVERLAY", sizeof (pri->code_buf));
22380Sstevel@tonic-gate 	if (arg & MS_OPTIONSTR)
22390Sstevel@tonic-gate 		used = strlcat(str, "|MS_OPTIONSTR", sizeof (pri->code_buf));
22400Sstevel@tonic-gate 	if (arg & MS_GLOBAL)
22410Sstevel@tonic-gate 		used = strlcat(str, "|MS_GLOBAL", sizeof (pri->code_buf));
22420Sstevel@tonic-gate 	if (arg & MS_FORCE)
22430Sstevel@tonic-gate 		used = strlcat(str, "|MS_FORCE", sizeof (pri->code_buf));
22440Sstevel@tonic-gate 	if (arg & MS_NOMNTTAB)
22450Sstevel@tonic-gate 		used = strlcat(str, "|MS_NOMNTTAB", sizeof (pri->code_buf));
22460Sstevel@tonic-gate 
22470Sstevel@tonic-gate 	if (used == 0 || used >= sizeof (pri->code_buf))
22480Sstevel@tonic-gate 		return ((char *)NULL);			/* use prt_hex() */
22490Sstevel@tonic-gate 
22500Sstevel@tonic-gate 	return ((const char *)(str+1));
22510Sstevel@tonic-gate }
22520Sstevel@tonic-gate 
22530Sstevel@tonic-gate const char *
svfsflags(private_t * pri,ulong_t arg)22540Sstevel@tonic-gate svfsflags(private_t *pri, ulong_t arg)	/* bit map of statvfs syscall flags */
22550Sstevel@tonic-gate {
22560Sstevel@tonic-gate 	char *str = pri->code_buf;
22570Sstevel@tonic-gate 
22580Sstevel@tonic-gate 	if (arg & ~(ST_RDONLY|ST_NOSUID|ST_NOTRUNC)) {
22590Sstevel@tonic-gate 		(void) sprintf(str, "0x%lx", arg);
22600Sstevel@tonic-gate 		return (str);
22610Sstevel@tonic-gate 	}
22620Sstevel@tonic-gate 	*str = '\0';
22630Sstevel@tonic-gate 	if (arg & ST_RDONLY)
22640Sstevel@tonic-gate 		(void) strcat(str, "|ST_RDONLY");
22650Sstevel@tonic-gate 	if (arg & ST_NOSUID)
22660Sstevel@tonic-gate 		(void) strcat(str, "|ST_NOSUID");
22670Sstevel@tonic-gate 	if (arg & ST_NOTRUNC)
22680Sstevel@tonic-gate 		(void) strcat(str, "|ST_NOTRUNC");
22690Sstevel@tonic-gate 	if (*str == '\0')
22700Sstevel@tonic-gate 		(void) strcat(str, "|0");
22710Sstevel@tonic-gate 	return ((const char *)(str+1));
22720Sstevel@tonic-gate }
22730Sstevel@tonic-gate 
22740Sstevel@tonic-gate const char *
fuiname(int arg)22750Sstevel@tonic-gate fuiname(int arg)	/* fusers() input argument */
22760Sstevel@tonic-gate {
22770Sstevel@tonic-gate 	const char *str = NULL;
22780Sstevel@tonic-gate 
22790Sstevel@tonic-gate 	switch (arg) {
22800Sstevel@tonic-gate 	case F_FILE_ONLY:	str = "F_FILE_ONLY";		break;
22810Sstevel@tonic-gate 	case F_CONTAINED:	str = "F_CONTAINED";		break;
22820Sstevel@tonic-gate 	}
22830Sstevel@tonic-gate 
22840Sstevel@tonic-gate 	return (str);
22850Sstevel@tonic-gate }
22860Sstevel@tonic-gate 
22870Sstevel@tonic-gate const char *
fuflags(private_t * pri,int arg)22880Sstevel@tonic-gate fuflags(private_t *pri, int arg)	/* fusers() output flags */
22890Sstevel@tonic-gate {
22900Sstevel@tonic-gate 	char *str = pri->code_buf;
22910Sstevel@tonic-gate 
22920Sstevel@tonic-gate 	if (arg & ~(F_CDIR|F_RDIR|F_TEXT|F_MAP|F_OPEN|F_TRACE|F_TTY)) {
22930Sstevel@tonic-gate 		(void) sprintf(str, "0x%x", arg);
22940Sstevel@tonic-gate 		return (str);
22950Sstevel@tonic-gate 	}
22960Sstevel@tonic-gate 	*str = '\0';
22970Sstevel@tonic-gate 	if (arg & F_CDIR)
22980Sstevel@tonic-gate 		(void) strcat(str, "|F_CDIR");
22990Sstevel@tonic-gate 	if (arg & F_RDIR)
23000Sstevel@tonic-gate 		(void) strcat(str, "|F_RDIR");
23010Sstevel@tonic-gate 	if (arg & F_TEXT)
23020Sstevel@tonic-gate 		(void) strcat(str, "|F_TEXT");
23030Sstevel@tonic-gate 	if (arg & F_MAP)
23040Sstevel@tonic-gate 		(void) strcat(str, "|F_MAP");
23050Sstevel@tonic-gate 	if (arg & F_OPEN)
23060Sstevel@tonic-gate 		(void) strcat(str, "|F_OPEN");
23070Sstevel@tonic-gate 	if (arg & F_TRACE)
23080Sstevel@tonic-gate 		(void) strcat(str, "|F_TRACE");
23090Sstevel@tonic-gate 	if (arg & F_TTY)
23100Sstevel@tonic-gate 		(void) strcat(str, "|F_TTY");
23110Sstevel@tonic-gate 	if (*str == '\0')
23120Sstevel@tonic-gate 		(void) strcat(str, "|0");
23130Sstevel@tonic-gate 	return ((const char *)(str+1));
23140Sstevel@tonic-gate }
23150Sstevel@tonic-gate 
23160Sstevel@tonic-gate 
23170Sstevel@tonic-gate const char *
ipprotos(int arg)23180Sstevel@tonic-gate ipprotos(int arg)	/* IP protocols cf. netinet/in.h */
23190Sstevel@tonic-gate {
23200Sstevel@tonic-gate 	switch (arg) {
23210Sstevel@tonic-gate 	case IPPROTO_IP:	return ("IPPROTO_IP");
23220Sstevel@tonic-gate 	case IPPROTO_ICMP:	return ("IPPROTO_ICMP");
23230Sstevel@tonic-gate 	case IPPROTO_IGMP:	return ("IPPROTO_IGMP");
23240Sstevel@tonic-gate 	case IPPROTO_GGP:	return ("IPPROTO_GGP");
23250Sstevel@tonic-gate 	case IPPROTO_ENCAP:	return ("IPPROTO_ENCAP");
23260Sstevel@tonic-gate 	case IPPROTO_TCP:	return ("IPPROTO_TCP");
23270Sstevel@tonic-gate 	case IPPROTO_EGP:	return ("IPPROTO_EGP");
23280Sstevel@tonic-gate 	case IPPROTO_PUP:	return ("IPPROTO_PUP");
23290Sstevel@tonic-gate 	case IPPROTO_UDP:	return ("IPPROTO_UDP");
23300Sstevel@tonic-gate 	case IPPROTO_IDP:	return ("IPPROTO_IDP");
23310Sstevel@tonic-gate 	case IPPROTO_IPV6:	return ("IPPROTO_IPV6");
23320Sstevel@tonic-gate 	case IPPROTO_ROUTING:	return ("IPPROTO_ROUTING");
23330Sstevel@tonic-gate 	case IPPROTO_FRAGMENT:	return ("IPPROTO_FRAGMENT");
23340Sstevel@tonic-gate 	case IPPROTO_RSVP:	return ("IPPROTO_RSVP");
23350Sstevel@tonic-gate 	case IPPROTO_ESP:	return ("IPPROTO_ESP");
23360Sstevel@tonic-gate 	case IPPROTO_AH:	return ("IPPROTO_AH");
23370Sstevel@tonic-gate 	case IPPROTO_ICMPV6:	return ("IPPROTO_ICMPV6");
23380Sstevel@tonic-gate 	case IPPROTO_NONE:	return ("IPPROTO_NONE");
23390Sstevel@tonic-gate 	case IPPROTO_DSTOPTS:	return ("IPPROTO_DSTOPTS");
23400Sstevel@tonic-gate 	case IPPROTO_HELLO:	return ("IPPROTO_HELLO");
23410Sstevel@tonic-gate 	case IPPROTO_ND:	return ("IPPROTO_ND");
23420Sstevel@tonic-gate 	case IPPROTO_EON:	return ("IPPROTO_EON");
23430Sstevel@tonic-gate 	case IPPROTO_PIM:	return ("IPPROTO_PIM");
23440Sstevel@tonic-gate 	case IPPROTO_SCTP:	return ("IPPROTO_SCTP");
23450Sstevel@tonic-gate 	case IPPROTO_RAW:	return ("IPPROTO_RAW");
23460Sstevel@tonic-gate 	default:		return (NULL);
23470Sstevel@tonic-gate 	}
23480Sstevel@tonic-gate }
2349