xref: /titanic_51/usr/src/cmd/truss/codes.c (revision 3f9d6ad73e45c6823b409f93b0c8d4f62861d2d5)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5ea8dc4b6Seschrock  * Common Development and Distribution License (the "License").
6ea8dc4b6Seschrock  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*3f9d6ad7SLin Ling  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
237c478bd9Sstevel@tonic-gate  */
247c478bd9Sstevel@tonic-gate 
257c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
267c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
277c478bd9Sstevel@tonic-gate 
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #include <stdio.h>
307c478bd9Sstevel@tonic-gate #include <stdlib.h>
317c478bd9Sstevel@tonic-gate #include <unistd.h>
327c478bd9Sstevel@tonic-gate #include <sys/types.h>
337c478bd9Sstevel@tonic-gate #include <libproc.h>
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate #include <ctype.h>
367c478bd9Sstevel@tonic-gate #include <string.h>
377c478bd9Sstevel@tonic-gate #include <sys/dlpi.h>
387c478bd9Sstevel@tonic-gate #include <sys/ipc.h>
397c478bd9Sstevel@tonic-gate #include <sys/ipc_impl.h>
407c478bd9Sstevel@tonic-gate #include <sys/msg.h>
417c478bd9Sstevel@tonic-gate #include <sys/sem.h>
427c478bd9Sstevel@tonic-gate #include <sys/shm.h>
437c478bd9Sstevel@tonic-gate #include <sys/fstyp.h>
447c478bd9Sstevel@tonic-gate #if defined(__i386) || defined(__amd64)
457c478bd9Sstevel@tonic-gate #include <sys/sysi86.h>
467c478bd9Sstevel@tonic-gate #endif /* __i386 */
477c478bd9Sstevel@tonic-gate #include <sys/unistd.h>
487c478bd9Sstevel@tonic-gate #include <sys/file.h>
497c478bd9Sstevel@tonic-gate #include <sys/tiuser.h>
507c478bd9Sstevel@tonic-gate #include <sys/timod.h>
517c478bd9Sstevel@tonic-gate #include <sys/stream.h>
527c478bd9Sstevel@tonic-gate #include <sys/stropts.h>
537c478bd9Sstevel@tonic-gate #include <sys/termios.h>
547c478bd9Sstevel@tonic-gate #include <sys/termiox.h>
557c478bd9Sstevel@tonic-gate #include <sys/jioctl.h>
567c478bd9Sstevel@tonic-gate #include <sys/filio.h>
577c478bd9Sstevel@tonic-gate #include <fcntl.h>
587c478bd9Sstevel@tonic-gate #include <sys/termio.h>
597c478bd9Sstevel@tonic-gate #include <sys/stermio.h>
607c478bd9Sstevel@tonic-gate #include <sys/ttold.h>
617c478bd9Sstevel@tonic-gate #include <sys/mount.h>
627c478bd9Sstevel@tonic-gate #include <sys/utssys.h>
637c478bd9Sstevel@tonic-gate #include <sys/sysconfig.h>
647c478bd9Sstevel@tonic-gate #include <sys/statvfs.h>
657c478bd9Sstevel@tonic-gate #include <sys/kstat.h>
667c478bd9Sstevel@tonic-gate #include <sys/audio.h>
677c478bd9Sstevel@tonic-gate #include <sys/mixer.h>
687c478bd9Sstevel@tonic-gate #include <sys/cpc_impl.h>
697c478bd9Sstevel@tonic-gate #include <sys/devpoll.h>
707c478bd9Sstevel@tonic-gate #include <sys/strredir.h>
717c478bd9Sstevel@tonic-gate #include <sys/sockio.h>
727c478bd9Sstevel@tonic-gate #include <netinet/ip_mroute.h>
737c478bd9Sstevel@tonic-gate #include <net/if.h>
747c478bd9Sstevel@tonic-gate #include <net/if_arp.h>
757c478bd9Sstevel@tonic-gate #include <sys/ptyvar.h>
767c478bd9Sstevel@tonic-gate #include <sys/des.h>
777c478bd9Sstevel@tonic-gate #include <sys/prnio.h>
787c478bd9Sstevel@tonic-gate #include <sys/dtrace.h>
797c478bd9Sstevel@tonic-gate #include <sys/crypto/ioctladmin.h>
807c478bd9Sstevel@tonic-gate #include <sys/crypto/ioctl.h>
817c478bd9Sstevel@tonic-gate #include <sys/kbio.h>
827c478bd9Sstevel@tonic-gate #include <sys/ptms.h>
837c478bd9Sstevel@tonic-gate #include <sys/aggr.h>
847c478bd9Sstevel@tonic-gate #include <sys/dld.h>
85b509e89bSRishi Srivatsavai #include <net/simnet.h>
86da14cebeSEric Cheng #include <sys/vnic.h>
87fa9e4066Sahrens #include <sys/fs/zfs.h>
885cd9bd63Skrishna #include <inet/kssl/kssl.h>
8906bbe1e0Sedp #include <sys/dkio.h>
907f0b8309SEdward Pilatowicz #include <sys/fdio.h>
917f0b8309SEdward Pilatowicz #include <sys/cdio.h>
927f0b8309SEdward Pilatowicz #include <sys/scsi/impl/uscsi.h>
937f0b8309SEdward Pilatowicz #include <sys/devinfo_impl.h>
9406bbe1e0Sedp #include <sys/dumpadm.h>
9506bbe1e0Sedp #include <sys/mntio.h>
962b24ab6bSSebastien Roy #include <inet/iptun.h>
979d5056eaSjv227347 #include <sys/zcons.h>
98ddee57faSrui zang - Sun Microsystems - Beijing China #include <sys/usb/clients/hid/hid.h>
99fc92c0cdSMargot Miller #include <sys/pm.h>
100d842718fSGarrett D'Amore #include <sys/soundcard.h>
1017c478bd9Sstevel@tonic-gate 
1027c478bd9Sstevel@tonic-gate #include "ramdata.h"
1037c478bd9Sstevel@tonic-gate #include "proto.h"
1047c478bd9Sstevel@tonic-gate 
1057c478bd9Sstevel@tonic-gate #define	FCNTLMIN	F_DUPFD
1064be06494SDan Price #define	FCNTLMAX	F_BADFD
1077c478bd9Sstevel@tonic-gate const char *const FCNTLname[] = {
1087c478bd9Sstevel@tonic-gate 	"F_DUPFD",
1097c478bd9Sstevel@tonic-gate 	"F_GETFD",
1107c478bd9Sstevel@tonic-gate 	"F_SETFD",
1117c478bd9Sstevel@tonic-gate 	"F_GETFL",
1127c478bd9Sstevel@tonic-gate 	"F_SETFL",
1137c478bd9Sstevel@tonic-gate 	"F_O_GETLK",
1147c478bd9Sstevel@tonic-gate 	"F_SETLK",
1157c478bd9Sstevel@tonic-gate 	"F_SETLKW",
1167c478bd9Sstevel@tonic-gate 	"F_CHKFL",
1177c478bd9Sstevel@tonic-gate 	"F_DUP2FD",
1187c478bd9Sstevel@tonic-gate 	"F_ALLOCSP",
1197c478bd9Sstevel@tonic-gate 	"F_FREESP",
1207c478bd9Sstevel@tonic-gate 	NULL,		/* 12 */
1217c478bd9Sstevel@tonic-gate 	NULL,		/* 13 */
1227c478bd9Sstevel@tonic-gate 	"F_GETLK",
1237c478bd9Sstevel@tonic-gate 	NULL,		/* 15 */
1247c478bd9Sstevel@tonic-gate 	NULL,		/* 16 */
1257c478bd9Sstevel@tonic-gate 	NULL,		/* 17 */
1267c478bd9Sstevel@tonic-gate 	NULL,		/* 18 */
1277c478bd9Sstevel@tonic-gate 	NULL,		/* 19 */
1287c478bd9Sstevel@tonic-gate 	NULL,		/* 20 */
1297c478bd9Sstevel@tonic-gate 	NULL,		/* 21 */
1307c478bd9Sstevel@tonic-gate 	NULL,		/* 22 */
1317c478bd9Sstevel@tonic-gate 	"F_GETOWN",
1327c478bd9Sstevel@tonic-gate 	"F_SETOWN",
1337c478bd9Sstevel@tonic-gate 	"F_REVOKE",
1347c478bd9Sstevel@tonic-gate 	"F_HASREMOTELOCKS",
1357c478bd9Sstevel@tonic-gate 	"F_FREESP64",
1367c478bd9Sstevel@tonic-gate 	NULL,		/* 28 */
1377c478bd9Sstevel@tonic-gate 	NULL,		/* 29 */
1387c478bd9Sstevel@tonic-gate 	NULL,		/* 30 */
1397c478bd9Sstevel@tonic-gate 	NULL,		/* 31 */
1407c478bd9Sstevel@tonic-gate 	NULL,		/* 32 */
1417c478bd9Sstevel@tonic-gate 	"F_GETLK64",
1427c478bd9Sstevel@tonic-gate 	"F_SETLK64",
1437c478bd9Sstevel@tonic-gate 	"F_SETLKW64",
1447c478bd9Sstevel@tonic-gate 	NULL,		/* 36 */
1457c478bd9Sstevel@tonic-gate 	NULL,		/* 37 */
1467c478bd9Sstevel@tonic-gate 	NULL,		/* 38 */
1477c478bd9Sstevel@tonic-gate 	NULL,		/* 39 */
1487c478bd9Sstevel@tonic-gate 	"F_SHARE",
1497c478bd9Sstevel@tonic-gate 	"F_UNSHARE",
1507c478bd9Sstevel@tonic-gate 	"F_SETLK_NBMAND",
1517c478bd9Sstevel@tonic-gate 	"F_SHARE_NBMAND",
1524be06494SDan Price 	"F_SETLK64_NBMAND",
1534be06494SDan Price 	NULL,		/* 45 */
1544be06494SDan Price 	"F_BADFD"
1557c478bd9Sstevel@tonic-gate };
1567c478bd9Sstevel@tonic-gate 
1577c478bd9Sstevel@tonic-gate #define	SYSFSMIN	GETFSIND
1587c478bd9Sstevel@tonic-gate #define	SYSFSMAX	GETNFSTYP
1597c478bd9Sstevel@tonic-gate const char *const SYSFSname[] = {
1607c478bd9Sstevel@tonic-gate 	"GETFSIND",
1617c478bd9Sstevel@tonic-gate 	"GETFSTYP",
1627c478bd9Sstevel@tonic-gate 	"GETNFSTYP"
1637c478bd9Sstevel@tonic-gate };
1647c478bd9Sstevel@tonic-gate 
1657c478bd9Sstevel@tonic-gate #define	SCONFMIN	_CONFIG_NGROUPS
1664be06494SDan Price #define	SCONFMAX	_CONFIG_EPHID_MAX
1677c478bd9Sstevel@tonic-gate const char *const SCONFname[] = {
1687c478bd9Sstevel@tonic-gate 	"_CONFIG_NGROUPS",		/*  2 */
1697c478bd9Sstevel@tonic-gate 	"_CONFIG_CHILD_MAX",		/*  3 */
1707c478bd9Sstevel@tonic-gate 	"_CONFIG_OPEN_FILES",		/*  4 */
1717c478bd9Sstevel@tonic-gate 	"_CONFIG_POSIX_VER",		/*  5 */
1727c478bd9Sstevel@tonic-gate 	"_CONFIG_PAGESIZE",		/*  6 */
1737c478bd9Sstevel@tonic-gate 	"_CONFIG_CLK_TCK",		/*  7 */
1747c478bd9Sstevel@tonic-gate 	"_CONFIG_XOPEN_VER",		/*  8 */
1757c478bd9Sstevel@tonic-gate 	"_CONFIG_HRESCLK_TCK",		/*  9 */
1767c478bd9Sstevel@tonic-gate 	"_CONFIG_PROF_TCK",		/* 10 */
1777c478bd9Sstevel@tonic-gate 	"_CONFIG_NPROC_CONF",		/* 11 */
1787c478bd9Sstevel@tonic-gate 	"_CONFIG_NPROC_ONLN",		/* 12 */
1797c478bd9Sstevel@tonic-gate 	"_CONFIG_AIO_LISTIO_MAX",	/* 13 */
1807c478bd9Sstevel@tonic-gate 	"_CONFIG_AIO_MAX",		/* 14 */
1817c478bd9Sstevel@tonic-gate 	"_CONFIG_AIO_PRIO_DELTA_MAX",	/* 15 */
1827c478bd9Sstevel@tonic-gate 	"_CONFIG_DELAYTIMER_MAX",	/* 16 */
1837c478bd9Sstevel@tonic-gate 	"_CONFIG_MQ_OPEN_MAX",		/* 17 */
1847c478bd9Sstevel@tonic-gate 	"_CONFIG_MQ_PRIO_MAX",		/* 18 */
1857c478bd9Sstevel@tonic-gate 	"_CONFIG_RTSIG_MAX",		/* 19 */
1867c478bd9Sstevel@tonic-gate 	"_CONFIG_SEM_NSEMS_MAX",	/* 20 */
1877c478bd9Sstevel@tonic-gate 	"_CONFIG_SEM_VALUE_MAX",	/* 21 */
1887c478bd9Sstevel@tonic-gate 	"_CONFIG_SIGQUEUE_MAX",		/* 22 */
1897c478bd9Sstevel@tonic-gate 	"_CONFIG_SIGRT_MIN",		/* 23 */
1907c478bd9Sstevel@tonic-gate 	"_CONFIG_SIGRT_MAX",		/* 24 */
1917c478bd9Sstevel@tonic-gate 	"_CONFIG_TIMER_MAX",		/* 25 */
1927c478bd9Sstevel@tonic-gate 	"_CONFIG_PHYS_PAGES",		/* 26 */
1937c478bd9Sstevel@tonic-gate 	"_CONFIG_AVPHYS_PAGES",		/* 27 */
1947c478bd9Sstevel@tonic-gate 	"_CONFIG_COHERENCY",		/* 28 */
1957c478bd9Sstevel@tonic-gate 	"_CONFIG_SPLIT_CACHE",		/* 29 */
1967c478bd9Sstevel@tonic-gate 	"_CONFIG_ICACHESZ",		/* 30 */
1977c478bd9Sstevel@tonic-gate 	"_CONFIG_DCACHESZ",		/* 31 */
1987c478bd9Sstevel@tonic-gate 	"_CONFIG_ICACHELINESZ",		/* 32 */
1997c478bd9Sstevel@tonic-gate 	"_CONFIG_DCACHELINESZ",		/* 33 */
2007c478bd9Sstevel@tonic-gate 	"_CONFIG_ICACHEBLKSZ",		/* 34 */
2017c478bd9Sstevel@tonic-gate 	"_CONFIG_DCACHEBLKSZ",		/* 35 */
2027c478bd9Sstevel@tonic-gate 	"_CONFIG_DCACHETBLKSZ",		/* 36 */
2037c478bd9Sstevel@tonic-gate 	"_CONFIG_ICACHE_ASSOC",		/* 37 */
2047c478bd9Sstevel@tonic-gate 	"_CONFIG_DCACHE_ASSOC",		/* 38 */
2057c478bd9Sstevel@tonic-gate 	NULL,				/* 39 */
2067c478bd9Sstevel@tonic-gate 	NULL,				/* 40 */
2077c478bd9Sstevel@tonic-gate 	NULL,				/* 41 */
2087c478bd9Sstevel@tonic-gate 	"_CONFIG_MAXPID",		/* 42 */
2097c478bd9Sstevel@tonic-gate 	"_CONFIG_STACK_PROT",		/* 43 */
2107c478bd9Sstevel@tonic-gate 	"_CONFIG_NPROC_MAX",		/* 44 */
2114be06494SDan Price 	"_CONFIG_CPUID_MAX",		/* 45 */
2124be06494SDan Price 	"_CONFIG_SYMLOOP_MAX",		/* 46 */
2134be06494SDan Price 	"_CONFIG_EPHID_MAX",		/* 47 */
2147c478bd9Sstevel@tonic-gate };
2157c478bd9Sstevel@tonic-gate 
2167c478bd9Sstevel@tonic-gate #define	PATHCONFMIN	_PC_LINK_MAX
2174be06494SDan Price #define	PATHCONFMAX	_PC_XATTR_EXISTS
2187c478bd9Sstevel@tonic-gate const char *const PATHCONFname[] = {
2194be06494SDan Price 	"_PC_LINK_MAX",			/*  1 */
2204be06494SDan Price 	"_PC_MAX_CANON",		/*  2 */
2214be06494SDan Price 	"_PC_MAX_INPUT",		/*  3 */
2224be06494SDan Price 	"_PC_NAME_MAX",			/*  4 */
2234be06494SDan Price 	"_PC_PATH_MAX",			/*  5 */
2244be06494SDan Price 	"_PC_PIPE_BUF",			/*  6 */
2254be06494SDan Price 	"_PC_NO_TRUNC",			/*  7 */
2264be06494SDan Price 	"_PC_VDISABLE",			/*  8 */
2274be06494SDan Price 	"_PC_CHOWN_RESTRICTED",		/*  9 */
2284be06494SDan Price 	"_PC_ASYNC_IO",			/* 10 */
2294be06494SDan Price 	"_PC_PRIO_IO",			/* 11 */
2304be06494SDan Price 	"_PC_SYNC_IO",			/* 12 */
2314be06494SDan Price 	"_PC_ALLOC_SIZE_MIN",		/* 13 */
2324be06494SDan Price 	"_PC_REC_INCR_XFER_SIZE",	/* 14 */
2334be06494SDan Price 	"_PC_REC_MAX_XFER_SIZE",	/* 15 */
2344be06494SDan Price 	"_PC_REC_MIN_XFER_SIZE",	/* 16 */
2354be06494SDan Price 	"_PC_REC_XFER_ALIGN",		/* 17 */
2364be06494SDan Price 	"_PC_SYMLINK_MAX",		/* 18 */
2374be06494SDan Price 	"_PC_2_SYMLINKS",		/* 19 */
2384be06494SDan Price 	"_PC_ACL_ENABLED",		/* 20 */
2394be06494SDan Price 	"_PC_MIN_HOLE_SIZE",		/* 21 */
2404be06494SDan Price 	"_PC_CASE_BEHAVIOR",		/* 22 */
2414be06494SDan Price 	"_PC_SATTR_ENABLED",		/* 23 */
2424be06494SDan Price 	"_PC_SATTR_EXISTS",		/* 24 */
243e802abbdSTim Haley 	"_PC_ACCESS_FILTERING",		/* 25 */
2443b862e9aSRoger A. Faulkner 	"_PC_TIMESTAMP_RESOLUTION",	/* 26 */
2454be06494SDan Price 	NULL,				/* 27 */
2464be06494SDan Price 	NULL,				/* 28 */
2474be06494SDan Price 	NULL,				/* 29 */
2484be06494SDan Price 	NULL,				/* 30 */
2494be06494SDan Price 	NULL,				/* 31 */
2504be06494SDan Price 	NULL,				/* 32 */
2514be06494SDan Price 	NULL,				/* 33 */
2524be06494SDan Price 	NULL,				/* 34 */
2534be06494SDan Price 	NULL,				/* 35 */
2544be06494SDan Price 	NULL,				/* 36 */
2554be06494SDan Price 	NULL,				/* 37 */
2564be06494SDan Price 	NULL,				/* 38 */
2574be06494SDan Price 	NULL,				/* 39 */
2584be06494SDan Price 	NULL,				/* 40 */
2594be06494SDan Price 	NULL,				/* 41 */
2604be06494SDan Price 	NULL,				/* 42 */
2614be06494SDan Price 	NULL,				/* 43 */
2624be06494SDan Price 	NULL,				/* 44 */
2634be06494SDan Price 	NULL,				/* 45 */
2644be06494SDan Price 	NULL,				/* 46 */
2654be06494SDan Price 	NULL,				/* 47 */
2664be06494SDan Price 	NULL,				/* 48 */
2674be06494SDan Price 	NULL,				/* 49 */
2684be06494SDan Price 	NULL,				/* 50 */
2694be06494SDan Price 	NULL,				/* 51 */
2704be06494SDan Price 	NULL,				/* 52 */
2714be06494SDan Price 	NULL,				/* 53 */
2724be06494SDan Price 	NULL,				/* 54 */
2734be06494SDan Price 	NULL,				/* 55 */
2744be06494SDan Price 	NULL,				/* 56 */
2754be06494SDan Price 	NULL,				/* 57 */
2764be06494SDan Price 	NULL,				/* 58 */
2774be06494SDan Price 	NULL,				/* 59 */
2784be06494SDan Price 	NULL,				/* 60 */
2794be06494SDan Price 	NULL,				/* 61 */
2804be06494SDan Price 	NULL,				/* 62 */
2814be06494SDan Price 	NULL,				/* 63 */
2824be06494SDan Price 	NULL,				/* 64 */
2834be06494SDan Price 	NULL,				/* 65 */
2844be06494SDan Price 	NULL,				/* 66 */
2854be06494SDan Price 	"_PC_FILESIZEBITS",		/* 67 */
2864be06494SDan Price 	NULL,				/* 68 */
2874be06494SDan Price 	NULL,				/* 69 */
2884be06494SDan Price 	NULL,				/* 70 */
2894be06494SDan Price 	NULL,				/* 71 */
2904be06494SDan Price 	NULL,				/* 72 */
2914be06494SDan Price 	NULL,				/* 73 */
2924be06494SDan Price 	NULL,				/* 74 */
2934be06494SDan Price 	NULL,				/* 75 */
2944be06494SDan Price 	NULL,				/* 76 */
2954be06494SDan Price 	NULL,				/* 77 */
2964be06494SDan Price 	NULL,				/* 78 */
2974be06494SDan Price 	NULL,				/* 79 */
2984be06494SDan Price 	NULL,				/* 80 */
2994be06494SDan Price 	NULL,				/* 81 */
3004be06494SDan Price 	NULL,				/* 82 */
3014be06494SDan Price 	NULL,				/* 83 */
3024be06494SDan Price 	NULL,				/* 84 */
3034be06494SDan Price 	NULL,				/* 85 */
3044be06494SDan Price 	NULL,				/* 86 */
3054be06494SDan Price 	NULL,				/* 87 */
3064be06494SDan Price 	NULL,				/* 88 */
3074be06494SDan Price 	NULL,				/* 89 */
3084be06494SDan Price 	NULL,				/* 90 */
3094be06494SDan Price 	NULL,				/* 91 */
3104be06494SDan Price 	NULL,				/* 92 */
3114be06494SDan Price 	NULL,				/* 93 */
3124be06494SDan Price 	NULL,				/* 94 */
3134be06494SDan Price 	NULL,				/* 95 */
3144be06494SDan Price 	NULL,				/* 96 */
3154be06494SDan Price 	NULL,				/* 97 */
3164be06494SDan Price 	NULL,				/* 98 */
3174be06494SDan Price 	NULL,				/* 99 */
3184be06494SDan Price 	"_PC_XATTR_ENABLED",		/* 100 */
3194be06494SDan Price 	"_PC_XATTR_EXISTS",		/* 101, _PC_LAST */
3207c478bd9Sstevel@tonic-gate };
3217c478bd9Sstevel@tonic-gate 
3227c478bd9Sstevel@tonic-gate const struct ioc {
3237c478bd9Sstevel@tonic-gate 	uint_t	code;
3247c478bd9Sstevel@tonic-gate 	const char *name;
3257c478bd9Sstevel@tonic-gate 	const char *datastruct;
3267c478bd9Sstevel@tonic-gate } ioc[] = {
3277c478bd9Sstevel@tonic-gate 	{ (uint_t)TCGETA,	"TCGETA",	NULL },
3287c478bd9Sstevel@tonic-gate 	{ (uint_t)TCSETA,	"TCSETA",	NULL },
3297c478bd9Sstevel@tonic-gate 	{ (uint_t)TCSETAW,	"TCSETAW",	NULL },
3307c478bd9Sstevel@tonic-gate 	{ (uint_t)TCSETAF,	"TCSETAF",	NULL },
3317c478bd9Sstevel@tonic-gate 	{ (uint_t)TCFLSH,	"TCFLSH",	NULL },
3327c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCKBON,	"TIOCKBON",	NULL },
3337c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCKBOF,	"TIOCKBOF",	NULL },
3347c478bd9Sstevel@tonic-gate 	{ (uint_t)KBENABLED,	"KBENABLED",	NULL },
3357c478bd9Sstevel@tonic-gate 	{ (uint_t)TCGETS,	"TCGETS",	NULL },
3367c478bd9Sstevel@tonic-gate 	{ (uint_t)TCSETS,	"TCSETS",	NULL },
3377c478bd9Sstevel@tonic-gate 	{ (uint_t)TCSETSW,	"TCSETSW",	NULL },
3387c478bd9Sstevel@tonic-gate 	{ (uint_t)TCSETSF,	"TCSETSF",	NULL },
3397c478bd9Sstevel@tonic-gate 	{ (uint_t)TCXONC,	"TCXONC",	NULL },
3407c478bd9Sstevel@tonic-gate 	{ (uint_t)TCSBRK,	"TCSBRK",	NULL },
3417c478bd9Sstevel@tonic-gate 	{ (uint_t)TCDSET,	"TCDSET",	NULL },
3427c478bd9Sstevel@tonic-gate 	{ (uint_t)RTS_TOG,	"RTS_TOG",	NULL },
3437c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSWINSZ,	"TIOCSWINSZ",	NULL },
3447c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCGWINSZ,	"TIOCGWINSZ",	NULL },
3457c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCGETD,	"TIOCGETD",	NULL },
3467c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSETD,	"TIOCSETD",	NULL },
3477c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCHPCL,	"TIOCHPCL",	NULL },
3487c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCGETP,	"TIOCGETP",	NULL },
3497c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSETP,	"TIOCSETP",	NULL },
3507c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSETN,	"TIOCSETN",	NULL },
3517c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCEXCL,	"TIOCEXCL",	NULL },
3527c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCNXCL,	"TIOCNXCL",	NULL },
3537c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCFLUSH,	"TIOCFLUSH",	NULL },
3547c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSETC,	"TIOCSETC",	NULL },
3557c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCGETC,	"TIOCGETC",	NULL },
3567c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCGPGRP,	"TIOCGPGRP",	NULL },
3577c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSPGRP,	"TIOCSPGRP",	NULL },
3587c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCGSID,	"TIOCGSID",	NULL },
3597c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSTI,	"TIOCSTI",	NULL },
3607c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCMSET,	"TIOCMSET",	NULL },
3617c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCMBIS,	"TIOCMBIS",	NULL },
3627c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCMBIC,	"TIOCMBIC",	NULL },
3637c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCMGET,	"TIOCMGET",	NULL },
3647c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCREMOTE,	"TIOCREMOTE",	NULL },
3657c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSIGNAL,	"TIOCSIGNAL",	NULL },
3667c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSTART,	"TIOCSTART",	NULL },
3677c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSTOP,	"TIOCSTOP",	NULL },
3687c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCNOTTY,	"TIOCNOTTY",	NULL },
369de81e71eSTim Marsland 	{ (uint_t)TIOCSCTTY,	"TIOCSCTTY",	NULL },
3707c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCOUTQ,	"TIOCOUTQ",	NULL },
3717c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCGLTC,	"TIOCGLTC",	NULL },
3727c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSLTC,	"TIOCSLTC",	NULL },
3737c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCCDTR,	"TIOCCDTR",	NULL },
3747c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSDTR,	"TIOCSDTR",	NULL },
3757c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCCBRK,	"TIOCCBRK",	NULL },
3767c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSBRK,	"TIOCSBRK",	NULL },
3777c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCLGET,	"TIOCLGET",	NULL },
3787c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCLSET,	"TIOCLSET",	NULL },
3797c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCLBIC,	"TIOCLBIC",	NULL },
3807c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCLBIS,	"TIOCLBIS",	NULL },
3817c478bd9Sstevel@tonic-gate 
382de81e71eSTim Marsland 	{ (uint_t)TIOCSILOOP,	"TIOCSILOOP",	NULL },
383de81e71eSTim Marsland 	{ (uint_t)TIOCCILOOP,	"TIOCSILOOP",	NULL },
384de81e71eSTim Marsland 
385de81e71eSTim Marsland 	{ (uint_t)TIOCSETLD,	"TIOCSETLD",	NULL },
386de81e71eSTim Marsland 	{ (uint_t)TIOCGETLD,	"TIOCGETLD",	NULL },
387de81e71eSTim Marsland 
388de81e71eSTim Marsland 	{ (uint_t)TIOCGPPS,	"TIOCGPPS",	NULL },
389de81e71eSTim Marsland 	{ (uint_t)TIOCSPPS,	"TIOCSPPS",	NULL },
390de81e71eSTim Marsland 	{ (uint_t)TIOCGPPSEV,	"TIOCGPPSEV",	NULL },
391de81e71eSTim Marsland 
3927c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCPKT,	"TIOCPKT",	NULL },	/* ptyvar.h */
3937c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCUCNTL,	"TIOCUCNTL",	NULL },
3947c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCTCNTL,	"TIOCTCNTL",	NULL },
3957c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCISPACE,	"TIOCISPACE",	NULL },
3967c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCISIZE,	"TIOCISIZE",	NULL },
3977c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCSSIZE,	"TIOCSSIZE",	"ttysize" },
3987c478bd9Sstevel@tonic-gate 	{ (uint_t)TIOCGSIZE,	"TIOCGSIZE",	"ttysize" },
3997c478bd9Sstevel@tonic-gate 
4007c478bd9Sstevel@tonic-gate 	/*
4010ba2cbe9Sxc151355 	 * Unfortunately, the DLIOC and LDIOC codes overlap.  Since the LDIOC
4027c478bd9Sstevel@tonic-gate 	 * ioctls (for xenix compatibility) are far less likely to be used, we
4030ba2cbe9Sxc151355 	 * give preference to DLIOC.
4047c478bd9Sstevel@tonic-gate 	 */
4057c478bd9Sstevel@tonic-gate 	{ (uint_t)DLIOCRAW,	"DLIOCRAW",	NULL },
4060ba2cbe9Sxc151355 	{ (uint_t)DLIOCNATIVE,	"DLIOCNATIVE",	NULL },
407b127ac41SPhilip Kirk 	{ (uint_t)DLIOCIPNETINFO, "DLIOCIPNETINFO", NULL},
4084eaa4710SRishi Srivatsavai 	{ (uint_t)DLIOCLOWLINK,	"DLIOCLOWLINK",	NULL },
4097c478bd9Sstevel@tonic-gate 
4107c478bd9Sstevel@tonic-gate 	{ (uint_t)LDOPEN,	"LDOPEN",	NULL },
4117c478bd9Sstevel@tonic-gate 	{ (uint_t)LDCLOSE,	"LDCLOSE",	NULL },
4127c478bd9Sstevel@tonic-gate 	{ (uint_t)LDCHG,	"LDCHG",	NULL },
4137c478bd9Sstevel@tonic-gate 	{ (uint_t)LDGETT,	"LDGETT",	NULL },
4147c478bd9Sstevel@tonic-gate 	{ (uint_t)LDSETT,	"LDSETT",	NULL },
4157c478bd9Sstevel@tonic-gate 	{ (uint_t)LDSMAP,	"LDSMAP",	NULL },
4167c478bd9Sstevel@tonic-gate 	{ (uint_t)LDGMAP,	"LDGMAP",	NULL },
4177c478bd9Sstevel@tonic-gate 	{ (uint_t)LDNMAP,	"LDNMAP",	NULL },
4187c478bd9Sstevel@tonic-gate 	{ (uint_t)TCGETX,	"TCGETX",	NULL },
4197c478bd9Sstevel@tonic-gate 	{ (uint_t)TCSETX,	"TCSETX",	NULL },
4207c478bd9Sstevel@tonic-gate 	{ (uint_t)TCSETXW,	"TCSETXW",	NULL },
4217c478bd9Sstevel@tonic-gate 	{ (uint_t)TCSETXF,	"TCSETXF",	NULL },
4227c478bd9Sstevel@tonic-gate 	{ (uint_t)FIORDCHK,	"FIORDCHK",	NULL },
4237c478bd9Sstevel@tonic-gate 	{ (uint_t)FIOCLEX,	"FIOCLEX",	NULL },
4247c478bd9Sstevel@tonic-gate 	{ (uint_t)FIONCLEX,	"FIONCLEX",	NULL },
4257c478bd9Sstevel@tonic-gate 	{ (uint_t)FIONREAD,	"FIONREAD",	NULL },
4267c478bd9Sstevel@tonic-gate 	{ (uint_t)FIONBIO,	"FIONBIO",	NULL },
4277c478bd9Sstevel@tonic-gate 	{ (uint_t)FIOASYNC,	"FIOASYNC",	NULL },
4287c478bd9Sstevel@tonic-gate 	{ (uint_t)FIOSETOWN,	"FIOSETOWN",	NULL },
4297c478bd9Sstevel@tonic-gate 	{ (uint_t)FIOGETOWN,	"FIOGETOWN",	NULL },
4307c478bd9Sstevel@tonic-gate #ifdef DIOCGETP
4317c478bd9Sstevel@tonic-gate 	{ (uint_t)DIOCGETP,	"DIOCGETP",	NULL },
4327c478bd9Sstevel@tonic-gate 	{ (uint_t)DIOCSETP,	"DIOCSETP",	NULL },
4337c478bd9Sstevel@tonic-gate #endif
4347c478bd9Sstevel@tonic-gate #ifdef DIOCGETC
4357c478bd9Sstevel@tonic-gate 	{ (uint_t)DIOCGETC,	"DIOCGETC",	NULL },
4367c478bd9Sstevel@tonic-gate 	{ (uint_t)DIOCGETB,	"DIOCGETB",	NULL },
4377c478bd9Sstevel@tonic-gate 	{ (uint_t)DIOCSETE,	"DIOCSETE",	NULL },
4387c478bd9Sstevel@tonic-gate #endif
4397c478bd9Sstevel@tonic-gate #ifdef IFFORMAT
4407c478bd9Sstevel@tonic-gate 	{ (uint_t)IFFORMAT,	"IFFORMAT",	NULL },
4417c478bd9Sstevel@tonic-gate 	{ (uint_t)IFBCHECK,	"IFBCHECK",	NULL },
4427c478bd9Sstevel@tonic-gate 	{ (uint_t)IFCONFIRM,	"IFCONFIRM",	NULL },
4437c478bd9Sstevel@tonic-gate #endif
4447c478bd9Sstevel@tonic-gate #ifdef LIOCGETP
4457c478bd9Sstevel@tonic-gate 	{ (uint_t)LIOCGETP,	"LIOCGETP",	NULL },
4467c478bd9Sstevel@tonic-gate 	{ (uint_t)LIOCSETP,	"LIOCSETP",	NULL },
4477c478bd9Sstevel@tonic-gate 	{ (uint_t)LIOCGETS,	"LIOCGETS",	NULL },
4487c478bd9Sstevel@tonic-gate 	{ (uint_t)LIOCSETS,	"LIOCSETS",	NULL },
4497c478bd9Sstevel@tonic-gate #endif
4507c478bd9Sstevel@tonic-gate #ifdef JBOOT
4517c478bd9Sstevel@tonic-gate 	{ (uint_t)JBOOT,	"JBOOT",	NULL },
4527c478bd9Sstevel@tonic-gate 	{ (uint_t)JTERM,	"JTERM",	NULL },
4537c478bd9Sstevel@tonic-gate 	{ (uint_t)JMPX,		"JMPX",	NULL },
4547c478bd9Sstevel@tonic-gate #ifdef JTIMO
4557c478bd9Sstevel@tonic-gate 	{ (uint_t)JTIMO,	"JTIMO",	NULL },
4567c478bd9Sstevel@tonic-gate #endif
4577c478bd9Sstevel@tonic-gate 	{ (uint_t)JWINSIZE,	"JWINSIZE",	NULL },
4587c478bd9Sstevel@tonic-gate 	{ (uint_t)JTIMOM,	"JTIMOM",	NULL },
4597c478bd9Sstevel@tonic-gate 	{ (uint_t)JZOMBOOT,	"JZOMBOOT",	NULL },
4607c478bd9Sstevel@tonic-gate 	{ (uint_t)JAGENT,	"JAGENT",	NULL },
4617c478bd9Sstevel@tonic-gate 	{ (uint_t)JTRUN,	"JTRUN",	NULL },
4627c478bd9Sstevel@tonic-gate 	{ (uint_t)JXTPROTO,	"JXTPROTO",	NULL },
4637c478bd9Sstevel@tonic-gate #endif
4647c478bd9Sstevel@tonic-gate 	{ (uint_t)KSTAT_IOC_CHAIN_ID,	"KSTAT_IOC_CHAIN_ID",	NULL },
4657c478bd9Sstevel@tonic-gate 	{ (uint_t)KSTAT_IOC_READ,	"KSTAT_IOC_READ",	NULL },
4667c478bd9Sstevel@tonic-gate 	{ (uint_t)KSTAT_IOC_WRITE,	"KSTAT_IOC_WRITE",	NULL },
4677c478bd9Sstevel@tonic-gate 	{ (uint_t)STGET,	"STGET",	NULL },
4687c478bd9Sstevel@tonic-gate 	{ (uint_t)STSET,	"STSET",	NULL },
4697c478bd9Sstevel@tonic-gate 	{ (uint_t)STTHROW,	"STTHROW",	NULL },
4707c478bd9Sstevel@tonic-gate 	{ (uint_t)STWLINE,	"STWLINE",	NULL },
4717c478bd9Sstevel@tonic-gate 	{ (uint_t)STTSV,	"STTSV",	NULL },
4727c478bd9Sstevel@tonic-gate 	{ (uint_t)I_NREAD,	"I_NREAD",	NULL },
4737c478bd9Sstevel@tonic-gate 	{ (uint_t)I_PUSH,	"I_PUSH",	NULL },
4747c478bd9Sstevel@tonic-gate 	{ (uint_t)I_POP,	"I_POP",	NULL },
4757c478bd9Sstevel@tonic-gate 	{ (uint_t)I_LOOK,	"I_LOOK",	NULL },
4767c478bd9Sstevel@tonic-gate 	{ (uint_t)I_FLUSH,	"I_FLUSH",	NULL },
4777c478bd9Sstevel@tonic-gate 	{ (uint_t)I_SRDOPT,	"I_SRDOPT",	NULL },
4787c478bd9Sstevel@tonic-gate 	{ (uint_t)I_GRDOPT,	"I_GRDOPT",	NULL },
4797c478bd9Sstevel@tonic-gate 	{ (uint_t)I_STR,	"I_STR",	NULL },
4807c478bd9Sstevel@tonic-gate 	{ (uint_t)I_SETSIG,	"I_SETSIG",	NULL },
4817c478bd9Sstevel@tonic-gate 	{ (uint_t)I_GETSIG,	"I_GETSIG",	NULL },
4827c478bd9Sstevel@tonic-gate 	{ (uint_t)I_FIND,	"I_FIND",	NULL },
4837c478bd9Sstevel@tonic-gate 	{ (uint_t)I_LINK,	"I_LINK",	NULL },
4847c478bd9Sstevel@tonic-gate 	{ (uint_t)I_UNLINK,	"I_UNLINK",	NULL },
4857c478bd9Sstevel@tonic-gate 	{ (uint_t)I_PEEK,	"I_PEEK",	NULL },
4867c478bd9Sstevel@tonic-gate 	{ (uint_t)I_FDINSERT,	"I_FDINSERT",	NULL },
4877c478bd9Sstevel@tonic-gate 	{ (uint_t)I_SENDFD,	"I_SENDFD",	NULL },
4887c478bd9Sstevel@tonic-gate 	{ (uint_t)I_RECVFD,	"I_RECVFD",	NULL },
4897c478bd9Sstevel@tonic-gate 	{ (uint_t)I_SWROPT,	"I_SWROPT",	NULL },
4907c478bd9Sstevel@tonic-gate 	{ (uint_t)I_GWROPT,	"I_GWROPT",	NULL },
4917c478bd9Sstevel@tonic-gate 	{ (uint_t)I_LIST,	"I_LIST",	NULL },
4927c478bd9Sstevel@tonic-gate 	{ (uint_t)I_PLINK,	"I_PLINK",	NULL },
4937c478bd9Sstevel@tonic-gate 	{ (uint_t)I_PUNLINK,	"I_PUNLINK",	NULL },
4947c478bd9Sstevel@tonic-gate 	{ (uint_t)I_FLUSHBAND,	"I_FLUSHBAND",	NULL },
4957c478bd9Sstevel@tonic-gate 	{ (uint_t)I_CKBAND,	"I_CKBAND",	NULL },
4967c478bd9Sstevel@tonic-gate 	{ (uint_t)I_GETBAND,	"I_GETBAND",	NULL },
4977c478bd9Sstevel@tonic-gate 	{ (uint_t)I_ATMARK,	"I_ATMARK",	NULL },
4987c478bd9Sstevel@tonic-gate 	{ (uint_t)I_SETCLTIME,	"I_SETCLTIME",	NULL },
4997c478bd9Sstevel@tonic-gate 	{ (uint_t)I_GETCLTIME,	"I_GETCLTIME",	NULL },
5007c478bd9Sstevel@tonic-gate 	{ (uint_t)I_CANPUT,	"I_CANPUT",	NULL },
5017c478bd9Sstevel@tonic-gate 	{ (uint_t)I_ANCHOR,	"I_ANCHOR",	NULL },
502a45f3f93Smeem 	{ (uint_t)_I_CMD,	"_I_CMD",	NULL },
5037c478bd9Sstevel@tonic-gate #ifdef TI_GETINFO
5047c478bd9Sstevel@tonic-gate 	{ (uint_t)TI_GETINFO,	"TI_GETINFO",	NULL },
5057c478bd9Sstevel@tonic-gate 	{ (uint_t)TI_OPTMGMT,	"TI_OPTMGMT",	NULL },
5067c478bd9Sstevel@tonic-gate 	{ (uint_t)TI_BIND,	"TI_BIND",	NULL },
5077c478bd9Sstevel@tonic-gate 	{ (uint_t)TI_UNBIND,	"TI_UNBIND",	NULL },
5087c478bd9Sstevel@tonic-gate #endif
5097c478bd9Sstevel@tonic-gate #ifdef	TI_CAPABILITY
5107c478bd9Sstevel@tonic-gate 	{ (uint_t)TI_CAPABILITY,	"TI_CAPABILITY",	NULL },
5117c478bd9Sstevel@tonic-gate #endif
5127c478bd9Sstevel@tonic-gate #ifdef TI_GETMYNAME
5137c478bd9Sstevel@tonic-gate 	{ (uint_t)TI_GETMYNAME,		"TI_GETMYNAME",		NULL },
5147c478bd9Sstevel@tonic-gate 	{ (uint_t)TI_GETPEERNAME,	"TI_GETPEERNAME",	NULL },
5157c478bd9Sstevel@tonic-gate 	{ (uint_t)TI_SETMYNAME,		"TI_SETMYNAME",		NULL },
5167c478bd9Sstevel@tonic-gate 	{ (uint_t)TI_SETPEERNAME,	"TI_SETPEERNAME",	NULL },
5177c478bd9Sstevel@tonic-gate #endif
5187c478bd9Sstevel@tonic-gate #ifdef V_PREAD
5197c478bd9Sstevel@tonic-gate 	{ (uint_t)V_PREAD,	"V_PREAD",	NULL },
5207c478bd9Sstevel@tonic-gate 	{ (uint_t)V_PWRITE,	"V_PWRITE",	NULL },
5217c478bd9Sstevel@tonic-gate 	{ (uint_t)V_PDREAD,	"V_PDREAD",	NULL },
5227c478bd9Sstevel@tonic-gate 	{ (uint_t)V_PDWRITE,	"V_PDWRITE",	NULL },
5237c478bd9Sstevel@tonic-gate #if !defined(__i386) && !defined(__amd64)
5247c478bd9Sstevel@tonic-gate 	{ (uint_t)V_GETSSZ,	"V_GETSSZ",	NULL },
5257c478bd9Sstevel@tonic-gate #endif /* !__i386 */
5267c478bd9Sstevel@tonic-gate #endif
5277c478bd9Sstevel@tonic-gate 	/* audio */
5287c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_GETINFO,	"AUDIO_GETINFO",	NULL },
5297c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_SETINFO,	"AUDIO_SETINFO",	NULL },
5307c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_DRAIN,		"AUDIO_DRAIN",		NULL },
5317c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_GETDEV,		"AUDIO_GETDEV",		NULL },
5327c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_DIAG_LOOPBACK,	"AUDIO_DIAG_LOOPBACK",	NULL },
5337c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_CH_NUMBER,	"AUDIO_GET_CH_NUMBER",	NULL },
5347c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_CH_TYPE,	"AUDIO_GET_CH_TYPE",	NULL },
5357c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_NUM_CHS,	"AUDIO_GET_NUM_CHS",	NULL },
5367c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_AD_DEV,	"AUDIO_GET_AD_DEV",	NULL },
5377c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_APM_DEV,	"AUDIO_GET_APM_DEV",	NULL },
5387c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_AS_DEV,	"AUDIO_GET_AS_DEV",	NULL },
5397c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXER_MULTIPLE_OPEN,	"AUDIO_MIXER_MULTIPLE_OPEN",
5407c478bd9Sstevel@tonic-gate 	    NULL },
5417c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXER_SINGLE_OPEN,	"AUDIO_MIXER_SINGLE_OPEN",
5427c478bd9Sstevel@tonic-gate 	    NULL },
5437c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXER_GET_SAMPLE_RATES,	"AUDIO_MIXER_GET_SAMPLE_RATES",
5447c478bd9Sstevel@tonic-gate 	    NULL },
5457c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_GETINFO,	"AUDIO_MIXERCTL_GETINFO",
5467c478bd9Sstevel@tonic-gate 	    NULL },
5477c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_SETINFO,	"AUDIO_MIXERCTL_SETINFO",
5487c478bd9Sstevel@tonic-gate 	    NULL },
5497c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_GET_CHINFO,	"AUDIO_MIXERCTL_GET_CHINFO",
5507c478bd9Sstevel@tonic-gate 	    NULL },
5517c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_SET_CHINFO,	"AUDIO_MIXERCTL_SET_CHINFO",
5527c478bd9Sstevel@tonic-gate 	    NULL },
5537c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_GET_MODE,	"AUDIO_MIXERCTL_GET_MODE",
5547c478bd9Sstevel@tonic-gate 	    NULL },
5557c478bd9Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_SET_MODE,	"AUDIO_MIXERCTL_SET_MODE",
5567c478bd9Sstevel@tonic-gate 	    NULL },
557d842718fSGarrett D'Amore 	/* new style Boomer (OSS) ioctls */
558d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_SYSINFO,	"SNDCTL_SYSINFO",	NULL },
559d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_AUDIOINFO,	"SNDCTL_AUDIOINFO",	NULL },
560d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_AUDIOINFO_EX,	"SNDCTL_AUDIOINFO_EX",	NULL },
561d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_MIXERINFO,	"SNDCTL_MIXERINFO",	NULL },
562d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_CARDINFO,	"SNDCTL_CARDINFO",	NULL },
563d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_ENGINEINFO,	"SNDCTL_ENGINEINFO",	NULL },
564d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_MIX_NRMIX,	"SNDCTL_MIX_NRMIX",	NULL },
565d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_MIX_NREXT,	"SNDCTL_MIX_NREXT",	NULL },
566d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_MIX_EXTINFO,	"SNDCTL_MIX_EXTINFO",	NULL },
567d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_MIX_READ,	"SNDCTL_MIX_READ",	NULL },
568d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_MIX_WRITE,	"SNDCTL_MIX_WRITE",	NULL },
569d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_MIX_ENUMINFO,	"SNDCTL_MIX_ENUMINFO",	NULL },
570d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_MIX_DESCRIPTION,	"SNDCTL_MIX_DESCRIPTION",
571d842718fSGarrett D'Amore 	    NULL },
572d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_SETSONG,	"SNDCTL_SETSONG",	NULL },
573d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_GETSONG,	"SNDCTL_GETSONG",	NULL },
574d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_SETNAME,	"SNDCTL_SETNAME",	NULL },
575d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_SETLABEL,	"SNDCTL_SETLABEL",	NULL },
576d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_GETLABEL,	"SNDCTL_GETLABEL",	NULL },
577d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_HALT,	"SNDCTL_DSP_HALT",	NULL },
578d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_RESET,	"SNDCTL_DSP_RESET",	NULL },
579d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SYNC,	"SNDCTL_DSP_SYNC",	NULL },
580d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SPEED,	"SNDCTL_DSP_SPEED",	NULL },
581d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_STEREO,	"SNDCTL_DSP_STEREO",	NULL },
582d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETBLKSIZE,	"SNDCTL_DSP_GETBLKSIZE",
583d842718fSGarrett D'Amore 	    NULL },
584d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SAMPLESIZE,	"SNDCTL_DSP_SAMPLESIZE",
585d842718fSGarrett D'Amore 	    NULL },
586d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_CHANNELS,	"SNDCTL_DSP_CHANNELS",  NULL },
587d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_POST,	"SNDCTL_DSP_POST",	NULL },
588d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SUBDIVIDE,	"SNDCTL_DSP_SUBDIVIDE",	NULL },
589d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SETFRAGMENT,	"SNDCTL_DSP_SETFRAGMENT",
590d842718fSGarrett D'Amore 	    NULL },
591d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETFMTS,	"SNDCTL_DSP_GETFMTS",	NULL },
592d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SETFMT,	"SNDCTL_DSP_SETFMT",	NULL },
593d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETOSPACE,	"SNDCTL_DSP_GETOSPACE",	NULL },
594d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETISPACE,	"SNDCTL_DSP_GETISPACE",	NULL },
595d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETCAPS,	"SNDCTL_DSP_CAPS",	NULL },
596d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETTRIGGER,	"SNDCTL_DSP_GETTRIGGER",
597d842718fSGarrett D'Amore 	    NULL },
598d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SETTRIGGER,	"SNDCTL_DSP_SETTRIGGER",
599d842718fSGarrett D'Amore 	    NULL },
600d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETIPTR,	"SNDCTL_DSP_GETIPTR",	NULL },
601d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETOPTR,	"SNDCTL_DSP_GETOPTR",	NULL },
602d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SETSYNCRO,	"SNDCTL_DSP_SETSYNCRO",	NULL },
603d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SETDUPLEX,	"SNDCTL_DSP_SETDUPLEX",	NULL },
604d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_PROFILE,	"SNDCTL_DSP_PROFILE",	NULL },
605d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETODELAY,	"SNDCTL_DSP_GETODELAY",	NULL },
606d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETPLAYVOL,	"SNDCTL_DSP_GETPLAYVOL",
607d842718fSGarrett D'Amore 	    NULL },
608d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SETPLAYVOL,	"SNDCTL_DSP_SETPLAYVOL",
609d842718fSGarrett D'Amore 	    NULL },
610d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETERROR,	"SNDCTL_DSP_GETERROR",	NULL },
611d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_READCTL,	"SNDCTL_DSP_READCTL",	NULL },
612d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_WRITECTL,	"SNDCTL_DSP_WRITECTL",	NULL },
613d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SYNCGROUP,	"SNDCTL_DSP_SYNCGROUP",	NULL },
614d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SYNCSTART,	"SNDCTL_DSP_SYNCSTART",	NULL },
615d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_COOKEDMODE,	"SNDCTL_DSP_COOKEDMODE",
616d842718fSGarrett D'Amore 	    NULL },
617d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SILENCE,	"SNDCTL_DSP_SILENCE",	NULL },
618d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SKIP,	"SNDCTL_DSP_SKIP",	NULL },
619d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_HALT_INPUT,	"SNDCTL_DSP_HALT_INPUT",
620d842718fSGarrett D'Amore 	    NULL },
621d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_HALT_OUTPUT,	"SNDCTL_DSP_HALT_OUTPUT",
622d842718fSGarrett D'Amore 	    NULL },
623d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_LOW_WATER,	"SNDCTL_DSP_LOW_WATER",	NULL },
624d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_CURRENT_OPTR,	"SNDCTL_DSP_CURRENT_OPTR",
625d842718fSGarrett D'Amore 	    NULL },
626d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_CURRENT_IPTR,	"SNDCTL_DSP_CURRENT_IPTR",
627d842718fSGarrett D'Amore 	    NULL },
628d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GET_RECSRC_NAMES,	"SNDCTL_DSP_GET_RECSRC_NAMES",
629d842718fSGarrett D'Amore 	    NULL },
630d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GET_RECSRC,	"SNDCTL_DSP_GET_RECSRC",
631d842718fSGarrett D'Amore 	    NULL },
632d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SET_RECSRC,	"SNDCTL_DSP_SET_RECSRC",
633d842718fSGarrett D'Amore 	    NULL },
634d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GET_PLAYTGT_NAMES,	"SNDCTL_DSP_GET_PLAYTGT_NAMES",
635d842718fSGarrett D'Amore 	    NULL },
636d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GET_PLAYTGT,	"SNDCTL_DSP_GET_PLAYTGT",
637d842718fSGarrett D'Amore 	    NULL },
638d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SET_PLAYTGT,	"SNDCTL_DSP_SET_PLAYTGT",
639d842718fSGarrett D'Amore 	    NULL },
640d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETRECVOL,		"SNDCTL_DSP_GETRECVOL",
641d842718fSGarrett D'Amore 	    NULL },
642d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SETRECVOL,		"SNDCTL_DSP_SETRECVOL",
643d842718fSGarrett D'Amore 	    NULL },
644d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GET_CHNORDER,	"SNDCTL_DSP_GET_CHNORDER",
645d842718fSGarrett D'Amore 	    NULL },
646d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_SET_CHNORDER,	"SNDCTL_DSP_SET_CHNORDER",
647d842718fSGarrett D'Amore 	    NULL },
648d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETIPEAKS,	"SNDCTL_DSP_GETIPEAKS",	NULL },
649d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETOPEAKS,	"SNDCTL_DSP_GETOPEAKS",	NULL },
650d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_POLICY,	"SNDCTL_DSP_POLICY",	NULL },
651d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_GETCHANNELMASK,	"SNDCTL_DSP_GETCHANNELMASK",
652d842718fSGarrett D'Amore 	    NULL },
653d842718fSGarrett D'Amore 	{ (uint_t)SNDCTL_DSP_BIND_CHANNEL,	"SNDCTL_DSP_BIND_CHANNEL",
654d842718fSGarrett D'Amore 	    NULL },
655d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_VOLUME,	"SOUND_MIXER_READ_VOLUME",
656d842718fSGarrett D'Amore 	    NULL },
657d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_OGAIN,	"SOUND_MIXER_READ_OGAIN",
658d842718fSGarrett D'Amore 	    NULL },
659d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_PCM,	"SOUND_MIXER_READ_PCM",	NULL },
660d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_IGAIN,	"SOUND_MIXER_READ_IGAIN",
661d842718fSGarrett D'Amore 	    NULL },
662d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_RECLEV,	"SOUND_MIXER_READ_RECLEV",
663d842718fSGarrett D'Amore 	    NULL },
664d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_RECSRC,	"SOUND_MIXER_READ_RECSRC",
665d842718fSGarrett D'Amore 	    NULL },
666d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_DEVMASK,	"SOUND_MIXER_READ_DEVMASK",
667d842718fSGarrett D'Amore 	    NULL },
668d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_RECMASK,	"SOUND_MIXER_READ_RECMASK",
669d842718fSGarrett D'Amore 	    NULL },
670d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_CAPS,	"SOUND_MIXER_READ_CAPS",
671d842718fSGarrett D'Amore 	    NULL },
672d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_STEREODEVS,	"SOUND_MIXER_READ_STEREODEVS",
673d842718fSGarrett D'Amore 	    NULL },
674d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_RECGAIN,	"SOUND_MIXER_READ_RECGAIN",
675d842718fSGarrett D'Amore 	    NULL },
676d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_READ_MONGAIN,	"SOUND_MIXER_READ_MONGAIN",
677d842718fSGarrett D'Amore 	    NULL },
678d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_WRITE_VOLUME,	"SOUND_MIXER_WRITE_VOLUME",
679d842718fSGarrett D'Amore 	    NULL },
680d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_WRITE_OGAIN,	"SOUND_MIXER_WRITE_OGAIN",
681d842718fSGarrett D'Amore 	    NULL },
682d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_WRITE_PCM,	"SOUND_MIXER_WRITE_PCM",
683d842718fSGarrett D'Amore 	    NULL },
684d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_WRITE_IGAIN,	"SOUND_MIXER_WRITE_IGAIN",
685d842718fSGarrett D'Amore 	    NULL },
686d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_WRITE_RECLEV,	"SOUND_MIXER_WRITE_RECLEV",
687d842718fSGarrett D'Amore 	    NULL },
688d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_WRITE_RECSRC,	"SOUND_MIXER_WRITE_RECSRC",
689d842718fSGarrett D'Amore 	    NULL },
690d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_WRITE_RECGAIN,	"SOUND_MIXER_WRITE_RECGAIN",
691d842718fSGarrett D'Amore 	    NULL },
692d842718fSGarrett D'Amore 	{ (uint_t)SOUND_MIXER_WRITE_MONGAIN,	"SOUND_MIXER_WRITE_MONGAIN",
693d842718fSGarrett D'Amore 	    NULL },
694d842718fSGarrett D'Amore 
6957c478bd9Sstevel@tonic-gate 	/* STREAMS redirection ioctls */
6967c478bd9Sstevel@tonic-gate 	{ (uint_t)SRIOCSREDIR,		"SRIOCSREDIR",	NULL },
6977c478bd9Sstevel@tonic-gate 	{ (uint_t)SRIOCISREDIR,		"SRIOCISREDIR",	NULL },
6987c478bd9Sstevel@tonic-gate 	{ (uint_t)CPCIO_BIND,		"CPCIO_BIND",		NULL },
6997c478bd9Sstevel@tonic-gate 	{ (uint_t)CPCIO_SAMPLE,		"CPCIO_SAMPLE",		NULL },
7007c478bd9Sstevel@tonic-gate 	{ (uint_t)CPCIO_RELE,		"CPCIO_RELE",		NULL },
7017c478bd9Sstevel@tonic-gate 	/* /dev/poll ioctl() control codes */
7027c478bd9Sstevel@tonic-gate 	{ (uint_t)DP_POLL,	"DP_POLL",	NULL },
7037c478bd9Sstevel@tonic-gate 	{ (uint_t)DP_ISPOLLED,	"DP_ISPOLLED",	NULL },
7047c478bd9Sstevel@tonic-gate 	/* the old /proc ioctl() control codes */
7057c478bd9Sstevel@tonic-gate #define	PIOC	('q'<<8)
7067c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|1),	"PIOCSTATUS",	NULL },
7077c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|2),	"PIOCSTOP",	NULL },
7087c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|3),	"PIOCWSTOP",	NULL },
7097c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|4),	"PIOCRUN",	NULL },
7107c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|5),	"PIOCGTRACE",	NULL },
7117c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|6),	"PIOCSTRACE",	NULL },
7127c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|7),	"PIOCSSIG",	NULL },
7137c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|8),	"PIOCKILL",	NULL },
7147c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|9),	"PIOCUNKILL",	NULL },
7157c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|10),	"PIOCGHOLD",	NULL },
7167c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|11),	"PIOCSHOLD",	NULL },
7177c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|12),	"PIOCMAXSIG",	NULL },
7187c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|13),	"PIOCACTION",	NULL },
7197c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|14),	"PIOCGFAULT",	NULL },
7207c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|15),	"PIOCSFAULT",	NULL },
7217c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|16),	"PIOCCFAULT",	NULL },
7227c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|17),	"PIOCGENTRY",	NULL },
7237c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|18),	"PIOCSENTRY",	NULL },
7247c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|19),	"PIOCGEXIT",	NULL },
7257c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|20),	"PIOCSEXIT",	NULL },
7267c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|21),	"PIOCSFORK",	NULL },
7277c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|22),	"PIOCRFORK",	NULL },
7287c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|23),	"PIOCSRLC",	NULL },
7297c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|24),	"PIOCRRLC",	NULL },
7307c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|25),	"PIOCGREG",	NULL },
7317c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|26),	"PIOCSREG",	NULL },
7327c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|27),	"PIOCGFPREG",	NULL },
7337c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|28),	"PIOCSFPREG",	NULL },
7347c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|29),	"PIOCNICE",	NULL },
7357c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|30),	"PIOCPSINFO",	NULL },
7367c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|31),	"PIOCNMAP",	NULL },
7377c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|32),	"PIOCMAP",	NULL },
7387c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|33),	"PIOCOPENM",	NULL },
7397c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|34),	"PIOCCRED",	NULL },
7407c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|35),	"PIOCGROUPS",	NULL },
7417c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|36),	"PIOCGETPR",	NULL },
7427c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|37),	"PIOCGETU",	NULL },
7437c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|38),	"PIOCSET",	NULL },
7447c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|39),	"PIOCRESET",	NULL },
7457c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|43),	"PIOCUSAGE",	NULL },
7467c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|44),	"PIOCOPENPD",	NULL },
7477c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|45),	"PIOCLWPIDS",	NULL },
7487c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|46),	"PIOCOPENLWP",	NULL },
7497c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|47),	"PIOCLSTATUS",	NULL },
7507c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|48),	"PIOCLUSAGE",	NULL },
7517c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|49),	"PIOCNAUXV",	NULL },
7527c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|50),	"PIOCAUXV",	NULL },
7537c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|51),	"PIOCGXREGSIZE",	NULL },
7547c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|52),	"PIOCGXREG",	NULL },
7557c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|53),	"PIOCSXREG",	NULL },
7567c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|101),	"PIOCGWIN",	NULL },
7577c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|103),	"PIOCNLDT",	NULL },
7587c478bd9Sstevel@tonic-gate 	{ (uint_t)(PIOC|104),	"PIOCLDT",	NULL },
7597c478bd9Sstevel@tonic-gate 
7607c478bd9Sstevel@tonic-gate 	/* ioctl's applicable on sockets */
7617c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSHIWAT,	"SIOCSHIWAT",	NULL },
7627c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGHIWAT,	"SIOCGHIWAT",	NULL },
7637c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLOWAT,	"SIOCSLOWAT",	NULL },
7647c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLOWAT,	"SIOCGLOWAT",	NULL },
7657c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCATMARK,	"SIOCATMARK",	NULL },
7667c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSPGRP,	"SIOCSPGRP",	NULL },
7677c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGPGRP,	"SIOCGPGRP",	NULL },
7687c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCADDRT,	"SIOCADDRT",	"rtentry" },
7697c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCDELRT,	"SIOCDELRT",	"rtentry" },
7707c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGETVIFCNT,	"SIOCGETVIFCNT", "sioc_vif_req" },
7717c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGETSGCNT,	"SIOCGETSGCNT",	"sioc_sg_req" },
7727c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGETLSGCNT,	"SIOCGETLSGCNT", "sioc_lsg_req" },
7737c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIFADDR,	"SIOCSIFADDR",	"ifreq" },
7747c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFADDR,	"SIOCGIFADDR",	"ifreq" },
7757c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIFDSTADDR,	"SIOCSIFDSTADDR", "ifreq" },
7767c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFDSTADDR,	"SIOCGIFDSTADDR", "ifreq" },
7777c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIFFLAGS,	"SIOCSIFFLAGS",	"ifreq" },
7787c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFFLAGS,	"SIOCGIFFLAGS",	"ifreq" },
7797c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMEM,	"SIOCSIFMEM",	"ifreq" },
7807c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMEM,	"SIOCGIFMEM",	"ifreq" },
7817c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFCONF,	"SIOCGIFCONF",	"ifconf" },
7827c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMTU,	"SIOCSIFMTU",	"ifreq" },
7837c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMTU,	"SIOCGIFMTU",	"ifreq" },
7847c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFBRDADDR,	"SIOCGIFBRDADDR",	"ifreq" },
7857c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIFBRDADDR,	"SIOCSIFBRDADDR",	"ifreq" },
7867c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFNETMASK,	"SIOCGIFNETMASK",	"ifreq" },
7877c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIFNETMASK,	"SIOCSIFNETMASK",	"ifreq" },
7887c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMETRIC,	"SIOCGIFMETRIC",	"ifreq" },
7897c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMETRIC,	"SIOCSIFMETRIC",	"ifreq" },
7907c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSARP,	"SIOCSARP",	"arpreq" },
7917c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGARP,	"SIOCGARP",	"arpreq" },
7927c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCDARP,	"SIOCDARP",	"arpreq" },
7937c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCUPPER,	"SIOCUPPER",	"ifreq" },
7947c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCLOWER,	"SIOCLOWER",	"ifreq" },
7957c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSETSYNC,	"SIOCSETSYNC",	"ifreq" },
7967c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGETSYNC,	"SIOCGETSYNC",	"ifreq" },
7977c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSSDSTATS,	"SIOCSSDSTATS",	"ifreq" },
7987c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSSESTATS,	"SIOCSSESTATS",	"ifreq" },
7997c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSPROMISC,	"SIOCSPROMISC",	NULL },
8007c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCADDMULTI,	"SIOCADDMULTI",	"ifreq" },
8017c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCDELMULTI,	"SIOCDELMULTI",	"ifreq" },
8027c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGETNAME,	"SIOCGETNAME",	"sockaddr" },
8037c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGETPEER,	"SIOCGETPEER",	"sockaddr" },
8047c478bd9Sstevel@tonic-gate 	{ (uint_t)IF_UNITSEL,	"IF_UNITSEL",	NULL },
8057c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCXPROTO,	"SIOCXPROTO",	NULL },
8067c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCIFDETACH,	"SIOCIFDETACH",	"ifreq" },
8077c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGENPSTATS,	"SIOCGENPSTATS",	"ifreq" },
8087c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCX25XMT,	"SIOCX25XMT",	"ifreq" },
8097c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCX25RCV,	"SIOCX25RCV",	"ifreq" },
8107c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCX25TBL,	"SIOCX25TBL",	"ifreq" },
8117c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLGETREQ,	"SIOCSLGETREQ",	"ifreq" },
8127c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLSTAT,	"SIOCSLSTAT",	"ifreq" },
8137c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIFNAME,	"SIOCSIFNAME",	"ifreq" },
8147c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGENADDR,	"SIOCGENADDR",	"ifreq" },
8157c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFNUM,	"SIOCGIFNUM",	NULL },
8167c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMUXID,	"SIOCGIFMUXID",	"ifreq" },
8177c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMUXID,	"SIOCSIFMUXID",	"ifreq" },
8187c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIFINDEX,	"SIOCGIFINDEX",	"ifreq" },
8197c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIFINDEX,	"SIOCSIFINDEX",	"ifreq" },
8207c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCLIFREMOVEIF,	"SIOCLIFREMOVEIF",	"lifreq" },
8217c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCLIFADDIF,		"SIOCLIFADDIF",		"lifreq" },
8227c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFADDR,		"SIOCSLIFADDR",		"lifreq" },
8237c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFADDR,		"SIOCGLIFADDR",		"lifreq" },
8247c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFDSTADDR,	"SIOCSLIFDSTADDR",	"lifreq" },
8257c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFDSTADDR,	"SIOCGLIFDSTADDR",	"lifreq" },
8267c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFFLAGS,	"SIOCSLIFFLAGS",	"lifreq" },
8277c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFFLAGS,	"SIOCGLIFFLAGS",	"lifreq" },
8287c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFCONF,		"SIOCGLIFCONF",		"lifconf" },
8297c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFMTU,		"SIOCSLIFMTU",		"lifreq" },
8307c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFMTU,		"SIOCGLIFMTU",		"lifreq" },
8317c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFBRDADDR,	"SIOCGLIFBRDADDR",	"lifreq" },
8327c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFBRDADDR,	"SIOCSLIFBRDADDR",	"lifreq" },
8337c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFNETMASK,	"SIOCGLIFNETMASK",	"lifreq" },
8347c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFNETMASK,	"SIOCSLIFNETMASK",	"lifreq" },
8357c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFMETRIC,	"SIOCGLIFMETRIC",	"lifreq" },
8367c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFMETRIC,	"SIOCSLIFMETRIC",	"lifreq" },
8377c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFNAME,		"SIOCSLIFNAME",		"lifreq" },
8387c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFNUM,		"SIOCGLIFNUM",		"lifnum" },
8397c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFMUXID,	"SIOCGLIFMUXID",	"lifreq" },
8407c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFMUXID,	"SIOCSLIFMUXID",	"lifreq" },
8417c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFINDEX,	"SIOCGLIFINDEX",	"lifreq" },
8427c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFINDEX,	"SIOCSLIFINDEX",	"lifreq" },
8437c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFTOKEN,	"SIOCSLIFTOKEN",	"lifreq" },
8447c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFTOKEN,	"SIOCGLIFTOKEN",	"lifreq" },
8457c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFSUBNET,	"SIOCSLIFSUBNET",	"lifreq" },
8467c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFSUBNET,	"SIOCGLIFSUBNET",	"lifreq" },
8477c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFLNKINFO,	"SIOCSLIFLNKINFO",	"lifreq" },
8487c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFLNKINFO,	"SIOCGLIFLNKINFO",	"lifreq" },
8497c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCLIFDELND,		"SIOCLIFDELND",		"lifreq" },
8507c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCLIFGETND,		"SIOCLIFGETND",		"lifreq" },
8517c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCLIFSETND,		"SIOCLIFSETND",		"lifreq" },
8527c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCTMYADDR,		"SIOCTMYADDR",	"sioc_addrreq" },
8537c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCTONLINK,		"SIOCTONLINK",	"sioc_addrreq" },
8547c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCTMYSITE,		"SIOCTMYSITE",	"sioc_addrreq" },
8557c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCFIPSECONFIG,	"SIOCFIPSECONFIG",	NULL },
8567c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIPSECONFIG,	"SIOCSIPSECONFIG",	NULL },
8577c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCDIPSECONFIG,	"SIOCDIPSECONFIG",	NULL },
8587c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCLIPSECONFIG,	"SIOCLIPSECONFIG",	NULL },
859e11c3f44Smeem 	{ (uint_t)SIOCGLIFBINDING,	"SIOCGLIFBINDING",	"lifreq" },
8607c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFGROUPNAME,	"SIOCSLIFGROUPNAME",	"lifreq" },
8617c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFGROUPNAME,	"SIOCGLIFGROUPNAME",	"lifreq" },
862e11c3f44Smeem 	{ (uint_t)SIOCGLIFGROUPINFO,	"SIOCGLIFGROUPINFO", "lifgroupinfo" },
8637c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGDSTINFO,		"SIOCGDSTINFO",		NULL },
8647c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIP6ADDRPOLICY,	"SIOCGIP6ADDRPOLICY",	NULL },
8657c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIP6ADDRPOLICY,	"SIOCSIP6ADDRPOLICY", 	NULL },
8667c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSXARP,		"SIOCSXARP",		"xarpreq" },
8677c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGXARP,		"SIOCGXARP",		"xarpreq" },
8687c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCDXARP,		"SIOCDXARP",		"xarpreq" },
8697c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFZONE,		"SIOCGLIFZONE",		"lifreq" },
8707c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFZONE,		"SIOCSLIFZONE",		"lifreq" },
8717c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSCTPSOPT,		"SIOCSCTPSOPT",		NULL },
8727c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSCTPGOPT,		"SIOCSCTPGOPT",		NULL },
8737c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSCTPPEELOFF,	"SIOPCSCTPPEELOFF",	"int" },
8747c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFUSESRC,	"SIOCGLIFUSESRC",	"lifreq" },
8757c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFUSESRC,	"SIOCSLIFUSESRC",	"lifreq" },
8767c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFSRCOF,	"SIOCGLIFSRCOF",	"lifsrcof" },
8777c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGMSFILTER,	"SIOCGMSFILTER",    "group_filter" },
8787c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSMSFILTER,	"SIOCSMSFILTER",    "group_filter" },
8797c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCGIPMSFILTER,	"SIOCGIPMSFILTER",  "ip_msfilter" },
8807c478bd9Sstevel@tonic-gate 	{ (uint_t)SIOCSIPMSFILTER,	"SIOCSIPMSFILTER",  "ip_msfilter" },
8816e91bba0SGirish Moodalbail 	{ (uint_t)SIOCGLIFDADSTATE,	"SIOCGLIFDADSTATE",  "lifreq" },
8826e91bba0SGirish Moodalbail 	{ (uint_t)SIOCSLIFPREFIX,	"SIOCSLIFPREFIX", "lifreq" },
8837c478bd9Sstevel@tonic-gate 
8847c478bd9Sstevel@tonic-gate 	/* DES encryption */
8857c478bd9Sstevel@tonic-gate 	{ (uint_t)DESIOCBLOCK,	"DESIOCBLOCK", 	"desparams" },
8867c478bd9Sstevel@tonic-gate 	{ (uint_t)DESIOCQUICK,	"DESIOCQUICK", 	"desparams" },
8877c478bd9Sstevel@tonic-gate 
8887c478bd9Sstevel@tonic-gate 	/* Printing system */
8897c478bd9Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_IFCAP,	"PRNIOC_GET_IFCAP", 	NULL },
8907c478bd9Sstevel@tonic-gate 	{ (uint_t)PRNIOC_SET_IFCAP,	"PRNIOC_SET_IFCAP", 	NULL },
8917c478bd9Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_IFINFO,	"PRNIOC_GET_IFINFO",
8927c478bd9Sstevel@tonic-gate 	    "prn_interface_info" },
8937c478bd9Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_STATUS,	"PRNIOC_GET_STATUS", 	NULL },
8947c478bd9Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_1284_DEVID,	"PRNIOC_GET_1284_DEVID",
8957c478bd9Sstevel@tonic-gate 	    "prn_1284_device_id" },
8967c478bd9Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_1284_STATUS,
8977c478bd9Sstevel@tonic-gate 	    "PRNIOC_GET_IFCANIOC_GET_1284_STATUS", NULL },
8987c478bd9Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_TIMEOUTS,	"PRNIOC_GET_TIMEOUTS",
8997c478bd9Sstevel@tonic-gate 	    "prn_timeouts" },
9007c478bd9Sstevel@tonic-gate 	{ (uint_t)PRNIOC_SET_TIMEOUTS,	"PRNIOC_SET_TIMEOUTS",
9017c478bd9Sstevel@tonic-gate 	    "prn_timeouts" },
9027c478bd9Sstevel@tonic-gate 	{ (uint_t)PRNIOC_RESET,	"PRNIOC_RESET", 	NULL },
9037c478bd9Sstevel@tonic-gate 
9047c478bd9Sstevel@tonic-gate 	/* DTrace */
9057c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROVIDER,	"DTRACEIOC_PROVIDER",	NULL },
9067c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROBES,	"DTRACEIOC_PROBES",	NULL },
9077c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_BUFSNAP,	"DTRACEIOC_BUFSNAP",	NULL },
9087c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROBEMATCH,	"DTRACEIOC_PROBEMATCH",	NULL },
9097c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_ENABLE,	"DTRACEIOC_ENABLE",	NULL },
9107c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_AGGSNAP,	"DTRACEIOC_AGGSNAP",	NULL },
9117c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_EPROBE,	"DTRACEIOC_EPROBE",	NULL },
9127c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROBEARG,   "DTRACEIOC_PROBEARG",   NULL },
9137c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_CONF,	"DTRACEIOC_CONF",	NULL },
9147c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_STATUS,	"DTRACEIOC_STATUS",	NULL },
9157c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_GO,		"DTRACEIOC_GO",		NULL },
9167c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_STOP,	"DTRACEIOC_STOP",	NULL },
9177c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_AGGDESC,	"DTRACEIOC_AGGDESC",	NULL },
9187c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_FORMAT,	"DTRACEIOC_FORMAT",	NULL },
9197c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_DOFGET,	"DTRACEIOC_DOFGET",	NULL },
9207c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_REPLICATE,	"DTRACEIOC_REPLICATE",	NULL },
9217c478bd9Sstevel@tonic-gate 
9227c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEHIOC_ADD,	"DTRACEHIOC_ADD",	NULL },
9237c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEHIOC_REMOVE,	"DTRACEHIOC_REMOVE",	NULL },
9247c478bd9Sstevel@tonic-gate 	{ (uint_t)DTRACEHIOC_ADDDOF,	"DTRACEHIOC_ADDDOF",	NULL },
9257c478bd9Sstevel@tonic-gate 
9267c478bd9Sstevel@tonic-gate 	/* /dev/cryptoadm ioctl() control codes */
9277c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_VERSION,	"CRYPTO_GET_VERSION",	NULL },
9287c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_DEV_LIST,	"CRYPTO_GET_DEV_LIST",	NULL },
9297c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_SOFT_LIST,	"CRYPTO_GET_SOFT_LIST",	NULL },
9307c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_DEV_INFO,	"CRYPTO_GET_DEV_INFO",	NULL },
9317c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_SOFT_INFO,	"CRYPTO_GET_SOFT_INFO",	NULL },
9327c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_DEV_DISABLED,	"CRYPTO_LOAD_DEV_DISABLED",
9337c478bd9Sstevel@tonic-gate 	    NULL },
9347c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_SOFT_DISABLED,	"CRYPTO_LOAD_SOFT_DISABLED",
9357c478bd9Sstevel@tonic-gate 	    NULL },
9367c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_UNLOAD_SOFT_MODULE,	"CRYPTO_UNLOAD_SOFT_MODULE",
9377c478bd9Sstevel@tonic-gate 	    NULL },
9387c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_SOFT_CONFIG,	"CRYPTO_LOAD_SOFT_CONFIG",
9397c478bd9Sstevel@tonic-gate 	    NULL },
9407c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_POOL_CREATE,	"CRYPTO_POOL_CREATE",	NULL },
9417c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_POOL_WAIT,	"CRYPTO_POOL_WAIT",	NULL },
9427c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_POOL_RUN,	"CRYPTO_POOL_RUN",	NULL },
9437c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_DOOR,	"CRYPTO_LOAD_DOOR",	NULL },
9447c478bd9Sstevel@tonic-gate 
9457c478bd9Sstevel@tonic-gate 	/* /dev/crypto ioctl() control codes */
9467c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_FUNCTION_LIST,	"CRYPTO_GET_FUNCTION_LIST",
9477c478bd9Sstevel@tonic-gate 	    NULL },
9487c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_MECHANISM_NUMBER,	"CRYPTO_GET_MECHANISM_NUMBER",
9497c478bd9Sstevel@tonic-gate 	    NULL },
9507c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OPEN_SESSION,	"CRYPTO_OPEN_SESSION",	NULL },
9517c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_CLOSE_SESSION,	"CRYPTO_CLOSE_SESSION",	NULL },
9527c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_CLOSE_ALL_SESSIONS,	"CRYPTO_CLOSE_ALL_SESSIONS",
9537c478bd9Sstevel@tonic-gate 	    NULL },
9547c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOGIN,		"CRYPTO_LOGIN",		NULL },
9557c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOGOUT,	"CRYPTO_LOGOUT",	NULL },
9567c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT,	"CRYPTO_ENCRYPT",	NULL },
9577c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT_INIT,	"CRYPTO_ENCRYPT_INIT",	NULL },
9587c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT_UPDATE,	"CRYPTO_ENCRYPT_UPDATE",
9597c478bd9Sstevel@tonic-gate 	    NULL },
9607c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT_FINAL,	"CRYPTO_ENCRYPT_FINAL",	NULL },
9617c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT,	"CRYPTO_DECRYPT",	NULL },
9627c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_INIT,	"CRYPTO_DECRYPT_INIT",	NULL },
9637c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_UPDATE,	"CRYPTO_DECRYPT_UPDATE",
9647c478bd9Sstevel@tonic-gate 	    NULL },
9657c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_FINAL,	"CRYPTO_DECRYPT_FINAL",	NULL },
9667c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST,	"CRYPTO_DIGEST",	NULL },
9677c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_INIT,	"CRYPTO_DIGEST_INIT",	NULL },
9687c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_UPDATE,	"CRYPTO_DIGEST_UPDATE",	NULL },
9697c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_KEY,	"CRYPTO_DIGEST_KEY",	NULL },
9707c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_FINAL,	"CRYPTO_DIGEST_FINAL",	NULL },
9717c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC,		"CRYPTO_MAC",		NULL },
9727c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC_INIT,	"CRYPTO_MAC_INIT",	NULL },
9737c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC_UPDATE,	"CRYPTO_MAC_UPDATE",	NULL },
9747c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC_FINAL,	"CRYPTO_MAC_FINAL",	NULL },
9757c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN,		"CRYPTO_SIGN",		NULL },
9767c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_INIT,	"CRYPTO_SIGN_INIT",	NULL },
9777c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_UPDATE,	"CRYPTO_SIGN_UPDATE",	NULL },
9787c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_FINAL,	"CRYPTO_SIGN_FINAL",	NULL },
9797c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_RECOVER_INIT,	"CRYPTO_SIGN_RECOVER_INIT",
9807c478bd9Sstevel@tonic-gate 	    NULL },
9817c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_RECOVER,	"CRYPTO_SIGN_RECOVER",	NULL },
9827c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY,	"CRYPTO_VERIFY",	NULL },
9837c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_INIT,	"CRYPTO_VERIFY_INIT",	NULL },
9847c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_UPDATE,	"CRYPTO_VERIFY_UPDATE",	NULL },
9857c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_FINAL,	"CRYPTO_VERIFY_FINAL",	NULL },
9867c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_RECOVER_INIT,	"CRYPTO_VERIFY_RECOVER_INIT",
9877c478bd9Sstevel@tonic-gate 	    NULL },
9887c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_RECOVER,	"CRYPTO_VERIFY_RECOVER",
9897c478bd9Sstevel@tonic-gate 	    NULL },
9907c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_ENCRYPT_UPDATE,	"CRYPTO_DIGEST_ENCRYPT_UPDATE",
9917c478bd9Sstevel@tonic-gate 	    NULL },
9927c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_DIGEST_UPDATE,	"CRYPTO_DECRYPT_DIGEST_UPDATE",
9937c478bd9Sstevel@tonic-gate 	    NULL },
9947c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_ENCRYPT_UPDATE,	"CRYPTO_SIGN_ENCRYPT_UPDATE",
9957c478bd9Sstevel@tonic-gate 	    NULL },
9967c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_VERIFY_UPDATE,	"CRYPTO_DECRYPT_VERIFY_UPDATE",
9977c478bd9Sstevel@tonic-gate 	    NULL },
9987c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SEED_RANDOM,	"CRYPTO_SEED_RANDOM",	NULL },
9997c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GENERATE_RANDOM,	"CRYPTO_GENERATE_RANDOM",
10007c478bd9Sstevel@tonic-gate 	    NULL },
10017c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_CREATE,	"CRYPTO_OBJECT_CREATE",	NULL },
10027c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_COPY,	"CRYPTO_OBJECT_COPY",	NULL },
10037c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_DESTROY,	"CRYPTO_OBJECT_DESTROY",
10047c478bd9Sstevel@tonic-gate 	    NULL },
10057c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_GET_ATTRIBUTE_VALUE,
10067c478bd9Sstevel@tonic-gate 	    "CRYPTO_OBJECT_GET_ATTRIBUTE_VALUE",	NULL },
10077c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_GET_SIZE, "CRYPTO_OBJECT_GET_SIZE",	NULL },
10087c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_SET_ATTRIBUTE_VALUE,
10097c478bd9Sstevel@tonic-gate 	    "CRYPTO_OBJECT_SET_ATTRIBUTE_VALUE",	NULL },
10107c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_FIND_INIT,	"CRYPTO_OBJECT_FIND_INIT",
10117c478bd9Sstevel@tonic-gate 	    NULL },
10127c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_FIND_UPDATE,	"CRYPTO_OBJECT_FIND_UPDATE",
10137c478bd9Sstevel@tonic-gate 	    NULL },
10147c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_FIND_FINAL,	"CRYPTO_OBJECT_FIND_FINAL",
10157c478bd9Sstevel@tonic-gate 	    NULL },
10167c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GENERATE_KEY,	"CRYPTO_GENERATE_KEY",	NULL },
10177c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GENERATE_KEY_PAIR,	"CRYPTO_GENERATE_KEY_PAIR",
10187c478bd9Sstevel@tonic-gate 	    NULL },
10197c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_WRAP_KEY,	"CRYPTO_WRAP_KEY",	NULL },
10207c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_UNWRAP_KEY,	"CRYPTO_UNWRAP_KEY",	NULL },
10217c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DERIVE_KEY,	"CRYPTO_DERIVE_KEY",	NULL },
10227c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_LIST,	"CRYPTO_GET_PROVIDER_LIST",
10237c478bd9Sstevel@tonic-gate 	    NULL },
10247c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_INFO,	"CRYPTO_GET_PROVIDER_INFO",
10257c478bd9Sstevel@tonic-gate 	    NULL },
10267c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_MECHANISMS,
10277c478bd9Sstevel@tonic-gate 	    "CRYPTO_GET_PROVIDER_MECHANISMS",	NULL },
10287c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_MECHANISM_INFO,
10297c478bd9Sstevel@tonic-gate 	    "CRYPTO_GET_PROVIDER_MECHANISM_INFO",	NULL },
10307c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_INIT_TOKEN,	"CRYPTO_INIT_TOKEN",	NULL },
10317c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_INIT_PIN,	"CRYPTO_INIT_PIN",	NULL },
10327c478bd9Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SET_PIN,	"CRYPTO_SET_PIN",	NULL },
1033034448feSmcpowers 	{ (uint_t)CRYPTO_NOSTORE_GENERATE_KEY,
1034034448feSmcpowers 	    "CRYPTO_NOSTORE_GENERATE_KEY",	NULL },
1035034448feSmcpowers 	{ (uint_t)CRYPTO_NOSTORE_GENERATE_KEY_PAIR,
1036034448feSmcpowers 	    "CRYPTO_NOSTORE_GENERATE_KEY_PAIR",	NULL },
1037034448feSmcpowers 	{ (uint_t)CRYPTO_NOSTORE_DERIVE_KEY,
1038034448feSmcpowers 	    "CRYPTO_NOSTORE_DERIVE_KEY",	NULL },
103973556491SAnthony Scarpino 	{ (uint_t)CRYPTO_FIPS140_STATUS,	"CRYPTO_FIPS140_STATUS", NULL },
104073556491SAnthony Scarpino 	{ (uint_t)CRYPTO_FIPS140_SET,	"CRYPTO_FIPS140_SET",	NULL },
10417c478bd9Sstevel@tonic-gate 
10427c478bd9Sstevel@tonic-gate 	/* kbio ioctls */
10437c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCTRANS,		"KIOCTRANS",	NULL },
10447c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCGTRANS,		"KIOCGTRANS",	NULL },
10457c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCTRANSABLE,	"KIOCTRANSABLE",	NULL },
10467c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCGTRANSABLE,	"KIOCGTRANSABLE",	NULL },
10477c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCSETKEY,		"KIOCSETKEY",	NULL },
10487c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCGETKEY,		"KIOCGETKEY",	NULL },
10497c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCCMD,		"KIOCCMD",	NULL },
10507c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCTYPE,		"KIOCTYPE",	NULL },
10517c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCSDIRECT,		"KIOCSDIRECT",	NULL },
10527c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCGDIRECT,		"KIOCGDIRECT",	NULL },
10537c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCSKEY,		"KIOCSKEY",	NULL },
10547c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCGKEY,		"KIOCGKEY",	NULL },
10557c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCSLED,		"KIOCSLED",	NULL },
10567c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCGLED,		"KIOCGLED",	NULL },
10577c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCSCOMPAT,		"KIOCSCOMPAT",	NULL },
10587c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCGCOMPAT,		"KIOCGCOMPAT",	NULL },
10597c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCSLAYOUT,		"KIOCSLAYOUT",	NULL },
10607c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCLAYOUT,		"KIOCLAYOUT",	NULL },
10617c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCSKABORTEN,	"KIOCSKABORTEN",	NULL },
10627c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCGRPTDELAY,	"KIOCGRPTDELAY",	NULL },
10637c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCSRPTDELAY,	"KIOCSRPTDELAY",	NULL },
10647c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCGRPTRATE,		"KIOCGRPTRATE",	NULL },
10657c478bd9Sstevel@tonic-gate 	{ (uint_t)KIOCSRPTRATE,		"KIOCSRPTRATE",	NULL },
10668ffc942dSrz201010 	{ (uint_t)KIOCSETFREQ,		"KIOCSETFREQ",	NULL },
1067c35aa225Smarx 	{ (uint_t)KIOCMKTONE,		"KIOCMKTONE",	NULL },
10687c478bd9Sstevel@tonic-gate 
10697c478bd9Sstevel@tonic-gate 	/* ptm/pts driver I_STR ioctls */
10707c478bd9Sstevel@tonic-gate 	{ (uint_t)ISPTM,		"ISPTM",		NULL},
10717c478bd9Sstevel@tonic-gate 	{ (uint_t)UNLKPT,		"UNLKPT",		NULL},
10727c478bd9Sstevel@tonic-gate 	{ (uint_t)PTSSTTY,		"PTSSTTY",		NULL},
10737c478bd9Sstevel@tonic-gate 	{ (uint_t)ZONEPT,		"ZONEPT",		NULL},
107449e92448Svikram 	{ (uint_t)OWNERPT,		"OWNERPT",		NULL},
10757c478bd9Sstevel@tonic-gate 
10767c478bd9Sstevel@tonic-gate 	/* aggr link aggregation pseudo driver ioctls */
10777c478bd9Sstevel@tonic-gate 	{ (uint_t)LAIOC_CREATE,		"LAIOC_CREATE",		"laioc_create"},
10787c478bd9Sstevel@tonic-gate 	{ (uint_t)LAIOC_DELETE,		"LAIOC_DELETE",		"laioc_delete"},
10797c478bd9Sstevel@tonic-gate 	{ (uint_t)LAIOC_INFO,		"LAIOC_INFO",		"laioc_info"},
10807c478bd9Sstevel@tonic-gate 	{ (uint_t)LAIOC_ADD,		"LAIOC_ADD",
10817c478bd9Sstevel@tonic-gate 	    "laioc_add_rem"},
10827c478bd9Sstevel@tonic-gate 	{ (uint_t)LAIOC_REMOVE,		"LAIOC_REMOVE",
10837c478bd9Sstevel@tonic-gate 	    "laioc_add_rem"},
10847c478bd9Sstevel@tonic-gate 	{ (uint_t)LAIOC_MODIFY,		"LAIOC_MODIFY",		"laioc_modify"},
10857c478bd9Sstevel@tonic-gate 
1086210db224Sericheng 	/* dld data-link ioctls */
1087d62bc4baSyz147064 	{ (uint_t)DLDIOC_ATTR,		"DLDIOC_ATTR",		"dld_ioc_attr"},
1088d62bc4baSyz147064 	{ (uint_t)DLDIOC_PHYS_ATTR,	"DLDIOC_PHYS_ATTR",
1089d62bc4baSyz147064 		"dld_ioc_phys_attr"},
1090d62bc4baSyz147064 	{ (uint_t)DLDIOC_DOORSERVER,	"DLDIOC_DOORSERVER", "dld_ioc_door"},
1091d62bc4baSyz147064 	{ (uint_t)DLDIOC_RENAME,	"DLDIOC_RENAME", "dld_ioc_rename"},
1092da14cebeSEric Cheng 	{ (uint_t)DLDIOC_SECOBJ_GET,		"DLDIOC_SECOBJ_GET",
1093da14cebeSEric Cheng 		"dld_ioc_secobj_get"},
1094da14cebeSEric Cheng 	{ (uint_t)DLDIOC_SECOBJ_SET,		"DLDIOC_SECOBJ_SET",
1095da14cebeSEric Cheng 		"dld_ioc_secobj_set"},
1096da14cebeSEric Cheng 	{ (uint_t)DLDIOC_SECOBJ_UNSET,		"DLDIOC_SECOBJ_UNSET",
1097da14cebeSEric Cheng 		"dld_ioc_secobj_unset"},
1098da14cebeSEric Cheng 	{ (uint_t)DLDIOC_MACADDRGET,		"DLDIOC_MACADDRGET",
1099da14cebeSEric Cheng 		"dld_ioc_macaddrget"},
11003bc21d0aSAruna Ramakrishna - Sun Microsystems 	{ (uint_t)DLDIOC_SETMACPROP,		"DLDIOC_SETMACPROP",
11013bc21d0aSAruna Ramakrishna - Sun Microsystems 		"dld_ioc_macprop_s"},
11023bc21d0aSAruna Ramakrishna - Sun Microsystems 	{ (uint_t)DLDIOC_GETMACPROP,		"DLDIOC_GETMACPROP",
11033bc21d0aSAruna Ramakrishna - Sun Microsystems 		"dld_ioc_macprop_s"},
1104da14cebeSEric Cheng 	{ (uint_t)DLDIOC_ADDFLOW,		"DLDIOC_ADDFLOW",
1105da14cebeSEric Cheng 		"dld_ioc_addflow"},
1106da14cebeSEric Cheng 	{ (uint_t)DLDIOC_REMOVEFLOW,		"DLDIOC_REMOVEFLOW",
1107da14cebeSEric Cheng 		"dld_ioc_removeflow"},
1108da14cebeSEric Cheng 	{ (uint_t)DLDIOC_MODIFYFLOW,		"DLDIOC_MODIFYFLOW",
1109da14cebeSEric Cheng 		"dld_ioc_modifyflow"},
1110da14cebeSEric Cheng 	{ (uint_t)DLDIOC_WALKFLOW,		"DLDIOC_WALKFLOW",
1111da14cebeSEric Cheng 		"dld_ioc_walkflow"},
1112da14cebeSEric Cheng 	{ (uint_t)DLDIOC_USAGELOG,		"DLDIOC_USAGELOG",
1113da14cebeSEric Cheng 		"dld_ioc_usagelog"},
1114da14cebeSEric Cheng 
1115b509e89bSRishi Srivatsavai 	/* simnet ioctls */
1116b509e89bSRishi Srivatsavai 	{ (uint_t)SIMNET_IOC_CREATE,		"SIMNET_IOC_CREATE",
1117b509e89bSRishi Srivatsavai 		"simnet_ioc_create"},
1118b509e89bSRishi Srivatsavai 	{ (uint_t)SIMNET_IOC_DELETE,		"SIMNET_IOC_DELETE",
1119b509e89bSRishi Srivatsavai 		"simnet_ioc_delete"},
1120b509e89bSRishi Srivatsavai 	{ (uint_t)SIMNET_IOC_INFO,		"SIMNET_IOC_INFO",
1121b509e89bSRishi Srivatsavai 		"simnet_ioc_info"},
1122b509e89bSRishi Srivatsavai 	{ (uint_t)SIMNET_IOC_MODIFY,		"SIMNET_IOC_MODIFY",
1123b509e89bSRishi Srivatsavai 		"simnet_ioc_info"},
1124b509e89bSRishi Srivatsavai 
1125da14cebeSEric Cheng 	/* vnic ioctls */
1126da14cebeSEric Cheng 	{ (uint_t)VNIC_IOC_CREATE,		"VNIC_IOC_CREATE",
1127da14cebeSEric Cheng 		"vnic_ioc_create"},
1128da14cebeSEric Cheng 	{ (uint_t)VNIC_IOC_DELETE,		"VNIC_IOC_DELETE",
1129da14cebeSEric Cheng 		"vnic_ioc_delete"},
1130da14cebeSEric Cheng 	{ (uint_t)VNIC_IOC_INFO,		"VNIC_IOC_INFO",
1131da14cebeSEric Cheng 		"vnic_ioc_info"},
1132fa9e4066Sahrens 
1133fa9e4066Sahrens 	/* ZFS ioctls */
1134fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_POOL_CREATE,		"ZFS_IOC_POOL_CREATE",
1135fa9e4066Sahrens 		"zfs_cmd_t" },
1136fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_POOL_DESTROY,		"ZFS_IOC_POOL_DESTROY",
1137fa9e4066Sahrens 		"zfs_cmd_t" },
1138fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_POOL_IMPORT,		"ZFS_IOC_POOL_IMPORT",
1139fa9e4066Sahrens 		"zfs_cmd_t" },
1140fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_POOL_EXPORT,		"ZFS_IOC_POOL_EXPORT",
1141fa9e4066Sahrens 		"zfs_cmd_t" },
1142fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_POOL_CONFIGS,		"ZFS_IOC_POOL_CONFIGS",
1143fa9e4066Sahrens 		"zfs_cmd_t" },
1144fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_POOL_STATS,		"ZFS_IOC_POOL_STATS",
1145fa9e4066Sahrens 		"zfs_cmd_t" },
1146fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_POOL_TRYIMPORT,	"ZFS_IOC_POOL_TRYIMPORT",
1147fa9e4066Sahrens 		"zfs_cmd_t" },
1148*3f9d6ad7SLin Ling 	{ (uint_t)ZFS_IOC_POOL_SCAN,		"ZFS_IOC_POOL_SCAN",
1149fa9e4066Sahrens 		"zfs_cmd_t" },
1150fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_POOL_FREEZE,		"ZFS_IOC_POOL_FREEZE",
1151fa9e4066Sahrens 		"zfs_cmd_t" },
1152eaca9bbdSeschrock 	{ (uint_t)ZFS_IOC_POOL_UPGRADE,		"ZFS_IOC_POOL_UPGRADE",
1153eaca9bbdSeschrock 		"zfs_cmd_t" },
115406eeb2adSek110237 	{ (uint_t)ZFS_IOC_POOL_GET_HISTORY,	"ZFS_IOC_POOL_GET_HISTORY",
115506eeb2adSek110237 		"zfs_cmd_t" },
1156fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_VDEV_ADD,		"ZFS_IOC_VDEV_ADD",
1157fa9e4066Sahrens 		"zfs_cmd_t" },
1158fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_VDEV_REMOVE,		"ZFS_IOC_VDEV_REMOVE",
1159fa9e4066Sahrens 		"zfs_cmd_t" },
11603d7072f8Seschrock 	{ (uint_t)ZFS_IOC_VDEV_SET_STATE,	"ZFS_IOC_VDEV_SET_STATE",
1161fa9e4066Sahrens 		"zfs_cmd_t" },
1162fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_VDEV_ATTACH,		"ZFS_IOC_VDEV_ATTACH",
1163fa9e4066Sahrens 		"zfs_cmd_t" },
1164fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_VDEV_DETACH,		"ZFS_IOC_VDEV_DETACH",
1165fa9e4066Sahrens 		"zfs_cmd_t" },
1166c67d9675Seschrock 	{ (uint_t)ZFS_IOC_VDEV_SETPATH,		"ZFS_IOC_VDEV_SETPATH",
1167c67d9675Seschrock 		"zfs_cmd_t" },
11686809eb4eSEric Schrock 	{ (uint_t)ZFS_IOC_VDEV_SETFRU,		"ZFS_IOC_VDEV_SETFRU",
11696809eb4eSEric Schrock 		"zfs_cmd_t" },
1170fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_OBJSET_STATS,		"ZFS_IOC_OBJSET_STATS",
1171fa9e4066Sahrens 		"zfs_cmd_t" },
11722be0e98cSTim Haley 	{ (uint_t)ZFS_IOC_OBJSET_ZPLPROPS,	"ZFS_IOC_OBJSET_ZPLPROPS",
11732be0e98cSTim Haley 		"zfs_cmd_t" },
1174fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_DATASET_LIST_NEXT,	"ZFS_IOC_DATASET_LIST_NEXT",
1175fa9e4066Sahrens 		"zfs_cmd_t" },
1176fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_SNAPSHOT_LIST_NEXT,	"ZFS_IOC_SNAPSHOT_LIST_NEXT",
1177fa9e4066Sahrens 		"zfs_cmd_t" },
1178fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_SET_PROP,		"ZFS_IOC_SET_PROP",
1179fa9e4066Sahrens 		"zfs_cmd_t" },
1180fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_CREATE,		"ZFS_IOC_CREATE",
1181fa9e4066Sahrens 		"zfs_cmd_t" },
1182fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_DESTROY,		"ZFS_IOC_DESTROY",
1183fa9e4066Sahrens 		"zfs_cmd_t" },
1184fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_ROLLBACK,		"ZFS_IOC_ROLLBACK",
1185fa9e4066Sahrens 		"zfs_cmd_t" },
1186fa9e4066Sahrens 	{ (uint_t)ZFS_IOC_RENAME,		"ZFS_IOC_RENAME",
1187fa9e4066Sahrens 		"zfs_cmd_t" },
11883cb34c60Sahrens 	{ (uint_t)ZFS_IOC_RECV,			"ZFS_IOC_RECV",
1189fa9e4066Sahrens 		"zfs_cmd_t" },
11903cb34c60Sahrens 	{ (uint_t)ZFS_IOC_SEND,			"ZFS_IOC_SEND",
1191fa9e4066Sahrens 		"zfs_cmd_t" },
1192ea8dc4b6Seschrock 	{ (uint_t)ZFS_IOC_INJECT_FAULT,		"ZFS_IOC_INJECT_FAULT",
1193ea8dc4b6Seschrock 		"zfs_cmd_t" },
1194ea8dc4b6Seschrock 	{ (uint_t)ZFS_IOC_CLEAR_FAULT,		"ZFS_IOC_CLEAR_FAULT",
1195ea8dc4b6Seschrock 		"zfs_cmd_t" },
1196ea8dc4b6Seschrock 	{ (uint_t)ZFS_IOC_INJECT_LIST_NEXT,	"ZFS_IOC_INJECT_LIST_NEXT",
1197ea8dc4b6Seschrock 		"zfs_cmd_t" },
1198ea8dc4b6Seschrock 	{ (uint_t)ZFS_IOC_ERROR_LOG,		"ZFS_IOC_ERROR_LOG",
1199ea8dc4b6Seschrock 		"zfs_cmd_t" },
1200ea8dc4b6Seschrock 	{ (uint_t)ZFS_IOC_CLEAR,		"ZFS_IOC_CLEAR",
1201ea8dc4b6Seschrock 		"zfs_cmd_t" },
120299653d4eSeschrock 	{ (uint_t)ZFS_IOC_PROMOTE,		"ZFS_IOC_PROMOTE",
120399653d4eSeschrock 		"zfs_cmd_t" },
12041d452cf5Sahrens 	{ (uint_t)ZFS_IOC_DESTROY_SNAPS,	"ZFS_IOC_DESTROY_SNAPS",
12051d452cf5Sahrens 		"zfs_cmd_t" },
12061d452cf5Sahrens 	{ (uint_t)ZFS_IOC_SNAPSHOT,		"ZFS_IOC_SNAPSHOT",
12071d452cf5Sahrens 		"zfs_cmd_t" },
120855434c77Sek110237 	{ (uint_t)ZFS_IOC_DSOBJ_TO_DSNAME,	"ZFS_IOC_DSOBJ_TO_DSNAME",
120955434c77Sek110237 		"zfs_cmd_t" },
121055434c77Sek110237 	{ (uint_t)ZFS_IOC_OBJ_TO_PATH,		"ZFS_IOC_OBJ_TO_PATH",
121155434c77Sek110237 		"zfs_cmd_t" },
1212b1b8ab34Slling 	{ (uint_t)ZFS_IOC_POOL_SET_PROPS,	"ZFS_IOC_POOL_SET_PROPS",
1213b1b8ab34Slling 		"zfs_cmd_t" },
1214b1b8ab34Slling 	{ (uint_t)ZFS_IOC_POOL_GET_PROPS,	"ZFS_IOC_POOL_GET_PROPS",
1215b1b8ab34Slling 		"zfs_cmd_t" },
1216ecd6cf80Smarks 	{ (uint_t)ZFS_IOC_SET_FSACL,		"ZFS_IOC_SET_FSACL",
1217ecd6cf80Smarks 		"zfs_cmd_t" },
1218ecd6cf80Smarks 	{ (uint_t)ZFS_IOC_GET_FSACL,		"ZFS_IOC_GET_FSACL",
1219ecd6cf80Smarks 		"zfs_cmd_t" },
1220ecd6cf80Smarks 	{ (uint_t)ZFS_IOC_SHARE,		"ZFS_IOC_SHARE",
1221ecd6cf80Smarks 		"zfs_cmd_t" },
1222e45ce728Sahrens 	{ (uint_t)ZFS_IOC_INHERIT_PROP,		"ZFS_IOC_INHERIT_PROP",
1223e45ce728Sahrens 		"zfs_cmd_t" },
1224743a77edSAlan Wright 	{ (uint_t)ZFS_IOC_SMB_ACL,		"ZFS_IOC_SMB_ACL",
1225743a77edSAlan Wright 		"zfs_cmd_t" },
122614843421SMatthew Ahrens 	{ (uint_t)ZFS_IOC_USERSPACE_ONE,	"ZFS_IOC_USERSPACE_ONE",
122714843421SMatthew Ahrens 		"zfs_cmd_t" },
122814843421SMatthew Ahrens 	{ (uint_t)ZFS_IOC_USERSPACE_MANY,	"ZFS_IOC_USERSPACE_MANY",
122914843421SMatthew Ahrens 		"zfs_cmd_t" },
123014843421SMatthew Ahrens 	{ (uint_t)ZFS_IOC_USERSPACE_UPGRADE,	"ZFS_IOC_USERSPACE_UPGRADE",
123114843421SMatthew Ahrens 		"zfs_cmd_t" },
1232842727c2SChris Kirby 	{ (uint_t)ZFS_IOC_HOLD,			"ZFS_IOC_HOLD",
1233842727c2SChris Kirby 		"zfs_cmd_t" },
1234842727c2SChris Kirby 	{ (uint_t)ZFS_IOC_RELEASE,		"ZFS_IOC_RELEASE",
1235842727c2SChris Kirby 		"zfs_cmd_t" },
1236842727c2SChris Kirby 	{ (uint_t)ZFS_IOC_GET_HOLDS,		"ZFS_IOC_GET_HOLDS",
1237842727c2SChris Kirby 		"zfs_cmd_t" },
123892241e0bSTom Erickson 	{ (uint_t)ZFS_IOC_OBJSET_RECVD_PROPS,	"ZFS_IOC_OBJSET_RECVD_PROPS",
123992241e0bSTom Erickson 		"zfs_cmd_t" },
1240fa9e4066Sahrens 
12415cd9bd63Skrishna 	/* kssl ioctls */
12425cd9bd63Skrishna 	{ (uint_t)KSSL_ADD_ENTRY,		"KSSL_ADD_ENTRY",
12435cd9bd63Skrishna 		"kssl_params_t"},
12445cd9bd63Skrishna 	{ (uint_t)KSSL_DELETE_ENTRY,		"KSSL_DELETE_ENTRY",
12455cd9bd63Skrishna 		"sockaddr_in"},
12465cd9bd63Skrishna 
12477f0b8309SEdward Pilatowicz 	/* disk ioctls - (0x04 << 8) - dkio.h */
124806bbe1e0Sedp 	{ (uint_t)DKIOCGGEOM,		"DKIOCGGEOM",
124906bbe1e0Sedp 		"struct dk_geom"},
125006bbe1e0Sedp 	{ (uint_t)DKIOCINFO,		"DKIOCINFO",
125106bbe1e0Sedp 		"struct dk_info"},
12527f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCEJECT,		"DKIOCEJECT",
12537f0b8309SEdward Pilatowicz 		NULL},
125406bbe1e0Sedp 	{ (uint_t)DKIOCGVTOC,		"DKIOCGVTOC",
125506bbe1e0Sedp 		"struct vtoc"},
125606bbe1e0Sedp 	{ (uint_t)DKIOCSVTOC,		"DKIOCSVTOC",
125706bbe1e0Sedp 		"struct vtoc"},
12587f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCGEXTVTOC,	"DKIOCGEXTVTOC",
12597f0b8309SEdward Pilatowicz 		"struct extvtoc"},
12607f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCSEXTVTOC,	"DKIOCSEXTVTOC",
12617f0b8309SEdward Pilatowicz 		"struct extvtoc"},
12627f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCFLUSHWRITECACHE,	"DKIOCFLUSHWRITECACHE",
126306bbe1e0Sedp 		NULL},
12647f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCGETWCE,		"DKIOCGETWCE",
12657f0b8309SEdward Pilatowicz 		NULL},
12667f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCSETWCE,		"DKIOCSETWCE",
12677f0b8309SEdward Pilatowicz 		NULL},
12687f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCSGEOM,		"DKIOCSGEOM",
12697f0b8309SEdward Pilatowicz 		"struct dk_geom"},
12707f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCSAPART,		"DKIOCSAPART",
12717f0b8309SEdward Pilatowicz 		"struct dk_allmap"},
12727f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCGAPART,		"DKIOCGAPART",
12737f0b8309SEdward Pilatowicz 		"struct dk_allmap"},
127406bbe1e0Sedp 	{ (uint_t)DKIOCG_PHYGEOM,	"DKIOCG_PHYGEOM",
127506bbe1e0Sedp 		"struct dk_geom"},
127606bbe1e0Sedp 	{ (uint_t)DKIOCG_VIRTGEOM,	"DKIOCG_VIRTGEOM",
127706bbe1e0Sedp 		"struct dk_geom"},
12787f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCLOCK,		"DKIOCLOCK",
12797f0b8309SEdward Pilatowicz 		NULL},
12807f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCUNLOCK,		"DKIOCUNLOCK",
12817f0b8309SEdward Pilatowicz 		NULL},
12827f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCSTATE,		"DKIOCSTATE",
12837f0b8309SEdward Pilatowicz 		NULL},
12847f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCREMOVABLE,	"DKIOCREMOVABLE",
12857f0b8309SEdward Pilatowicz 		NULL},
12867f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCHOTPLUGGABLE,	"DKIOCHOTPLUGGABLE",
12877f0b8309SEdward Pilatowicz 		NULL},
12887f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCADDBAD,		"DKIOCADDBAD",
12897f0b8309SEdward Pilatowicz 		NULL},
12907f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCGETDEF,		"DKIOCGETDEF",
12917f0b8309SEdward Pilatowicz 		NULL},
12927f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCPARTINFO,	"DKIOCPARTINFO",
12937f0b8309SEdward Pilatowicz 		"struct part_info"},
12947f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCEXTPARTINFO,	"DKIOCEXTPARTINFO",
12957f0b8309SEdward Pilatowicz 		"struct extpart_info"},
129606bbe1e0Sedp 	{ (uint_t)DKIOCGMEDIAINFO,	"DKIOCGMEDIAINFO",
129706bbe1e0Sedp 		"struct dk_minfo"},
12987f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCGMBOOT,		"DKIOCGMBOOT",
12997f0b8309SEdward Pilatowicz 		NULL},
13007f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCSMBOOT,		"DKIOCSMBOOT",
13017f0b8309SEdward Pilatowicz 		NULL},
13027f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCSETEFI,		"DKIOCSETEFI",
13037f0b8309SEdward Pilatowicz 		"struct dk_efi"},
13047f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCGETEFI,		"DKIOCGETEFI",
13057f0b8309SEdward Pilatowicz 		"struct dk_efi"},
13067f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCPARTITION,	"DKIOCPARTITION",
13077f0b8309SEdward Pilatowicz 		"struct partition64"},
13087f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCGETVOLCAP,	"DKIOCGETVOLCAP",
13097f0b8309SEdward Pilatowicz 		"struct volcap_t"},
13107f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCSETVOLCAP,	"DKIOCSETVOLCAP",
13117f0b8309SEdward Pilatowicz 		"struct volcap_t"},
13127f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCDMR,		"DKIOCDMR",
13137f0b8309SEdward Pilatowicz 		"struct vol_directed_rd"},
13147f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCDUMPINIT,	"DKIOCDUMPINIT",
13157f0b8309SEdward Pilatowicz 		NULL},
13167f0b8309SEdward Pilatowicz 	{ (uint_t)DKIOCDUMPFINI,	"DKIOCDUMPFINI",
13177f0b8309SEdward Pilatowicz 		NULL},
131834de8762SGarrett D'Amore 	{ (uint_t)DKIOCREADONLY,	"DKIOCREADONLY",
131934de8762SGarrett D'Amore 		NULL},
13207f0b8309SEdward Pilatowicz 
13217f0b8309SEdward Pilatowicz 	/* disk ioctls - (0x04 << 8) - fdio.h */
13227f0b8309SEdward Pilatowicz 	{ (uint_t)FDIOGCHAR,		"FDIOGCHAR",
13237f0b8309SEdward Pilatowicz 		"struct fd_char"},
13247f0b8309SEdward Pilatowicz 	{ (uint_t)FDIOSCHAR,		"FDIOSCHAR",
13257f0b8309SEdward Pilatowicz 		"struct fd_char"},
13267f0b8309SEdward Pilatowicz 	{ (uint_t)FDEJECT,		"FDEJECT",
13277f0b8309SEdward Pilatowicz 		NULL},
13287f0b8309SEdward Pilatowicz 	{ (uint_t)FDGETCHANGE,		"FDGETCHANGE",
13297f0b8309SEdward Pilatowicz 		NULL},
13307f0b8309SEdward Pilatowicz 	{ (uint_t)FDGETDRIVECHAR,	"FDGETDRIVECHAR",
13317f0b8309SEdward Pilatowicz 		"struct fd_drive"},
13327f0b8309SEdward Pilatowicz 	{ (uint_t)FDSETDRIVECHAR,	"FDSETDRIVECHAR",
13337f0b8309SEdward Pilatowicz 		"struct fd_drive"},
13347f0b8309SEdward Pilatowicz 	{ (uint_t)FDGETSEARCH,		"FDGETSEARCH",
13357f0b8309SEdward Pilatowicz 		NULL},
13367f0b8309SEdward Pilatowicz 	{ (uint_t)FDSETSEARCH,		"FDSETSEARCH",
13377f0b8309SEdward Pilatowicz 		NULL},
13387f0b8309SEdward Pilatowicz 	{ (uint_t)FDIOCMD,		"FDIOCMD",
13397f0b8309SEdward Pilatowicz 		"struct fd_cmd"},
13407f0b8309SEdward Pilatowicz 	{ (uint_t)FDRAW,		"FDRAW",
13417f0b8309SEdward Pilatowicz 		"struct fd_raw"},
13427f0b8309SEdward Pilatowicz 	{ (uint_t)FDDEFGEOCHAR,		"FDDEFGEOCHAR",
13437f0b8309SEdward Pilatowicz 		NULL},
13447f0b8309SEdward Pilatowicz 
13457f0b8309SEdward Pilatowicz 	/* disk ioctls - (0x04 << 8) - cdio.h */
13467f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMPAUSE,		"CDROMPAUSE",
13477f0b8309SEdward Pilatowicz 		NULL},
13487f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMRESUME,		"CDROMRESUME",
13497f0b8309SEdward Pilatowicz 		NULL},
13507f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMPLAYMSF,		"CDROMPLAYMSF",
13517f0b8309SEdward Pilatowicz 		"struct cdrom_msf"},
13527f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMPLAYTRKIND,	"CDROMPLAYTRKIND",
13537f0b8309SEdward Pilatowicz 		"struct cdrom_ti"},
13547f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMREADTOCHDR,	"CDROMREADTOCHDR",
13557f0b8309SEdward Pilatowicz 		"struct cdrom_tochdr"},
13567f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMREADTOCENTRY,	"CDROMREADTOCENTRY",
13577f0b8309SEdward Pilatowicz 		"struct cdrom_tocentry"},
13587f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMSTOP,		"CDROMSTOP",
13597f0b8309SEdward Pilatowicz 		NULL},
13607f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMSTART,		"CDROMSTART",
13617f0b8309SEdward Pilatowicz 		NULL},
13627f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMEJECT,		"CDROMEJECT",
13637f0b8309SEdward Pilatowicz 		NULL},
13647f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMVOLCTRL,		"CDROMVOLCTRL",
13657f0b8309SEdward Pilatowicz 		"struct cdrom_volctrl"},
13667f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMSUBCHNL,		"CDROMSUBCHNL",
13677f0b8309SEdward Pilatowicz 		"struct cdrom_subchnl"},
13687f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMREADMODE2,	"CDROMREADMODE2",
13697f0b8309SEdward Pilatowicz 		"struct cdrom_read"},
13707f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMREADMODE1,	"CDROMREADMODE1",
13717f0b8309SEdward Pilatowicz 		"struct cdrom_read"},
13727f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMREADOFFSET,	"CDROMREADOFFSET",
13737f0b8309SEdward Pilatowicz 		NULL},
13747f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMGBLKMODE,	"CDROMGBLKMODE",
13757f0b8309SEdward Pilatowicz 		NULL},
13767f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMSBLKMODE,	"CDROMSBLKMODE",
13777f0b8309SEdward Pilatowicz 		NULL},
13787f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMCDDA,		"CDROMCDDA",
13797f0b8309SEdward Pilatowicz 		"struct cdrom_cdda"},
13807f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMCDXA,		"CDROMCDXA",
13817f0b8309SEdward Pilatowicz 		"struct cdrom_cdxa"},
13827f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMSUBCODE,		"CDROMSUBCODE",
13837f0b8309SEdward Pilatowicz 		"struct cdrom_subcode"},
13847f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMGDRVSPEED,	"CDROMGDRVSPEED",
13857f0b8309SEdward Pilatowicz 		NULL},
13867f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMSDRVSPEED,	"CDROMSDRVSPEED",
13877f0b8309SEdward Pilatowicz 		NULL},
13887f0b8309SEdward Pilatowicz 	{ (uint_t)CDROMCLOSETRAY,	"CDROMCLOSETRAY",
13897f0b8309SEdward Pilatowicz 		NULL},
13907f0b8309SEdward Pilatowicz 
13917f0b8309SEdward Pilatowicz 	/* disk ioctls - (0x04 << 8) - uscsi.h */
13927f0b8309SEdward Pilatowicz 	{ (uint_t)USCSICMD,		"USCSICMD",
13937f0b8309SEdward Pilatowicz 		"struct uscsi_cmd"},
139406bbe1e0Sedp 
139506bbe1e0Sedp 	/* dumpadm ioctls - (0xdd << 8) */
139606bbe1e0Sedp 	{ (uint_t)DIOCGETDEV,	"DIOCGETDEV",
13977f0b8309SEdward Pilatowicz 		NULL},
139806bbe1e0Sedp 
139906bbe1e0Sedp 	/* mntio ioctls - ('m' << 8) */
1400835ee219SRobert Harris 	{ (uint_t)MNTIOC_NMNTS,		"MNTIOC_NMNTS",
1401835ee219SRobert Harris 		NULL},
1402835ee219SRobert Harris 	{ (uint_t)MNTIOC_GETDEVLIST,	"MNTIOC_GETDEVLIST",
1403835ee219SRobert Harris 		NULL},
1404835ee219SRobert Harris 	{ (uint_t)MNTIOC_SETTAG,	"MNTIOC_SETTAG",
1405835ee219SRobert Harris 		"struct mnttagdesc"},
1406835ee219SRobert Harris 	{ (uint_t)MNTIOC_CLRTAG,	"MNTIOC_CLRTAG",
1407835ee219SRobert Harris 		"struct mnttagdesc"},
1408835ee219SRobert Harris 	{ (uint_t)MNTIOC_SHOWHIDDEN,	"MNTIOC_SHOWHIDDEN",
1409835ee219SRobert Harris 		NULL},
141006bbe1e0Sedp 	{ (uint_t)MNTIOC_GETMNTENT,	"MNTIOC_GETMNTENT",
1411835ee219SRobert Harris 		"struct mnttab"},
1412835ee219SRobert Harris 	{ (uint_t)MNTIOC_GETEXTMNTENT,	"MNTIOC_GETEXTMNTENT",
141306bbe1e0Sedp 		"struct extmnttab"},
1414835ee219SRobert Harris 	{ (uint_t)MNTIOC_GETMNTANY,	"MNTIOC_GETMNTANY",
1415835ee219SRobert Harris 		"struct mnttab"},
141606bbe1e0Sedp 
14177f0b8309SEdward Pilatowicz 	/* devinfo ioctls - ('df' << 8) - devinfo_impl.h */
14187f0b8309SEdward Pilatowicz 	{ (uint_t)DINFOUSRLD,		"DINFOUSRLD",
14197f0b8309SEdward Pilatowicz 		NULL},
14207f0b8309SEdward Pilatowicz 	{ (uint_t)DINFOLODRV,		"DINFOLODRV",
14217f0b8309SEdward Pilatowicz 		NULL},
14227f0b8309SEdward Pilatowicz 	{ (uint_t)DINFOIDENT,		"DINFOIDENT",
14237f0b8309SEdward Pilatowicz 		NULL},
14247f0b8309SEdward Pilatowicz 
14252b24ab6bSSebastien Roy 	{ (uint_t)IPTUN_CREATE,	"IPTUN_CREATE",	"iptun_kparams_t"},
14262b24ab6bSSebastien Roy 	{ (uint_t)IPTUN_DELETE,	"IPTUN_DELETE", "datalink_id_t"},
14272b24ab6bSSebastien Roy 	{ (uint_t)IPTUN_MODIFY, "IPTUN_MODIFY", "iptun_kparams_t"},
14282b24ab6bSSebastien Roy 	{ (uint_t)IPTUN_INFO,	"IPTUN_INFO",	NULL},
14292b24ab6bSSebastien Roy 	{ (uint_t)IPTUN_SET_6TO4RELAY, "IPTUN_SET_6TO4RELAY",	NULL},
14302b24ab6bSSebastien Roy 	{ (uint_t)IPTUN_GET_6TO4RELAY, "IPTUN_GET_6TO4RELAY",	NULL},
14312b24ab6bSSebastien Roy 
14329d5056eaSjv227347 	/* zcons ioctls */
14339d5056eaSjv227347 	{ (uint_t)ZC_HOLDSLAVE,		"ZC_HOLDSLAVE",		NULL },
14349d5056eaSjv227347 	{ (uint_t)ZC_RELEASESLAVE,	"ZC_RELEASESLAVE",	NULL },
14359d5056eaSjv227347 
1436ddee57faSrui zang - Sun Microsystems - Beijing China 	/* hid ioctls - ('h' << 8) - hid.h */
1437ddee57faSrui zang - Sun Microsystems - Beijing China 	{ (uint_t)HIDIOCKMGDIRECT,	"HIDIOCKMGDIRECT",	NULL },
1438ddee57faSrui zang - Sun Microsystems - Beijing China 	{ (uint_t)HIDIOCKMSDIRECT,	"HIDIOCKMSDIRECT",	NULL },
1439ddee57faSrui zang - Sun Microsystems - Beijing China 
1440fc92c0cdSMargot Miller 	/* pm ioctls */
1441fc92c0cdSMargot Miller 	{ (uint_t)PM_SCHEDULE,		"PM_SCHEDULE",		NULL },
1442fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_IDLE_TIME,	"PM_GET_IDLE_TIME",	NULL },
1443fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_NUM_CMPTS,	"PM_GET_NUM_CMPTS",	NULL },
1444fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_THRESHOLD,	"PM_GET_THRESHOLD",	NULL },
1445fc92c0cdSMargot Miller 	{ (uint_t)PM_SET_THRESHOLD,	"PM_SET_THRESHOLD",	NULL },
1446fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_NORM_PWR,	"PM_GET_NORM_PWR",	NULL },
1447fc92c0cdSMargot Miller 	{ (uint_t)PM_SET_CUR_PWR,	"PM_SET_CUR_PWR",	NULL },
1448fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_CUR_PWR,	"PM_GET_CUR_PWR",	NULL },
1449fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_NUM_DEPS,	"PM_GET_NUM_DEPS",	NULL },
1450fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_DEP,		"PM_GET_DEP",		NULL },
1451fc92c0cdSMargot Miller 	{ (uint_t)PM_ADD_DEP,		"PM_ADD_DEP",		NULL },
1452fc92c0cdSMargot Miller 	{ (uint_t)PM_REM_DEP,		"PM_REM_DEP",		NULL },
1453fc92c0cdSMargot Miller 	{ (uint_t)PM_REM_DEVICE,	"PM_REM_DEVICE",	NULL },
1454fc92c0cdSMargot Miller 	{ (uint_t)PM_REM_DEVICES,	"PM_REM_DEVICES",	NULL },
1455fc92c0cdSMargot Miller 	{ (uint_t)PM_DISABLE_AUTOPM,	"PM_DISABLE_AUTOPM",	NULL },
1456fc92c0cdSMargot Miller 	{ (uint_t)PM_REENABLE_AUTOPM,	"PM_REENABLE_AUTOPM",	NULL },
1457fc92c0cdSMargot Miller 	{ (uint_t)PM_SET_NORM_PWR,	"PM_SET_NORM_PWR",	NULL },
1458fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_SYSTEM_THRESHOLD,	"PM_GET_SYSTEM_THRESHOLD",
1459fc92c0cdSMargot Miller 		NULL },
1460fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_DEFAULT_SYSTEM_THRESHOLD,
1461fc92c0cdSMargot Miller 		"PM_GET_DEFAULT_SYSTEM_THRESHOLD", NULL },
1462fc92c0cdSMargot Miller 	{ (uint_t)PM_SET_SYSTEM_THRESHOLD,	"PM_SET_SYSTEM_THRESHOLD",
1463fc92c0cdSMargot Miller 		NULL },
1464fc92c0cdSMargot Miller 	{ (uint_t)PM_START_PM,		"PM_START_PM",		NULL },
1465fc92c0cdSMargot Miller 	{ (uint_t)PM_STOP_PM,		"PM_STOP_PM",		NULL },
1466fc92c0cdSMargot Miller 	{ (uint_t)PM_RESET_PM,		"PM_RESET_PM",		NULL },
1467fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_PM_STATE,	"PM_GET_PM_STATE",	NULL },
1468fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_AUTOS3_STATE,	"PM_GET_AUTOS3_STATE",	NULL },
1469fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_S3_SUPPORT_STATE,	"PM_GET_S3_SUPPORT_STATE",
1470fc92c0cdSMargot Miller 		NULL },
1471fc92c0cdSMargot Miller 	{ (uint_t)PM_IDLE_DOWN,		"PM_IDLE_DOWN",		NULL },
1472fc92c0cdSMargot Miller 	{ (uint_t)PM_START_CPUPM,	"PM_START_CPUPM",	NULL },
1473fc92c0cdSMargot Miller 	{ (uint_t)PM_START_CPUPM_EV,	"PM_START_CPUPM_EV",	NULL },
1474fc92c0cdSMargot Miller 	{ (uint_t)PM_START_CPUPM_POLL,	"PM_START_CPUPM_POLL",	NULL },
1475fc92c0cdSMargot Miller 	{ (uint_t)PM_STOP_CPUPM,	"PM_STOP_CPUPM",	NULL },
1476fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_CPU_THRESHOLD,	"PM_GET_CPU_THRESHOLD",	NULL },
1477fc92c0cdSMargot Miller 	{ (uint_t)PM_SET_CPU_THRESHOLD,	"PM_SET_CPU_THRESHOLD",	NULL },
1478fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_CPUPM_STATE,	"PM_GET_CPUPM_STATE",	NULL },
1479fc92c0cdSMargot Miller 	{ (uint_t)PM_START_AUTOS3,	"PM_START_AUTOS3",	NULL },
1480fc92c0cdSMargot Miller 	{ (uint_t)PM_STOP_AUTOS3,	"PM_STOP_AUTOS3",	NULL },
1481fc92c0cdSMargot Miller 	{ (uint_t)PM_ENABLE_S3,		"PM_ENABLE_S3",		NULL },
1482fc92c0cdSMargot Miller 	{ (uint_t)PM_DISABLE_S3,	"PM_DISABLE_S3",	NULL },
1483fc92c0cdSMargot Miller 	{ (uint_t)PM_ENTER_S3,		"PM_ENTER_S3",		NULL },
1484fc92c0cdSMargot Miller 	{ (uint_t)PM_DISABLE_CPU_DEEP_IDLE,	"PM_DISABLE_CPU_DEEP_IDLE",
1485fc92c0cdSMargot Miller 		NULL },
1486fc92c0cdSMargot Miller 	{ (uint_t)PM_ENABLE_CPU_DEEP_IDLE,	"PM_START_CPU_DEEP_IDLE",
1487fc92c0cdSMargot Miller 		NULL },
1488fc92c0cdSMargot Miller 	{ (uint_t)PM_DEFAULT_CPU_DEEP_IDLE,	"PM_DFLT_CPU_DEEP_IDLE",
1489fc92c0cdSMargot Miller 		NULL },
1490fc92c0cdSMargot Miller #ifdef _SYSCALL32
1491fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_STATE_CHANGE,		"PM_GET_STATE_CHANGE",
1492fc92c0cdSMargot Miller 		"pm_state_change32_t" },
1493fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_STATE_CHANGE_WAIT,	"PM_GET_STATE_CHANGE_WAIT",
1494fc92c0cdSMargot Miller 		"pm_state_change32_t" },
1495fc92c0cdSMargot Miller 	{ (uint_t)PM_DIRECT_NOTIFY,		"PM_DIRECT_NOTIFY",
1496fc92c0cdSMargot Miller 		"pm_state_change32_t" },
1497fc92c0cdSMargot Miller 	{ (uint_t)PM_DIRECT_NOTIFY_WAIT,	"PM_DIRECT_NOTIFY_WAIT",
1498fc92c0cdSMargot Miller 		"pm_state_change32_t" },
1499fc92c0cdSMargot Miller 	{ (uint_t)PM_REPARSE_PM_PROPS,		"PM_REPARSE_PM_PROPS",
1500fc92c0cdSMargot Miller 		"pm_req32_t" },
1501fc92c0cdSMargot Miller 	{ (uint_t)PM_SET_DEVICE_THRESHOLD,	"PM_SET_DEVICE_THRESHOLD",
1502fc92c0cdSMargot Miller 		"pm_req32_t" },
1503fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_STATS,			"PM_GET_STATS",
1504fc92c0cdSMargot Miller 		"pm_req32_t" },
1505fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_DEVICE_THRESHOLD,	"PM_GET_DEVICE_THRESHOLD",
1506fc92c0cdSMargot Miller 		"pm_req32_t" },
1507fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_POWER_NAME,		"PM_GET_POWER_NAME",
1508fc92c0cdSMargot Miller 		"pm_req32_t" },
1509fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_POWER_LEVELS,		"PM_GET_POWER_LEVELS",
1510fc92c0cdSMargot Miller 		"pm_req32_t" },
1511fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_NUM_COMPONENTS,	"PM_GET_NUM_COMPONENTS",
1512fc92c0cdSMargot Miller 		"pm_req32_t" },
1513fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_COMPONENT_NAME,	"PM_GET_COMPONENT_NAME",
1514fc92c0cdSMargot Miller 		"pm_req32_t" },
1515fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_NUM_POWER_LEVELS,	"PM_GET_NUM_POWER_LEVELS",
1516fc92c0cdSMargot Miller 		"pm_req32_t" },
1517fc92c0cdSMargot Miller 	{ (uint_t)PM_DIRECT_PM,			"PM_DIRECT_PM",
1518fc92c0cdSMargot Miller 		"pm_req32_t" },
1519fc92c0cdSMargot Miller 	{ (uint_t)PM_RELEASE_DIRECT_PM,		"PM_RELEASE_DIRECT_PM",
1520fc92c0cdSMargot Miller 		"pm_req32_t" },
1521fc92c0cdSMargot Miller 	{ (uint_t)PM_RESET_DEVICE_THRESHOLD,	"PM_RESET_DEVICE_THRESHOLD",
1522fc92c0cdSMargot Miller 		"pm_req32_t" },
1523fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_DEVICE_TYPE,		"PM_GET_DEVICE_TYPE",
1524fc92c0cdSMargot Miller 		"pm_req32_t" },
1525fc92c0cdSMargot Miller 	{ (uint_t)PM_SET_COMPONENT_THRESHOLDS,	"PM_SET_COMPONENT_THRESHOLDS",
1526fc92c0cdSMargot Miller 		"pm_req32_t" },
1527fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_COMPONENT_THRESHOLDS,	"PM_GET_COMPONENT_THRESHOLDS",
1528fc92c0cdSMargot Miller 		"pm_req32_t" },
1529fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_DEVICE_THRESHOLD_BASIS,
1530fc92c0cdSMargot Miller 		"PM_GET_DEVICE_THRESHOLD_BASIS",	"pm_req32_t" },
1531fc92c0cdSMargot Miller 	{ (uint_t)PM_SET_CURRENT_POWER,		"PM_SET_CURRENT_POWER",
1532fc92c0cdSMargot Miller 		"pm_req32_t" },
1533fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_CURRENT_POWER,		"PM_GET_CURRENT_POWER",
1534fc92c0cdSMargot Miller 		"pm_req32_t" },
1535fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_FULL_POWER,		"PM_GET_FULL_POWER",
1536fc92c0cdSMargot Miller 		"pm_req32_t" },
1537fc92c0cdSMargot Miller 	{ (uint_t)PM_ADD_DEPENDENT,		"PM_ADD_DEPENDENT",
1538fc92c0cdSMargot Miller 		"pm_req32_t" },
1539fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_TIME_IDLE,		"PM_GET_TIME_IDLE",
1540fc92c0cdSMargot Miller 		"pm_req32_t" },
1541fc92c0cdSMargot Miller 	{ (uint_t)PM_ADD_DEPENDENT_PROPERTY,	"PM_ADD_DEPENDENT_PROPERTY",
1542fc92c0cdSMargot Miller 		"pm_req32_t" },
1543fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_CMD_NAME,		"PM_GET_CMD_NAME",
1544fc92c0cdSMargot Miller 		"pm_req32_t" },
1545fc92c0cdSMargot Miller 	{ (uint_t)PM_SEARCH_LIST,		"PM_SEARCH_LIST",
1546fc92c0cdSMargot Miller 		"pm_searchargs32_t" },
1547fc92c0cdSMargot Miller #else  /* _SYSCALL32 */
1548fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_STATE_CHANGE,		"PM_GET_STATE_CHANGE",
1549fc92c0cdSMargot Miller 		"pm_state_change_t" },
1550fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_STATE_CHANGE_WAIT,	"PM_GET_STATE_CHANGE_WAIT",
1551fc92c0cdSMargot Miller 		"pm_state_change_t" },
1552fc92c0cdSMargot Miller 	{ (uint_t)PM_DIRECT_NOTIFY,		"PM_DIRECT_NOTIFY",
1553fc92c0cdSMargot Miller 		"pm_state_change_t" },
1554fc92c0cdSMargot Miller 	{ (uint_t)PM_DIRECT_NOTIFY_WAIT,	"PM_DIRECT_NOTIFY_WAIT",
1555fc92c0cdSMargot Miller 		"pm_state_change_t" },
1556fc92c0cdSMargot Miller 	{ (uint_t)PM_REPARSE_PM_PROPS,		"PM_REPARSE_PM_PROPS",
1557fc92c0cdSMargot Miller 		"pm_req_t" },
1558fc92c0cdSMargot Miller 	{ (uint_t)PM_SET_DEVICE_THRESHOLD,	"PM_SET_DEVICE_THRESHOLD",
1559fc92c0cdSMargot Miller 		"pm_req_t" },
1560fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_STATS,			"PM_GET_STATS",
1561fc92c0cdSMargot Miller 		"pm_req_t" },
1562fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_DEVICE_THRESHOLD,	"PM_GET_DEVICE_THRESHOLD",
1563fc92c0cdSMargot Miller 		"pm_req_t" },
1564fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_POWER_NAME,		"PM_GET_POWER_NAME",
1565fc92c0cdSMargot Miller 		"pm_req_t" },
1566fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_POWER_LEVELS,		"PM_GET_POWER_LEVELS",
1567fc92c0cdSMargot Miller 		"pm_req_t" },
1568fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_NUM_COMPONENTS,	"PM_GET_NUM_COMPONENTS",
1569fc92c0cdSMargot Miller 		"pm_req_t" },
1570fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_COMPONENT_NAME,	"PM_GET_COMPONENT_NAME",
1571fc92c0cdSMargot Miller 		"pm_req_t" },
1572fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_NUM_POWER_LEVELS,	"PM_GET_NUM_POWER_LEVELS",
1573fc92c0cdSMargot Miller 		"pm_req_t" },
1574fc92c0cdSMargot Miller 	{ (uint_t)PM_DIRECT_PM,			"PM_DIRECT_PM",
1575fc92c0cdSMargot Miller 		"pm_req_t" },
1576fc92c0cdSMargot Miller 	{ (uint_t)PM_RELEASE_DIRECT_PM,		"PM_RELEASE_DIRECT_PM",
1577fc92c0cdSMargot Miller 		"pm_req_t" },
1578fc92c0cdSMargot Miller 	{ (uint_t)PM_RESET_DEVICE_THRESHOLD,	"PM_RESET_DEVICE_THRESHOLD",
1579fc92c0cdSMargot Miller 		"pm_req_t" },
1580fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_DEVICE_TYPE,		"PM_GET_DEVICE_TYPE",
1581fc92c0cdSMargot Miller 		"pm_req_t" },
1582fc92c0cdSMargot Miller 	{ (uint_t)PM_SET_COMPONENT_THRESHOLDS,	"PM_SET_COMPONENT_THRESHOLDS",
1583fc92c0cdSMargot Miller 		"pm_req_t" },
1584fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_COMPONENT_THRESHOLDS,	"PM_GET_COMPONENT_THRESHOLDS",
1585fc92c0cdSMargot Miller 		"pm_req_t" },
1586fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_DEVICE_THRESHOLD_BASIS,
1587fc92c0cdSMargot Miller 		"PM_GET_DEVICE_THRESHOLD_BASIS",	"pm_req_t" },
1588fc92c0cdSMargot Miller 	{ (uint_t)PM_SET_CURRENT_POWER,		"PM_SET_CURRENT_POWER",
1589fc92c0cdSMargot Miller 		"pm_req_t" },
1590fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_CURRENT_POWER,		"PM_GET_CURRENT_POWER",
1591fc92c0cdSMargot Miller 		"pm_req_t" },
1592fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_FULL_POWER,		"PM_GET_FULL_POWER",
1593fc92c0cdSMargot Miller 		"pm_req_t" },
1594fc92c0cdSMargot Miller 	{ (uint_t)PM_ADD_DEPENDENT,		"PM_ADD_DEPENDENT",
1595fc92c0cdSMargot Miller 		"pm_req_t" },
1596fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_TIME_IDLE,		"PM_GET_TIME_IDLE",
1597fc92c0cdSMargot Miller 		"pm_req_t" },
1598fc92c0cdSMargot Miller 	{ (uint_t)PM_ADD_DEPENDENT_PROPERTY,	"PM_ADD_DEPENDENT_PROPERTY",
1599fc92c0cdSMargot Miller 		"pm_req_t" },
1600fc92c0cdSMargot Miller 	{ (uint_t)PM_GET_CMD_NAME,		"PM_GET_CMD_NAME",
1601fc92c0cdSMargot Miller 		"pm_req_t" },
1602fc92c0cdSMargot Miller 	{ (uint_t)PM_SEARCH_LIST,	"PM_SEARCH_LIST",
1603fc92c0cdSMargot Miller 		"pm_searchargs_t" },
1604fc92c0cdSMargot Miller #endif /* _SYSCALL */
1605fc92c0cdSMargot Miller 
16067c478bd9Sstevel@tonic-gate 	{ (uint_t)0, NULL, NULL	}
16077c478bd9Sstevel@tonic-gate };
16087c478bd9Sstevel@tonic-gate 
16097c478bd9Sstevel@tonic-gate void
16107c478bd9Sstevel@tonic-gate ioctl_ioccom(char *buf, size_t size, uint_t code, int nbytes, int x, int y)
16117c478bd9Sstevel@tonic-gate {
16127c478bd9Sstevel@tonic-gate 	const char *inoutstr;
16137c478bd9Sstevel@tonic-gate 
16147c478bd9Sstevel@tonic-gate 	if (code & IOC_VOID)
16157c478bd9Sstevel@tonic-gate 		inoutstr = "";
16167c478bd9Sstevel@tonic-gate 	else if ((code & IOC_INOUT) == IOC_INOUT)
16177c478bd9Sstevel@tonic-gate 		inoutstr = "WR";
16187c478bd9Sstevel@tonic-gate 	else
16197c478bd9Sstevel@tonic-gate 		inoutstr = code & IOC_IN ? "W" : "R";
16207c478bd9Sstevel@tonic-gate 
16217c478bd9Sstevel@tonic-gate 	if (isascii(x) && isprint(x))
16227c478bd9Sstevel@tonic-gate 		(void) snprintf(buf, size, "_IO%sN('%c', %d, %d)", inoutstr,
16237c478bd9Sstevel@tonic-gate 		    x, y, nbytes);
16247c478bd9Sstevel@tonic-gate 	else
16257c478bd9Sstevel@tonic-gate 		(void) snprintf(buf, size, "_IO%sN(0x%x, %d, %d)", inoutstr,
16267c478bd9Sstevel@tonic-gate 		    x, y, nbytes);
16277c478bd9Sstevel@tonic-gate }
16287c478bd9Sstevel@tonic-gate 
16297c478bd9Sstevel@tonic-gate 
16307c478bd9Sstevel@tonic-gate const char *
16317c478bd9Sstevel@tonic-gate ioctlname(private_t *pri, uint_t code)
16327c478bd9Sstevel@tonic-gate {
16337c478bd9Sstevel@tonic-gate 	const struct ioc *ip;
16347c478bd9Sstevel@tonic-gate 	const char *str = NULL;
16357c478bd9Sstevel@tonic-gate 
16367c478bd9Sstevel@tonic-gate 	for (ip = &ioc[0]; ip->name; ip++) {
16377c478bd9Sstevel@tonic-gate 		if (code == ip->code) {
16387c478bd9Sstevel@tonic-gate 			str = ip->name;
16397c478bd9Sstevel@tonic-gate 			break;
16407c478bd9Sstevel@tonic-gate 		}
16417c478bd9Sstevel@tonic-gate 	}
16427c478bd9Sstevel@tonic-gate 
16437c478bd9Sstevel@tonic-gate 	/*
16447c478bd9Sstevel@tonic-gate 	 * Developers hide ascii ioctl names in the ioctl subcode; for example
16457c478bd9Sstevel@tonic-gate 	 * 0x445210 should be printed 'D'<<16|'R'<<8|10.  We allow for all
16467c478bd9Sstevel@tonic-gate 	 * three high order bytes (called hi, mid and lo) to contain ascii
16477c478bd9Sstevel@tonic-gate 	 * characters.
16487c478bd9Sstevel@tonic-gate 	 */
16497c478bd9Sstevel@tonic-gate 	if (str == NULL) {
16507c478bd9Sstevel@tonic-gate 		int c_hi = code >> 24;
16517c478bd9Sstevel@tonic-gate 		int c_mid = (code >> 16) & 0xff;
16527c478bd9Sstevel@tonic-gate 		int c_mid_nm = (code >> 16);
16537c478bd9Sstevel@tonic-gate 		int c_lo = (code >> 8) & 0xff;
16547c478bd9Sstevel@tonic-gate 		int c_lo_nm = code >> 8;
16557c478bd9Sstevel@tonic-gate 
16567c478bd9Sstevel@tonic-gate 		if (isascii(c_lo) && isprint(c_lo) &&
16577c478bd9Sstevel@tonic-gate 		    isascii(c_mid) && isprint(c_mid) &&
16587c478bd9Sstevel@tonic-gate 		    isascii(c_hi) && isprint(c_hi))
16597c478bd9Sstevel@tonic-gate 			(void) sprintf(pri->code_buf,
16607c478bd9Sstevel@tonic-gate 			    "(('%c'<<24)|('%c'<<16)|('%c'<<8)|%d)",
16617c478bd9Sstevel@tonic-gate 			    c_hi, c_mid, c_lo, code & 0xff);
16627c478bd9Sstevel@tonic-gate 		else if (isascii(c_lo) && isprint(c_lo) &&
16637c478bd9Sstevel@tonic-gate 		    isascii(c_mid_nm) && isprint(c_mid_nm))
16647c478bd9Sstevel@tonic-gate 			(void) sprintf(pri->code_buf,
16657c478bd9Sstevel@tonic-gate 			    "(('%c'<<16)|('%c'<<8)|%d)", c_mid, c_lo,
16667c478bd9Sstevel@tonic-gate 			    code & 0xff);
16677c478bd9Sstevel@tonic-gate 		else if (isascii(c_lo_nm) && isprint(c_lo_nm))
16687c478bd9Sstevel@tonic-gate 			(void) sprintf(pri->code_buf, "(('%c'<<8)|%d)",
16697c478bd9Sstevel@tonic-gate 			    c_lo_nm, code & 0xff);
16707c478bd9Sstevel@tonic-gate 		else if (code & (IOC_VOID|IOC_INOUT))
16717c478bd9Sstevel@tonic-gate 			ioctl_ioccom(pri->code_buf, sizeof (pri->code_buf),
16727c478bd9Sstevel@tonic-gate 			    code, c_mid, c_lo, code & 0xff);
16737c478bd9Sstevel@tonic-gate 		else
16747c478bd9Sstevel@tonic-gate 			(void) sprintf(pri->code_buf, "0x%.4X", code);
16757c478bd9Sstevel@tonic-gate 		str = (const char *)pri->code_buf;
16767c478bd9Sstevel@tonic-gate 	}
16777c478bd9Sstevel@tonic-gate 
16787c478bd9Sstevel@tonic-gate 	return (str);
16797c478bd9Sstevel@tonic-gate }
16807c478bd9Sstevel@tonic-gate 
16817c478bd9Sstevel@tonic-gate 
16827c478bd9Sstevel@tonic-gate const char *
16837c478bd9Sstevel@tonic-gate ioctldatastruct(uint_t code)
16847c478bd9Sstevel@tonic-gate {
16857c478bd9Sstevel@tonic-gate 	const struct ioc *ip;
16867c478bd9Sstevel@tonic-gate 	const char *str = NULL;
16877c478bd9Sstevel@tonic-gate 
16887c478bd9Sstevel@tonic-gate 	for (ip = &ioc[0]; ip->name != NULL; ip++) {
16897c478bd9Sstevel@tonic-gate 		if (code == ip->code) {
16907c478bd9Sstevel@tonic-gate 			str = ip->datastruct;
16917c478bd9Sstevel@tonic-gate 			break;
16927c478bd9Sstevel@tonic-gate 		}
16937c478bd9Sstevel@tonic-gate 	}
16947c478bd9Sstevel@tonic-gate 	return (str);
16957c478bd9Sstevel@tonic-gate }
16967c478bd9Sstevel@tonic-gate 
16977c478bd9Sstevel@tonic-gate 
16987c478bd9Sstevel@tonic-gate const char *
16997c478bd9Sstevel@tonic-gate fcntlname(int code)
17007c478bd9Sstevel@tonic-gate {
17017c478bd9Sstevel@tonic-gate 	const char *str = NULL;
17027c478bd9Sstevel@tonic-gate 
17037c478bd9Sstevel@tonic-gate 	if (code >= FCNTLMIN && code <= FCNTLMAX)
17047c478bd9Sstevel@tonic-gate 		str = FCNTLname[code-FCNTLMIN];
17057c478bd9Sstevel@tonic-gate 	return (str);
17067c478bd9Sstevel@tonic-gate }
17077c478bd9Sstevel@tonic-gate 
17087c478bd9Sstevel@tonic-gate const char *
17097c478bd9Sstevel@tonic-gate sfsname(int code)
17107c478bd9Sstevel@tonic-gate {
17117c478bd9Sstevel@tonic-gate 	const char *str = NULL;
17127c478bd9Sstevel@tonic-gate 
17137c478bd9Sstevel@tonic-gate 	if (code >= SYSFSMIN && code <= SYSFSMAX)
17147c478bd9Sstevel@tonic-gate 		str = SYSFSname[code-SYSFSMIN];
17157c478bd9Sstevel@tonic-gate 	return (str);
17167c478bd9Sstevel@tonic-gate }
17177c478bd9Sstevel@tonic-gate 
17187c478bd9Sstevel@tonic-gate /* ARGSUSED */
17197c478bd9Sstevel@tonic-gate const char *
17207c478bd9Sstevel@tonic-gate si86name(int code)
17217c478bd9Sstevel@tonic-gate {
17227c478bd9Sstevel@tonic-gate 	const char *str = NULL;
17237c478bd9Sstevel@tonic-gate 
17247c478bd9Sstevel@tonic-gate #if defined(__i386) || defined(__amd64)
17257c478bd9Sstevel@tonic-gate 	switch (code) {
17267c478bd9Sstevel@tonic-gate 	case SI86SWPI:		str = "SI86SWPI";	break;
17277c478bd9Sstevel@tonic-gate 	case SI86SYM:		str = "SI86SYM";	break;
17287c478bd9Sstevel@tonic-gate 	case SI86CONF:		str = "SI86CONF";	break;
17297c478bd9Sstevel@tonic-gate 	case SI86BOOT:		str = "SI86BOOT";	break;
17307c478bd9Sstevel@tonic-gate 	case SI86AUTO:		str = "SI86AUTO";	break;
17317c478bd9Sstevel@tonic-gate 	case SI86EDT:		str = "SI86EDT";	break;
17327c478bd9Sstevel@tonic-gate 	case SI86SWAP:		str = "SI86SWAP";	break;
17337c478bd9Sstevel@tonic-gate 	case SI86FPHW:		str = "SI86FPHW";	break;
17347c478bd9Sstevel@tonic-gate 	case SI86FPSTART:	str = "SI86FPSTART";	break;
17357c478bd9Sstevel@tonic-gate 	case GRNON:		str = "GRNON";		break;
17367c478bd9Sstevel@tonic-gate 	case GRNFLASH:		str = "GRNFLASH";	break;
17377c478bd9Sstevel@tonic-gate 	case STIME:		str = "STIME";		break;
17387c478bd9Sstevel@tonic-gate 	case SETNAME:		str = "SETNAME";	break;
17397c478bd9Sstevel@tonic-gate 	case RNVR:		str = "RNVR";		break;
17407c478bd9Sstevel@tonic-gate 	case WNVR:		str = "WNVR";		break;
17417c478bd9Sstevel@tonic-gate 	case RTODC:		str = "RTODC";		break;
17427c478bd9Sstevel@tonic-gate 	case CHKSER:		str = "CHKSER";		break;
17437c478bd9Sstevel@tonic-gate 	case SI86NVPRT:		str = "SI86NVPRT";	break;
17447c478bd9Sstevel@tonic-gate 	case SANUPD:		str = "SANUPD";		break;
17457c478bd9Sstevel@tonic-gate 	case SI86KSTR:		str = "SI86KSTR";	break;
17467c478bd9Sstevel@tonic-gate 	case SI86MEM:		str = "SI86MEM";	break;
17477c478bd9Sstevel@tonic-gate 	case SI86TODEMON:	str = "SI86TODEMON";	break;
17487c478bd9Sstevel@tonic-gate 	case SI86CCDEMON:	str = "SI86CCDEMON";	break;
17497c478bd9Sstevel@tonic-gate 	case SI86CACHE:		str = "SI86CACHE";	break;
17507c478bd9Sstevel@tonic-gate 	case SI86DELMEM:	str = "SI86DELMEM";	break;
17517c478bd9Sstevel@tonic-gate 	case SI86ADDMEM:	str = "SI86ADDMEM";	break;
17527c478bd9Sstevel@tonic-gate /* 71 through 74 reserved for VPIX */
17537c478bd9Sstevel@tonic-gate 	case SI86V86: 		str = "SI86V86";	break;
17547c478bd9Sstevel@tonic-gate 	case SI86SLTIME:	str = "SI86SLTIME";	break;
17557c478bd9Sstevel@tonic-gate 	case SI86DSCR:		str = "SI86DSCR";	break;
17567c478bd9Sstevel@tonic-gate 	case RDUBLK:		str = "RDUBLK";		break;
17577c478bd9Sstevel@tonic-gate /* NFA entry point */
17587c478bd9Sstevel@tonic-gate 	case SI86NFA:		str = "SI86NFA";	break;
17597c478bd9Sstevel@tonic-gate 	case SI86VM86:		str = "SI86VM86";	break;
17607c478bd9Sstevel@tonic-gate 	case SI86VMENABLE:	str = "SI86VMENABLE";	break;
17617c478bd9Sstevel@tonic-gate 	case SI86LIMUSER:	str = "SI86LIMUSER";	break;
17627c478bd9Sstevel@tonic-gate 	case SI86RDID: 		str = "SI86RDID";	break;
17637c478bd9Sstevel@tonic-gate 	case SI86RDBOOT:	str = "SI86RDBOOT";	break;
17647c478bd9Sstevel@tonic-gate /* Merged Product defines */
17657c478bd9Sstevel@tonic-gate 	case SI86SHFIL:		str = "SI86SHFIL";	break;
17667c478bd9Sstevel@tonic-gate 	case SI86PCHRGN:	str = "SI86PCHRGN";	break;
17677c478bd9Sstevel@tonic-gate 	case SI86BADVISE:	str = "SI86BADVISE";	break;
17687c478bd9Sstevel@tonic-gate 	case SI86SHRGN:		str = "SI86SHRGN";	break;
17697c478bd9Sstevel@tonic-gate 	case SI86CHIDT:		str = "SI86CHIDT";	break;
17707c478bd9Sstevel@tonic-gate 	case SI86EMULRDA: 	str = "SI86EMULRDA";	break;
17714be06494SDan Price /* RTC commands */
17724be06494SDan Price 	case WTODC:		str = "WTODC";		break;
17734be06494SDan Price 	case SGMTL:		str = "SGMTL";		break;
17744be06494SDan Price 	case GGMTL:		str = "GGMTL";		break;
17754be06494SDan Price 	case RTCSYNC:		str = "RTCSYNC";	break;
17767c478bd9Sstevel@tonic-gate 	}
17777c478bd9Sstevel@tonic-gate #endif /* __i386 */
17787c478bd9Sstevel@tonic-gate 
17797c478bd9Sstevel@tonic-gate 	return (str);
17807c478bd9Sstevel@tonic-gate }
17817c478bd9Sstevel@tonic-gate 
17827c478bd9Sstevel@tonic-gate const char *
17837c478bd9Sstevel@tonic-gate utscode(int code)
17847c478bd9Sstevel@tonic-gate {
17857c478bd9Sstevel@tonic-gate 	const char *str = NULL;
17867c478bd9Sstevel@tonic-gate 
17877c478bd9Sstevel@tonic-gate 	switch (code) {
17887c478bd9Sstevel@tonic-gate 	case UTS_UNAME:		str = "UNAME";	break;
17897c478bd9Sstevel@tonic-gate 	case UTS_USTAT:		str = "USTAT";	break;
17907c478bd9Sstevel@tonic-gate 	case UTS_FUSERS:	str = "FUSERS";	break;
17917c478bd9Sstevel@tonic-gate 	}
17927c478bd9Sstevel@tonic-gate 
17937c478bd9Sstevel@tonic-gate 	return (str);
17947c478bd9Sstevel@tonic-gate }
17957c478bd9Sstevel@tonic-gate 
17967c478bd9Sstevel@tonic-gate const char *
1797aa4a4f3bSnf202958 rctlsyscode(int code)
1798aa4a4f3bSnf202958 {
1799aa4a4f3bSnf202958 	const char *str = NULL;
1800aa4a4f3bSnf202958 	switch (code) {
1801aa4a4f3bSnf202958 	case 0:		str = "GETRCTL";	break;
1802aa4a4f3bSnf202958 	case 1:		str = "SETRCTL";	break;
1803aa4a4f3bSnf202958 	case 2:		str = "RCTLSYS_LST";	break;
1804aa4a4f3bSnf202958 	case 3:		str = "RCTLSYS_CTL";	break;
1805532877c4Srd117015 	case 4:		str = "RCTLSYS_SETPROJ";	break;
1806aa4a4f3bSnf202958 	default:	str = "UNKNOWN";	break;
1807aa4a4f3bSnf202958 	}
1808aa4a4f3bSnf202958 	return (str);
1809aa4a4f3bSnf202958 }
1810aa4a4f3bSnf202958 
1811aa4a4f3bSnf202958 const char *
1812aa4a4f3bSnf202958 rctl_local_action(private_t *pri, uint_t val)
1813aa4a4f3bSnf202958 {
1814aa4a4f3bSnf202958 	uint_t action = val & (~RCTL_LOCAL_ACTION_MASK);
1815aa4a4f3bSnf202958 
1816aa4a4f3bSnf202958 	char *s = pri->code_buf;
1817aa4a4f3bSnf202958 
1818aa4a4f3bSnf202958 	*s = '\0';
1819aa4a4f3bSnf202958 
1820aa4a4f3bSnf202958 	if (action & RCTL_LOCAL_NOACTION) {
1821aa4a4f3bSnf202958 		action ^= RCTL_LOCAL_NOACTION;
1822aa4a4f3bSnf202958 		(void) strlcat(s, "|RCTL_LOCAL_NOACTION",
1823aa4a4f3bSnf202958 		    sizeof (pri->code_buf));
1824aa4a4f3bSnf202958 	}
1825aa4a4f3bSnf202958 	if (action & RCTL_LOCAL_SIGNAL) {
1826aa4a4f3bSnf202958 		action ^= RCTL_LOCAL_SIGNAL;
1827aa4a4f3bSnf202958 		(void) strlcat(s, "|RCTL_LOCAL_SIGNAL",
1828aa4a4f3bSnf202958 		    sizeof (pri->code_buf));
1829aa4a4f3bSnf202958 	}
1830aa4a4f3bSnf202958 	if (action & RCTL_LOCAL_DENY) {
1831aa4a4f3bSnf202958 		action ^= RCTL_LOCAL_DENY;
1832aa4a4f3bSnf202958 		(void) strlcat(s, "|RCTL_LOCAL_DENY",
1833aa4a4f3bSnf202958 		    sizeof (pri->code_buf));
1834aa4a4f3bSnf202958 	}
1835aa4a4f3bSnf202958 
1836aa4a4f3bSnf202958 	if ((action & (~RCTL_LOCAL_ACTION_MASK)) != 0)
1837aa4a4f3bSnf202958 		return (NULL);
1838aa4a4f3bSnf202958 	else if (*s != '\0')
1839aa4a4f3bSnf202958 		return (s+1);
1840aa4a4f3bSnf202958 	else
1841aa4a4f3bSnf202958 		return (NULL);
1842aa4a4f3bSnf202958 }
1843aa4a4f3bSnf202958 
1844aa4a4f3bSnf202958 
1845aa4a4f3bSnf202958 const char *
1846aa4a4f3bSnf202958 rctl_local_flags(private_t *pri, uint_t val)
1847aa4a4f3bSnf202958 {
1848aa4a4f3bSnf202958 	uint_t pval = val & RCTL_LOCAL_ACTION_MASK;
1849aa4a4f3bSnf202958 	char *s = pri->code_buf;
1850aa4a4f3bSnf202958 
1851aa4a4f3bSnf202958 	*s = '\0';
1852aa4a4f3bSnf202958 
1853aa4a4f3bSnf202958 	if (pval & RCTL_LOCAL_MAXIMAL) {
1854aa4a4f3bSnf202958 		pval ^= RCTL_LOCAL_MAXIMAL;
1855aa4a4f3bSnf202958 		(void) strlcat(s, "|RCTL_LOCAL_MAXIMAL",
1856aa4a4f3bSnf202958 		    sizeof (pri->code_buf));
1857aa4a4f3bSnf202958 	}
1858aa4a4f3bSnf202958 
1859aa4a4f3bSnf202958 	if ((pval & RCTL_LOCAL_ACTION_MASK) != 0)
1860aa4a4f3bSnf202958 		return (NULL);
1861aa4a4f3bSnf202958 	else if (*s != '\0')
1862aa4a4f3bSnf202958 		return (s+1);
1863aa4a4f3bSnf202958 	else
1864aa4a4f3bSnf202958 		return (NULL);
1865aa4a4f3bSnf202958 }
1866aa4a4f3bSnf202958 
1867aa4a4f3bSnf202958 
1868aa4a4f3bSnf202958 const char *
18697c478bd9Sstevel@tonic-gate sconfname(int code)
18707c478bd9Sstevel@tonic-gate {
18717c478bd9Sstevel@tonic-gate 	const char *str = NULL;
18727c478bd9Sstevel@tonic-gate 
18737c478bd9Sstevel@tonic-gate 	if (code >= SCONFMIN && code <= SCONFMAX)
18747c478bd9Sstevel@tonic-gate 		str = SCONFname[code-SCONFMIN];
18757c478bd9Sstevel@tonic-gate 	return (str);
18767c478bd9Sstevel@tonic-gate }
18777c478bd9Sstevel@tonic-gate 
18787c478bd9Sstevel@tonic-gate const char *
18797c478bd9Sstevel@tonic-gate pathconfname(int code)
18807c478bd9Sstevel@tonic-gate {
18817c478bd9Sstevel@tonic-gate 	const char *str = NULL;
18827c478bd9Sstevel@tonic-gate 
18837c478bd9Sstevel@tonic-gate 	if (code >= PATHCONFMIN && code <= PATHCONFMAX)
18847c478bd9Sstevel@tonic-gate 		str = PATHCONFname[code-PATHCONFMIN];
18857c478bd9Sstevel@tonic-gate 	return (str);
18867c478bd9Sstevel@tonic-gate }
18877c478bd9Sstevel@tonic-gate 
18887c478bd9Sstevel@tonic-gate #define	ALL_O_FLAGS \
18897c478bd9Sstevel@tonic-gate 	(O_NDELAY|O_APPEND|O_SYNC|O_DSYNC|O_NONBLOCK|O_CREAT|O_TRUNC\
18908fd04b83SRoger A. Faulkner 	|O_EXCL|O_NOCTTY|O_LARGEFILE|O_RSYNC|O_XATTR|O_NOFOLLOW|O_NOLINKS\
18918fd04b83SRoger A. Faulkner 	|FXATTRDIROPEN)
18927c478bd9Sstevel@tonic-gate 
18937c478bd9Sstevel@tonic-gate const char *
18947c478bd9Sstevel@tonic-gate openarg(private_t *pri, int arg)
18957c478bd9Sstevel@tonic-gate {
18967c478bd9Sstevel@tonic-gate 	char *str = pri->code_buf;
18977c478bd9Sstevel@tonic-gate 
18987c478bd9Sstevel@tonic-gate 	switch (arg & ~ALL_O_FLAGS) {
18997c478bd9Sstevel@tonic-gate 	default:
19007c478bd9Sstevel@tonic-gate 		return ((char *)NULL);
19017c478bd9Sstevel@tonic-gate 	case O_RDONLY:
19027c478bd9Sstevel@tonic-gate 		(void) strcpy(str, "O_RDONLY");
19037c478bd9Sstevel@tonic-gate 		break;
19047c478bd9Sstevel@tonic-gate 	case O_WRONLY:
19057c478bd9Sstevel@tonic-gate 		(void) strcpy(str, "O_WRONLY");
19067c478bd9Sstevel@tonic-gate 		break;
19077c478bd9Sstevel@tonic-gate 	case O_RDWR:
19087c478bd9Sstevel@tonic-gate 		(void) strcpy(str, "O_RDWR");
19097c478bd9Sstevel@tonic-gate 		break;
19107c478bd9Sstevel@tonic-gate 	}
19117c478bd9Sstevel@tonic-gate 
19127c478bd9Sstevel@tonic-gate 	if (arg & O_NDELAY)
19137c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_NDELAY", sizeof (pri->code_buf));
19147c478bd9Sstevel@tonic-gate 	if (arg & O_APPEND)
19157c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_APPEND", sizeof (pri->code_buf));
19167c478bd9Sstevel@tonic-gate 	if (arg & O_SYNC)
19177c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_SYNC", sizeof (pri->code_buf));
19187c478bd9Sstevel@tonic-gate 	if (arg & O_DSYNC)
19197c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_DSYNC", sizeof (pri->code_buf));
19207c478bd9Sstevel@tonic-gate 	if (arg & O_NONBLOCK)
19217c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_NONBLOCK", sizeof (pri->code_buf));
19227c478bd9Sstevel@tonic-gate 	if (arg & O_CREAT)
19237c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_CREAT", sizeof (pri->code_buf));
19247c478bd9Sstevel@tonic-gate 	if (arg & O_TRUNC)
19257c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_TRUNC", sizeof (pri->code_buf));
19267c478bd9Sstevel@tonic-gate 	if (arg & O_EXCL)
19277c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_EXCL", sizeof (pri->code_buf));
19287c478bd9Sstevel@tonic-gate 	if (arg & O_NOCTTY)
19297c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_NOCTTY", sizeof (pri->code_buf));
19307c478bd9Sstevel@tonic-gate 	if (arg & O_LARGEFILE)
19317c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_LARGEFILE", sizeof (pri->code_buf));
19327c478bd9Sstevel@tonic-gate 	if (arg & O_RSYNC)
19337c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_RSYNC", sizeof (pri->code_buf));
19347c478bd9Sstevel@tonic-gate 	if (arg & O_XATTR)
19357c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_XATTR", sizeof (pri->code_buf));
19367c478bd9Sstevel@tonic-gate 	if (arg & O_NOFOLLOW)
19377c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_NOFOLLOW", sizeof (pri->code_buf));
19387c478bd9Sstevel@tonic-gate 	if (arg & O_NOLINKS)
19397c478bd9Sstevel@tonic-gate 		(void) strlcat(str, "|O_NOLINKS", sizeof (pri->code_buf));
19408fd04b83SRoger A. Faulkner 	if (arg & FXATTRDIROPEN)
19418fd04b83SRoger A. Faulkner 		(void) strlcat(str, "|FXATTRDIROPEN", sizeof (pri->code_buf));
19427c478bd9Sstevel@tonic-gate 
19437c478bd9Sstevel@tonic-gate 	return ((const char *)str);
19447c478bd9Sstevel@tonic-gate }
19457c478bd9Sstevel@tonic-gate 
19467c478bd9Sstevel@tonic-gate const char *
19477c478bd9Sstevel@tonic-gate whencearg(int arg)
19487c478bd9Sstevel@tonic-gate {
19497c478bd9Sstevel@tonic-gate 	const char *str = NULL;
19507c478bd9Sstevel@tonic-gate 
19517c478bd9Sstevel@tonic-gate 	switch (arg) {
19527c478bd9Sstevel@tonic-gate 	case SEEK_SET:	str = "SEEK_SET";	break;
19537c478bd9Sstevel@tonic-gate 	case SEEK_CUR:	str = "SEEK_CUR";	break;
19547c478bd9Sstevel@tonic-gate 	case SEEK_END:	str = "SEEK_END";	break;
19557c478bd9Sstevel@tonic-gate 	case SEEK_DATA:	str = "SEEK_DATA";	break;
19567c478bd9Sstevel@tonic-gate 	case SEEK_HOLE:	str = "SEEK_HOLE";	break;
19577c478bd9Sstevel@tonic-gate 	}
19587c478bd9Sstevel@tonic-gate 
19597c478bd9Sstevel@tonic-gate 	return (str);
19607c478bd9Sstevel@tonic-gate }
19617c478bd9Sstevel@tonic-gate 
19627c478bd9Sstevel@tonic-gate #define	IPC_FLAGS	(IPC_ALLOC|IPC_CREAT|IPC_EXCL|IPC_NOWAIT)
19637c478bd9Sstevel@tonic-gate 
19647c478bd9Sstevel@tonic-gate char *
19657c478bd9Sstevel@tonic-gate ipcflags(private_t *pri, int arg)
19667c478bd9Sstevel@tonic-gate {
19677c478bd9Sstevel@tonic-gate 	char *str = pri->code_buf;
19687c478bd9Sstevel@tonic-gate 
19697c478bd9Sstevel@tonic-gate 	if (arg & 0777)
19707c478bd9Sstevel@tonic-gate 		(void) sprintf(str, "0%.3o", arg&0777);
19717c478bd9Sstevel@tonic-gate 	else
19727c478bd9Sstevel@tonic-gate 		*str = '\0';
19737c478bd9Sstevel@tonic-gate 
19747c478bd9Sstevel@tonic-gate 	if (arg & IPC_ALLOC)
19757c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|IPC_ALLOC");
19767c478bd9Sstevel@tonic-gate 	if (arg & IPC_CREAT)
19777c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|IPC_CREAT");
19787c478bd9Sstevel@tonic-gate 	if (arg & IPC_EXCL)
19797c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|IPC_EXCL");
19807c478bd9Sstevel@tonic-gate 	if (arg & IPC_NOWAIT)
19817c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|IPC_NOWAIT");
19827c478bd9Sstevel@tonic-gate 
19837c478bd9Sstevel@tonic-gate 	return (str);
19847c478bd9Sstevel@tonic-gate }
19857c478bd9Sstevel@tonic-gate 
19867c478bd9Sstevel@tonic-gate const char *
19877c478bd9Sstevel@tonic-gate msgflags(private_t *pri, int arg)
19887c478bd9Sstevel@tonic-gate {
19897c478bd9Sstevel@tonic-gate 	char *str;
19907c478bd9Sstevel@tonic-gate 
19917c478bd9Sstevel@tonic-gate 	if (arg == 0 || (arg & ~(IPC_FLAGS|MSG_NOERROR|0777)) != 0)
19927c478bd9Sstevel@tonic-gate 		return ((char *)NULL);
19937c478bd9Sstevel@tonic-gate 
19947c478bd9Sstevel@tonic-gate 	str = ipcflags(pri, arg);
19957c478bd9Sstevel@tonic-gate 
19967c478bd9Sstevel@tonic-gate 	if (arg & MSG_NOERROR)
19977c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|MSG_NOERROR");
19987c478bd9Sstevel@tonic-gate 
19997c478bd9Sstevel@tonic-gate 	if (*str == '|')
20007c478bd9Sstevel@tonic-gate 		str++;
20017c478bd9Sstevel@tonic-gate 	return ((const char *)str);
20027c478bd9Sstevel@tonic-gate }
20037c478bd9Sstevel@tonic-gate 
20047c478bd9Sstevel@tonic-gate const char *
20057c478bd9Sstevel@tonic-gate semflags(private_t *pri, int arg)
20067c478bd9Sstevel@tonic-gate {
20077c478bd9Sstevel@tonic-gate 	char *str;
20087c478bd9Sstevel@tonic-gate 
20097c478bd9Sstevel@tonic-gate 	if (arg == 0 || (arg & ~(IPC_FLAGS|SEM_UNDO|0777)) != 0)
20107c478bd9Sstevel@tonic-gate 		return ((char *)NULL);
20117c478bd9Sstevel@tonic-gate 
20127c478bd9Sstevel@tonic-gate 	str = ipcflags(pri, arg);
20137c478bd9Sstevel@tonic-gate 
20147c478bd9Sstevel@tonic-gate 	if (arg & SEM_UNDO)
20157c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|SEM_UNDO");
20167c478bd9Sstevel@tonic-gate 
20177c478bd9Sstevel@tonic-gate 	if (*str == '|')
20187c478bd9Sstevel@tonic-gate 		str++;
20197c478bd9Sstevel@tonic-gate 	return ((const char *)str);
20207c478bd9Sstevel@tonic-gate }
20217c478bd9Sstevel@tonic-gate 
20227c478bd9Sstevel@tonic-gate const char *
20237c478bd9Sstevel@tonic-gate shmflags(private_t *pri, int arg)
20247c478bd9Sstevel@tonic-gate {
20257c478bd9Sstevel@tonic-gate 	char *str;
20267c478bd9Sstevel@tonic-gate 
20277c478bd9Sstevel@tonic-gate 	if (arg == 0 || (arg & ~(IPC_FLAGS|SHM_RDONLY|SHM_RND|0777)) != 0)
20287c478bd9Sstevel@tonic-gate 		return ((char *)NULL);
20297c478bd9Sstevel@tonic-gate 
20307c478bd9Sstevel@tonic-gate 	str = ipcflags(pri, arg);
20317c478bd9Sstevel@tonic-gate 
20327c478bd9Sstevel@tonic-gate 	if (arg & SHM_RDONLY)
20337c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|SHM_RDONLY");
20347c478bd9Sstevel@tonic-gate 	if (arg & SHM_RND)
20357c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|SHM_RND");
20367c478bd9Sstevel@tonic-gate 
20377c478bd9Sstevel@tonic-gate 	if (*str == '|')
20387c478bd9Sstevel@tonic-gate 		str++;
20397c478bd9Sstevel@tonic-gate 	return ((const char *)str);
20407c478bd9Sstevel@tonic-gate }
20417c478bd9Sstevel@tonic-gate 
20427c478bd9Sstevel@tonic-gate #define	MSGCMDMIN	0
20437c478bd9Sstevel@tonic-gate #define	MSGCMDMAX	IPC_STAT64
20447c478bd9Sstevel@tonic-gate const char *const MSGCMDname[MSGCMDMAX+1] = {
20457c478bd9Sstevel@tonic-gate 	NULL, NULL, NULL, NULL, NULL,
20467c478bd9Sstevel@tonic-gate 	NULL, NULL, NULL, NULL, NULL,
20477c478bd9Sstevel@tonic-gate 	"IPC_RMID",	/* 10 */
20487c478bd9Sstevel@tonic-gate 	"IPC_SET",	/* 11 */
20497c478bd9Sstevel@tonic-gate 	"IPC_STAT",	/* 12 */
20507c478bd9Sstevel@tonic-gate 	"IPC_SET64",	/* 13 */
20517c478bd9Sstevel@tonic-gate 	"IPC_STAT64",	/* 14 */
20527c478bd9Sstevel@tonic-gate };
20537c478bd9Sstevel@tonic-gate 
20547c478bd9Sstevel@tonic-gate #define	SEMCMDMIN	0
20557c478bd9Sstevel@tonic-gate #define	SEMCMDMAX	IPC_STAT64
20567c478bd9Sstevel@tonic-gate const char *const SEMCMDname[SEMCMDMAX+1] = {
20577c478bd9Sstevel@tonic-gate 	NULL,		/* 0 */
20587c478bd9Sstevel@tonic-gate 	NULL,		/* 1 */
20597c478bd9Sstevel@tonic-gate 	NULL,		/* 2 */
20607c478bd9Sstevel@tonic-gate 	"GETNCNT",	/* 3 */
20617c478bd9Sstevel@tonic-gate 	"GETPID",	/* 4 */
20627c478bd9Sstevel@tonic-gate 	"GETVAL",	/* 5 */
20637c478bd9Sstevel@tonic-gate 	"GETALL",	/* 6 */
20647c478bd9Sstevel@tonic-gate 	"GETZCNT",	/* 7 */
20657c478bd9Sstevel@tonic-gate 	"SETVAL",	/* 8 */
20667c478bd9Sstevel@tonic-gate 	"SETALL",	/* 9 */
20677c478bd9Sstevel@tonic-gate 	"IPC_RMID",	/* 10 */
20687c478bd9Sstevel@tonic-gate 	"IPC_SET",	/* 11 */
20697c478bd9Sstevel@tonic-gate 	"IPC_STAT",	/* 12 */
20707c478bd9Sstevel@tonic-gate 	"IPC_SET64",	/* 13 */
20717c478bd9Sstevel@tonic-gate 	"IPC_STAT64",	/* 14 */
20727c478bd9Sstevel@tonic-gate };
20737c478bd9Sstevel@tonic-gate 
20747c478bd9Sstevel@tonic-gate #define	SHMCMDMIN	0
20757c478bd9Sstevel@tonic-gate #define	SHMCMDMAX	IPC_STAT64
20767c478bd9Sstevel@tonic-gate const char *const SHMCMDname[SHMCMDMAX+1] = {
20777c478bd9Sstevel@tonic-gate 	NULL,		/* 0 */
20787c478bd9Sstevel@tonic-gate 	NULL,		/* 1 */
20797c478bd9Sstevel@tonic-gate 	NULL,		/* 2 */
20807c478bd9Sstevel@tonic-gate 	"SHM_LOCK",	/* 3 */
20817c478bd9Sstevel@tonic-gate 	"SHM_UNLOCK",	/* 4 */
20827c478bd9Sstevel@tonic-gate 	NULL, NULL, NULL, NULL, NULL,			/* 5 NULLs */
20837c478bd9Sstevel@tonic-gate 	"IPC_RMID",	/* 10 */
20847c478bd9Sstevel@tonic-gate 	"IPC_SET",	/* 11 */
20857c478bd9Sstevel@tonic-gate 	"IPC_STAT",	/* 12 */
20867c478bd9Sstevel@tonic-gate 	"IPC_SET64",	/* 13 */
20877c478bd9Sstevel@tonic-gate 	"IPC_STAT64",	/* 14 */
20887c478bd9Sstevel@tonic-gate };
20897c478bd9Sstevel@tonic-gate 
20907c478bd9Sstevel@tonic-gate const char *
20917c478bd9Sstevel@tonic-gate msgcmd(int arg)
20927c478bd9Sstevel@tonic-gate {
20937c478bd9Sstevel@tonic-gate 	const char *str = NULL;
20947c478bd9Sstevel@tonic-gate 
20957c478bd9Sstevel@tonic-gate 	if (arg >= MSGCMDMIN && arg <= MSGCMDMAX)
20967c478bd9Sstevel@tonic-gate 		str = MSGCMDname[arg-MSGCMDMIN];
20977c478bd9Sstevel@tonic-gate 	return (str);
20987c478bd9Sstevel@tonic-gate }
20997c478bd9Sstevel@tonic-gate 
21007c478bd9Sstevel@tonic-gate const char *
21017c478bd9Sstevel@tonic-gate semcmd(int arg)
21027c478bd9Sstevel@tonic-gate {
21037c478bd9Sstevel@tonic-gate 	const char *str = NULL;
21047c478bd9Sstevel@tonic-gate 
21057c478bd9Sstevel@tonic-gate 	if (arg >= SEMCMDMIN && arg <= SEMCMDMAX)
21067c478bd9Sstevel@tonic-gate 		str = SEMCMDname[arg-SEMCMDMIN];
21077c478bd9Sstevel@tonic-gate 	return (str);
21087c478bd9Sstevel@tonic-gate }
21097c478bd9Sstevel@tonic-gate 
21107c478bd9Sstevel@tonic-gate const char *
21117c478bd9Sstevel@tonic-gate shmcmd(int arg)
21127c478bd9Sstevel@tonic-gate {
21137c478bd9Sstevel@tonic-gate 	const char *str = NULL;
21147c478bd9Sstevel@tonic-gate 
21157c478bd9Sstevel@tonic-gate 	if (arg >= SHMCMDMIN && arg <= SHMCMDMAX)
21167c478bd9Sstevel@tonic-gate 		str = SHMCMDname[arg-SHMCMDMIN];
21177c478bd9Sstevel@tonic-gate 	return (str);
21187c478bd9Sstevel@tonic-gate }
21197c478bd9Sstevel@tonic-gate 
21207c478bd9Sstevel@tonic-gate const char *
21217c478bd9Sstevel@tonic-gate strrdopt(int arg)	/* streams read option (I_SRDOPT I_GRDOPT) */
21227c478bd9Sstevel@tonic-gate {
21237c478bd9Sstevel@tonic-gate 	const char *str = NULL;
21247c478bd9Sstevel@tonic-gate 
21257c478bd9Sstevel@tonic-gate 	switch (arg) {
21267c478bd9Sstevel@tonic-gate 	case RNORM:	str = "RNORM";		break;
21277c478bd9Sstevel@tonic-gate 	case RMSGD:	str = "RMSGD";		break;
21287c478bd9Sstevel@tonic-gate 	case RMSGN:	str = "RMSGN";		break;
21297c478bd9Sstevel@tonic-gate 	}
21307c478bd9Sstevel@tonic-gate 
21317c478bd9Sstevel@tonic-gate 	return (str);
21327c478bd9Sstevel@tonic-gate }
21337c478bd9Sstevel@tonic-gate 
21347c478bd9Sstevel@tonic-gate /* bit map of streams events (I_SETSIG & I_GETSIG) */
21357c478bd9Sstevel@tonic-gate const char *
21367c478bd9Sstevel@tonic-gate strevents(private_t *pri, int arg)
21377c478bd9Sstevel@tonic-gate {
21387c478bd9Sstevel@tonic-gate 	char *str = pri->code_buf;
21397c478bd9Sstevel@tonic-gate 
21407c478bd9Sstevel@tonic-gate 	if (arg & ~(S_INPUT|S_HIPRI|S_OUTPUT|S_MSG|S_ERROR|S_HANGUP))
21417c478bd9Sstevel@tonic-gate 		return ((char *)NULL);
21427c478bd9Sstevel@tonic-gate 
21437c478bd9Sstevel@tonic-gate 	*str = '\0';
21447c478bd9Sstevel@tonic-gate 	if (arg & S_INPUT)
21457c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|S_INPUT");
21467c478bd9Sstevel@tonic-gate 	if (arg & S_HIPRI)
21477c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|S_HIPRI");
21487c478bd9Sstevel@tonic-gate 	if (arg & S_OUTPUT)
21497c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|S_OUTPUT");
21507c478bd9Sstevel@tonic-gate 	if (arg & S_MSG)
21517c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|S_MSG");
21527c478bd9Sstevel@tonic-gate 	if (arg & S_ERROR)
21537c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|S_ERROR");
21547c478bd9Sstevel@tonic-gate 	if (arg & S_HANGUP)
21557c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|S_HANGUP");
21567c478bd9Sstevel@tonic-gate 
21577c478bd9Sstevel@tonic-gate 	return ((const char *)(str+1));
21587c478bd9Sstevel@tonic-gate }
21597c478bd9Sstevel@tonic-gate 
21607c478bd9Sstevel@tonic-gate const char *
21617c478bd9Sstevel@tonic-gate tiocflush(private_t *pri, int arg)	/* bit map passsed by TIOCFLUSH */
21627c478bd9Sstevel@tonic-gate {
21637c478bd9Sstevel@tonic-gate 	char *str = pri->code_buf;
21647c478bd9Sstevel@tonic-gate 
21657c478bd9Sstevel@tonic-gate 	if (arg & ~(FREAD|FWRITE))
21667c478bd9Sstevel@tonic-gate 		return ((char *)NULL);
21677c478bd9Sstevel@tonic-gate 
21687c478bd9Sstevel@tonic-gate 	*str = '\0';
21697c478bd9Sstevel@tonic-gate 	if (arg & FREAD)
21707c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|FREAD");
21717c478bd9Sstevel@tonic-gate 	if (arg & FWRITE)
21727c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|FWRITE");
21737c478bd9Sstevel@tonic-gate 
21747c478bd9Sstevel@tonic-gate 	return ((const char *)(str+1));
21757c478bd9Sstevel@tonic-gate }
21767c478bd9Sstevel@tonic-gate 
21777c478bd9Sstevel@tonic-gate const char *
21787c478bd9Sstevel@tonic-gate strflush(int arg)	/* streams flush option (I_FLUSH) */
21797c478bd9Sstevel@tonic-gate {
21807c478bd9Sstevel@tonic-gate 	const char *str = NULL;
21817c478bd9Sstevel@tonic-gate 
21827c478bd9Sstevel@tonic-gate 	switch (arg) {
21837c478bd9Sstevel@tonic-gate 	case FLUSHR:	str = "FLUSHR";		break;
21847c478bd9Sstevel@tonic-gate 	case FLUSHW:	str = "FLUSHW";		break;
21857c478bd9Sstevel@tonic-gate 	case FLUSHRW:	str = "FLUSHRW";	break;
21867c478bd9Sstevel@tonic-gate 	}
21877c478bd9Sstevel@tonic-gate 
21887c478bd9Sstevel@tonic-gate 	return (str);
21897c478bd9Sstevel@tonic-gate }
21907c478bd9Sstevel@tonic-gate 
21917c478bd9Sstevel@tonic-gate #define	ALL_MOUNT_FLAGS	(MS_RDONLY|MS_FSS|MS_DATA|MS_NOSUID|MS_REMOUNT| \
21927c478bd9Sstevel@tonic-gate 	MS_NOTRUNC|MS_OVERLAY|MS_OPTIONSTR|MS_GLOBAL|MS_FORCE|MS_NOMNTTAB)
21937c478bd9Sstevel@tonic-gate 
21947c478bd9Sstevel@tonic-gate const char *
21957c478bd9Sstevel@tonic-gate mountflags(private_t *pri, int arg)	/* bit map of mount syscall flags */
21967c478bd9Sstevel@tonic-gate {
21977c478bd9Sstevel@tonic-gate 	char *str = pri->code_buf;
21987c478bd9Sstevel@tonic-gate 	size_t used = 0;
21997c478bd9Sstevel@tonic-gate 
22007c478bd9Sstevel@tonic-gate 	if (arg & ~ALL_MOUNT_FLAGS)
22017c478bd9Sstevel@tonic-gate 		return ((char *)NULL);
22027c478bd9Sstevel@tonic-gate 
22037c478bd9Sstevel@tonic-gate 	*str = '\0';
22047c478bd9Sstevel@tonic-gate 	if (arg & MS_RDONLY)
22057c478bd9Sstevel@tonic-gate 		used = strlcat(str, "|MS_RDONLY", sizeof (pri->code_buf));
22067c478bd9Sstevel@tonic-gate 	if (arg & MS_FSS)
22077c478bd9Sstevel@tonic-gate 		used = strlcat(str, "|MS_FSS", sizeof (pri->code_buf));
22087c478bd9Sstevel@tonic-gate 	if (arg & MS_DATA)
22097c478bd9Sstevel@tonic-gate 		used = strlcat(str, "|MS_DATA", sizeof (pri->code_buf));
22107c478bd9Sstevel@tonic-gate 	if (arg & MS_NOSUID)
22117c478bd9Sstevel@tonic-gate 		used = strlcat(str, "|MS_NOSUID", sizeof (pri->code_buf));
22127c478bd9Sstevel@tonic-gate 	if (arg & MS_REMOUNT)
22137c478bd9Sstevel@tonic-gate 		used = strlcat(str, "|MS_REMOUNT", sizeof (pri->code_buf));
22147c478bd9Sstevel@tonic-gate 	if (arg & MS_NOTRUNC)
22157c478bd9Sstevel@tonic-gate 		used = strlcat(str, "|MS_NOTRUNC", sizeof (pri->code_buf));
22167c478bd9Sstevel@tonic-gate 	if (arg & MS_OVERLAY)
22177c478bd9Sstevel@tonic-gate 		used = strlcat(str, "|MS_OVERLAY", sizeof (pri->code_buf));
22187c478bd9Sstevel@tonic-gate 	if (arg & MS_OPTIONSTR)
22197c478bd9Sstevel@tonic-gate 		used = strlcat(str, "|MS_OPTIONSTR", sizeof (pri->code_buf));
22207c478bd9Sstevel@tonic-gate 	if (arg & MS_GLOBAL)
22217c478bd9Sstevel@tonic-gate 		used = strlcat(str, "|MS_GLOBAL", sizeof (pri->code_buf));
22227c478bd9Sstevel@tonic-gate 	if (arg & MS_FORCE)
22237c478bd9Sstevel@tonic-gate 		used = strlcat(str, "|MS_FORCE", sizeof (pri->code_buf));
22247c478bd9Sstevel@tonic-gate 	if (arg & MS_NOMNTTAB)
22257c478bd9Sstevel@tonic-gate 		used = strlcat(str, "|MS_NOMNTTAB", sizeof (pri->code_buf));
22267c478bd9Sstevel@tonic-gate 
22277c478bd9Sstevel@tonic-gate 	if (used == 0 || used >= sizeof (pri->code_buf))
22287c478bd9Sstevel@tonic-gate 		return ((char *)NULL);			/* use prt_hex() */
22297c478bd9Sstevel@tonic-gate 
22307c478bd9Sstevel@tonic-gate 	return ((const char *)(str+1));
22317c478bd9Sstevel@tonic-gate }
22327c478bd9Sstevel@tonic-gate 
22337c478bd9Sstevel@tonic-gate const char *
22347c478bd9Sstevel@tonic-gate svfsflags(private_t *pri, ulong_t arg)	/* bit map of statvfs syscall flags */
22357c478bd9Sstevel@tonic-gate {
22367c478bd9Sstevel@tonic-gate 	char *str = pri->code_buf;
22377c478bd9Sstevel@tonic-gate 
22387c478bd9Sstevel@tonic-gate 	if (arg & ~(ST_RDONLY|ST_NOSUID|ST_NOTRUNC)) {
22397c478bd9Sstevel@tonic-gate 		(void) sprintf(str, "0x%lx", arg);
22407c478bd9Sstevel@tonic-gate 		return (str);
22417c478bd9Sstevel@tonic-gate 	}
22427c478bd9Sstevel@tonic-gate 	*str = '\0';
22437c478bd9Sstevel@tonic-gate 	if (arg & ST_RDONLY)
22447c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|ST_RDONLY");
22457c478bd9Sstevel@tonic-gate 	if (arg & ST_NOSUID)
22467c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|ST_NOSUID");
22477c478bd9Sstevel@tonic-gate 	if (arg & ST_NOTRUNC)
22487c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|ST_NOTRUNC");
22497c478bd9Sstevel@tonic-gate 	if (*str == '\0')
22507c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|0");
22517c478bd9Sstevel@tonic-gate 	return ((const char *)(str+1));
22527c478bd9Sstevel@tonic-gate }
22537c478bd9Sstevel@tonic-gate 
22547c478bd9Sstevel@tonic-gate const char *
22557c478bd9Sstevel@tonic-gate fuiname(int arg)	/* fusers() input argument */
22567c478bd9Sstevel@tonic-gate {
22577c478bd9Sstevel@tonic-gate 	const char *str = NULL;
22587c478bd9Sstevel@tonic-gate 
22597c478bd9Sstevel@tonic-gate 	switch (arg) {
22607c478bd9Sstevel@tonic-gate 	case F_FILE_ONLY:	str = "F_FILE_ONLY";		break;
22617c478bd9Sstevel@tonic-gate 	case F_CONTAINED:	str = "F_CONTAINED";		break;
22627c478bd9Sstevel@tonic-gate 	}
22637c478bd9Sstevel@tonic-gate 
22647c478bd9Sstevel@tonic-gate 	return (str);
22657c478bd9Sstevel@tonic-gate }
22667c478bd9Sstevel@tonic-gate 
22677c478bd9Sstevel@tonic-gate const char *
22687c478bd9Sstevel@tonic-gate fuflags(private_t *pri, int arg)	/* fusers() output flags */
22697c478bd9Sstevel@tonic-gate {
22707c478bd9Sstevel@tonic-gate 	char *str = pri->code_buf;
22717c478bd9Sstevel@tonic-gate 
22727c478bd9Sstevel@tonic-gate 	if (arg & ~(F_CDIR|F_RDIR|F_TEXT|F_MAP|F_OPEN|F_TRACE|F_TTY)) {
22737c478bd9Sstevel@tonic-gate 		(void) sprintf(str, "0x%x", arg);
22747c478bd9Sstevel@tonic-gate 		return (str);
22757c478bd9Sstevel@tonic-gate 	}
22767c478bd9Sstevel@tonic-gate 	*str = '\0';
22777c478bd9Sstevel@tonic-gate 	if (arg & F_CDIR)
22787c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|F_CDIR");
22797c478bd9Sstevel@tonic-gate 	if (arg & F_RDIR)
22807c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|F_RDIR");
22817c478bd9Sstevel@tonic-gate 	if (arg & F_TEXT)
22827c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|F_TEXT");
22837c478bd9Sstevel@tonic-gate 	if (arg & F_MAP)
22847c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|F_MAP");
22857c478bd9Sstevel@tonic-gate 	if (arg & F_OPEN)
22867c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|F_OPEN");
22877c478bd9Sstevel@tonic-gate 	if (arg & F_TRACE)
22887c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|F_TRACE");
22897c478bd9Sstevel@tonic-gate 	if (arg & F_TTY)
22907c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|F_TTY");
22917c478bd9Sstevel@tonic-gate 	if (*str == '\0')
22927c478bd9Sstevel@tonic-gate 		(void) strcat(str, "|0");
22937c478bd9Sstevel@tonic-gate 	return ((const char *)(str+1));
22947c478bd9Sstevel@tonic-gate }
22957c478bd9Sstevel@tonic-gate 
22967c478bd9Sstevel@tonic-gate 
22977c478bd9Sstevel@tonic-gate const char *
22987c478bd9Sstevel@tonic-gate ipprotos(int arg)	/* IP protocols cf. netinet/in.h */
22997c478bd9Sstevel@tonic-gate {
23007c478bd9Sstevel@tonic-gate 	switch (arg) {
23017c478bd9Sstevel@tonic-gate 	case IPPROTO_IP:	return ("IPPROTO_IP");
23027c478bd9Sstevel@tonic-gate 	case IPPROTO_ICMP:	return ("IPPROTO_ICMP");
23037c478bd9Sstevel@tonic-gate 	case IPPROTO_IGMP:	return ("IPPROTO_IGMP");
23047c478bd9Sstevel@tonic-gate 	case IPPROTO_GGP:	return ("IPPROTO_GGP");
23057c478bd9Sstevel@tonic-gate 	case IPPROTO_ENCAP:	return ("IPPROTO_ENCAP");
23067c478bd9Sstevel@tonic-gate 	case IPPROTO_TCP:	return ("IPPROTO_TCP");
23077c478bd9Sstevel@tonic-gate 	case IPPROTO_EGP:	return ("IPPROTO_EGP");
23087c478bd9Sstevel@tonic-gate 	case IPPROTO_PUP:	return ("IPPROTO_PUP");
23097c478bd9Sstevel@tonic-gate 	case IPPROTO_UDP:	return ("IPPROTO_UDP");
23107c478bd9Sstevel@tonic-gate 	case IPPROTO_IDP:	return ("IPPROTO_IDP");
23117c478bd9Sstevel@tonic-gate 	case IPPROTO_IPV6:	return ("IPPROTO_IPV6");
23127c478bd9Sstevel@tonic-gate 	case IPPROTO_ROUTING:	return ("IPPROTO_ROUTING");
23137c478bd9Sstevel@tonic-gate 	case IPPROTO_FRAGMENT:	return ("IPPROTO_FRAGMENT");
23147c478bd9Sstevel@tonic-gate 	case IPPROTO_RSVP:	return ("IPPROTO_RSVP");
23157c478bd9Sstevel@tonic-gate 	case IPPROTO_ESP:	return ("IPPROTO_ESP");
23167c478bd9Sstevel@tonic-gate 	case IPPROTO_AH:	return ("IPPROTO_AH");
23177c478bd9Sstevel@tonic-gate 	case IPPROTO_ICMPV6:	return ("IPPROTO_ICMPV6");
23187c478bd9Sstevel@tonic-gate 	case IPPROTO_NONE:	return ("IPPROTO_NONE");
23197c478bd9Sstevel@tonic-gate 	case IPPROTO_DSTOPTS:	return ("IPPROTO_DSTOPTS");
23207c478bd9Sstevel@tonic-gate 	case IPPROTO_HELLO:	return ("IPPROTO_HELLO");
23217c478bd9Sstevel@tonic-gate 	case IPPROTO_ND:	return ("IPPROTO_ND");
23227c478bd9Sstevel@tonic-gate 	case IPPROTO_EON:	return ("IPPROTO_EON");
23237c478bd9Sstevel@tonic-gate 	case IPPROTO_PIM:	return ("IPPROTO_PIM");
23247c478bd9Sstevel@tonic-gate 	case IPPROTO_SCTP:	return ("IPPROTO_SCTP");
23257c478bd9Sstevel@tonic-gate 	case IPPROTO_RAW:	return ("IPPROTO_RAW");
23267c478bd9Sstevel@tonic-gate 	default:		return (NULL);
23277c478bd9Sstevel@tonic-gate 	}
23287c478bd9Sstevel@tonic-gate }
2329