xref: /onnv-gate/usr/src/cmd/truss/codes.c (revision 10242)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
51544Seschrock  * Common Development and Distribution License (the "License").
61544Seschrock  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
228485SPeter.Memishian@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
270Sstevel@tonic-gate /*	  All Rights Reserved  	*/
280Sstevel@tonic-gate 
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #include <stdio.h>
310Sstevel@tonic-gate #include <stdlib.h>
320Sstevel@tonic-gate #include <unistd.h>
330Sstevel@tonic-gate #include <sys/types.h>
340Sstevel@tonic-gate #include <libproc.h>
350Sstevel@tonic-gate 
360Sstevel@tonic-gate #include <ctype.h>
370Sstevel@tonic-gate #include <string.h>
380Sstevel@tonic-gate #include <sys/dlpi.h>
390Sstevel@tonic-gate #include <sys/ipc.h>
400Sstevel@tonic-gate #include <sys/ipc_impl.h>
410Sstevel@tonic-gate #include <sys/msg.h>
420Sstevel@tonic-gate #include <sys/sem.h>
430Sstevel@tonic-gate #include <sys/shm.h>
440Sstevel@tonic-gate #include <sys/fstyp.h>
450Sstevel@tonic-gate #if defined(__i386) || defined(__amd64)
460Sstevel@tonic-gate #include <sys/sysi86.h>
470Sstevel@tonic-gate #endif /* __i386 */
480Sstevel@tonic-gate #include <sys/unistd.h>
490Sstevel@tonic-gate #include <sys/file.h>
500Sstevel@tonic-gate #include <sys/tiuser.h>
510Sstevel@tonic-gate #include <sys/timod.h>
520Sstevel@tonic-gate #include <sys/stream.h>
530Sstevel@tonic-gate #include <sys/stropts.h>
540Sstevel@tonic-gate #include <sys/termios.h>
550Sstevel@tonic-gate #include <sys/termiox.h>
560Sstevel@tonic-gate #include <sys/jioctl.h>
570Sstevel@tonic-gate #include <sys/filio.h>
580Sstevel@tonic-gate #include <fcntl.h>
590Sstevel@tonic-gate #include <sys/termio.h>
600Sstevel@tonic-gate #include <sys/stermio.h>
610Sstevel@tonic-gate #include <sys/ttold.h>
620Sstevel@tonic-gate #include <sys/lock.h>
630Sstevel@tonic-gate #include <sys/mount.h>
640Sstevel@tonic-gate #include <sys/utssys.h>
650Sstevel@tonic-gate #include <sys/sysconfig.h>
660Sstevel@tonic-gate #include <sys/statvfs.h>
670Sstevel@tonic-gate #include <sys/kstat.h>
680Sstevel@tonic-gate #include <sys/audio.h>
690Sstevel@tonic-gate #include <sys/mixer.h>
700Sstevel@tonic-gate #include <sys/cpc_impl.h>
710Sstevel@tonic-gate #include <sys/devpoll.h>
720Sstevel@tonic-gate #include <sys/strredir.h>
730Sstevel@tonic-gate #include <sys/sockio.h>
740Sstevel@tonic-gate #include <netinet/ip_mroute.h>
750Sstevel@tonic-gate #include <net/if.h>
760Sstevel@tonic-gate #include <net/if_arp.h>
770Sstevel@tonic-gate #include <sys/ptyvar.h>
780Sstevel@tonic-gate #include <sys/des.h>
790Sstevel@tonic-gate #include <sys/prnio.h>
800Sstevel@tonic-gate #include <sys/dtrace.h>
810Sstevel@tonic-gate #include <sys/crypto/ioctladmin.h>
820Sstevel@tonic-gate #include <sys/crypto/ioctl.h>
830Sstevel@tonic-gate #include <sys/kbio.h>
840Sstevel@tonic-gate #include <sys/ptms.h>
850Sstevel@tonic-gate #include <sys/aggr.h>
860Sstevel@tonic-gate #include <sys/dld.h>
879815SRishi.Srivatsavai@Sun.COM #include <net/simnet.h>
888275SEric Cheng #include <sys/vnic.h>
89789Sahrens #include <sys/fs/zfs.h>
901400Skrishna #include <inet/kssl/kssl.h>
916318Sedp #include <sys/dkio.h>
928863SEdward.Pilatowicz@Sun.COM #include <sys/fdio.h>
938863SEdward.Pilatowicz@Sun.COM #include <sys/cdio.h>
948863SEdward.Pilatowicz@Sun.COM #include <sys/scsi/impl/uscsi.h>
958863SEdward.Pilatowicz@Sun.COM #include <sys/devinfo_impl.h>
966318Sedp #include <sys/dumpadm.h>
976318Sedp #include <sys/mntio.h>
988770SJordan.Vaughan@Sun.com #include <sys/zcons.h>
9910153SAaron.Zang@Sun.COM #include <sys/usb/clients/hid/hid.h>
1000Sstevel@tonic-gate 
1010Sstevel@tonic-gate #include "ramdata.h"
1020Sstevel@tonic-gate #include "proto.h"
1030Sstevel@tonic-gate 
1040Sstevel@tonic-gate #define	FCNTLMIN	F_DUPFD
1058646Sdp@eng.sun.com #define	FCNTLMAX	F_BADFD
1060Sstevel@tonic-gate const char *const FCNTLname[] = {
1070Sstevel@tonic-gate 	"F_DUPFD",
1080Sstevel@tonic-gate 	"F_GETFD",
1090Sstevel@tonic-gate 	"F_SETFD",
1100Sstevel@tonic-gate 	"F_GETFL",
1110Sstevel@tonic-gate 	"F_SETFL",
1120Sstevel@tonic-gate 	"F_O_GETLK",
1130Sstevel@tonic-gate 	"F_SETLK",
1140Sstevel@tonic-gate 	"F_SETLKW",
1150Sstevel@tonic-gate 	"F_CHKFL",
1160Sstevel@tonic-gate 	"F_DUP2FD",
1170Sstevel@tonic-gate 	"F_ALLOCSP",
1180Sstevel@tonic-gate 	"F_FREESP",
1190Sstevel@tonic-gate 	NULL,		/* 12 */
1200Sstevel@tonic-gate 	NULL,		/* 13 */
1210Sstevel@tonic-gate 	"F_GETLK",
1220Sstevel@tonic-gate 	NULL,		/* 15 */
1230Sstevel@tonic-gate 	NULL,		/* 16 */
1240Sstevel@tonic-gate 	NULL,		/* 17 */
1250Sstevel@tonic-gate 	NULL,		/* 18 */
1260Sstevel@tonic-gate 	NULL,		/* 19 */
1270Sstevel@tonic-gate 	NULL,		/* 20 */
1280Sstevel@tonic-gate 	NULL,		/* 21 */
1290Sstevel@tonic-gate 	NULL,		/* 22 */
1300Sstevel@tonic-gate 	"F_GETOWN",
1310Sstevel@tonic-gate 	"F_SETOWN",
1320Sstevel@tonic-gate 	"F_REVOKE",
1330Sstevel@tonic-gate 	"F_HASREMOTELOCKS",
1340Sstevel@tonic-gate 	"F_FREESP64",
1350Sstevel@tonic-gate 	NULL,		/* 28 */
1360Sstevel@tonic-gate 	NULL,		/* 29 */
1370Sstevel@tonic-gate 	NULL,		/* 30 */
1380Sstevel@tonic-gate 	NULL,		/* 31 */
1390Sstevel@tonic-gate 	NULL,		/* 32 */
1400Sstevel@tonic-gate 	"F_GETLK64",
1410Sstevel@tonic-gate 	"F_SETLK64",
1420Sstevel@tonic-gate 	"F_SETLKW64",
1430Sstevel@tonic-gate 	NULL,		/* 36 */
1440Sstevel@tonic-gate 	NULL,		/* 37 */
1450Sstevel@tonic-gate 	NULL,		/* 38 */
1460Sstevel@tonic-gate 	NULL,		/* 39 */
1470Sstevel@tonic-gate 	"F_SHARE",
1480Sstevel@tonic-gate 	"F_UNSHARE",
1490Sstevel@tonic-gate 	"F_SETLK_NBMAND",
1500Sstevel@tonic-gate 	"F_SHARE_NBMAND",
1518646Sdp@eng.sun.com 	"F_SETLK64_NBMAND",
1528646Sdp@eng.sun.com 	NULL,		/* 45 */
1538646Sdp@eng.sun.com 	"F_BADFD"
1540Sstevel@tonic-gate };
1550Sstevel@tonic-gate 
1560Sstevel@tonic-gate #define	SYSFSMIN	GETFSIND
1570Sstevel@tonic-gate #define	SYSFSMAX	GETNFSTYP
1580Sstevel@tonic-gate const char *const SYSFSname[] = {
1590Sstevel@tonic-gate 	"GETFSIND",
1600Sstevel@tonic-gate 	"GETFSTYP",
1610Sstevel@tonic-gate 	"GETNFSTYP"
1620Sstevel@tonic-gate };
1630Sstevel@tonic-gate 
1640Sstevel@tonic-gate #define	PLOCKMIN	UNLOCK
1650Sstevel@tonic-gate #define	PLOCKMAX	DATLOCK
1660Sstevel@tonic-gate const char *const PLOCKname[] = {
1670Sstevel@tonic-gate 	"UNLOCK",
1680Sstevel@tonic-gate 	"PROCLOCK",
1690Sstevel@tonic-gate 	"TXTLOCK",
1700Sstevel@tonic-gate 	NULL,
1710Sstevel@tonic-gate 	"DATLOCK"
1720Sstevel@tonic-gate };
1730Sstevel@tonic-gate 
1740Sstevel@tonic-gate #define	SCONFMIN	_CONFIG_NGROUPS
1758646Sdp@eng.sun.com #define	SCONFMAX	_CONFIG_EPHID_MAX
1760Sstevel@tonic-gate const char *const SCONFname[] = {
1770Sstevel@tonic-gate 	"_CONFIG_NGROUPS",		/*  2 */
1780Sstevel@tonic-gate 	"_CONFIG_CHILD_MAX",		/*  3 */
1790Sstevel@tonic-gate 	"_CONFIG_OPEN_FILES",		/*  4 */
1800Sstevel@tonic-gate 	"_CONFIG_POSIX_VER",		/*  5 */
1810Sstevel@tonic-gate 	"_CONFIG_PAGESIZE",		/*  6 */
1820Sstevel@tonic-gate 	"_CONFIG_CLK_TCK",		/*  7 */
1830Sstevel@tonic-gate 	"_CONFIG_XOPEN_VER",		/*  8 */
1840Sstevel@tonic-gate 	"_CONFIG_HRESCLK_TCK",		/*  9 */
1850Sstevel@tonic-gate 	"_CONFIG_PROF_TCK",		/* 10 */
1860Sstevel@tonic-gate 	"_CONFIG_NPROC_CONF",		/* 11 */
1870Sstevel@tonic-gate 	"_CONFIG_NPROC_ONLN",		/* 12 */
1880Sstevel@tonic-gate 	"_CONFIG_AIO_LISTIO_MAX",	/* 13 */
1890Sstevel@tonic-gate 	"_CONFIG_AIO_MAX",		/* 14 */
1900Sstevel@tonic-gate 	"_CONFIG_AIO_PRIO_DELTA_MAX",	/* 15 */
1910Sstevel@tonic-gate 	"_CONFIG_DELAYTIMER_MAX",	/* 16 */
1920Sstevel@tonic-gate 	"_CONFIG_MQ_OPEN_MAX",		/* 17 */
1930Sstevel@tonic-gate 	"_CONFIG_MQ_PRIO_MAX",		/* 18 */
1940Sstevel@tonic-gate 	"_CONFIG_RTSIG_MAX",		/* 19 */
1950Sstevel@tonic-gate 	"_CONFIG_SEM_NSEMS_MAX",	/* 20 */
1960Sstevel@tonic-gate 	"_CONFIG_SEM_VALUE_MAX",	/* 21 */
1970Sstevel@tonic-gate 	"_CONFIG_SIGQUEUE_MAX",		/* 22 */
1980Sstevel@tonic-gate 	"_CONFIG_SIGRT_MIN",		/* 23 */
1990Sstevel@tonic-gate 	"_CONFIG_SIGRT_MAX",		/* 24 */
2000Sstevel@tonic-gate 	"_CONFIG_TIMER_MAX",		/* 25 */
2010Sstevel@tonic-gate 	"_CONFIG_PHYS_PAGES",		/* 26 */
2020Sstevel@tonic-gate 	"_CONFIG_AVPHYS_PAGES",		/* 27 */
2030Sstevel@tonic-gate 	"_CONFIG_COHERENCY",		/* 28 */
2040Sstevel@tonic-gate 	"_CONFIG_SPLIT_CACHE",		/* 29 */
2050Sstevel@tonic-gate 	"_CONFIG_ICACHESZ",		/* 30 */
2060Sstevel@tonic-gate 	"_CONFIG_DCACHESZ",		/* 31 */
2070Sstevel@tonic-gate 	"_CONFIG_ICACHELINESZ",		/* 32 */
2080Sstevel@tonic-gate 	"_CONFIG_DCACHELINESZ",		/* 33 */
2090Sstevel@tonic-gate 	"_CONFIG_ICACHEBLKSZ",		/* 34 */
2100Sstevel@tonic-gate 	"_CONFIG_DCACHEBLKSZ",		/* 35 */
2110Sstevel@tonic-gate 	"_CONFIG_DCACHETBLKSZ",		/* 36 */
2120Sstevel@tonic-gate 	"_CONFIG_ICACHE_ASSOC",		/* 37 */
2130Sstevel@tonic-gate 	"_CONFIG_DCACHE_ASSOC",		/* 38 */
2140Sstevel@tonic-gate 	NULL,				/* 39 */
2150Sstevel@tonic-gate 	NULL,				/* 40 */
2160Sstevel@tonic-gate 	NULL,				/* 41 */
2170Sstevel@tonic-gate 	"_CONFIG_MAXPID",		/* 42 */
2180Sstevel@tonic-gate 	"_CONFIG_STACK_PROT",		/* 43 */
2190Sstevel@tonic-gate 	"_CONFIG_NPROC_MAX",		/* 44 */
2208646Sdp@eng.sun.com 	"_CONFIG_CPUID_MAX",		/* 45 */
2218646Sdp@eng.sun.com 	"_CONFIG_SYMLOOP_MAX",		/* 46 */
2228646Sdp@eng.sun.com 	"_CONFIG_EPHID_MAX",		/* 47 */
2230Sstevel@tonic-gate };
2240Sstevel@tonic-gate 
2250Sstevel@tonic-gate #define	PATHCONFMIN	_PC_LINK_MAX
2268646Sdp@eng.sun.com #define	PATHCONFMAX	_PC_XATTR_EXISTS
2270Sstevel@tonic-gate const char *const PATHCONFname[] = {
2288646Sdp@eng.sun.com 	"_PC_LINK_MAX",			/*  1 */
2298646Sdp@eng.sun.com 	"_PC_MAX_CANON",		/*  2 */
2308646Sdp@eng.sun.com 	"_PC_MAX_INPUT",		/*  3 */
2318646Sdp@eng.sun.com 	"_PC_NAME_MAX",			/*  4 */
2328646Sdp@eng.sun.com 	"_PC_PATH_MAX",			/*  5 */
2338646Sdp@eng.sun.com 	"_PC_PIPE_BUF",			/*  6 */
2348646Sdp@eng.sun.com 	"_PC_NO_TRUNC",			/*  7 */
2358646Sdp@eng.sun.com 	"_PC_VDISABLE",			/*  8 */
2368646Sdp@eng.sun.com 	"_PC_CHOWN_RESTRICTED",		/*  9 */
2378646Sdp@eng.sun.com 	"_PC_ASYNC_IO",			/* 10 */
2388646Sdp@eng.sun.com 	"_PC_PRIO_IO",			/* 11 */
2398646Sdp@eng.sun.com 	"_PC_SYNC_IO",			/* 12 */
2408646Sdp@eng.sun.com 	"_PC_ALLOC_SIZE_MIN",		/* 13 */
2418646Sdp@eng.sun.com 	"_PC_REC_INCR_XFER_SIZE",	/* 14 */
2428646Sdp@eng.sun.com 	"_PC_REC_MAX_XFER_SIZE",	/* 15 */
2438646Sdp@eng.sun.com 	"_PC_REC_MIN_XFER_SIZE",	/* 16 */
2448646Sdp@eng.sun.com 	"_PC_REC_XFER_ALIGN",		/* 17 */
2458646Sdp@eng.sun.com 	"_PC_SYMLINK_MAX",		/* 18 */
2468646Sdp@eng.sun.com 	"_PC_2_SYMLINKS",		/* 19 */
2478646Sdp@eng.sun.com 	"_PC_ACL_ENABLED",		/* 20 */
2488646Sdp@eng.sun.com 	"_PC_MIN_HOLE_SIZE",		/* 21 */
2498646Sdp@eng.sun.com 	"_PC_CASE_BEHAVIOR",		/* 22 */
2508646Sdp@eng.sun.com 	"_PC_SATTR_ENABLED",		/* 23 */
2518646Sdp@eng.sun.com 	"_PC_SATTR_EXISTS",		/* 24 */
2529749STim.Haley@Sun.COM 	"_PC_ACCESS_FILTERING",		/* 25 */
2538646Sdp@eng.sun.com 	NULL,				/* 26 */
2548646Sdp@eng.sun.com 	NULL,				/* 27 */
2558646Sdp@eng.sun.com 	NULL,				/* 28 */
2568646Sdp@eng.sun.com 	NULL,				/* 29 */
2578646Sdp@eng.sun.com 	NULL,				/* 30 */
2588646Sdp@eng.sun.com 	NULL,				/* 31 */
2598646Sdp@eng.sun.com 	NULL,				/* 32 */
2608646Sdp@eng.sun.com 	NULL,				/* 33 */
2618646Sdp@eng.sun.com 	NULL,				/* 34 */
2628646Sdp@eng.sun.com 	NULL,				/* 35 */
2638646Sdp@eng.sun.com 	NULL,				/* 36 */
2648646Sdp@eng.sun.com 	NULL,				/* 37 */
2658646Sdp@eng.sun.com 	NULL,				/* 38 */
2668646Sdp@eng.sun.com 	NULL,				/* 39 */
2678646Sdp@eng.sun.com 	NULL,				/* 40 */
2688646Sdp@eng.sun.com 	NULL,				/* 41 */
2698646Sdp@eng.sun.com 	NULL,				/* 42 */
2708646Sdp@eng.sun.com 	NULL,				/* 43 */
2718646Sdp@eng.sun.com 	NULL,				/* 44 */
2728646Sdp@eng.sun.com 	NULL,				/* 45 */
2738646Sdp@eng.sun.com 	NULL,				/* 46 */
2748646Sdp@eng.sun.com 	NULL,				/* 47 */
2758646Sdp@eng.sun.com 	NULL,				/* 48 */
2768646Sdp@eng.sun.com 	NULL,				/* 49 */
2778646Sdp@eng.sun.com 	NULL,				/* 50 */
2788646Sdp@eng.sun.com 	NULL,				/* 51 */
2798646Sdp@eng.sun.com 	NULL,				/* 52 */
2808646Sdp@eng.sun.com 	NULL,				/* 53 */
2818646Sdp@eng.sun.com 	NULL,				/* 54 */
2828646Sdp@eng.sun.com 	NULL,				/* 55 */
2838646Sdp@eng.sun.com 	NULL,				/* 56 */
2848646Sdp@eng.sun.com 	NULL,				/* 57 */
2858646Sdp@eng.sun.com 	NULL,				/* 58 */
2868646Sdp@eng.sun.com 	NULL,				/* 59 */
2878646Sdp@eng.sun.com 	NULL,				/* 60 */
2888646Sdp@eng.sun.com 	NULL,				/* 61 */
2898646Sdp@eng.sun.com 	NULL,				/* 62 */
2908646Sdp@eng.sun.com 	NULL,				/* 63 */
2918646Sdp@eng.sun.com 	NULL,				/* 64 */
2928646Sdp@eng.sun.com 	NULL,				/* 65 */
2938646Sdp@eng.sun.com 	NULL,				/* 66 */
2948646Sdp@eng.sun.com 	"_PC_FILESIZEBITS",		/* 67 */
2958646Sdp@eng.sun.com 	NULL,				/* 68 */
2968646Sdp@eng.sun.com 	NULL,				/* 69 */
2978646Sdp@eng.sun.com 	NULL,				/* 70 */
2988646Sdp@eng.sun.com 	NULL,				/* 71 */
2998646Sdp@eng.sun.com 	NULL,				/* 72 */
3008646Sdp@eng.sun.com 	NULL,				/* 73 */
3018646Sdp@eng.sun.com 	NULL,				/* 74 */
3028646Sdp@eng.sun.com 	NULL,				/* 75 */
3038646Sdp@eng.sun.com 	NULL,				/* 76 */
3048646Sdp@eng.sun.com 	NULL,				/* 77 */
3058646Sdp@eng.sun.com 	NULL,				/* 78 */
3068646Sdp@eng.sun.com 	NULL,				/* 79 */
3078646Sdp@eng.sun.com 	NULL,				/* 80 */
3088646Sdp@eng.sun.com 	NULL,				/* 81 */
3098646Sdp@eng.sun.com 	NULL,				/* 82 */
3108646Sdp@eng.sun.com 	NULL,				/* 83 */
3118646Sdp@eng.sun.com 	NULL,				/* 84 */
3128646Sdp@eng.sun.com 	NULL,				/* 85 */
3138646Sdp@eng.sun.com 	NULL,				/* 86 */
3148646Sdp@eng.sun.com 	NULL,				/* 87 */
3158646Sdp@eng.sun.com 	NULL,				/* 88 */
3168646Sdp@eng.sun.com 	NULL,				/* 89 */
3178646Sdp@eng.sun.com 	NULL,				/* 90 */
3188646Sdp@eng.sun.com 	NULL,				/* 91 */
3198646Sdp@eng.sun.com 	NULL,				/* 92 */
3208646Sdp@eng.sun.com 	NULL,				/* 93 */
3218646Sdp@eng.sun.com 	NULL,				/* 94 */
3228646Sdp@eng.sun.com 	NULL,				/* 95 */
3238646Sdp@eng.sun.com 	NULL,				/* 96 */
3248646Sdp@eng.sun.com 	NULL,				/* 97 */
3258646Sdp@eng.sun.com 	NULL,				/* 98 */
3268646Sdp@eng.sun.com 	NULL,				/* 99 */
3278646Sdp@eng.sun.com 	"_PC_XATTR_ENABLED",		/* 100 */
3288646Sdp@eng.sun.com 	"_PC_XATTR_EXISTS",		/* 101, _PC_LAST */
3290Sstevel@tonic-gate };
3300Sstevel@tonic-gate 
3310Sstevel@tonic-gate const struct ioc {
3320Sstevel@tonic-gate 	uint_t	code;
3330Sstevel@tonic-gate 	const char *name;
3340Sstevel@tonic-gate 	const char *datastruct;
3350Sstevel@tonic-gate } ioc[] = {
3360Sstevel@tonic-gate 	{ (uint_t)TCGETA,	"TCGETA",	NULL },
3370Sstevel@tonic-gate 	{ (uint_t)TCSETA,	"TCSETA",	NULL },
3380Sstevel@tonic-gate 	{ (uint_t)TCSETAW,	"TCSETAW",	NULL },
3390Sstevel@tonic-gate 	{ (uint_t)TCSETAF,	"TCSETAF",	NULL },
3400Sstevel@tonic-gate 	{ (uint_t)TCFLSH,	"TCFLSH",	NULL },
3410Sstevel@tonic-gate 	{ (uint_t)TIOCKBON,	"TIOCKBON",	NULL },
3420Sstevel@tonic-gate 	{ (uint_t)TIOCKBOF,	"TIOCKBOF",	NULL },
3430Sstevel@tonic-gate 	{ (uint_t)KBENABLED,	"KBENABLED",	NULL },
3440Sstevel@tonic-gate 	{ (uint_t)TCGETS,	"TCGETS",	NULL },
3450Sstevel@tonic-gate 	{ (uint_t)TCSETS,	"TCSETS",	NULL },
3460Sstevel@tonic-gate 	{ (uint_t)TCSETSW,	"TCSETSW",	NULL },
3470Sstevel@tonic-gate 	{ (uint_t)TCSETSF,	"TCSETSF",	NULL },
3480Sstevel@tonic-gate 	{ (uint_t)TCXONC,	"TCXONC",	NULL },
3490Sstevel@tonic-gate 	{ (uint_t)TCSBRK,	"TCSBRK",	NULL },
3500Sstevel@tonic-gate 	{ (uint_t)TCDSET,	"TCDSET",	NULL },
3510Sstevel@tonic-gate 	{ (uint_t)RTS_TOG,	"RTS_TOG",	NULL },
3520Sstevel@tonic-gate 	{ (uint_t)TIOCSWINSZ,	"TIOCSWINSZ",	NULL },
3530Sstevel@tonic-gate 	{ (uint_t)TIOCGWINSZ,	"TIOCGWINSZ",	NULL },
3540Sstevel@tonic-gate 	{ (uint_t)TIOCGETD,	"TIOCGETD",	NULL },
3550Sstevel@tonic-gate 	{ (uint_t)TIOCSETD,	"TIOCSETD",	NULL },
3560Sstevel@tonic-gate 	{ (uint_t)TIOCHPCL,	"TIOCHPCL",	NULL },
3570Sstevel@tonic-gate 	{ (uint_t)TIOCGETP,	"TIOCGETP",	NULL },
3580Sstevel@tonic-gate 	{ (uint_t)TIOCSETP,	"TIOCSETP",	NULL },
3590Sstevel@tonic-gate 	{ (uint_t)TIOCSETN,	"TIOCSETN",	NULL },
3600Sstevel@tonic-gate 	{ (uint_t)TIOCEXCL,	"TIOCEXCL",	NULL },
3610Sstevel@tonic-gate 	{ (uint_t)TIOCNXCL,	"TIOCNXCL",	NULL },
3620Sstevel@tonic-gate 	{ (uint_t)TIOCFLUSH,	"TIOCFLUSH",	NULL },
3630Sstevel@tonic-gate 	{ (uint_t)TIOCSETC,	"TIOCSETC",	NULL },
3640Sstevel@tonic-gate 	{ (uint_t)TIOCGETC,	"TIOCGETC",	NULL },
3650Sstevel@tonic-gate 	{ (uint_t)TIOCGPGRP,	"TIOCGPGRP",	NULL },
3660Sstevel@tonic-gate 	{ (uint_t)TIOCSPGRP,	"TIOCSPGRP",	NULL },
3670Sstevel@tonic-gate 	{ (uint_t)TIOCGSID,	"TIOCGSID",	NULL },
3680Sstevel@tonic-gate 	{ (uint_t)TIOCSTI,	"TIOCSTI",	NULL },
3690Sstevel@tonic-gate 	{ (uint_t)TIOCMSET,	"TIOCMSET",	NULL },
3700Sstevel@tonic-gate 	{ (uint_t)TIOCMBIS,	"TIOCMBIS",	NULL },
3710Sstevel@tonic-gate 	{ (uint_t)TIOCMBIC,	"TIOCMBIC",	NULL },
3720Sstevel@tonic-gate 	{ (uint_t)TIOCMGET,	"TIOCMGET",	NULL },
3730Sstevel@tonic-gate 	{ (uint_t)TIOCREMOTE,	"TIOCREMOTE",	NULL },
3740Sstevel@tonic-gate 	{ (uint_t)TIOCSIGNAL,	"TIOCSIGNAL",	NULL },
3750Sstevel@tonic-gate 	{ (uint_t)TIOCSTART,	"TIOCSTART",	NULL },
3760Sstevel@tonic-gate 	{ (uint_t)TIOCSTOP,	"TIOCSTOP",	NULL },
3770Sstevel@tonic-gate 	{ (uint_t)TIOCNOTTY,	"TIOCNOTTY",	NULL },
3789354STim.Marsland@Sun.COM 	{ (uint_t)TIOCSCTTY,	"TIOCSCTTY",	NULL },
3790Sstevel@tonic-gate 	{ (uint_t)TIOCOUTQ,	"TIOCOUTQ",	NULL },
3800Sstevel@tonic-gate 	{ (uint_t)TIOCGLTC,	"TIOCGLTC",	NULL },
3810Sstevel@tonic-gate 	{ (uint_t)TIOCSLTC,	"TIOCSLTC",	NULL },
3820Sstevel@tonic-gate 	{ (uint_t)TIOCCDTR,	"TIOCCDTR",	NULL },
3830Sstevel@tonic-gate 	{ (uint_t)TIOCSDTR,	"TIOCSDTR",	NULL },
3840Sstevel@tonic-gate 	{ (uint_t)TIOCCBRK,	"TIOCCBRK",	NULL },
3850Sstevel@tonic-gate 	{ (uint_t)TIOCSBRK,	"TIOCSBRK",	NULL },
3860Sstevel@tonic-gate 	{ (uint_t)TIOCLGET,	"TIOCLGET",	NULL },
3870Sstevel@tonic-gate 	{ (uint_t)TIOCLSET,	"TIOCLSET",	NULL },
3880Sstevel@tonic-gate 	{ (uint_t)TIOCLBIC,	"TIOCLBIC",	NULL },
3890Sstevel@tonic-gate 	{ (uint_t)TIOCLBIS,	"TIOCLBIS",	NULL },
3900Sstevel@tonic-gate 
3919354STim.Marsland@Sun.COM 	{ (uint_t)TIOCSILOOP,	"TIOCSILOOP",	NULL },
3929354STim.Marsland@Sun.COM 	{ (uint_t)TIOCCILOOP,	"TIOCSILOOP",	NULL },
3939354STim.Marsland@Sun.COM 
3949354STim.Marsland@Sun.COM 	{ (uint_t)TIOCSETLD,	"TIOCSETLD",	NULL },
3959354STim.Marsland@Sun.COM 	{ (uint_t)TIOCGETLD,	"TIOCGETLD",	NULL },
3969354STim.Marsland@Sun.COM 
3979354STim.Marsland@Sun.COM 	{ (uint_t)TIOCGPPS,	"TIOCGPPS",	NULL },
3989354STim.Marsland@Sun.COM 	{ (uint_t)TIOCSPPS,	"TIOCSPPS",	NULL },
3999354STim.Marsland@Sun.COM 	{ (uint_t)TIOCGPPSEV,	"TIOCGPPSEV",	NULL },
4009354STim.Marsland@Sun.COM 
4010Sstevel@tonic-gate 	{ (uint_t)TIOCPKT,	"TIOCPKT",	NULL },	/* ptyvar.h */
4020Sstevel@tonic-gate 	{ (uint_t)TIOCUCNTL,	"TIOCUCNTL",	NULL },
4030Sstevel@tonic-gate 	{ (uint_t)TIOCTCNTL,	"TIOCTCNTL",	NULL },
4040Sstevel@tonic-gate 	{ (uint_t)TIOCISPACE,	"TIOCISPACE",	NULL },
4050Sstevel@tonic-gate 	{ (uint_t)TIOCISIZE,	"TIOCISIZE",	NULL },
4060Sstevel@tonic-gate 	{ (uint_t)TIOCSSIZE,	"TIOCSSIZE",	"ttysize" },
4070Sstevel@tonic-gate 	{ (uint_t)TIOCGSIZE,	"TIOCGSIZE",	"ttysize" },
4080Sstevel@tonic-gate 
4090Sstevel@tonic-gate 	/*
4103147Sxc151355 	 * Unfortunately, the DLIOC and LDIOC codes overlap.  Since the LDIOC
4110Sstevel@tonic-gate 	 * ioctls (for xenix compatibility) are far less likely to be used, we
4123147Sxc151355 	 * give preference to DLIOC.
4130Sstevel@tonic-gate 	 */
4140Sstevel@tonic-gate 	{ (uint_t)DLIOCRAW,	"DLIOCRAW",	NULL },
4153147Sxc151355 	{ (uint_t)DLIOCNATIVE,	"DLIOCNATIVE",	NULL },
4168023SPhil.Kirk@Sun.COM 	{ (uint_t)DLIOCIPNETINFO, "DLIOCIPNETINFO", NULL},
4170Sstevel@tonic-gate 
4180Sstevel@tonic-gate 	{ (uint_t)LDOPEN,	"LDOPEN",	NULL },
4190Sstevel@tonic-gate 	{ (uint_t)LDCLOSE,	"LDCLOSE",	NULL },
4200Sstevel@tonic-gate 	{ (uint_t)LDCHG,	"LDCHG",	NULL },
4210Sstevel@tonic-gate 	{ (uint_t)LDGETT,	"LDGETT",	NULL },
4220Sstevel@tonic-gate 	{ (uint_t)LDSETT,	"LDSETT",	NULL },
4230Sstevel@tonic-gate 	{ (uint_t)LDSMAP,	"LDSMAP",	NULL },
4240Sstevel@tonic-gate 	{ (uint_t)LDGMAP,	"LDGMAP",	NULL },
4250Sstevel@tonic-gate 	{ (uint_t)LDNMAP,	"LDNMAP",	NULL },
4260Sstevel@tonic-gate 	{ (uint_t)TCGETX,	"TCGETX",	NULL },
4270Sstevel@tonic-gate 	{ (uint_t)TCSETX,	"TCSETX",	NULL },
4280Sstevel@tonic-gate 	{ (uint_t)TCSETXW,	"TCSETXW",	NULL },
4290Sstevel@tonic-gate 	{ (uint_t)TCSETXF,	"TCSETXF",	NULL },
4300Sstevel@tonic-gate 	{ (uint_t)FIORDCHK,	"FIORDCHK",	NULL },
4310Sstevel@tonic-gate 	{ (uint_t)FIOCLEX,	"FIOCLEX",	NULL },
4320Sstevel@tonic-gate 	{ (uint_t)FIONCLEX,	"FIONCLEX",	NULL },
4330Sstevel@tonic-gate 	{ (uint_t)FIONREAD,	"FIONREAD",	NULL },
4340Sstevel@tonic-gate 	{ (uint_t)FIONBIO,	"FIONBIO",	NULL },
4350Sstevel@tonic-gate 	{ (uint_t)FIOASYNC,	"FIOASYNC",	NULL },
4360Sstevel@tonic-gate 	{ (uint_t)FIOSETOWN,	"FIOSETOWN",	NULL },
4370Sstevel@tonic-gate 	{ (uint_t)FIOGETOWN,	"FIOGETOWN",	NULL },
4380Sstevel@tonic-gate #ifdef DIOCGETP
4390Sstevel@tonic-gate 	{ (uint_t)DIOCGETP,	"DIOCGETP",	NULL },
4400Sstevel@tonic-gate 	{ (uint_t)DIOCSETP,	"DIOCSETP",	NULL },
4410Sstevel@tonic-gate #endif
4420Sstevel@tonic-gate #ifdef DIOCGETC
4430Sstevel@tonic-gate 	{ (uint_t)DIOCGETC,	"DIOCGETC",	NULL },
4440Sstevel@tonic-gate 	{ (uint_t)DIOCGETB,	"DIOCGETB",	NULL },
4450Sstevel@tonic-gate 	{ (uint_t)DIOCSETE,	"DIOCSETE",	NULL },
4460Sstevel@tonic-gate #endif
4470Sstevel@tonic-gate #ifdef IFFORMAT
4480Sstevel@tonic-gate 	{ (uint_t)IFFORMAT,	"IFFORMAT",	NULL },
4490Sstevel@tonic-gate 	{ (uint_t)IFBCHECK,	"IFBCHECK",	NULL },
4500Sstevel@tonic-gate 	{ (uint_t)IFCONFIRM,	"IFCONFIRM",	NULL },
4510Sstevel@tonic-gate #endif
4520Sstevel@tonic-gate #ifdef LIOCGETP
4530Sstevel@tonic-gate 	{ (uint_t)LIOCGETP,	"LIOCGETP",	NULL },
4540Sstevel@tonic-gate 	{ (uint_t)LIOCSETP,	"LIOCSETP",	NULL },
4550Sstevel@tonic-gate 	{ (uint_t)LIOCGETS,	"LIOCGETS",	NULL },
4560Sstevel@tonic-gate 	{ (uint_t)LIOCSETS,	"LIOCSETS",	NULL },
4570Sstevel@tonic-gate #endif
4580Sstevel@tonic-gate #ifdef JBOOT
4590Sstevel@tonic-gate 	{ (uint_t)JBOOT,	"JBOOT",	NULL },
4600Sstevel@tonic-gate 	{ (uint_t)JTERM,	"JTERM",	NULL },
4610Sstevel@tonic-gate 	{ (uint_t)JMPX,		"JMPX",	NULL },
4620Sstevel@tonic-gate #ifdef JTIMO
4630Sstevel@tonic-gate 	{ (uint_t)JTIMO,	"JTIMO",	NULL },
4640Sstevel@tonic-gate #endif
4650Sstevel@tonic-gate 	{ (uint_t)JWINSIZE,	"JWINSIZE",	NULL },
4660Sstevel@tonic-gate 	{ (uint_t)JTIMOM,	"JTIMOM",	NULL },
4670Sstevel@tonic-gate 	{ (uint_t)JZOMBOOT,	"JZOMBOOT",	NULL },
4680Sstevel@tonic-gate 	{ (uint_t)JAGENT,	"JAGENT",	NULL },
4690Sstevel@tonic-gate 	{ (uint_t)JTRUN,	"JTRUN",	NULL },
4700Sstevel@tonic-gate 	{ (uint_t)JXTPROTO,	"JXTPROTO",	NULL },
4710Sstevel@tonic-gate #endif
4720Sstevel@tonic-gate 	{ (uint_t)KSTAT_IOC_CHAIN_ID,	"KSTAT_IOC_CHAIN_ID",	NULL },
4730Sstevel@tonic-gate 	{ (uint_t)KSTAT_IOC_READ,	"KSTAT_IOC_READ",	NULL },
4740Sstevel@tonic-gate 	{ (uint_t)KSTAT_IOC_WRITE,	"KSTAT_IOC_WRITE",	NULL },
4750Sstevel@tonic-gate 	{ (uint_t)STGET,	"STGET",	NULL },
4760Sstevel@tonic-gate 	{ (uint_t)STSET,	"STSET",	NULL },
4770Sstevel@tonic-gate 	{ (uint_t)STTHROW,	"STTHROW",	NULL },
4780Sstevel@tonic-gate 	{ (uint_t)STWLINE,	"STWLINE",	NULL },
4790Sstevel@tonic-gate 	{ (uint_t)STTSV,	"STTSV",	NULL },
4800Sstevel@tonic-gate 	{ (uint_t)I_NREAD,	"I_NREAD",	NULL },
4810Sstevel@tonic-gate 	{ (uint_t)I_PUSH,	"I_PUSH",	NULL },
4820Sstevel@tonic-gate 	{ (uint_t)I_POP,	"I_POP",	NULL },
4830Sstevel@tonic-gate 	{ (uint_t)I_LOOK,	"I_LOOK",	NULL },
4840Sstevel@tonic-gate 	{ (uint_t)I_FLUSH,	"I_FLUSH",	NULL },
4850Sstevel@tonic-gate 	{ (uint_t)I_SRDOPT,	"I_SRDOPT",	NULL },
4860Sstevel@tonic-gate 	{ (uint_t)I_GRDOPT,	"I_GRDOPT",	NULL },
4870Sstevel@tonic-gate 	{ (uint_t)I_STR,	"I_STR",	NULL },
4880Sstevel@tonic-gate 	{ (uint_t)I_SETSIG,	"I_SETSIG",	NULL },
4890Sstevel@tonic-gate 	{ (uint_t)I_GETSIG,	"I_GETSIG",	NULL },
4900Sstevel@tonic-gate 	{ (uint_t)I_FIND,	"I_FIND",	NULL },
4910Sstevel@tonic-gate 	{ (uint_t)I_LINK,	"I_LINK",	NULL },
4920Sstevel@tonic-gate 	{ (uint_t)I_UNLINK,	"I_UNLINK",	NULL },
4930Sstevel@tonic-gate 	{ (uint_t)I_PEEK,	"I_PEEK",	NULL },
4940Sstevel@tonic-gate 	{ (uint_t)I_FDINSERT,	"I_FDINSERT",	NULL },
4950Sstevel@tonic-gate 	{ (uint_t)I_SENDFD,	"I_SENDFD",	NULL },
4960Sstevel@tonic-gate 	{ (uint_t)I_RECVFD,	"I_RECVFD",	NULL },
4970Sstevel@tonic-gate 	{ (uint_t)I_SWROPT,	"I_SWROPT",	NULL },
4980Sstevel@tonic-gate 	{ (uint_t)I_GWROPT,	"I_GWROPT",	NULL },
4990Sstevel@tonic-gate 	{ (uint_t)I_LIST,	"I_LIST",	NULL },
5000Sstevel@tonic-gate 	{ (uint_t)I_PLINK,	"I_PLINK",	NULL },
5010Sstevel@tonic-gate 	{ (uint_t)I_PUNLINK,	"I_PUNLINK",	NULL },
5020Sstevel@tonic-gate 	{ (uint_t)I_FLUSHBAND,	"I_FLUSHBAND",	NULL },
5030Sstevel@tonic-gate 	{ (uint_t)I_CKBAND,	"I_CKBAND",	NULL },
5040Sstevel@tonic-gate 	{ (uint_t)I_GETBAND,	"I_GETBAND",	NULL },
5050Sstevel@tonic-gate 	{ (uint_t)I_ATMARK,	"I_ATMARK",	NULL },
5060Sstevel@tonic-gate 	{ (uint_t)I_SETCLTIME,	"I_SETCLTIME",	NULL },
5070Sstevel@tonic-gate 	{ (uint_t)I_GETCLTIME,	"I_GETCLTIME",	NULL },
5080Sstevel@tonic-gate 	{ (uint_t)I_CANPUT,	"I_CANPUT",	NULL },
5090Sstevel@tonic-gate 	{ (uint_t)I_ANCHOR,	"I_ANCHOR",	NULL },
5108752SPeter.Memishian@Sun.COM 	{ (uint_t)_I_CMD,	"_I_CMD",	NULL },
5110Sstevel@tonic-gate #ifdef TI_GETINFO
5120Sstevel@tonic-gate 	{ (uint_t)TI_GETINFO,	"TI_GETINFO",	NULL },
5130Sstevel@tonic-gate 	{ (uint_t)TI_OPTMGMT,	"TI_OPTMGMT",	NULL },
5140Sstevel@tonic-gate 	{ (uint_t)TI_BIND,	"TI_BIND",	NULL },
5150Sstevel@tonic-gate 	{ (uint_t)TI_UNBIND,	"TI_UNBIND",	NULL },
5160Sstevel@tonic-gate #endif
5170Sstevel@tonic-gate #ifdef	TI_CAPABILITY
5180Sstevel@tonic-gate 	{ (uint_t)TI_CAPABILITY,	"TI_CAPABILITY",	NULL },
5190Sstevel@tonic-gate #endif
5200Sstevel@tonic-gate #ifdef TI_GETMYNAME
5210Sstevel@tonic-gate 	{ (uint_t)TI_GETMYNAME,		"TI_GETMYNAME",		NULL },
5220Sstevel@tonic-gate 	{ (uint_t)TI_GETPEERNAME,	"TI_GETPEERNAME",	NULL },
5230Sstevel@tonic-gate 	{ (uint_t)TI_SETMYNAME,		"TI_SETMYNAME",		NULL },
5240Sstevel@tonic-gate 	{ (uint_t)TI_SETPEERNAME,	"TI_SETPEERNAME",	NULL },
5250Sstevel@tonic-gate #endif
5260Sstevel@tonic-gate #ifdef V_PREAD
5270Sstevel@tonic-gate 	{ (uint_t)V_PREAD,	"V_PREAD",	NULL },
5280Sstevel@tonic-gate 	{ (uint_t)V_PWRITE,	"V_PWRITE",	NULL },
5290Sstevel@tonic-gate 	{ (uint_t)V_PDREAD,	"V_PDREAD",	NULL },
5300Sstevel@tonic-gate 	{ (uint_t)V_PDWRITE,	"V_PDWRITE",	NULL },
5310Sstevel@tonic-gate #if !defined(__i386) && !defined(__amd64)
5320Sstevel@tonic-gate 	{ (uint_t)V_GETSSZ,	"V_GETSSZ",	NULL },
5330Sstevel@tonic-gate #endif /* !__i386 */
5340Sstevel@tonic-gate #endif
5350Sstevel@tonic-gate 	/* audio */
5360Sstevel@tonic-gate 	{ (uint_t)AUDIO_GETINFO,	"AUDIO_GETINFO",	NULL },
5370Sstevel@tonic-gate 	{ (uint_t)AUDIO_SETINFO,	"AUDIO_SETINFO",	NULL },
5380Sstevel@tonic-gate 	{ (uint_t)AUDIO_DRAIN,		"AUDIO_DRAIN",		NULL },
5390Sstevel@tonic-gate 	{ (uint_t)AUDIO_GETDEV,		"AUDIO_GETDEV",		NULL },
5400Sstevel@tonic-gate 	{ (uint_t)AUDIO_DIAG_LOOPBACK,	"AUDIO_DIAG_LOOPBACK",	NULL },
5410Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_CH_NUMBER,	"AUDIO_GET_CH_NUMBER",	NULL },
5420Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_CH_TYPE,	"AUDIO_GET_CH_TYPE",	NULL },
5430Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_NUM_CHS,	"AUDIO_GET_NUM_CHS",	NULL },
5440Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_AD_DEV,	"AUDIO_GET_AD_DEV",	NULL },
5450Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_APM_DEV,	"AUDIO_GET_APM_DEV",	NULL },
5460Sstevel@tonic-gate 	{ (uint_t)AUDIO_GET_AS_DEV,	"AUDIO_GET_AS_DEV",	NULL },
5470Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXER_MULTIPLE_OPEN,	"AUDIO_MIXER_MULTIPLE_OPEN",
5480Sstevel@tonic-gate 	    NULL },
5490Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXER_SINGLE_OPEN,	"AUDIO_MIXER_SINGLE_OPEN",
5500Sstevel@tonic-gate 	    NULL },
5510Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXER_GET_SAMPLE_RATES,	"AUDIO_MIXER_GET_SAMPLE_RATES",
5520Sstevel@tonic-gate 	    NULL },
5530Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_GETINFO,	"AUDIO_MIXERCTL_GETINFO",
5540Sstevel@tonic-gate 	    NULL },
5550Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_SETINFO,	"AUDIO_MIXERCTL_SETINFO",
5560Sstevel@tonic-gate 	    NULL },
5570Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_GET_CHINFO,	"AUDIO_MIXERCTL_GET_CHINFO",
5580Sstevel@tonic-gate 	    NULL },
5590Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_SET_CHINFO,	"AUDIO_MIXERCTL_SET_CHINFO",
5600Sstevel@tonic-gate 	    NULL },
5610Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_GET_MODE,	"AUDIO_MIXERCTL_GET_MODE",
5620Sstevel@tonic-gate 	    NULL },
5630Sstevel@tonic-gate 	{ (uint_t)AUDIO_MIXERCTL_SET_MODE,	"AUDIO_MIXERCTL_SET_MODE",
5640Sstevel@tonic-gate 	    NULL },
5650Sstevel@tonic-gate 	/* STREAMS redirection ioctls */
5660Sstevel@tonic-gate 	{ (uint_t)SRIOCSREDIR,		"SRIOCSREDIR",	NULL },
5670Sstevel@tonic-gate 	{ (uint_t)SRIOCISREDIR,		"SRIOCISREDIR",	NULL },
5680Sstevel@tonic-gate 	{ (uint_t)CPCIO_BIND,		"CPCIO_BIND",		NULL },
5690Sstevel@tonic-gate 	{ (uint_t)CPCIO_SAMPLE,		"CPCIO_SAMPLE",		NULL },
5700Sstevel@tonic-gate 	{ (uint_t)CPCIO_RELE,		"CPCIO_RELE",		NULL },
5710Sstevel@tonic-gate 	/* /dev/poll ioctl() control codes */
5720Sstevel@tonic-gate 	{ (uint_t)DP_POLL,	"DP_POLL",	NULL },
5730Sstevel@tonic-gate 	{ (uint_t)DP_ISPOLLED,	"DP_ISPOLLED",	NULL },
5740Sstevel@tonic-gate 	/* the old /proc ioctl() control codes */
5750Sstevel@tonic-gate #define	PIOC	('q'<<8)
5760Sstevel@tonic-gate 	{ (uint_t)(PIOC|1),	"PIOCSTATUS",	NULL },
5770Sstevel@tonic-gate 	{ (uint_t)(PIOC|2),	"PIOCSTOP",	NULL },
5780Sstevel@tonic-gate 	{ (uint_t)(PIOC|3),	"PIOCWSTOP",	NULL },
5790Sstevel@tonic-gate 	{ (uint_t)(PIOC|4),	"PIOCRUN",	NULL },
5800Sstevel@tonic-gate 	{ (uint_t)(PIOC|5),	"PIOCGTRACE",	NULL },
5810Sstevel@tonic-gate 	{ (uint_t)(PIOC|6),	"PIOCSTRACE",	NULL },
5820Sstevel@tonic-gate 	{ (uint_t)(PIOC|7),	"PIOCSSIG",	NULL },
5830Sstevel@tonic-gate 	{ (uint_t)(PIOC|8),	"PIOCKILL",	NULL },
5840Sstevel@tonic-gate 	{ (uint_t)(PIOC|9),	"PIOCUNKILL",	NULL },
5850Sstevel@tonic-gate 	{ (uint_t)(PIOC|10),	"PIOCGHOLD",	NULL },
5860Sstevel@tonic-gate 	{ (uint_t)(PIOC|11),	"PIOCSHOLD",	NULL },
5870Sstevel@tonic-gate 	{ (uint_t)(PIOC|12),	"PIOCMAXSIG",	NULL },
5880Sstevel@tonic-gate 	{ (uint_t)(PIOC|13),	"PIOCACTION",	NULL },
5890Sstevel@tonic-gate 	{ (uint_t)(PIOC|14),	"PIOCGFAULT",	NULL },
5900Sstevel@tonic-gate 	{ (uint_t)(PIOC|15),	"PIOCSFAULT",	NULL },
5910Sstevel@tonic-gate 	{ (uint_t)(PIOC|16),	"PIOCCFAULT",	NULL },
5920Sstevel@tonic-gate 	{ (uint_t)(PIOC|17),	"PIOCGENTRY",	NULL },
5930Sstevel@tonic-gate 	{ (uint_t)(PIOC|18),	"PIOCSENTRY",	NULL },
5940Sstevel@tonic-gate 	{ (uint_t)(PIOC|19),	"PIOCGEXIT",	NULL },
5950Sstevel@tonic-gate 	{ (uint_t)(PIOC|20),	"PIOCSEXIT",	NULL },
5960Sstevel@tonic-gate 	{ (uint_t)(PIOC|21),	"PIOCSFORK",	NULL },
5970Sstevel@tonic-gate 	{ (uint_t)(PIOC|22),	"PIOCRFORK",	NULL },
5980Sstevel@tonic-gate 	{ (uint_t)(PIOC|23),	"PIOCSRLC",	NULL },
5990Sstevel@tonic-gate 	{ (uint_t)(PIOC|24),	"PIOCRRLC",	NULL },
6000Sstevel@tonic-gate 	{ (uint_t)(PIOC|25),	"PIOCGREG",	NULL },
6010Sstevel@tonic-gate 	{ (uint_t)(PIOC|26),	"PIOCSREG",	NULL },
6020Sstevel@tonic-gate 	{ (uint_t)(PIOC|27),	"PIOCGFPREG",	NULL },
6030Sstevel@tonic-gate 	{ (uint_t)(PIOC|28),	"PIOCSFPREG",	NULL },
6040Sstevel@tonic-gate 	{ (uint_t)(PIOC|29),	"PIOCNICE",	NULL },
6050Sstevel@tonic-gate 	{ (uint_t)(PIOC|30),	"PIOCPSINFO",	NULL },
6060Sstevel@tonic-gate 	{ (uint_t)(PIOC|31),	"PIOCNMAP",	NULL },
6070Sstevel@tonic-gate 	{ (uint_t)(PIOC|32),	"PIOCMAP",	NULL },
6080Sstevel@tonic-gate 	{ (uint_t)(PIOC|33),	"PIOCOPENM",	NULL },
6090Sstevel@tonic-gate 	{ (uint_t)(PIOC|34),	"PIOCCRED",	NULL },
6100Sstevel@tonic-gate 	{ (uint_t)(PIOC|35),	"PIOCGROUPS",	NULL },
6110Sstevel@tonic-gate 	{ (uint_t)(PIOC|36),	"PIOCGETPR",	NULL },
6120Sstevel@tonic-gate 	{ (uint_t)(PIOC|37),	"PIOCGETU",	NULL },
6130Sstevel@tonic-gate 	{ (uint_t)(PIOC|38),	"PIOCSET",	NULL },
6140Sstevel@tonic-gate 	{ (uint_t)(PIOC|39),	"PIOCRESET",	NULL },
6150Sstevel@tonic-gate 	{ (uint_t)(PIOC|43),	"PIOCUSAGE",	NULL },
6160Sstevel@tonic-gate 	{ (uint_t)(PIOC|44),	"PIOCOPENPD",	NULL },
6170Sstevel@tonic-gate 	{ (uint_t)(PIOC|45),	"PIOCLWPIDS",	NULL },
6180Sstevel@tonic-gate 	{ (uint_t)(PIOC|46),	"PIOCOPENLWP",	NULL },
6190Sstevel@tonic-gate 	{ (uint_t)(PIOC|47),	"PIOCLSTATUS",	NULL },
6200Sstevel@tonic-gate 	{ (uint_t)(PIOC|48),	"PIOCLUSAGE",	NULL },
6210Sstevel@tonic-gate 	{ (uint_t)(PIOC|49),	"PIOCNAUXV",	NULL },
6220Sstevel@tonic-gate 	{ (uint_t)(PIOC|50),	"PIOCAUXV",	NULL },
6230Sstevel@tonic-gate 	{ (uint_t)(PIOC|51),	"PIOCGXREGSIZE",	NULL },
6240Sstevel@tonic-gate 	{ (uint_t)(PIOC|52),	"PIOCGXREG",	NULL },
6250Sstevel@tonic-gate 	{ (uint_t)(PIOC|53),	"PIOCSXREG",	NULL },
6260Sstevel@tonic-gate 	{ (uint_t)(PIOC|101),	"PIOCGWIN",	NULL },
6270Sstevel@tonic-gate 	{ (uint_t)(PIOC|103),	"PIOCNLDT",	NULL },
6280Sstevel@tonic-gate 	{ (uint_t)(PIOC|104),	"PIOCLDT",	NULL },
6290Sstevel@tonic-gate 
6300Sstevel@tonic-gate 	/* ioctl's applicable on sockets */
6310Sstevel@tonic-gate 	{ (uint_t)SIOCSHIWAT,	"SIOCSHIWAT",	NULL },
6320Sstevel@tonic-gate 	{ (uint_t)SIOCGHIWAT,	"SIOCGHIWAT",	NULL },
6330Sstevel@tonic-gate 	{ (uint_t)SIOCSLOWAT,	"SIOCSLOWAT",	NULL },
6340Sstevel@tonic-gate 	{ (uint_t)SIOCGLOWAT,	"SIOCGLOWAT",	NULL },
6350Sstevel@tonic-gate 	{ (uint_t)SIOCATMARK,	"SIOCATMARK",	NULL },
6360Sstevel@tonic-gate 	{ (uint_t)SIOCSPGRP,	"SIOCSPGRP",	NULL },
6370Sstevel@tonic-gate 	{ (uint_t)SIOCGPGRP,	"SIOCGPGRP",	NULL },
6380Sstevel@tonic-gate 	{ (uint_t)SIOCADDRT,	"SIOCADDRT",	"rtentry" },
6390Sstevel@tonic-gate 	{ (uint_t)SIOCDELRT,	"SIOCDELRT",	"rtentry" },
6400Sstevel@tonic-gate 	{ (uint_t)SIOCGETVIFCNT,	"SIOCGETVIFCNT", "sioc_vif_req" },
6410Sstevel@tonic-gate 	{ (uint_t)SIOCGETSGCNT,	"SIOCGETSGCNT",	"sioc_sg_req" },
6420Sstevel@tonic-gate 	{ (uint_t)SIOCGETLSGCNT,	"SIOCGETLSGCNT", "sioc_lsg_req" },
6430Sstevel@tonic-gate 	{ (uint_t)SIOCSIFADDR,	"SIOCSIFADDR",	"ifreq" },
6440Sstevel@tonic-gate 	{ (uint_t)SIOCGIFADDR,	"SIOCGIFADDR",	"ifreq" },
6450Sstevel@tonic-gate 	{ (uint_t)SIOCSIFDSTADDR,	"SIOCSIFDSTADDR", "ifreq" },
6460Sstevel@tonic-gate 	{ (uint_t)SIOCGIFDSTADDR,	"SIOCGIFDSTADDR", "ifreq" },
6470Sstevel@tonic-gate 	{ (uint_t)SIOCSIFFLAGS,	"SIOCSIFFLAGS",	"ifreq" },
6480Sstevel@tonic-gate 	{ (uint_t)SIOCGIFFLAGS,	"SIOCGIFFLAGS",	"ifreq" },
6490Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMEM,	"SIOCSIFMEM",	"ifreq" },
6500Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMEM,	"SIOCGIFMEM",	"ifreq" },
6510Sstevel@tonic-gate 	{ (uint_t)SIOCGIFCONF,	"SIOCGIFCONF",	"ifconf" },
6520Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMTU,	"SIOCSIFMTU",	"ifreq" },
6530Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMTU,	"SIOCGIFMTU",	"ifreq" },
6540Sstevel@tonic-gate 	{ (uint_t)SIOCGIFBRDADDR,	"SIOCGIFBRDADDR",	"ifreq" },
6550Sstevel@tonic-gate 	{ (uint_t)SIOCSIFBRDADDR,	"SIOCSIFBRDADDR",	"ifreq" },
6560Sstevel@tonic-gate 	{ (uint_t)SIOCGIFNETMASK,	"SIOCGIFNETMASK",	"ifreq" },
6570Sstevel@tonic-gate 	{ (uint_t)SIOCSIFNETMASK,	"SIOCSIFNETMASK",	"ifreq" },
6580Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMETRIC,	"SIOCGIFMETRIC",	"ifreq" },
6590Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMETRIC,	"SIOCSIFMETRIC",	"ifreq" },
6600Sstevel@tonic-gate 	{ (uint_t)SIOCSARP,	"SIOCSARP",	"arpreq" },
6610Sstevel@tonic-gate 	{ (uint_t)SIOCGARP,	"SIOCGARP",	"arpreq" },
6620Sstevel@tonic-gate 	{ (uint_t)SIOCDARP,	"SIOCDARP",	"arpreq" },
6630Sstevel@tonic-gate 	{ (uint_t)SIOCUPPER,	"SIOCUPPER",	"ifreq" },
6640Sstevel@tonic-gate 	{ (uint_t)SIOCLOWER,	"SIOCLOWER",	"ifreq" },
6650Sstevel@tonic-gate 	{ (uint_t)SIOCSETSYNC,	"SIOCSETSYNC",	"ifreq" },
6660Sstevel@tonic-gate 	{ (uint_t)SIOCGETSYNC,	"SIOCGETSYNC",	"ifreq" },
6670Sstevel@tonic-gate 	{ (uint_t)SIOCSSDSTATS,	"SIOCSSDSTATS",	"ifreq" },
6680Sstevel@tonic-gate 	{ (uint_t)SIOCSSESTATS,	"SIOCSSESTATS",	"ifreq" },
6690Sstevel@tonic-gate 	{ (uint_t)SIOCSPROMISC,	"SIOCSPROMISC",	NULL },
6700Sstevel@tonic-gate 	{ (uint_t)SIOCADDMULTI,	"SIOCADDMULTI",	"ifreq" },
6710Sstevel@tonic-gate 	{ (uint_t)SIOCDELMULTI,	"SIOCDELMULTI",	"ifreq" },
6720Sstevel@tonic-gate 	{ (uint_t)SIOCGETNAME,	"SIOCGETNAME",	"sockaddr" },
6730Sstevel@tonic-gate 	{ (uint_t)SIOCGETPEER,	"SIOCGETPEER",	"sockaddr" },
6740Sstevel@tonic-gate 	{ (uint_t)IF_UNITSEL,	"IF_UNITSEL",	NULL },
6750Sstevel@tonic-gate 	{ (uint_t)SIOCXPROTO,	"SIOCXPROTO",	NULL },
6760Sstevel@tonic-gate 	{ (uint_t)SIOCIFDETACH,	"SIOCIFDETACH",	"ifreq" },
6770Sstevel@tonic-gate 	{ (uint_t)SIOCGENPSTATS,	"SIOCGENPSTATS",	"ifreq" },
6780Sstevel@tonic-gate 	{ (uint_t)SIOCX25XMT,	"SIOCX25XMT",	"ifreq" },
6790Sstevel@tonic-gate 	{ (uint_t)SIOCX25RCV,	"SIOCX25RCV",	"ifreq" },
6800Sstevel@tonic-gate 	{ (uint_t)SIOCX25TBL,	"SIOCX25TBL",	"ifreq" },
6810Sstevel@tonic-gate 	{ (uint_t)SIOCSLGETREQ,	"SIOCSLGETREQ",	"ifreq" },
6820Sstevel@tonic-gate 	{ (uint_t)SIOCSLSTAT,	"SIOCSLSTAT",	"ifreq" },
6830Sstevel@tonic-gate 	{ (uint_t)SIOCSIFNAME,	"SIOCSIFNAME",	"ifreq" },
6840Sstevel@tonic-gate 	{ (uint_t)SIOCGENADDR,	"SIOCGENADDR",	"ifreq" },
6850Sstevel@tonic-gate 	{ (uint_t)SIOCGIFNUM,	"SIOCGIFNUM",	NULL },
6860Sstevel@tonic-gate 	{ (uint_t)SIOCGIFMUXID,	"SIOCGIFMUXID",	"ifreq" },
6870Sstevel@tonic-gate 	{ (uint_t)SIOCSIFMUXID,	"SIOCSIFMUXID",	"ifreq" },
6880Sstevel@tonic-gate 	{ (uint_t)SIOCGIFINDEX,	"SIOCGIFINDEX",	"ifreq" },
6890Sstevel@tonic-gate 	{ (uint_t)SIOCSIFINDEX,	"SIOCSIFINDEX",	"ifreq" },
6900Sstevel@tonic-gate 	{ (uint_t)SIOCLIFREMOVEIF,	"SIOCLIFREMOVEIF",	"lifreq" },
6910Sstevel@tonic-gate 	{ (uint_t)SIOCLIFADDIF,		"SIOCLIFADDIF",		"lifreq" },
6920Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFADDR,		"SIOCSLIFADDR",		"lifreq" },
6930Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFADDR,		"SIOCGLIFADDR",		"lifreq" },
6940Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFDSTADDR,	"SIOCSLIFDSTADDR",	"lifreq" },
6950Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFDSTADDR,	"SIOCGLIFDSTADDR",	"lifreq" },
6960Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFFLAGS,	"SIOCSLIFFLAGS",	"lifreq" },
6970Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFFLAGS,	"SIOCGLIFFLAGS",	"lifreq" },
6980Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFCONF,		"SIOCGLIFCONF",		"lifconf" },
6990Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFMTU,		"SIOCSLIFMTU",		"lifreq" },
7000Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFMTU,		"SIOCGLIFMTU",		"lifreq" },
7010Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFBRDADDR,	"SIOCGLIFBRDADDR",	"lifreq" },
7020Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFBRDADDR,	"SIOCSLIFBRDADDR",	"lifreq" },
7030Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFNETMASK,	"SIOCGLIFNETMASK",	"lifreq" },
7040Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFNETMASK,	"SIOCSLIFNETMASK",	"lifreq" },
7050Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFMETRIC,	"SIOCGLIFMETRIC",	"lifreq" },
7060Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFMETRIC,	"SIOCSLIFMETRIC",	"lifreq" },
7070Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFNAME,		"SIOCSLIFNAME",		"lifreq" },
7080Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFNUM,		"SIOCGLIFNUM",		"lifnum" },
7090Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFMUXID,	"SIOCGLIFMUXID",	"lifreq" },
7100Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFMUXID,	"SIOCSLIFMUXID",	"lifreq" },
7110Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFINDEX,	"SIOCGLIFINDEX",	"lifreq" },
7120Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFINDEX,	"SIOCSLIFINDEX",	"lifreq" },
7130Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFTOKEN,	"SIOCSLIFTOKEN",	"lifreq" },
7140Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFTOKEN,	"SIOCGLIFTOKEN",	"lifreq" },
7150Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFSUBNET,	"SIOCSLIFSUBNET",	"lifreq" },
7160Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFSUBNET,	"SIOCGLIFSUBNET",	"lifreq" },
7170Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFLNKINFO,	"SIOCSLIFLNKINFO",	"lifreq" },
7180Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFLNKINFO,	"SIOCGLIFLNKINFO",	"lifreq" },
7190Sstevel@tonic-gate 	{ (uint_t)SIOCLIFDELND,		"SIOCLIFDELND",		"lifreq" },
7200Sstevel@tonic-gate 	{ (uint_t)SIOCLIFGETND,		"SIOCLIFGETND",		"lifreq" },
7210Sstevel@tonic-gate 	{ (uint_t)SIOCLIFSETND,		"SIOCLIFSETND",		"lifreq" },
7220Sstevel@tonic-gate 	{ (uint_t)SIOCTMYADDR,		"SIOCTMYADDR",	"sioc_addrreq" },
7230Sstevel@tonic-gate 	{ (uint_t)SIOCTONLINK,		"SIOCTONLINK",	"sioc_addrreq" },
7240Sstevel@tonic-gate 	{ (uint_t)SIOCTMYSITE,		"SIOCTMYSITE",	"sioc_addrreq" },
7258023SPhil.Kirk@Sun.COM 	{ (uint_t)SIOCGTUNPARAM,        "SIOCGTUNPARAM",        "iftun_req" },
7268023SPhil.Kirk@Sun.COM 	{ (uint_t)SIOCSTUNPARAM,        "SIOCSTUNPARAM",        "iftun_req" },
7270Sstevel@tonic-gate 	{ (uint_t)SIOCFIPSECONFIG,	"SIOCFIPSECONFIG",	NULL },
7280Sstevel@tonic-gate 	{ (uint_t)SIOCSIPSECONFIG,	"SIOCSIPSECONFIG",	NULL },
7290Sstevel@tonic-gate 	{ (uint_t)SIOCDIPSECONFIG,	"SIOCDIPSECONFIG",	NULL },
7300Sstevel@tonic-gate 	{ (uint_t)SIOCLIPSECONFIG,	"SIOCLIPSECONFIG",	NULL },
7318485SPeter.Memishian@Sun.COM 	{ (uint_t)SIOCGLIFBINDING,	"SIOCGLIFBINDING",	"lifreq" },
7320Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFGROUPNAME,	"SIOCSLIFGROUPNAME",	"lifreq" },
7330Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFGROUPNAME,	"SIOCGLIFGROUPNAME",	"lifreq" },
7348485SPeter.Memishian@Sun.COM 	{ (uint_t)SIOCGLIFGROUPINFO,	"SIOCGLIFGROUPINFO", "lifgroupinfo" },
7350Sstevel@tonic-gate 	{ (uint_t)SIOCGDSTINFO,		"SIOCGDSTINFO",		NULL },
7360Sstevel@tonic-gate 	{ (uint_t)SIOCGIP6ADDRPOLICY,	"SIOCGIP6ADDRPOLICY",	NULL },
7370Sstevel@tonic-gate 	{ (uint_t)SIOCSIP6ADDRPOLICY,	"SIOCSIP6ADDRPOLICY", 	NULL },
7380Sstevel@tonic-gate 	{ (uint_t)SIOCSXARP,		"SIOCSXARP",		"xarpreq" },
7390Sstevel@tonic-gate 	{ (uint_t)SIOCGXARP,		"SIOCGXARP",		"xarpreq" },
7400Sstevel@tonic-gate 	{ (uint_t)SIOCDXARP,		"SIOCDXARP",		"xarpreq" },
7410Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFZONE,		"SIOCGLIFZONE",		"lifreq" },
7420Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFZONE,		"SIOCSLIFZONE",		"lifreq" },
7430Sstevel@tonic-gate 	{ (uint_t)SIOCSCTPSOPT,		"SIOCSCTPSOPT",		NULL },
7440Sstevel@tonic-gate 	{ (uint_t)SIOCSCTPGOPT,		"SIOCSCTPGOPT",		NULL },
7450Sstevel@tonic-gate 	{ (uint_t)SIOCSCTPPEELOFF,	"SIOPCSCTPPEELOFF",	"int" },
7460Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFUSESRC,	"SIOCGLIFUSESRC",	"lifreq" },
7470Sstevel@tonic-gate 	{ (uint_t)SIOCSLIFUSESRC,	"SIOCSLIFUSESRC",	"lifreq" },
7480Sstevel@tonic-gate 	{ (uint_t)SIOCGLIFSRCOF,	"SIOCGLIFSRCOF",	"lifsrcof" },
7490Sstevel@tonic-gate 	{ (uint_t)SIOCGMSFILTER,	"SIOCGMSFILTER",    "group_filter" },
7500Sstevel@tonic-gate 	{ (uint_t)SIOCSMSFILTER,	"SIOCSMSFILTER",    "group_filter" },
7510Sstevel@tonic-gate 	{ (uint_t)SIOCGIPMSFILTER,	"SIOCGIPMSFILTER",  "ip_msfilter" },
7520Sstevel@tonic-gate 	{ (uint_t)SIOCSIPMSFILTER,	"SIOCSIPMSFILTER",  "ip_msfilter" },
7530Sstevel@tonic-gate 
7540Sstevel@tonic-gate 	/* DES encryption */
7550Sstevel@tonic-gate 	{ (uint_t)DESIOCBLOCK,	"DESIOCBLOCK", 	"desparams" },
7560Sstevel@tonic-gate 	{ (uint_t)DESIOCQUICK,	"DESIOCQUICK", 	"desparams" },
7570Sstevel@tonic-gate 
7580Sstevel@tonic-gate 	/* Printing system */
7590Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_IFCAP,	"PRNIOC_GET_IFCAP", 	NULL },
7600Sstevel@tonic-gate 	{ (uint_t)PRNIOC_SET_IFCAP,	"PRNIOC_SET_IFCAP", 	NULL },
7610Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_IFINFO,	"PRNIOC_GET_IFINFO",
7620Sstevel@tonic-gate 	    "prn_interface_info" },
7630Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_STATUS,	"PRNIOC_GET_STATUS", 	NULL },
7640Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_1284_DEVID,	"PRNIOC_GET_1284_DEVID",
7650Sstevel@tonic-gate 	    "prn_1284_device_id" },
7660Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_1284_STATUS,
7670Sstevel@tonic-gate 	    "PRNIOC_GET_IFCANIOC_GET_1284_STATUS", NULL },
7680Sstevel@tonic-gate 	{ (uint_t)PRNIOC_GET_TIMEOUTS,	"PRNIOC_GET_TIMEOUTS",
7690Sstevel@tonic-gate 	    "prn_timeouts" },
7700Sstevel@tonic-gate 	{ (uint_t)PRNIOC_SET_TIMEOUTS,	"PRNIOC_SET_TIMEOUTS",
7710Sstevel@tonic-gate 	    "prn_timeouts" },
7720Sstevel@tonic-gate 	{ (uint_t)PRNIOC_RESET,	"PRNIOC_RESET", 	NULL },
7730Sstevel@tonic-gate 
7740Sstevel@tonic-gate 	/* DTrace */
7750Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROVIDER,	"DTRACEIOC_PROVIDER",	NULL },
7760Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROBES,	"DTRACEIOC_PROBES",	NULL },
7770Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_BUFSNAP,	"DTRACEIOC_BUFSNAP",	NULL },
7780Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROBEMATCH,	"DTRACEIOC_PROBEMATCH",	NULL },
7790Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_ENABLE,	"DTRACEIOC_ENABLE",	NULL },
7800Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_AGGSNAP,	"DTRACEIOC_AGGSNAP",	NULL },
7810Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_EPROBE,	"DTRACEIOC_EPROBE",	NULL },
7820Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_PROBEARG,   "DTRACEIOC_PROBEARG",   NULL },
7830Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_CONF,	"DTRACEIOC_CONF",	NULL },
7840Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_STATUS,	"DTRACEIOC_STATUS",	NULL },
7850Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_GO,		"DTRACEIOC_GO",		NULL },
7860Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_STOP,	"DTRACEIOC_STOP",	NULL },
7870Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_AGGDESC,	"DTRACEIOC_AGGDESC",	NULL },
7880Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_FORMAT,	"DTRACEIOC_FORMAT",	NULL },
7890Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_DOFGET,	"DTRACEIOC_DOFGET",	NULL },
7900Sstevel@tonic-gate 	{ (uint_t)DTRACEIOC_REPLICATE,	"DTRACEIOC_REPLICATE",	NULL },
7910Sstevel@tonic-gate 
7920Sstevel@tonic-gate 	{ (uint_t)DTRACEHIOC_ADD,	"DTRACEHIOC_ADD",	NULL },
7930Sstevel@tonic-gate 	{ (uint_t)DTRACEHIOC_REMOVE,	"DTRACEHIOC_REMOVE",	NULL },
7940Sstevel@tonic-gate 	{ (uint_t)DTRACEHIOC_ADDDOF,	"DTRACEHIOC_ADDDOF",	NULL },
7950Sstevel@tonic-gate 
7960Sstevel@tonic-gate 	/* /dev/cryptoadm ioctl() control codes */
7970Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_VERSION,	"CRYPTO_GET_VERSION",	NULL },
7980Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_DEV_LIST,	"CRYPTO_GET_DEV_LIST",	NULL },
7990Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_SOFT_LIST,	"CRYPTO_GET_SOFT_LIST",	NULL },
8000Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_DEV_INFO,	"CRYPTO_GET_DEV_INFO",	NULL },
8010Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_SOFT_INFO,	"CRYPTO_GET_SOFT_INFO",	NULL },
8020Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_DEV_DISABLED,	"CRYPTO_LOAD_DEV_DISABLED",
8030Sstevel@tonic-gate 	    NULL },
8040Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_SOFT_DISABLED,	"CRYPTO_LOAD_SOFT_DISABLED",
8050Sstevel@tonic-gate 	    NULL },
8060Sstevel@tonic-gate 	{ (uint_t)CRYPTO_UNLOAD_SOFT_MODULE,	"CRYPTO_UNLOAD_SOFT_MODULE",
8070Sstevel@tonic-gate 	    NULL },
8080Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_SOFT_CONFIG,	"CRYPTO_LOAD_SOFT_CONFIG",
8090Sstevel@tonic-gate 	    NULL },
8100Sstevel@tonic-gate 	{ (uint_t)CRYPTO_POOL_CREATE,	"CRYPTO_POOL_CREATE",	NULL },
8110Sstevel@tonic-gate 	{ (uint_t)CRYPTO_POOL_WAIT,	"CRYPTO_POOL_WAIT",	NULL },
8120Sstevel@tonic-gate 	{ (uint_t)CRYPTO_POOL_RUN,	"CRYPTO_POOL_RUN",	NULL },
8130Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOAD_DOOR,	"CRYPTO_LOAD_DOOR",	NULL },
8140Sstevel@tonic-gate 
8150Sstevel@tonic-gate 	/* /dev/crypto ioctl() control codes */
8160Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_FUNCTION_LIST,	"CRYPTO_GET_FUNCTION_LIST",
8170Sstevel@tonic-gate 	    NULL },
8180Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_MECHANISM_NUMBER,	"CRYPTO_GET_MECHANISM_NUMBER",
8190Sstevel@tonic-gate 	    NULL },
8200Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OPEN_SESSION,	"CRYPTO_OPEN_SESSION",	NULL },
8210Sstevel@tonic-gate 	{ (uint_t)CRYPTO_CLOSE_SESSION,	"CRYPTO_CLOSE_SESSION",	NULL },
8220Sstevel@tonic-gate 	{ (uint_t)CRYPTO_CLOSE_ALL_SESSIONS,	"CRYPTO_CLOSE_ALL_SESSIONS",
8230Sstevel@tonic-gate 	    NULL },
8240Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOGIN,		"CRYPTO_LOGIN",		NULL },
8250Sstevel@tonic-gate 	{ (uint_t)CRYPTO_LOGOUT,	"CRYPTO_LOGOUT",	NULL },
8260Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT,	"CRYPTO_ENCRYPT",	NULL },
8270Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT_INIT,	"CRYPTO_ENCRYPT_INIT",	NULL },
8280Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT_UPDATE,	"CRYPTO_ENCRYPT_UPDATE",
8290Sstevel@tonic-gate 	    NULL },
8300Sstevel@tonic-gate 	{ (uint_t)CRYPTO_ENCRYPT_FINAL,	"CRYPTO_ENCRYPT_FINAL",	NULL },
8310Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT,	"CRYPTO_DECRYPT",	NULL },
8320Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_INIT,	"CRYPTO_DECRYPT_INIT",	NULL },
8330Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_UPDATE,	"CRYPTO_DECRYPT_UPDATE",
8340Sstevel@tonic-gate 	    NULL },
8350Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_FINAL,	"CRYPTO_DECRYPT_FINAL",	NULL },
8360Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST,	"CRYPTO_DIGEST",	NULL },
8370Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_INIT,	"CRYPTO_DIGEST_INIT",	NULL },
8380Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_UPDATE,	"CRYPTO_DIGEST_UPDATE",	NULL },
8390Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_KEY,	"CRYPTO_DIGEST_KEY",	NULL },
8400Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_FINAL,	"CRYPTO_DIGEST_FINAL",	NULL },
8410Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC,		"CRYPTO_MAC",		NULL },
8420Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC_INIT,	"CRYPTO_MAC_INIT",	NULL },
8430Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC_UPDATE,	"CRYPTO_MAC_UPDATE",	NULL },
8440Sstevel@tonic-gate 	{ (uint_t)CRYPTO_MAC_FINAL,	"CRYPTO_MAC_FINAL",	NULL },
8450Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN,		"CRYPTO_SIGN",		NULL },
8460Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_INIT,	"CRYPTO_SIGN_INIT",	NULL },
8470Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_UPDATE,	"CRYPTO_SIGN_UPDATE",	NULL },
8480Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_FINAL,	"CRYPTO_SIGN_FINAL",	NULL },
8490Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_RECOVER_INIT,	"CRYPTO_SIGN_RECOVER_INIT",
8500Sstevel@tonic-gate 	    NULL },
8510Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_RECOVER,	"CRYPTO_SIGN_RECOVER",	NULL },
8520Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY,	"CRYPTO_VERIFY",	NULL },
8530Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_INIT,	"CRYPTO_VERIFY_INIT",	NULL },
8540Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_UPDATE,	"CRYPTO_VERIFY_UPDATE",	NULL },
8550Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_FINAL,	"CRYPTO_VERIFY_FINAL",	NULL },
8560Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_RECOVER_INIT,	"CRYPTO_VERIFY_RECOVER_INIT",
8570Sstevel@tonic-gate 	    NULL },
8580Sstevel@tonic-gate 	{ (uint_t)CRYPTO_VERIFY_RECOVER,	"CRYPTO_VERIFY_RECOVER",
8590Sstevel@tonic-gate 	    NULL },
8600Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DIGEST_ENCRYPT_UPDATE,	"CRYPTO_DIGEST_ENCRYPT_UPDATE",
8610Sstevel@tonic-gate 	    NULL },
8620Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_DIGEST_UPDATE,	"CRYPTO_DECRYPT_DIGEST_UPDATE",
8630Sstevel@tonic-gate 	    NULL },
8640Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SIGN_ENCRYPT_UPDATE,	"CRYPTO_SIGN_ENCRYPT_UPDATE",
8650Sstevel@tonic-gate 	    NULL },
8660Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DECRYPT_VERIFY_UPDATE,	"CRYPTO_DECRYPT_VERIFY_UPDATE",
8670Sstevel@tonic-gate 	    NULL },
8680Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SEED_RANDOM,	"CRYPTO_SEED_RANDOM",	NULL },
8690Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GENERATE_RANDOM,	"CRYPTO_GENERATE_RANDOM",
8700Sstevel@tonic-gate 	    NULL },
8710Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_CREATE,	"CRYPTO_OBJECT_CREATE",	NULL },
8720Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_COPY,	"CRYPTO_OBJECT_COPY",	NULL },
8730Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_DESTROY,	"CRYPTO_OBJECT_DESTROY",
8740Sstevel@tonic-gate 	    NULL },
8750Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_GET_ATTRIBUTE_VALUE,
8760Sstevel@tonic-gate 	    "CRYPTO_OBJECT_GET_ATTRIBUTE_VALUE",	NULL },
8770Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_GET_SIZE, "CRYPTO_OBJECT_GET_SIZE",	NULL },
8780Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_SET_ATTRIBUTE_VALUE,
8790Sstevel@tonic-gate 	    "CRYPTO_OBJECT_SET_ATTRIBUTE_VALUE",	NULL },
8800Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_FIND_INIT,	"CRYPTO_OBJECT_FIND_INIT",
8810Sstevel@tonic-gate 	    NULL },
8820Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_FIND_UPDATE,	"CRYPTO_OBJECT_FIND_UPDATE",
8830Sstevel@tonic-gate 	    NULL },
8840Sstevel@tonic-gate 	{ (uint_t)CRYPTO_OBJECT_FIND_FINAL,	"CRYPTO_OBJECT_FIND_FINAL",
8850Sstevel@tonic-gate 	    NULL },
8860Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GENERATE_KEY,	"CRYPTO_GENERATE_KEY",	NULL },
8870Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GENERATE_KEY_PAIR,	"CRYPTO_GENERATE_KEY_PAIR",
8880Sstevel@tonic-gate 	    NULL },
8890Sstevel@tonic-gate 	{ (uint_t)CRYPTO_WRAP_KEY,	"CRYPTO_WRAP_KEY",	NULL },
8900Sstevel@tonic-gate 	{ (uint_t)CRYPTO_UNWRAP_KEY,	"CRYPTO_UNWRAP_KEY",	NULL },
8910Sstevel@tonic-gate 	{ (uint_t)CRYPTO_DERIVE_KEY,	"CRYPTO_DERIVE_KEY",	NULL },
8920Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_LIST,	"CRYPTO_GET_PROVIDER_LIST",
8930Sstevel@tonic-gate 	    NULL },
8940Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_INFO,	"CRYPTO_GET_PROVIDER_INFO",
8950Sstevel@tonic-gate 	    NULL },
8960Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_MECHANISMS,
8970Sstevel@tonic-gate 	    "CRYPTO_GET_PROVIDER_MECHANISMS",	NULL },
8980Sstevel@tonic-gate 	{ (uint_t)CRYPTO_GET_PROVIDER_MECHANISM_INFO,
8990Sstevel@tonic-gate 	    "CRYPTO_GET_PROVIDER_MECHANISM_INFO",	NULL },
9000Sstevel@tonic-gate 	{ (uint_t)CRYPTO_INIT_TOKEN,	"CRYPTO_INIT_TOKEN",	NULL },
9010Sstevel@tonic-gate 	{ (uint_t)CRYPTO_INIT_PIN,	"CRYPTO_INIT_PIN",	NULL },
9020Sstevel@tonic-gate 	{ (uint_t)CRYPTO_SET_PIN,	"CRYPTO_SET_PIN",	NULL },
9034219Smcpowers 	{ (uint_t)CRYPTO_NOSTORE_GENERATE_KEY,
9044219Smcpowers 	    "CRYPTO_NOSTORE_GENERATE_KEY",	NULL },
9054219Smcpowers 	{ (uint_t)CRYPTO_NOSTORE_GENERATE_KEY_PAIR,
9064219Smcpowers 	    "CRYPTO_NOSTORE_GENERATE_KEY_PAIR",	NULL },
9074219Smcpowers 	{ (uint_t)CRYPTO_NOSTORE_DERIVE_KEY,
9084219Smcpowers 	    "CRYPTO_NOSTORE_DERIVE_KEY",	NULL },
9090Sstevel@tonic-gate 
9100Sstevel@tonic-gate 	/* kbio ioctls */
9110Sstevel@tonic-gate 	{ (uint_t)KIOCTRANS,		"KIOCTRANS",	NULL },
9120Sstevel@tonic-gate 	{ (uint_t)KIOCGTRANS,		"KIOCGTRANS",	NULL },
9130Sstevel@tonic-gate 	{ (uint_t)KIOCTRANSABLE,	"KIOCTRANSABLE",	NULL },
9140Sstevel@tonic-gate 	{ (uint_t)KIOCGTRANSABLE,	"KIOCGTRANSABLE",	NULL },
9150Sstevel@tonic-gate 	{ (uint_t)KIOCSETKEY,		"KIOCSETKEY",	NULL },
9160Sstevel@tonic-gate 	{ (uint_t)KIOCGETKEY,		"KIOCGETKEY",	NULL },
9170Sstevel@tonic-gate 	{ (uint_t)KIOCCMD,		"KIOCCMD",	NULL },
9180Sstevel@tonic-gate 	{ (uint_t)KIOCTYPE,		"KIOCTYPE",	NULL },
9190Sstevel@tonic-gate 	{ (uint_t)KIOCSDIRECT,		"KIOCSDIRECT",	NULL },
9200Sstevel@tonic-gate 	{ (uint_t)KIOCGDIRECT,		"KIOCGDIRECT",	NULL },
9210Sstevel@tonic-gate 	{ (uint_t)KIOCSKEY,		"KIOCSKEY",	NULL },
9220Sstevel@tonic-gate 	{ (uint_t)KIOCGKEY,		"KIOCGKEY",	NULL },
9230Sstevel@tonic-gate 	{ (uint_t)KIOCSLED,		"KIOCSLED",	NULL },
9240Sstevel@tonic-gate 	{ (uint_t)KIOCGLED,		"KIOCGLED",	NULL },
9250Sstevel@tonic-gate 	{ (uint_t)KIOCSCOMPAT,		"KIOCSCOMPAT",	NULL },
9260Sstevel@tonic-gate 	{ (uint_t)KIOCGCOMPAT,		"KIOCGCOMPAT",	NULL },
9270Sstevel@tonic-gate 	{ (uint_t)KIOCSLAYOUT,		"KIOCSLAYOUT",	NULL },
9280Sstevel@tonic-gate 	{ (uint_t)KIOCLAYOUT,		"KIOCLAYOUT",	NULL },
9290Sstevel@tonic-gate 	{ (uint_t)KIOCSKABORTEN,	"KIOCSKABORTEN",	NULL },
9300Sstevel@tonic-gate 	{ (uint_t)KIOCGRPTDELAY,	"KIOCGRPTDELAY",	NULL },
9310Sstevel@tonic-gate 	{ (uint_t)KIOCSRPTDELAY,	"KIOCSRPTDELAY",	NULL },
9320Sstevel@tonic-gate 	{ (uint_t)KIOCGRPTRATE,		"KIOCGRPTRATE",	NULL },
9330Sstevel@tonic-gate 	{ (uint_t)KIOCSRPTRATE,		"KIOCSRPTRATE",	NULL },
9343497Srz201010 	{ (uint_t)KIOCSETFREQ,		"KIOCSETFREQ",	NULL },
9355129Smarx 	{ (uint_t)KIOCMKTONE,		"KIOCMKTONE",	NULL },
9360Sstevel@tonic-gate 
9370Sstevel@tonic-gate 	/* ptm/pts driver I_STR ioctls */
9380Sstevel@tonic-gate 	{ (uint_t)ISPTM,		"ISPTM",		NULL},
9390Sstevel@tonic-gate 	{ (uint_t)UNLKPT,		"UNLKPT",		NULL},
9400Sstevel@tonic-gate 	{ (uint_t)PTSSTTY,		"PTSSTTY",		NULL},
9410Sstevel@tonic-gate 	{ (uint_t)ZONEPT,		"ZONEPT",		NULL},
9423442Svikram 	{ (uint_t)OWNERPT,		"OWNERPT",		NULL},
9430Sstevel@tonic-gate 
9440Sstevel@tonic-gate 	/* aggr link aggregation pseudo driver ioctls */
9450Sstevel@tonic-gate 	{ (uint_t)LAIOC_CREATE,		"LAIOC_CREATE",		"laioc_create"},
9460Sstevel@tonic-gate 	{ (uint_t)LAIOC_DELETE,		"LAIOC_DELETE",		"laioc_delete"},
9470Sstevel@tonic-gate 	{ (uint_t)LAIOC_INFO,		"LAIOC_INFO",		"laioc_info"},
9480Sstevel@tonic-gate 	{ (uint_t)LAIOC_ADD,		"LAIOC_ADD",
9490Sstevel@tonic-gate 	    "laioc_add_rem"},
9500Sstevel@tonic-gate 	{ (uint_t)LAIOC_REMOVE,		"LAIOC_REMOVE",
9510Sstevel@tonic-gate 	    "laioc_add_rem"},
9520Sstevel@tonic-gate 	{ (uint_t)LAIOC_MODIFY,		"LAIOC_MODIFY",		"laioc_modify"},
9530Sstevel@tonic-gate 
954269Sericheng 	/* dld data-link ioctls */
9555895Syz147064 	{ (uint_t)DLDIOC_ATTR,		"DLDIOC_ATTR",		"dld_ioc_attr"},
9565895Syz147064 	{ (uint_t)DLDIOC_PHYS_ATTR,	"DLDIOC_PHYS_ATTR",
9575895Syz147064 		"dld_ioc_phys_attr"},
9588275SEric Cheng 	{ (uint_t)DLDIOC_DOORSERVER,	"DLDIOC_DOORSERVER", "dld_ioc_door"},
9598275SEric Cheng 	{ (uint_t)DLDIOC_RENAME,	"DLDIOC_RENAME", "dld_ioc_rename"},
9608275SEric Cheng 	{ (uint_t)DLDIOC_SECOBJ_GET,		"DLDIOC_SECOBJ_GET",
9618275SEric Cheng 		"dld_ioc_secobj_get"},
9628275SEric Cheng 	{ (uint_t)DLDIOC_SECOBJ_SET,		"DLDIOC_SECOBJ_SET",
9638275SEric Cheng 		"dld_ioc_secobj_set"},
9648275SEric Cheng 	{ (uint_t)DLDIOC_SECOBJ_UNSET,		"DLDIOC_SECOBJ_UNSET",
9658275SEric Cheng 		"dld_ioc_secobj_unset"},
9668275SEric Cheng 	{ (uint_t)DLDIOC_MACADDRGET,		"DLDIOC_MACADDRGET",
9678275SEric Cheng 		"dld_ioc_macaddrget"},
9688275SEric Cheng 	{ (uint_t)DLDIOC_SETMACPROP,		"DLDIOC_SETMACPROP",
9698275SEric Cheng 		"dld_ioc_macprop_s"},
9708275SEric Cheng 	{ (uint_t)DLDIOC_GETMACPROP,		"DLDIOC_GETMACPROP",
9717342SAruna.Ramakrishna@Sun.COM 		"dld_ioc_macprop_s"},
9728275SEric Cheng 	{ (uint_t)DLDIOC_ADDFLOW,		"DLDIOC_ADDFLOW",
9738275SEric Cheng 		"dld_ioc_addflow"},
9748275SEric Cheng 	{ (uint_t)DLDIOC_REMOVEFLOW,		"DLDIOC_REMOVEFLOW",
9758275SEric Cheng 		"dld_ioc_removeflow"},
9768275SEric Cheng 	{ (uint_t)DLDIOC_MODIFYFLOW,		"DLDIOC_MODIFYFLOW",
9778275SEric Cheng 		"dld_ioc_modifyflow"},
9788275SEric Cheng 	{ (uint_t)DLDIOC_WALKFLOW,		"DLDIOC_WALKFLOW",
9798275SEric Cheng 		"dld_ioc_walkflow"},
9808275SEric Cheng 	{ (uint_t)DLDIOC_USAGELOG,		"DLDIOC_USAGELOG",
9818275SEric Cheng 		"dld_ioc_usagelog"},
9828275SEric Cheng 
9839815SRishi.Srivatsavai@Sun.COM 	/* simnet ioctls */
9849815SRishi.Srivatsavai@Sun.COM 	{ (uint_t)SIMNET_IOC_CREATE,		"SIMNET_IOC_CREATE",
9859815SRishi.Srivatsavai@Sun.COM 		"simnet_ioc_create"},
9869815SRishi.Srivatsavai@Sun.COM 	{ (uint_t)SIMNET_IOC_DELETE,		"SIMNET_IOC_DELETE",
9879815SRishi.Srivatsavai@Sun.COM 		"simnet_ioc_delete"},
9889815SRishi.Srivatsavai@Sun.COM 	{ (uint_t)SIMNET_IOC_INFO,		"SIMNET_IOC_INFO",
9899815SRishi.Srivatsavai@Sun.COM 		"simnet_ioc_info"},
9909815SRishi.Srivatsavai@Sun.COM 	{ (uint_t)SIMNET_IOC_MODIFY,		"SIMNET_IOC_MODIFY",
9919815SRishi.Srivatsavai@Sun.COM 		"simnet_ioc_info"},
9929815SRishi.Srivatsavai@Sun.COM 
9938275SEric Cheng 	/* vnic ioctls */
9948275SEric Cheng 	{ (uint_t)VNIC_IOC_CREATE,		"VNIC_IOC_CREATE",
9958275SEric Cheng 		"vnic_ioc_create"},
9968275SEric Cheng 	{ (uint_t)VNIC_IOC_DELETE,		"VNIC_IOC_DELETE",
9978275SEric Cheng 		"vnic_ioc_delete"},
9988275SEric Cheng 	{ (uint_t)VNIC_IOC_INFO,		"VNIC_IOC_INFO",
9998275SEric Cheng 		"vnic_ioc_info"},
1000789Sahrens 
1001789Sahrens 	/* ZFS ioctls */
1002789Sahrens 	{ (uint_t)ZFS_IOC_POOL_CREATE,		"ZFS_IOC_POOL_CREATE",
1003789Sahrens 		"zfs_cmd_t" },
1004789Sahrens 	{ (uint_t)ZFS_IOC_POOL_DESTROY,		"ZFS_IOC_POOL_DESTROY",
1005789Sahrens 		"zfs_cmd_t" },
1006789Sahrens 	{ (uint_t)ZFS_IOC_POOL_IMPORT,		"ZFS_IOC_POOL_IMPORT",
1007789Sahrens 		"zfs_cmd_t" },
1008789Sahrens 	{ (uint_t)ZFS_IOC_POOL_EXPORT,		"ZFS_IOC_POOL_EXPORT",
1009789Sahrens 		"zfs_cmd_t" },
1010789Sahrens 	{ (uint_t)ZFS_IOC_POOL_CONFIGS,		"ZFS_IOC_POOL_CONFIGS",
1011789Sahrens 		"zfs_cmd_t" },
1012789Sahrens 	{ (uint_t)ZFS_IOC_POOL_STATS,		"ZFS_IOC_POOL_STATS",
1013789Sahrens 		"zfs_cmd_t" },
1014789Sahrens 	{ (uint_t)ZFS_IOC_POOL_TRYIMPORT,	"ZFS_IOC_POOL_TRYIMPORT",
1015789Sahrens 		"zfs_cmd_t" },
1016789Sahrens 	{ (uint_t)ZFS_IOC_POOL_SCRUB,		"ZFS_IOC_POOL_SCRUB",
1017789Sahrens 		"zfs_cmd_t" },
1018789Sahrens 	{ (uint_t)ZFS_IOC_POOL_FREEZE,		"ZFS_IOC_POOL_FREEZE",
1019789Sahrens 		"zfs_cmd_t" },
10201760Seschrock 	{ (uint_t)ZFS_IOC_POOL_UPGRADE,		"ZFS_IOC_POOL_UPGRADE",
10211760Seschrock 		"zfs_cmd_t" },
10222926Sek110237 	{ (uint_t)ZFS_IOC_POOL_GET_HISTORY,	"ZFS_IOC_POOL_GET_HISTORY",
10232926Sek110237 		"zfs_cmd_t" },
1024789Sahrens 	{ (uint_t)ZFS_IOC_VDEV_ADD,		"ZFS_IOC_VDEV_ADD",
1025789Sahrens 		"zfs_cmd_t" },
1026789Sahrens 	{ (uint_t)ZFS_IOC_VDEV_REMOVE,		"ZFS_IOC_VDEV_REMOVE",
1027789Sahrens 		"zfs_cmd_t" },
10284451Seschrock 	{ (uint_t)ZFS_IOC_VDEV_SET_STATE,	"ZFS_IOC_VDEV_SET_STATE",
1029789Sahrens 		"zfs_cmd_t" },
1030789Sahrens 	{ (uint_t)ZFS_IOC_VDEV_ATTACH,		"ZFS_IOC_VDEV_ATTACH",
1031789Sahrens 		"zfs_cmd_t" },
1032789Sahrens 	{ (uint_t)ZFS_IOC_VDEV_DETACH,		"ZFS_IOC_VDEV_DETACH",
1033789Sahrens 		"zfs_cmd_t" },
10341354Seschrock 	{ (uint_t)ZFS_IOC_VDEV_SETPATH,		"ZFS_IOC_VDEV_SETPATH",
10351354Seschrock 		"zfs_cmd_t" },
10369425SEric.Schrock@Sun.COM 	{ (uint_t)ZFS_IOC_VDEV_SETFRU,		"ZFS_IOC_VDEV_SETFRU",
10379425SEric.Schrock@Sun.COM 		"zfs_cmd_t" },
1038789Sahrens 	{ (uint_t)ZFS_IOC_OBJSET_STATS,		"ZFS_IOC_OBJSET_STATS",
1039789Sahrens 		"zfs_cmd_t" },
10408761STim.Haley@Sun.COM 	{ (uint_t)ZFS_IOC_OBJSET_ZPLPROPS,	"ZFS_IOC_OBJSET_ZPLPROPS",
10418761STim.Haley@Sun.COM 		"zfs_cmd_t" },
1042789Sahrens 	{ (uint_t)ZFS_IOC_DATASET_LIST_NEXT,	"ZFS_IOC_DATASET_LIST_NEXT",
1043789Sahrens 		"zfs_cmd_t" },
1044789Sahrens 	{ (uint_t)ZFS_IOC_SNAPSHOT_LIST_NEXT,	"ZFS_IOC_SNAPSHOT_LIST_NEXT",
1045789Sahrens 		"zfs_cmd_t" },
1046789Sahrens 	{ (uint_t)ZFS_IOC_SET_PROP,		"ZFS_IOC_SET_PROP",
1047789Sahrens 		"zfs_cmd_t" },
1048789Sahrens 	{ (uint_t)ZFS_IOC_CREATE_MINOR,		"ZFS_IOC_CREATE_MINOR",
1049789Sahrens 		"zfs_cmd_t" },
1050789Sahrens 	{ (uint_t)ZFS_IOC_REMOVE_MINOR,		"ZFS_IOC_REMOVE_MINOR",
1051789Sahrens 		"zfs_cmd_t" },
1052789Sahrens 	{ (uint_t)ZFS_IOC_CREATE,		"ZFS_IOC_CREATE",
1053789Sahrens 		"zfs_cmd_t" },
1054789Sahrens 	{ (uint_t)ZFS_IOC_DESTROY,		"ZFS_IOC_DESTROY",
1055789Sahrens 		"zfs_cmd_t" },
1056789Sahrens 	{ (uint_t)ZFS_IOC_ROLLBACK,		"ZFS_IOC_ROLLBACK",
1057789Sahrens 		"zfs_cmd_t" },
1058789Sahrens 	{ (uint_t)ZFS_IOC_RENAME,		"ZFS_IOC_RENAME",
1059789Sahrens 		"zfs_cmd_t" },
10605367Sahrens 	{ (uint_t)ZFS_IOC_RECV,			"ZFS_IOC_RECV",
1061789Sahrens 		"zfs_cmd_t" },
10625367Sahrens 	{ (uint_t)ZFS_IOC_SEND,			"ZFS_IOC_SEND",
1063789Sahrens 		"zfs_cmd_t" },
10641544Seschrock 	{ (uint_t)ZFS_IOC_INJECT_FAULT,		"ZFS_IOC_INJECT_FAULT",
10651544Seschrock 		"zfs_cmd_t" },
10661544Seschrock 	{ (uint_t)ZFS_IOC_CLEAR_FAULT,		"ZFS_IOC_CLEAR_FAULT",
10671544Seschrock 		"zfs_cmd_t" },
10681544Seschrock 	{ (uint_t)ZFS_IOC_INJECT_LIST_NEXT,	"ZFS_IOC_INJECT_LIST_NEXT",
10691544Seschrock 		"zfs_cmd_t" },
10701544Seschrock 	{ (uint_t)ZFS_IOC_ERROR_LOG,		"ZFS_IOC_ERROR_LOG",
10711544Seschrock 		"zfs_cmd_t" },
10721544Seschrock 	{ (uint_t)ZFS_IOC_CLEAR,		"ZFS_IOC_CLEAR",
10731544Seschrock 		"zfs_cmd_t" },
10742082Seschrock 	{ (uint_t)ZFS_IOC_PROMOTE,		"ZFS_IOC_PROMOTE",
10752082Seschrock 		"zfs_cmd_t" },
10762199Sahrens 	{ (uint_t)ZFS_IOC_DESTROY_SNAPS,	"ZFS_IOC_DESTROY_SNAPS",
10772199Sahrens 		"zfs_cmd_t" },
10782199Sahrens 	{ (uint_t)ZFS_IOC_SNAPSHOT,		"ZFS_IOC_SNAPSHOT",
10792199Sahrens 		"zfs_cmd_t" },
10803444Sek110237 	{ (uint_t)ZFS_IOC_DSOBJ_TO_DSNAME,	"ZFS_IOC_DSOBJ_TO_DSNAME",
10813444Sek110237 		"zfs_cmd_t" },
10823444Sek110237 	{ (uint_t)ZFS_IOC_OBJ_TO_PATH,		"ZFS_IOC_OBJ_TO_PATH",
10833444Sek110237 		"zfs_cmd_t" },
10843912Slling 	{ (uint_t)ZFS_IOC_POOL_SET_PROPS,	"ZFS_IOC_POOL_SET_PROPS",
10853912Slling 		"zfs_cmd_t" },
10863912Slling 	{ (uint_t)ZFS_IOC_POOL_GET_PROPS,	"ZFS_IOC_POOL_GET_PROPS",
10873912Slling 		"zfs_cmd_t" },
10884543Smarks 	{ (uint_t)ZFS_IOC_SET_FSACL,		"ZFS_IOC_SET_FSACL",
10894543Smarks 		"zfs_cmd_t" },
10904543Smarks 	{ (uint_t)ZFS_IOC_GET_FSACL,		"ZFS_IOC_GET_FSACL",
10914543Smarks 		"zfs_cmd_t" },
10924543Smarks 	{ (uint_t)ZFS_IOC_ISCSI_PERM_CHECK,	"ZFS_IOC_ISCSI_PERM_CHECK",
10934543Smarks 		"zfs_cmd_t" },
10944543Smarks 	{ (uint_t)ZFS_IOC_SHARE,		"ZFS_IOC_SHARE",
10954543Smarks 		"zfs_cmd_t" },
10964849Sahrens 	{ (uint_t)ZFS_IOC_INHERIT_PROP,		"ZFS_IOC_INHERIT_PROP",
10974849Sahrens 		"zfs_cmd_t" },
10988845Samw@Sun.COM 	{ (uint_t)ZFS_IOC_SMB_ACL,		"ZFS_IOC_SMB_ACL",
10998845Samw@Sun.COM 		"zfs_cmd_t" },
11009396SMatthew.Ahrens@Sun.COM 	{ (uint_t)ZFS_IOC_USERSPACE_ONE,	"ZFS_IOC_USERSPACE_ONE",
11019396SMatthew.Ahrens@Sun.COM 		"zfs_cmd_t" },
11029396SMatthew.Ahrens@Sun.COM 	{ (uint_t)ZFS_IOC_USERSPACE_MANY,	"ZFS_IOC_USERSPACE_MANY",
11039396SMatthew.Ahrens@Sun.COM 		"zfs_cmd_t" },
11049396SMatthew.Ahrens@Sun.COM 	{ (uint_t)ZFS_IOC_USERSPACE_UPGRADE,	"ZFS_IOC_USERSPACE_UPGRADE",
11059396SMatthew.Ahrens@Sun.COM 		"zfs_cmd_t" },
1106*10242Schris.kirby@sun.com 	{ (uint_t)ZFS_IOC_HOLD,			"ZFS_IOC_HOLD",
1107*10242Schris.kirby@sun.com 		"zfs_cmd_t" },
1108*10242Schris.kirby@sun.com 	{ (uint_t)ZFS_IOC_RELEASE,		"ZFS_IOC_RELEASE",
1109*10242Schris.kirby@sun.com 		"zfs_cmd_t" },
1110*10242Schris.kirby@sun.com 	{ (uint_t)ZFS_IOC_GET_HOLDS,		"ZFS_IOC_GET_HOLDS",
1111*10242Schris.kirby@sun.com 		"zfs_cmd_t" },
1112789Sahrens 
11131400Skrishna 	/* kssl ioctls */
11141400Skrishna 	{ (uint_t)KSSL_ADD_ENTRY,		"KSSL_ADD_ENTRY",
11151400Skrishna 		"kssl_params_t"},
11161400Skrishna 	{ (uint_t)KSSL_DELETE_ENTRY,		"KSSL_DELETE_ENTRY",
11171400Skrishna 		"sockaddr_in"},
11181400Skrishna 
11198863SEdward.Pilatowicz@Sun.COM 	/* disk ioctls - (0x04 << 8) - dkio.h */
11206318Sedp 	{ (uint_t)DKIOCGGEOM,		"DKIOCGGEOM",
11216318Sedp 		"struct dk_geom"},
11226318Sedp 	{ (uint_t)DKIOCINFO,		"DKIOCINFO",
11236318Sedp 		"struct dk_info"},
11248863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCEJECT,		"DKIOCEJECT",
11258863SEdward.Pilatowicz@Sun.COM 		NULL},
11266318Sedp 	{ (uint_t)DKIOCGVTOC,		"DKIOCGVTOC",
11276318Sedp 		"struct vtoc"},
11286318Sedp 	{ (uint_t)DKIOCSVTOC,		"DKIOCSVTOC",
11296318Sedp 		"struct vtoc"},
11308863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGEXTVTOC,	"DKIOCGEXTVTOC",
11318863SEdward.Pilatowicz@Sun.COM 		"struct extvtoc"},
11328863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSEXTVTOC,	"DKIOCSEXTVTOC",
11338863SEdward.Pilatowicz@Sun.COM 		"struct extvtoc"},
11348863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCFLUSHWRITECACHE,	"DKIOCFLUSHWRITECACHE",
11358863SEdward.Pilatowicz@Sun.COM 		NULL},
11368863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGETWCE,		"DKIOCGETWCE",
11376318Sedp 		NULL},
11388863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSETWCE,		"DKIOCSETWCE",
11398863SEdward.Pilatowicz@Sun.COM 		NULL},
11408863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSGEOM,		"DKIOCSGEOM",
11418863SEdward.Pilatowicz@Sun.COM 		"struct dk_geom"},
11428863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSAPART,		"DKIOCSAPART",
11438863SEdward.Pilatowicz@Sun.COM 		"struct dk_allmap"},
11448863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGAPART,		"DKIOCGAPART",
11458863SEdward.Pilatowicz@Sun.COM 		"struct dk_allmap"},
11466318Sedp 	{ (uint_t)DKIOCG_PHYGEOM,	"DKIOCG_PHYGEOM",
11476318Sedp 		"struct dk_geom"},
11486318Sedp 	{ (uint_t)DKIOCG_VIRTGEOM,	"DKIOCG_VIRTGEOM",
11496318Sedp 		"struct dk_geom"},
11508863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCLOCK,		"DKIOCLOCK",
11518863SEdward.Pilatowicz@Sun.COM 		NULL},
11528863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCUNLOCK,		"DKIOCUNLOCK",
11538863SEdward.Pilatowicz@Sun.COM 		NULL},
11548863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSTATE,		"DKIOCSTATE",
11558863SEdward.Pilatowicz@Sun.COM 		NULL},
11568863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCREMOVABLE,	"DKIOCREMOVABLE",
11578863SEdward.Pilatowicz@Sun.COM 		NULL},
11588863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCHOTPLUGGABLE,	"DKIOCHOTPLUGGABLE",
11598863SEdward.Pilatowicz@Sun.COM 		NULL},
11608863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCADDBAD,		"DKIOCADDBAD",
11618863SEdward.Pilatowicz@Sun.COM 		NULL},
11628863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGETDEF,		"DKIOCGETDEF",
11638863SEdward.Pilatowicz@Sun.COM 		NULL},
11648863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCPARTINFO,	"DKIOCPARTINFO",
11658863SEdward.Pilatowicz@Sun.COM 		"struct part_info"},
11668863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCEXTPARTINFO,	"DKIOCEXTPARTINFO",
11678863SEdward.Pilatowicz@Sun.COM 		"struct extpart_info"},
11686318Sedp 	{ (uint_t)DKIOCGMEDIAINFO,	"DKIOCGMEDIAINFO",
11696318Sedp 		"struct dk_minfo"},
11708863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGMBOOT,		"DKIOCGMBOOT",
11718863SEdward.Pilatowicz@Sun.COM 		NULL},
11728863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSMBOOT,		"DKIOCSMBOOT",
11738863SEdward.Pilatowicz@Sun.COM 		NULL},
11748863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSETEFI,		"DKIOCSETEFI",
11758863SEdward.Pilatowicz@Sun.COM 		"struct dk_efi"},
11768863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGETEFI,		"DKIOCGETEFI",
11778863SEdward.Pilatowicz@Sun.COM 		"struct dk_efi"},
11788863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCPARTITION,	"DKIOCPARTITION",
11798863SEdward.Pilatowicz@Sun.COM 		"struct partition64"},
11808863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCGETVOLCAP,	"DKIOCGETVOLCAP",
11818863SEdward.Pilatowicz@Sun.COM 		"struct volcap_t"},
11828863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCSETVOLCAP,	"DKIOCSETVOLCAP",
11838863SEdward.Pilatowicz@Sun.COM 		"struct volcap_t"},
11848863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCDMR,		"DKIOCDMR",
11858863SEdward.Pilatowicz@Sun.COM 		"struct vol_directed_rd"},
11868863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCDUMPINIT,	"DKIOCDUMPINIT",
11878863SEdward.Pilatowicz@Sun.COM 		NULL},
11888863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DKIOCDUMPFINI,	"DKIOCDUMPFINI",
11898863SEdward.Pilatowicz@Sun.COM 		NULL},
11908863SEdward.Pilatowicz@Sun.COM 
11918863SEdward.Pilatowicz@Sun.COM 	/* disk ioctls - (0x04 << 8) - fdio.h */
11928863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDIOGCHAR,		"FDIOGCHAR",
11938863SEdward.Pilatowicz@Sun.COM 		"struct fd_char"},
11948863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDIOSCHAR,		"FDIOSCHAR",
11958863SEdward.Pilatowicz@Sun.COM 		"struct fd_char"},
11968863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDEJECT,		"FDEJECT",
11978863SEdward.Pilatowicz@Sun.COM 		NULL},
11988863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDGETCHANGE,		"FDGETCHANGE",
11998863SEdward.Pilatowicz@Sun.COM 		NULL},
12008863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDGETDRIVECHAR,	"FDGETDRIVECHAR",
12018863SEdward.Pilatowicz@Sun.COM 		"struct fd_drive"},
12028863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDSETDRIVECHAR,	"FDSETDRIVECHAR",
12038863SEdward.Pilatowicz@Sun.COM 		"struct fd_drive"},
12048863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDGETSEARCH,		"FDGETSEARCH",
12058863SEdward.Pilatowicz@Sun.COM 		NULL},
12068863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDSETSEARCH,		"FDSETSEARCH",
12078863SEdward.Pilatowicz@Sun.COM 		NULL},
12088863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDIOCMD,		"FDIOCMD",
12098863SEdward.Pilatowicz@Sun.COM 		"struct fd_cmd"},
12108863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDRAW,		"FDRAW",
12118863SEdward.Pilatowicz@Sun.COM 		"struct fd_raw"},
12128863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)FDDEFGEOCHAR,		"FDDEFGEOCHAR",
12138863SEdward.Pilatowicz@Sun.COM 		NULL},
12148863SEdward.Pilatowicz@Sun.COM 
12158863SEdward.Pilatowicz@Sun.COM 	/* disk ioctls - (0x04 << 8) - cdio.h */
12168863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMPAUSE,		"CDROMPAUSE",
12178863SEdward.Pilatowicz@Sun.COM 		NULL},
12188863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMRESUME,		"CDROMRESUME",
12198863SEdward.Pilatowicz@Sun.COM 		NULL},
12208863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMPLAYMSF,		"CDROMPLAYMSF",
12218863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_msf"},
12228863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMPLAYTRKIND,	"CDROMPLAYTRKIND",
12238863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_ti"},
12248863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMREADTOCHDR,	"CDROMREADTOCHDR",
12258863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_tochdr"},
12268863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMREADTOCENTRY,	"CDROMREADTOCENTRY",
12278863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_tocentry"},
12288863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSTOP,		"CDROMSTOP",
12298863SEdward.Pilatowicz@Sun.COM 		NULL},
12308863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSTART,		"CDROMSTART",
12318863SEdward.Pilatowicz@Sun.COM 		NULL},
12328863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMEJECT,		"CDROMEJECT",
12338863SEdward.Pilatowicz@Sun.COM 		NULL},
12348863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMVOLCTRL,		"CDROMVOLCTRL",
12358863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_volctrl"},
12368863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSUBCHNL,		"CDROMSUBCHNL",
12378863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_subchnl"},
12388863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMREADMODE2,	"CDROMREADMODE2",
12398863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_read"},
12408863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMREADMODE1,	"CDROMREADMODE1",
12418863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_read"},
12428863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMREADOFFSET,	"CDROMREADOFFSET",
12438863SEdward.Pilatowicz@Sun.COM 		NULL},
12448863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMGBLKMODE,	"CDROMGBLKMODE",
12458863SEdward.Pilatowicz@Sun.COM 		NULL},
12468863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSBLKMODE,	"CDROMSBLKMODE",
12478863SEdward.Pilatowicz@Sun.COM 		NULL},
12488863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMCDDA,		"CDROMCDDA",
12498863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_cdda"},
12508863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMCDXA,		"CDROMCDXA",
12518863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_cdxa"},
12528863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSUBCODE,		"CDROMSUBCODE",
12538863SEdward.Pilatowicz@Sun.COM 		"struct cdrom_subcode"},
12548863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMGDRVSPEED,	"CDROMGDRVSPEED",
12558863SEdward.Pilatowicz@Sun.COM 		NULL},
12568863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMSDRVSPEED,	"CDROMSDRVSPEED",
12578863SEdward.Pilatowicz@Sun.COM 		NULL},
12588863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)CDROMCLOSETRAY,	"CDROMCLOSETRAY",
12598863SEdward.Pilatowicz@Sun.COM 		NULL},
12608863SEdward.Pilatowicz@Sun.COM 
12618863SEdward.Pilatowicz@Sun.COM 	/* disk ioctls - (0x04 << 8) - uscsi.h */
12628863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)USCSICMD,		"USCSICMD",
12638863SEdward.Pilatowicz@Sun.COM 		"struct uscsi_cmd"},
12646318Sedp 
12656318Sedp 	/* dumpadm ioctls - (0xdd << 8) */
12666318Sedp 	{ (uint_t)DIOCGETDEV,	"DIOCGETDEV",
12678863SEdward.Pilatowicz@Sun.COM 		NULL},
12686318Sedp 
12696318Sedp 	/* mntio ioctls - ('m' << 8) */
12706318Sedp 	{ (uint_t)MNTIOC_GETMNTENT,	"MNTIOC_GETMNTENT",
12716318Sedp 		"struct extmnttab"},
12726318Sedp 
12738863SEdward.Pilatowicz@Sun.COM 	/* devinfo ioctls - ('df' << 8) - devinfo_impl.h */
12748863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DINFOUSRLD,		"DINFOUSRLD",
12758863SEdward.Pilatowicz@Sun.COM 		NULL},
12768863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DINFOLODRV,		"DINFOLODRV",
12778863SEdward.Pilatowicz@Sun.COM 		NULL},
12788863SEdward.Pilatowicz@Sun.COM 	{ (uint_t)DINFOIDENT,		"DINFOIDENT",
12798863SEdward.Pilatowicz@Sun.COM 		NULL},
12808863SEdward.Pilatowicz@Sun.COM 
12818770SJordan.Vaughan@Sun.com 	/* zcons ioctls */
12828770SJordan.Vaughan@Sun.com 	{ (uint_t)ZC_HOLDSLAVE,		"ZC_HOLDSLAVE",		NULL },
12838770SJordan.Vaughan@Sun.com 	{ (uint_t)ZC_RELEASESLAVE,	"ZC_RELEASESLAVE",	NULL },
12848770SJordan.Vaughan@Sun.com 
128510153SAaron.Zang@Sun.COM 	/* hid ioctls - ('h' << 8) - hid.h */
128610153SAaron.Zang@Sun.COM 	{ (uint_t)HIDIOCKMGDIRECT,	"HIDIOCKMGDIRECT",	NULL },
128710153SAaron.Zang@Sun.COM 	{ (uint_t)HIDIOCKMSDIRECT,	"HIDIOCKMSDIRECT",	NULL },
128810153SAaron.Zang@Sun.COM 
12890Sstevel@tonic-gate 	{ (uint_t)0, NULL, NULL	}
12900Sstevel@tonic-gate };
12910Sstevel@tonic-gate 
12920Sstevel@tonic-gate void
12930Sstevel@tonic-gate ioctl_ioccom(char *buf, size_t size, uint_t code, int nbytes, int x, int y)
12940Sstevel@tonic-gate {
12950Sstevel@tonic-gate 	const char *inoutstr;
12960Sstevel@tonic-gate 
12970Sstevel@tonic-gate 	if (code & IOC_VOID)
12980Sstevel@tonic-gate 		inoutstr = "";
12990Sstevel@tonic-gate 	else if ((code & IOC_INOUT) == IOC_INOUT)
13000Sstevel@tonic-gate 		inoutstr = "WR";
13010Sstevel@tonic-gate 	else
13020Sstevel@tonic-gate 		inoutstr = code & IOC_IN ? "W" : "R";
13030Sstevel@tonic-gate 
13040Sstevel@tonic-gate 	if (isascii(x) && isprint(x))
13050Sstevel@tonic-gate 		(void) snprintf(buf, size, "_IO%sN('%c', %d, %d)", inoutstr,
13060Sstevel@tonic-gate 		    x, y, nbytes);
13070Sstevel@tonic-gate 	else
13080Sstevel@tonic-gate 		(void) snprintf(buf, size, "_IO%sN(0x%x, %d, %d)", inoutstr,
13090Sstevel@tonic-gate 		    x, y, nbytes);
13100Sstevel@tonic-gate }
13110Sstevel@tonic-gate 
13120Sstevel@tonic-gate 
13130Sstevel@tonic-gate const char *
13140Sstevel@tonic-gate ioctlname(private_t *pri, uint_t code)
13150Sstevel@tonic-gate {
13160Sstevel@tonic-gate 	const struct ioc *ip;
13170Sstevel@tonic-gate 	const char *str = NULL;
13180Sstevel@tonic-gate 
13190Sstevel@tonic-gate 	for (ip = &ioc[0]; ip->name; ip++) {
13200Sstevel@tonic-gate 		if (code == ip->code) {
13210Sstevel@tonic-gate 			str = ip->name;
13220Sstevel@tonic-gate 			break;
13230Sstevel@tonic-gate 		}
13240Sstevel@tonic-gate 	}
13250Sstevel@tonic-gate 
13260Sstevel@tonic-gate 	/*
13270Sstevel@tonic-gate 	 * Developers hide ascii ioctl names in the ioctl subcode; for example
13280Sstevel@tonic-gate 	 * 0x445210 should be printed 'D'<<16|'R'<<8|10.  We allow for all
13290Sstevel@tonic-gate 	 * three high order bytes (called hi, mid and lo) to contain ascii
13300Sstevel@tonic-gate 	 * characters.
13310Sstevel@tonic-gate 	 */
13320Sstevel@tonic-gate 	if (str == NULL) {
13330Sstevel@tonic-gate 		int c_hi = code >> 24;
13340Sstevel@tonic-gate 		int c_mid = (code >> 16) & 0xff;
13350Sstevel@tonic-gate 		int c_mid_nm = (code >> 16);
13360Sstevel@tonic-gate 		int c_lo = (code >> 8) & 0xff;
13370Sstevel@tonic-gate 		int c_lo_nm = code >> 8;
13380Sstevel@tonic-gate 
13390Sstevel@tonic-gate 		if (isascii(c_lo) && isprint(c_lo) &&
13400Sstevel@tonic-gate 		    isascii(c_mid) && isprint(c_mid) &&
13410Sstevel@tonic-gate 		    isascii(c_hi) && isprint(c_hi))
13420Sstevel@tonic-gate 			(void) sprintf(pri->code_buf,
13430Sstevel@tonic-gate 			    "(('%c'<<24)|('%c'<<16)|('%c'<<8)|%d)",
13440Sstevel@tonic-gate 			    c_hi, c_mid, c_lo, code & 0xff);
13450Sstevel@tonic-gate 		else if (isascii(c_lo) && isprint(c_lo) &&
13460Sstevel@tonic-gate 		    isascii(c_mid_nm) && isprint(c_mid_nm))
13470Sstevel@tonic-gate 			(void) sprintf(pri->code_buf,
13480Sstevel@tonic-gate 			    "(('%c'<<16)|('%c'<<8)|%d)", c_mid, c_lo,
13490Sstevel@tonic-gate 			    code & 0xff);
13500Sstevel@tonic-gate 		else if (isascii(c_lo_nm) && isprint(c_lo_nm))
13510Sstevel@tonic-gate 			(void) sprintf(pri->code_buf, "(('%c'<<8)|%d)",
13523912Slling 			    c_lo_nm, code & 0xff);
13530Sstevel@tonic-gate 		else if (code & (IOC_VOID|IOC_INOUT))
13540Sstevel@tonic-gate 			ioctl_ioccom(pri->code_buf, sizeof (pri->code_buf),
13550Sstevel@tonic-gate 			    code, c_mid, c_lo, code & 0xff);
13560Sstevel@tonic-gate 		else
13570Sstevel@tonic-gate 			(void) sprintf(pri->code_buf, "0x%.4X", code);
13580Sstevel@tonic-gate 		str = (const char *)pri->code_buf;
13590Sstevel@tonic-gate 	}
13600Sstevel@tonic-gate 
13610Sstevel@tonic-gate 	return (str);
13620Sstevel@tonic-gate }
13630Sstevel@tonic-gate 
13640Sstevel@tonic-gate 
13650Sstevel@tonic-gate const char *
13660Sstevel@tonic-gate ioctldatastruct(uint_t code)
13670Sstevel@tonic-gate {
13680Sstevel@tonic-gate 	const struct ioc *ip;
13690Sstevel@tonic-gate 	const char *str = NULL;
13700Sstevel@tonic-gate 
13710Sstevel@tonic-gate 	for (ip = &ioc[0]; ip->name != NULL; ip++) {
13720Sstevel@tonic-gate 		if (code == ip->code) {
13730Sstevel@tonic-gate 			str = ip->datastruct;
13740Sstevel@tonic-gate 			break;
13750Sstevel@tonic-gate 		}
13760Sstevel@tonic-gate 	}
13770Sstevel@tonic-gate 	return (str);
13780Sstevel@tonic-gate }
13790Sstevel@tonic-gate 
13800Sstevel@tonic-gate 
13810Sstevel@tonic-gate const char *
13820Sstevel@tonic-gate fcntlname(int code)
13830Sstevel@tonic-gate {
13840Sstevel@tonic-gate 	const char *str = NULL;
13850Sstevel@tonic-gate 
13860Sstevel@tonic-gate 	if (code >= FCNTLMIN && code <= FCNTLMAX)
13870Sstevel@tonic-gate 		str = FCNTLname[code-FCNTLMIN];
13880Sstevel@tonic-gate 	return (str);
13890Sstevel@tonic-gate }
13900Sstevel@tonic-gate 
13910Sstevel@tonic-gate const char *
13920Sstevel@tonic-gate sfsname(int code)
13930Sstevel@tonic-gate {
13940Sstevel@tonic-gate 	const char *str = NULL;
13950Sstevel@tonic-gate 
13960Sstevel@tonic-gate 	if (code >= SYSFSMIN && code <= SYSFSMAX)
13970Sstevel@tonic-gate 		str = SYSFSname[code-SYSFSMIN];
13980Sstevel@tonic-gate 	return (str);
13990Sstevel@tonic-gate }
14000Sstevel@tonic-gate 
14010Sstevel@tonic-gate const char *
14020Sstevel@tonic-gate plockname(int code)
14030Sstevel@tonic-gate {
14040Sstevel@tonic-gate 	const char *str = NULL;
14050Sstevel@tonic-gate 
14060Sstevel@tonic-gate 	if (code >= PLOCKMIN && code <= PLOCKMAX)
14070Sstevel@tonic-gate 		str = PLOCKname[code-PLOCKMIN];
14080Sstevel@tonic-gate 	return (str);
14090Sstevel@tonic-gate }
14100Sstevel@tonic-gate 
14110Sstevel@tonic-gate /* ARGSUSED */
14120Sstevel@tonic-gate const char *
14130Sstevel@tonic-gate si86name(int code)
14140Sstevel@tonic-gate {
14150Sstevel@tonic-gate 	const char *str = NULL;
14160Sstevel@tonic-gate 
14170Sstevel@tonic-gate #if defined(__i386) || defined(__amd64)
14180Sstevel@tonic-gate 	switch (code) {
14190Sstevel@tonic-gate 	case SI86SWPI:		str = "SI86SWPI";	break;
14200Sstevel@tonic-gate 	case SI86SYM:		str = "SI86SYM";	break;
14210Sstevel@tonic-gate 	case SI86CONF:		str = "SI86CONF";	break;
14220Sstevel@tonic-gate 	case SI86BOOT:		str = "SI86BOOT";	break;
14230Sstevel@tonic-gate 	case SI86AUTO:		str = "SI86AUTO";	break;
14240Sstevel@tonic-gate 	case SI86EDT:		str = "SI86EDT";	break;
14250Sstevel@tonic-gate 	case SI86SWAP:		str = "SI86SWAP";	break;
14260Sstevel@tonic-gate 	case SI86FPHW:		str = "SI86FPHW";	break;
14270Sstevel@tonic-gate 	case SI86FPSTART:	str = "SI86FPSTART";	break;
14280Sstevel@tonic-gate 	case GRNON:		str = "GRNON";		break;
14290Sstevel@tonic-gate 	case GRNFLASH:		str = "GRNFLASH";	break;
14300Sstevel@tonic-gate 	case STIME:		str = "STIME";		break;
14310Sstevel@tonic-gate 	case SETNAME:		str = "SETNAME";	break;
14320Sstevel@tonic-gate 	case RNVR:		str = "RNVR";		break;
14330Sstevel@tonic-gate 	case WNVR:		str = "WNVR";		break;
14340Sstevel@tonic-gate 	case RTODC:		str = "RTODC";		break;
14350Sstevel@tonic-gate 	case CHKSER:		str = "CHKSER";		break;
14360Sstevel@tonic-gate 	case SI86NVPRT:		str = "SI86NVPRT";	break;
14370Sstevel@tonic-gate 	case SANUPD:		str = "SANUPD";		break;
14380Sstevel@tonic-gate 	case SI86KSTR:		str = "SI86KSTR";	break;
14390Sstevel@tonic-gate 	case SI86MEM:		str = "SI86MEM";	break;
14400Sstevel@tonic-gate 	case SI86TODEMON:	str = "SI86TODEMON";	break;
14410Sstevel@tonic-gate 	case SI86CCDEMON:	str = "SI86CCDEMON";	break;
14420Sstevel@tonic-gate 	case SI86CACHE:		str = "SI86CACHE";	break;
14430Sstevel@tonic-gate 	case SI86DELMEM:	str = "SI86DELMEM";	break;
14440Sstevel@tonic-gate 	case SI86ADDMEM:	str = "SI86ADDMEM";	break;
14450Sstevel@tonic-gate /* 71 through 74 reserved for VPIX */
14460Sstevel@tonic-gate 	case SI86V86: 		str = "SI86V86";	break;
14470Sstevel@tonic-gate 	case SI86SLTIME:	str = "SI86SLTIME";	break;
14480Sstevel@tonic-gate 	case SI86DSCR:		str = "SI86DSCR";	break;
14490Sstevel@tonic-gate 	case RDUBLK:		str = "RDUBLK";		break;
14500Sstevel@tonic-gate /* NFA entry point */
14510Sstevel@tonic-gate 	case SI86NFA:		str = "SI86NFA";	break;
14520Sstevel@tonic-gate 	case SI86VM86:		str = "SI86VM86";	break;
14530Sstevel@tonic-gate 	case SI86VMENABLE:	str = "SI86VMENABLE";	break;
14540Sstevel@tonic-gate 	case SI86LIMUSER:	str = "SI86LIMUSER";	break;
14550Sstevel@tonic-gate 	case SI86RDID: 		str = "SI86RDID";	break;
14560Sstevel@tonic-gate 	case SI86RDBOOT:	str = "SI86RDBOOT";	break;
14570Sstevel@tonic-gate /* Merged Product defines */
14580Sstevel@tonic-gate 	case SI86SHFIL:		str = "SI86SHFIL";	break;
14590Sstevel@tonic-gate 	case SI86PCHRGN:	str = "SI86PCHRGN";	break;
14600Sstevel@tonic-gate 	case SI86BADVISE:	str = "SI86BADVISE";	break;
14610Sstevel@tonic-gate 	case SI86SHRGN:		str = "SI86SHRGN";	break;
14620Sstevel@tonic-gate 	case SI86CHIDT:		str = "SI86CHIDT";	break;
14630Sstevel@tonic-gate 	case SI86EMULRDA: 	str = "SI86EMULRDA";	break;
14648646Sdp@eng.sun.com /* RTC commands */
14658646Sdp@eng.sun.com 	case WTODC:		str = "WTODC";		break;
14668646Sdp@eng.sun.com 	case SGMTL:		str = "SGMTL";		break;
14678646Sdp@eng.sun.com 	case GGMTL:		str = "GGMTL";		break;
14688646Sdp@eng.sun.com 	case RTCSYNC:		str = "RTCSYNC";	break;
14690Sstevel@tonic-gate 	}
14700Sstevel@tonic-gate #endif /* __i386 */
14710Sstevel@tonic-gate 
14720Sstevel@tonic-gate 	return (str);
14730Sstevel@tonic-gate }
14740Sstevel@tonic-gate 
14750Sstevel@tonic-gate const char *
14760Sstevel@tonic-gate utscode(int code)
14770Sstevel@tonic-gate {
14780Sstevel@tonic-gate 	const char *str = NULL;
14790Sstevel@tonic-gate 
14800Sstevel@tonic-gate 	switch (code) {
14810Sstevel@tonic-gate 	case UTS_UNAME:		str = "UNAME";	break;
14820Sstevel@tonic-gate 	case UTS_USTAT:		str = "USTAT";	break;
14830Sstevel@tonic-gate 	case UTS_FUSERS:	str = "FUSERS";	break;
14840Sstevel@tonic-gate 	}
14850Sstevel@tonic-gate 
14860Sstevel@tonic-gate 	return (str);
14870Sstevel@tonic-gate }
14880Sstevel@tonic-gate 
14890Sstevel@tonic-gate const char *
14902447Snf202958 rctlsyscode(int code)
14912447Snf202958 {
14922447Snf202958 	const char *str = NULL;
14932447Snf202958 	switch (code) {
14942447Snf202958 	case 0:		str = "GETRCTL";	break;
14952447Snf202958 	case 1:		str = "SETRCTL";	break;
14962447Snf202958 	case 2:		str = "RCTLSYS_LST";	break;
14972447Snf202958 	case 3:		str = "RCTLSYS_CTL";	break;
14983684Srd117015 	case 4:		str = "RCTLSYS_SETPROJ";	break;
14992447Snf202958 	default:	str = "UNKNOWN";	break;
15002447Snf202958 	}
15012447Snf202958 	return (str);
15022447Snf202958 }
15032447Snf202958 
15042447Snf202958 const char *
15052447Snf202958 rctl_local_action(private_t *pri, uint_t val)
15062447Snf202958 {
15072447Snf202958 	uint_t action = val & (~RCTL_LOCAL_ACTION_MASK);
15082447Snf202958 
15092447Snf202958 	char *s = pri->code_buf;
15102447Snf202958 
15112447Snf202958 	*s = '\0';
15122447Snf202958 
15132447Snf202958 	if (action & RCTL_LOCAL_NOACTION) {
15142447Snf202958 		action ^= RCTL_LOCAL_NOACTION;
15152447Snf202958 		(void) strlcat(s, "|RCTL_LOCAL_NOACTION",
15162447Snf202958 		    sizeof (pri->code_buf));
15172447Snf202958 	}
15182447Snf202958 	if (action & RCTL_LOCAL_SIGNAL) {
15192447Snf202958 		action ^= RCTL_LOCAL_SIGNAL;
15202447Snf202958 		(void) strlcat(s, "|RCTL_LOCAL_SIGNAL",
15212447Snf202958 		    sizeof (pri->code_buf));
15222447Snf202958 	}
15232447Snf202958 	if (action & RCTL_LOCAL_DENY) {
15242447Snf202958 		action ^= RCTL_LOCAL_DENY;
15252447Snf202958 		(void) strlcat(s, "|RCTL_LOCAL_DENY",
15262447Snf202958 		    sizeof (pri->code_buf));
15272447Snf202958 	}
15282447Snf202958 
15292447Snf202958 	if ((action & (~RCTL_LOCAL_ACTION_MASK)) != 0)
15302447Snf202958 		return (NULL);
15312447Snf202958 	else if (*s != '\0')
15322447Snf202958 		return (s+1);
15332447Snf202958 	else
15342447Snf202958 		return (NULL);
15352447Snf202958 }
15362447Snf202958 
15372447Snf202958 
15382447Snf202958 const char *
15392447Snf202958 rctl_local_flags(private_t *pri, uint_t val)
15402447Snf202958 {
15412447Snf202958 	uint_t pval = val & RCTL_LOCAL_ACTION_MASK;
15422447Snf202958 	char *s = pri->code_buf;
15432447Snf202958 
15442447Snf202958 	*s = '\0';
15452447Snf202958 
15462447Snf202958 	if (pval & RCTL_LOCAL_MAXIMAL) {
15472447Snf202958 		pval ^= RCTL_LOCAL_MAXIMAL;
15482447Snf202958 		(void) strlcat(s, "|RCTL_LOCAL_MAXIMAL",
15492447Snf202958 		    sizeof (pri->code_buf));
15502447Snf202958 	}
15512447Snf202958 
15522447Snf202958 	if ((pval & RCTL_LOCAL_ACTION_MASK) != 0)
15532447Snf202958 		return (NULL);
15542447Snf202958 	else if (*s != '\0')
15552447Snf202958 		return (s+1);
15562447Snf202958 	else
15572447Snf202958 		return (NULL);
15582447Snf202958 }
15592447Snf202958 
15602447Snf202958 
15612447Snf202958 const char *
15620Sstevel@tonic-gate sconfname(int code)
15630Sstevel@tonic-gate {
15640Sstevel@tonic-gate 	const char *str = NULL;
15650Sstevel@tonic-gate 
15660Sstevel@tonic-gate 	if (code >= SCONFMIN && code <= SCONFMAX)
15670Sstevel@tonic-gate 		str = SCONFname[code-SCONFMIN];
15680Sstevel@tonic-gate 	return (str);
15690Sstevel@tonic-gate }
15700Sstevel@tonic-gate 
15710Sstevel@tonic-gate const char *
15720Sstevel@tonic-gate pathconfname(int code)
15730Sstevel@tonic-gate {
15740Sstevel@tonic-gate 	const char *str = NULL;
15750Sstevel@tonic-gate 
15760Sstevel@tonic-gate 	if (code >= PATHCONFMIN && code <= PATHCONFMAX)
15770Sstevel@tonic-gate 		str = PATHCONFname[code-PATHCONFMIN];
15780Sstevel@tonic-gate 	return (str);
15790Sstevel@tonic-gate }
15800Sstevel@tonic-gate 
15810Sstevel@tonic-gate const char *
15820Sstevel@tonic-gate sigarg(private_t *pri, int arg)
15830Sstevel@tonic-gate {
15840Sstevel@tonic-gate 	char *str = NULL;
15850Sstevel@tonic-gate 	int sig = (arg & SIGNO_MASK);
15860Sstevel@tonic-gate 
15870Sstevel@tonic-gate 	str = pri->code_buf;
15880Sstevel@tonic-gate 	arg &= ~SIGNO_MASK;
15890Sstevel@tonic-gate 	if (arg & ~(SIGDEFER|SIGHOLD|SIGRELSE|SIGIGNORE|SIGPAUSE))
15900Sstevel@tonic-gate 		(void) snprintf(pri->code_buf, sizeof (pri->code_buf),
15910Sstevel@tonic-gate 		    "%s|0x%X", signame(pri, sig), arg);
15920Sstevel@tonic-gate 	else {
15930Sstevel@tonic-gate 		(void) strcpy(str, signame(pri, sig));
15940Sstevel@tonic-gate 		if (arg & SIGDEFER)
15950Sstevel@tonic-gate 			(void) strcat(str, "|SIGDEFER");
15960Sstevel@tonic-gate 		if (arg & SIGHOLD)
15970Sstevel@tonic-gate 			(void) strcat(str, "|SIGHOLD");
15980Sstevel@tonic-gate 		if (arg & SIGRELSE)
15990Sstevel@tonic-gate 			(void) strcat(str, "|SIGRELSE");
16000Sstevel@tonic-gate 		if (arg & SIGIGNORE)
16010Sstevel@tonic-gate 			(void) strcat(str, "|SIGIGNORE");
16020Sstevel@tonic-gate 		if (arg & SIGPAUSE)
16030Sstevel@tonic-gate 			(void) strcat(str, "|SIGPAUSE");
16040Sstevel@tonic-gate 	}
16050Sstevel@tonic-gate 
16060Sstevel@tonic-gate 	return ((const char *)str);
16070Sstevel@tonic-gate }
16080Sstevel@tonic-gate 
16090Sstevel@tonic-gate #define	ALL_O_FLAGS \
16100Sstevel@tonic-gate 	(O_NDELAY|O_APPEND|O_SYNC|O_DSYNC|O_NONBLOCK|O_CREAT|O_TRUNC\
16110Sstevel@tonic-gate 	|O_EXCL|O_NOCTTY|O_LARGEFILE|O_RSYNC|O_XATTR|O_NOFOLLOW|O_NOLINKS)
16120Sstevel@tonic-gate 
16130Sstevel@tonic-gate const char *
16140Sstevel@tonic-gate openarg(private_t *pri, int arg)
16150Sstevel@tonic-gate {
16160Sstevel@tonic-gate 	char *str = pri->code_buf;
16170Sstevel@tonic-gate 
16180Sstevel@tonic-gate 	switch (arg & ~ALL_O_FLAGS) {
16190Sstevel@tonic-gate 	default:
16200Sstevel@tonic-gate 		return ((char *)NULL);
16210Sstevel@tonic-gate 	case O_RDONLY:
16220Sstevel@tonic-gate 		(void) strcpy(str, "O_RDONLY");
16230Sstevel@tonic-gate 		break;
16240Sstevel@tonic-gate 	case O_WRONLY:
16250Sstevel@tonic-gate 		(void) strcpy(str, "O_WRONLY");
16260Sstevel@tonic-gate 		break;
16270Sstevel@tonic-gate 	case O_RDWR:
16280Sstevel@tonic-gate 		(void) strcpy(str, "O_RDWR");
16290Sstevel@tonic-gate 		break;
16300Sstevel@tonic-gate 	}
16310Sstevel@tonic-gate 
16320Sstevel@tonic-gate 	if (arg & O_NDELAY)
16330Sstevel@tonic-gate 		(void) strlcat(str, "|O_NDELAY", sizeof (pri->code_buf));
16340Sstevel@tonic-gate 	if (arg & O_APPEND)
16350Sstevel@tonic-gate 		(void) strlcat(str, "|O_APPEND", sizeof (pri->code_buf));
16360Sstevel@tonic-gate 	if (arg & O_SYNC)
16370Sstevel@tonic-gate 		(void) strlcat(str, "|O_SYNC", sizeof (pri->code_buf));
16380Sstevel@tonic-gate 	if (arg & O_DSYNC)
16390Sstevel@tonic-gate 		(void) strlcat(str, "|O_DSYNC", sizeof (pri->code_buf));
16400Sstevel@tonic-gate 	if (arg & O_NONBLOCK)
16410Sstevel@tonic-gate 		(void) strlcat(str, "|O_NONBLOCK", sizeof (pri->code_buf));
16420Sstevel@tonic-gate 	if (arg & O_CREAT)
16430Sstevel@tonic-gate 		(void) strlcat(str, "|O_CREAT", sizeof (pri->code_buf));
16440Sstevel@tonic-gate 	if (arg & O_TRUNC)
16450Sstevel@tonic-gate 		(void) strlcat(str, "|O_TRUNC", sizeof (pri->code_buf));
16460Sstevel@tonic-gate 	if (arg & O_EXCL)
16470Sstevel@tonic-gate 		(void) strlcat(str, "|O_EXCL", sizeof (pri->code_buf));
16480Sstevel@tonic-gate 	if (arg & O_NOCTTY)
16490Sstevel@tonic-gate 		(void) strlcat(str, "|O_NOCTTY", sizeof (pri->code_buf));
16500Sstevel@tonic-gate 	if (arg & O_LARGEFILE)
16510Sstevel@tonic-gate 		(void) strlcat(str, "|O_LARGEFILE", sizeof (pri->code_buf));
16520Sstevel@tonic-gate 	if (arg & O_RSYNC)
16530Sstevel@tonic-gate 		(void) strlcat(str, "|O_RSYNC", sizeof (pri->code_buf));
16540Sstevel@tonic-gate 	if (arg & O_XATTR)
16550Sstevel@tonic-gate 		(void) strlcat(str, "|O_XATTR", sizeof (pri->code_buf));
16560Sstevel@tonic-gate 	if (arg & O_NOFOLLOW)
16570Sstevel@tonic-gate 		(void) strlcat(str, "|O_NOFOLLOW", sizeof (pri->code_buf));
16580Sstevel@tonic-gate 	if (arg & O_NOLINKS)
16590Sstevel@tonic-gate 		(void) strlcat(str, "|O_NOLINKS", sizeof (pri->code_buf));
16600Sstevel@tonic-gate 
16610Sstevel@tonic-gate 	return ((const char *)str);
16620Sstevel@tonic-gate }
16630Sstevel@tonic-gate 
16640Sstevel@tonic-gate const char *
16650Sstevel@tonic-gate whencearg(int arg)
16660Sstevel@tonic-gate {
16670Sstevel@tonic-gate 	const char *str = NULL;
16680Sstevel@tonic-gate 
16690Sstevel@tonic-gate 	switch (arg) {
16700Sstevel@tonic-gate 	case SEEK_SET:	str = "SEEK_SET";	break;
16710Sstevel@tonic-gate 	case SEEK_CUR:	str = "SEEK_CUR";	break;
16720Sstevel@tonic-gate 	case SEEK_END:	str = "SEEK_END";	break;
16730Sstevel@tonic-gate 	case SEEK_DATA:	str = "SEEK_DATA";	break;
16740Sstevel@tonic-gate 	case SEEK_HOLE:	str = "SEEK_HOLE";	break;
16750Sstevel@tonic-gate 	}
16760Sstevel@tonic-gate 
16770Sstevel@tonic-gate 	return (str);
16780Sstevel@tonic-gate }
16790Sstevel@tonic-gate 
16800Sstevel@tonic-gate #define	IPC_FLAGS	(IPC_ALLOC|IPC_CREAT|IPC_EXCL|IPC_NOWAIT)
16810Sstevel@tonic-gate 
16820Sstevel@tonic-gate char *
16830Sstevel@tonic-gate ipcflags(private_t *pri, int arg)
16840Sstevel@tonic-gate {
16850Sstevel@tonic-gate 	char *str = pri->code_buf;
16860Sstevel@tonic-gate 
16870Sstevel@tonic-gate 	if (arg & 0777)
16880Sstevel@tonic-gate 		(void) sprintf(str, "0%.3o", arg&0777);
16890Sstevel@tonic-gate 	else
16900Sstevel@tonic-gate 		*str = '\0';
16910Sstevel@tonic-gate 
16920Sstevel@tonic-gate 	if (arg & IPC_ALLOC)
16930Sstevel@tonic-gate 		(void) strcat(str, "|IPC_ALLOC");
16940Sstevel@tonic-gate 	if (arg & IPC_CREAT)
16950Sstevel@tonic-gate 		(void) strcat(str, "|IPC_CREAT");
16960Sstevel@tonic-gate 	if (arg & IPC_EXCL)
16970Sstevel@tonic-gate 		(void) strcat(str, "|IPC_EXCL");
16980Sstevel@tonic-gate 	if (arg & IPC_NOWAIT)
16990Sstevel@tonic-gate 		(void) strcat(str, "|IPC_NOWAIT");
17000Sstevel@tonic-gate 
17010Sstevel@tonic-gate 	return (str);
17020Sstevel@tonic-gate }
17030Sstevel@tonic-gate 
17040Sstevel@tonic-gate const char *
17050Sstevel@tonic-gate msgflags(private_t *pri, int arg)
17060Sstevel@tonic-gate {
17070Sstevel@tonic-gate 	char *str;
17080Sstevel@tonic-gate 
17090Sstevel@tonic-gate 	if (arg == 0 || (arg & ~(IPC_FLAGS|MSG_NOERROR|0777)) != 0)
17100Sstevel@tonic-gate 		return ((char *)NULL);
17110Sstevel@tonic-gate 
17120Sstevel@tonic-gate 	str = ipcflags(pri, arg);
17130Sstevel@tonic-gate 
17140Sstevel@tonic-gate 	if (arg & MSG_NOERROR)
17150Sstevel@tonic-gate 		(void) strcat(str, "|MSG_NOERROR");
17160Sstevel@tonic-gate 
17170Sstevel@tonic-gate 	if (*str == '|')
17180Sstevel@tonic-gate 		str++;
17190Sstevel@tonic-gate 	return ((const char *)str);
17200Sstevel@tonic-gate }
17210Sstevel@tonic-gate 
17220Sstevel@tonic-gate const char *
17230Sstevel@tonic-gate semflags(private_t *pri, int arg)
17240Sstevel@tonic-gate {
17250Sstevel@tonic-gate 	char *str;
17260Sstevel@tonic-gate 
17270Sstevel@tonic-gate 	if (arg == 0 || (arg & ~(IPC_FLAGS|SEM_UNDO|0777)) != 0)
17280Sstevel@tonic-gate 		return ((char *)NULL);
17290Sstevel@tonic-gate 
17300Sstevel@tonic-gate 	str = ipcflags(pri, arg);
17310Sstevel@tonic-gate 
17320Sstevel@tonic-gate 	if (arg & SEM_UNDO)
17330Sstevel@tonic-gate 		(void) strcat(str, "|SEM_UNDO");
17340Sstevel@tonic-gate 
17350Sstevel@tonic-gate 	if (*str == '|')
17360Sstevel@tonic-gate 		str++;
17370Sstevel@tonic-gate 	return ((const char *)str);
17380Sstevel@tonic-gate }
17390Sstevel@tonic-gate 
17400Sstevel@tonic-gate const char *
17410Sstevel@tonic-gate shmflags(private_t *pri, int arg)
17420Sstevel@tonic-gate {
17430Sstevel@tonic-gate 	char *str;
17440Sstevel@tonic-gate 
17450Sstevel@tonic-gate 	if (arg == 0 || (arg & ~(IPC_FLAGS|SHM_RDONLY|SHM_RND|0777)) != 0)
17460Sstevel@tonic-gate 		return ((char *)NULL);
17470Sstevel@tonic-gate 
17480Sstevel@tonic-gate 	str = ipcflags(pri, arg);
17490Sstevel@tonic-gate 
17500Sstevel@tonic-gate 	if (arg & SHM_RDONLY)
17510Sstevel@tonic-gate 		(void) strcat(str, "|SHM_RDONLY");
17520Sstevel@tonic-gate 	if (arg & SHM_RND)
17530Sstevel@tonic-gate 		(void) strcat(str, "|SHM_RND");
17540Sstevel@tonic-gate 
17550Sstevel@tonic-gate 	if (*str == '|')
17560Sstevel@tonic-gate 		str++;
17570Sstevel@tonic-gate 	return ((const char *)str);
17580Sstevel@tonic-gate }
17590Sstevel@tonic-gate 
17600Sstevel@tonic-gate #define	MSGCMDMIN	0
17610Sstevel@tonic-gate #define	MSGCMDMAX	IPC_STAT64
17620Sstevel@tonic-gate const char *const MSGCMDname[MSGCMDMAX+1] = {
17630Sstevel@tonic-gate 	NULL, NULL, NULL, NULL, NULL,
17640Sstevel@tonic-gate 	NULL, NULL, NULL, NULL, NULL,
17650Sstevel@tonic-gate 	"IPC_RMID",	/* 10 */
17660Sstevel@tonic-gate 	"IPC_SET",	/* 11 */
17670Sstevel@tonic-gate 	"IPC_STAT",	/* 12 */
17680Sstevel@tonic-gate 	"IPC_SET64",	/* 13 */
17690Sstevel@tonic-gate 	"IPC_STAT64",	/* 14 */
17700Sstevel@tonic-gate };
17710Sstevel@tonic-gate 
17720Sstevel@tonic-gate #define	SEMCMDMIN	0
17730Sstevel@tonic-gate #define	SEMCMDMAX	IPC_STAT64
17740Sstevel@tonic-gate const char *const SEMCMDname[SEMCMDMAX+1] = {
17750Sstevel@tonic-gate 	NULL,		/* 0 */
17760Sstevel@tonic-gate 	NULL,		/* 1 */
17770Sstevel@tonic-gate 	NULL,		/* 2 */
17780Sstevel@tonic-gate 	"GETNCNT",	/* 3 */
17790Sstevel@tonic-gate 	"GETPID",	/* 4 */
17800Sstevel@tonic-gate 	"GETVAL",	/* 5 */
17810Sstevel@tonic-gate 	"GETALL",	/* 6 */
17820Sstevel@tonic-gate 	"GETZCNT",	/* 7 */
17830Sstevel@tonic-gate 	"SETVAL",	/* 8 */
17840Sstevel@tonic-gate 	"SETALL",	/* 9 */
17850Sstevel@tonic-gate 	"IPC_RMID",	/* 10 */
17860Sstevel@tonic-gate 	"IPC_SET",	/* 11 */
17870Sstevel@tonic-gate 	"IPC_STAT",	/* 12 */
17880Sstevel@tonic-gate 	"IPC_SET64",	/* 13 */
17890Sstevel@tonic-gate 	"IPC_STAT64",	/* 14 */
17900Sstevel@tonic-gate };
17910Sstevel@tonic-gate 
17920Sstevel@tonic-gate #define	SHMCMDMIN	0
17930Sstevel@tonic-gate #define	SHMCMDMAX	IPC_STAT64
17940Sstevel@tonic-gate const char *const SHMCMDname[SHMCMDMAX+1] = {
17950Sstevel@tonic-gate 	NULL,		/* 0 */
17960Sstevel@tonic-gate 	NULL,		/* 1 */
17970Sstevel@tonic-gate 	NULL,		/* 2 */
17980Sstevel@tonic-gate 	"SHM_LOCK",	/* 3 */
17990Sstevel@tonic-gate 	"SHM_UNLOCK",	/* 4 */
18000Sstevel@tonic-gate 	NULL, NULL, NULL, NULL, NULL,			/* 5 NULLs */
18010Sstevel@tonic-gate 	"IPC_RMID",	/* 10 */
18020Sstevel@tonic-gate 	"IPC_SET",	/* 11 */
18030Sstevel@tonic-gate 	"IPC_STAT",	/* 12 */
18040Sstevel@tonic-gate 	"IPC_SET64",	/* 13 */
18050Sstevel@tonic-gate 	"IPC_STAT64",	/* 14 */
18060Sstevel@tonic-gate };
18070Sstevel@tonic-gate 
18080Sstevel@tonic-gate const char *
18090Sstevel@tonic-gate msgcmd(int arg)
18100Sstevel@tonic-gate {
18110Sstevel@tonic-gate 	const char *str = NULL;
18120Sstevel@tonic-gate 
18130Sstevel@tonic-gate 	if (arg >= MSGCMDMIN && arg <= MSGCMDMAX)
18140Sstevel@tonic-gate 		str = MSGCMDname[arg-MSGCMDMIN];
18150Sstevel@tonic-gate 	return (str);
18160Sstevel@tonic-gate }
18170Sstevel@tonic-gate 
18180Sstevel@tonic-gate const char *
18190Sstevel@tonic-gate semcmd(int arg)
18200Sstevel@tonic-gate {
18210Sstevel@tonic-gate 	const char *str = NULL;
18220Sstevel@tonic-gate 
18230Sstevel@tonic-gate 	if (arg >= SEMCMDMIN && arg <= SEMCMDMAX)
18240Sstevel@tonic-gate 		str = SEMCMDname[arg-SEMCMDMIN];
18250Sstevel@tonic-gate 	return (str);
18260Sstevel@tonic-gate }
18270Sstevel@tonic-gate 
18280Sstevel@tonic-gate const char *
18290Sstevel@tonic-gate shmcmd(int arg)
18300Sstevel@tonic-gate {
18310Sstevel@tonic-gate 	const char *str = NULL;
18320Sstevel@tonic-gate 
18330Sstevel@tonic-gate 	if (arg >= SHMCMDMIN && arg <= SHMCMDMAX)
18340Sstevel@tonic-gate 		str = SHMCMDname[arg-SHMCMDMIN];
18350Sstevel@tonic-gate 	return (str);
18360Sstevel@tonic-gate }
18370Sstevel@tonic-gate 
18380Sstevel@tonic-gate const char *
18390Sstevel@tonic-gate strrdopt(int arg)	/* streams read option (I_SRDOPT I_GRDOPT) */
18400Sstevel@tonic-gate {
18410Sstevel@tonic-gate 	const char *str = NULL;
18420Sstevel@tonic-gate 
18430Sstevel@tonic-gate 	switch (arg) {
18440Sstevel@tonic-gate 	case RNORM:	str = "RNORM";		break;
18450Sstevel@tonic-gate 	case RMSGD:	str = "RMSGD";		break;
18460Sstevel@tonic-gate 	case RMSGN:	str = "RMSGN";		break;
18470Sstevel@tonic-gate 	}
18480Sstevel@tonic-gate 
18490Sstevel@tonic-gate 	return (str);
18500Sstevel@tonic-gate }
18510Sstevel@tonic-gate 
18520Sstevel@tonic-gate /* bit map of streams events (I_SETSIG & I_GETSIG) */
18530Sstevel@tonic-gate const char *
18540Sstevel@tonic-gate strevents(private_t *pri, int arg)
18550Sstevel@tonic-gate {
18560Sstevel@tonic-gate 	char *str = pri->code_buf;
18570Sstevel@tonic-gate 
18580Sstevel@tonic-gate 	if (arg & ~(S_INPUT|S_HIPRI|S_OUTPUT|S_MSG|S_ERROR|S_HANGUP))
18590Sstevel@tonic-gate 		return ((char *)NULL);
18600Sstevel@tonic-gate 
18610Sstevel@tonic-gate 	*str = '\0';
18620Sstevel@tonic-gate 	if (arg & S_INPUT)
18630Sstevel@tonic-gate 		(void) strcat(str, "|S_INPUT");
18640Sstevel@tonic-gate 	if (arg & S_HIPRI)
18650Sstevel@tonic-gate 		(void) strcat(str, "|S_HIPRI");
18660Sstevel@tonic-gate 	if (arg & S_OUTPUT)
18670Sstevel@tonic-gate 		(void) strcat(str, "|S_OUTPUT");
18680Sstevel@tonic-gate 	if (arg & S_MSG)
18690Sstevel@tonic-gate 		(void) strcat(str, "|S_MSG");
18700Sstevel@tonic-gate 	if (arg & S_ERROR)
18710Sstevel@tonic-gate 		(void) strcat(str, "|S_ERROR");
18720Sstevel@tonic-gate 	if (arg & S_HANGUP)
18730Sstevel@tonic-gate 		(void) strcat(str, "|S_HANGUP");
18740Sstevel@tonic-gate 
18750Sstevel@tonic-gate 	return ((const char *)(str+1));
18760Sstevel@tonic-gate }
18770Sstevel@tonic-gate 
18780Sstevel@tonic-gate const char *
18790Sstevel@tonic-gate tiocflush(private_t *pri, int arg)	/* bit map passsed by TIOCFLUSH */
18800Sstevel@tonic-gate {
18810Sstevel@tonic-gate 	char *str = pri->code_buf;
18820Sstevel@tonic-gate 
18830Sstevel@tonic-gate 	if (arg & ~(FREAD|FWRITE))
18840Sstevel@tonic-gate 		return ((char *)NULL);
18850Sstevel@tonic-gate 
18860Sstevel@tonic-gate 	*str = '\0';
18870Sstevel@tonic-gate 	if (arg & FREAD)
18880Sstevel@tonic-gate 		(void) strcat(str, "|FREAD");
18890Sstevel@tonic-gate 	if (arg & FWRITE)
18900Sstevel@tonic-gate 		(void) strcat(str, "|FWRITE");
18910Sstevel@tonic-gate 
18920Sstevel@tonic-gate 	return ((const char *)(str+1));
18930Sstevel@tonic-gate }
18940Sstevel@tonic-gate 
18950Sstevel@tonic-gate const char *
18960Sstevel@tonic-gate strflush(int arg)	/* streams flush option (I_FLUSH) */
18970Sstevel@tonic-gate {
18980Sstevel@tonic-gate 	const char *str = NULL;
18990Sstevel@tonic-gate 
19000Sstevel@tonic-gate 	switch (arg) {
19010Sstevel@tonic-gate 	case FLUSHR:	str = "FLUSHR";		break;
19020Sstevel@tonic-gate 	case FLUSHW:	str = "FLUSHW";		break;
19030Sstevel@tonic-gate 	case FLUSHRW:	str = "FLUSHRW";	break;
19040Sstevel@tonic-gate 	}
19050Sstevel@tonic-gate 
19060Sstevel@tonic-gate 	return (str);
19070Sstevel@tonic-gate }
19080Sstevel@tonic-gate 
19090Sstevel@tonic-gate #define	ALL_MOUNT_FLAGS	(MS_RDONLY|MS_FSS|MS_DATA|MS_NOSUID|MS_REMOUNT| \
19100Sstevel@tonic-gate 	MS_NOTRUNC|MS_OVERLAY|MS_OPTIONSTR|MS_GLOBAL|MS_FORCE|MS_NOMNTTAB)
19110Sstevel@tonic-gate 
19120Sstevel@tonic-gate const char *
19130Sstevel@tonic-gate mountflags(private_t *pri, int arg)	/* bit map of mount syscall flags */
19140Sstevel@tonic-gate {
19150Sstevel@tonic-gate 	char *str = pri->code_buf;
19160Sstevel@tonic-gate 	size_t used = 0;
19170Sstevel@tonic-gate 
19180Sstevel@tonic-gate 	if (arg & ~ALL_MOUNT_FLAGS)
19190Sstevel@tonic-gate 		return ((char *)NULL);
19200Sstevel@tonic-gate 
19210Sstevel@tonic-gate 	*str = '\0';
19220Sstevel@tonic-gate 	if (arg & MS_RDONLY)
19230Sstevel@tonic-gate 		used = strlcat(str, "|MS_RDONLY", sizeof (pri->code_buf));
19240Sstevel@tonic-gate 	if (arg & MS_FSS)
19250Sstevel@tonic-gate 		used = strlcat(str, "|MS_FSS", sizeof (pri->code_buf));
19260Sstevel@tonic-gate 	if (arg & MS_DATA)
19270Sstevel@tonic-gate 		used = strlcat(str, "|MS_DATA", sizeof (pri->code_buf));
19280Sstevel@tonic-gate 	if (arg & MS_NOSUID)
19290Sstevel@tonic-gate 		used = strlcat(str, "|MS_NOSUID", sizeof (pri->code_buf));
19300Sstevel@tonic-gate 	if (arg & MS_REMOUNT)
19310Sstevel@tonic-gate 		used = strlcat(str, "|MS_REMOUNT", sizeof (pri->code_buf));
19320Sstevel@tonic-gate 	if (arg & MS_NOTRUNC)
19330Sstevel@tonic-gate 		used = strlcat(str, "|MS_NOTRUNC", sizeof (pri->code_buf));
19340Sstevel@tonic-gate 	if (arg & MS_OVERLAY)
19350Sstevel@tonic-gate 		used = strlcat(str, "|MS_OVERLAY", sizeof (pri->code_buf));
19360Sstevel@tonic-gate 	if (arg & MS_OPTIONSTR)
19370Sstevel@tonic-gate 		used = strlcat(str, "|MS_OPTIONSTR", sizeof (pri->code_buf));
19380Sstevel@tonic-gate 	if (arg & MS_GLOBAL)
19390Sstevel@tonic-gate 		used = strlcat(str, "|MS_GLOBAL", sizeof (pri->code_buf));
19400Sstevel@tonic-gate 	if (arg & MS_FORCE)
19410Sstevel@tonic-gate 		used = strlcat(str, "|MS_FORCE", sizeof (pri->code_buf));
19420Sstevel@tonic-gate 	if (arg & MS_NOMNTTAB)
19430Sstevel@tonic-gate 		used = strlcat(str, "|MS_NOMNTTAB", sizeof (pri->code_buf));
19440Sstevel@tonic-gate 
19450Sstevel@tonic-gate 	if (used == 0 || used >= sizeof (pri->code_buf))
19460Sstevel@tonic-gate 		return ((char *)NULL);			/* use prt_hex() */
19470Sstevel@tonic-gate 
19480Sstevel@tonic-gate 	return ((const char *)(str+1));
19490Sstevel@tonic-gate }
19500Sstevel@tonic-gate 
19510Sstevel@tonic-gate const char *
19520Sstevel@tonic-gate svfsflags(private_t *pri, ulong_t arg)	/* bit map of statvfs syscall flags */
19530Sstevel@tonic-gate {
19540Sstevel@tonic-gate 	char *str = pri->code_buf;
19550Sstevel@tonic-gate 
19560Sstevel@tonic-gate 	if (arg & ~(ST_RDONLY|ST_NOSUID|ST_NOTRUNC)) {
19570Sstevel@tonic-gate 		(void) sprintf(str, "0x%lx", arg);
19580Sstevel@tonic-gate 		return (str);
19590Sstevel@tonic-gate 	}
19600Sstevel@tonic-gate 	*str = '\0';
19610Sstevel@tonic-gate 	if (arg & ST_RDONLY)
19620Sstevel@tonic-gate 		(void) strcat(str, "|ST_RDONLY");
19630Sstevel@tonic-gate 	if (arg & ST_NOSUID)
19640Sstevel@tonic-gate 		(void) strcat(str, "|ST_NOSUID");
19650Sstevel@tonic-gate 	if (arg & ST_NOTRUNC)
19660Sstevel@tonic-gate 		(void) strcat(str, "|ST_NOTRUNC");
19670Sstevel@tonic-gate 	if (*str == '\0')
19680Sstevel@tonic-gate 		(void) strcat(str, "|0");
19690Sstevel@tonic-gate 	return ((const char *)(str+1));
19700Sstevel@tonic-gate }
19710Sstevel@tonic-gate 
19720Sstevel@tonic-gate const char *
19730Sstevel@tonic-gate fuiname(int arg)	/* fusers() input argument */
19740Sstevel@tonic-gate {
19750Sstevel@tonic-gate 	const char *str = NULL;
19760Sstevel@tonic-gate 
19770Sstevel@tonic-gate 	switch (arg) {
19780Sstevel@tonic-gate 	case F_FILE_ONLY:	str = "F_FILE_ONLY";		break;
19790Sstevel@tonic-gate 	case F_CONTAINED:	str = "F_CONTAINED";		break;
19800Sstevel@tonic-gate 	}
19810Sstevel@tonic-gate 
19820Sstevel@tonic-gate 	return (str);
19830Sstevel@tonic-gate }
19840Sstevel@tonic-gate 
19850Sstevel@tonic-gate const char *
19860Sstevel@tonic-gate fuflags(private_t *pri, int arg)	/* fusers() output flags */
19870Sstevel@tonic-gate {
19880Sstevel@tonic-gate 	char *str = pri->code_buf;
19890Sstevel@tonic-gate 
19900Sstevel@tonic-gate 	if (arg & ~(F_CDIR|F_RDIR|F_TEXT|F_MAP|F_OPEN|F_TRACE|F_TTY)) {
19910Sstevel@tonic-gate 		(void) sprintf(str, "0x%x", arg);
19920Sstevel@tonic-gate 		return (str);
19930Sstevel@tonic-gate 	}
19940Sstevel@tonic-gate 	*str = '\0';
19950Sstevel@tonic-gate 	if (arg & F_CDIR)
19960Sstevel@tonic-gate 		(void) strcat(str, "|F_CDIR");
19970Sstevel@tonic-gate 	if (arg & F_RDIR)
19980Sstevel@tonic-gate 		(void) strcat(str, "|F_RDIR");
19990Sstevel@tonic-gate 	if (arg & F_TEXT)
20000Sstevel@tonic-gate 		(void) strcat(str, "|F_TEXT");
20010Sstevel@tonic-gate 	if (arg & F_MAP)
20020Sstevel@tonic-gate 		(void) strcat(str, "|F_MAP");
20030Sstevel@tonic-gate 	if (arg & F_OPEN)
20040Sstevel@tonic-gate 		(void) strcat(str, "|F_OPEN");
20050Sstevel@tonic-gate 	if (arg & F_TRACE)
20060Sstevel@tonic-gate 		(void) strcat(str, "|F_TRACE");
20070Sstevel@tonic-gate 	if (arg & F_TTY)
20080Sstevel@tonic-gate 		(void) strcat(str, "|F_TTY");
20090Sstevel@tonic-gate 	if (*str == '\0')
20100Sstevel@tonic-gate 		(void) strcat(str, "|0");
20110Sstevel@tonic-gate 	return ((const char *)(str+1));
20120Sstevel@tonic-gate }
20130Sstevel@tonic-gate 
20140Sstevel@tonic-gate 
20150Sstevel@tonic-gate const char *
20160Sstevel@tonic-gate ipprotos(int arg)	/* IP protocols cf. netinet/in.h */
20170Sstevel@tonic-gate {
20180Sstevel@tonic-gate 	switch (arg) {
20190Sstevel@tonic-gate 	case IPPROTO_IP:	return ("IPPROTO_IP");
20200Sstevel@tonic-gate 	case IPPROTO_ICMP:	return ("IPPROTO_ICMP");
20210Sstevel@tonic-gate 	case IPPROTO_IGMP:	return ("IPPROTO_IGMP");
20220Sstevel@tonic-gate 	case IPPROTO_GGP:	return ("IPPROTO_GGP");
20230Sstevel@tonic-gate 	case IPPROTO_ENCAP:	return ("IPPROTO_ENCAP");
20240Sstevel@tonic-gate 	case IPPROTO_TCP:	return ("IPPROTO_TCP");
20250Sstevel@tonic-gate 	case IPPROTO_EGP:	return ("IPPROTO_EGP");
20260Sstevel@tonic-gate 	case IPPROTO_PUP:	return ("IPPROTO_PUP");
20270Sstevel@tonic-gate 	case IPPROTO_UDP:	return ("IPPROTO_UDP");
20280Sstevel@tonic-gate 	case IPPROTO_IDP:	return ("IPPROTO_IDP");
20290Sstevel@tonic-gate 	case IPPROTO_IPV6:	return ("IPPROTO_IPV6");
20300Sstevel@tonic-gate 	case IPPROTO_ROUTING:	return ("IPPROTO_ROUTING");
20310Sstevel@tonic-gate 	case IPPROTO_FRAGMENT:	return ("IPPROTO_FRAGMENT");
20320Sstevel@tonic-gate 	case IPPROTO_RSVP:	return ("IPPROTO_RSVP");
20330Sstevel@tonic-gate 	case IPPROTO_ESP:	return ("IPPROTO_ESP");
20340Sstevel@tonic-gate 	case IPPROTO_AH:	return ("IPPROTO_AH");
20350Sstevel@tonic-gate 	case IPPROTO_ICMPV6:	return ("IPPROTO_ICMPV6");
20360Sstevel@tonic-gate 	case IPPROTO_NONE:	return ("IPPROTO_NONE");
20370Sstevel@tonic-gate 	case IPPROTO_DSTOPTS:	return ("IPPROTO_DSTOPTS");
20380Sstevel@tonic-gate 	case IPPROTO_HELLO:	return ("IPPROTO_HELLO");
20390Sstevel@tonic-gate 	case IPPROTO_ND:	return ("IPPROTO_ND");
20400Sstevel@tonic-gate 	case IPPROTO_EON:	return ("IPPROTO_EON");
20410Sstevel@tonic-gate 	case IPPROTO_PIM:	return ("IPPROTO_PIM");
20420Sstevel@tonic-gate 	case IPPROTO_SCTP:	return ("IPPROTO_SCTP");
20430Sstevel@tonic-gate 	case IPPROTO_RAW:	return ("IPPROTO_RAW");
20440Sstevel@tonic-gate 	default:		return (NULL);
20450Sstevel@tonic-gate 	}
20460Sstevel@tonic-gate }
2047