17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5ea8dc4b6Seschrock * Common Development and Distribution License (the "License"). 6ea8dc4b6Seschrock * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22e11c3f44Smeem * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 277c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #include <stdio.h> 317c478bd9Sstevel@tonic-gate #include <stdlib.h> 327c478bd9Sstevel@tonic-gate #include <unistd.h> 337c478bd9Sstevel@tonic-gate #include <sys/types.h> 347c478bd9Sstevel@tonic-gate #include <libproc.h> 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate #include <ctype.h> 377c478bd9Sstevel@tonic-gate #include <string.h> 387c478bd9Sstevel@tonic-gate #include <sys/dlpi.h> 397c478bd9Sstevel@tonic-gate #include <sys/ipc.h> 407c478bd9Sstevel@tonic-gate #include <sys/ipc_impl.h> 417c478bd9Sstevel@tonic-gate #include <sys/msg.h> 427c478bd9Sstevel@tonic-gate #include <sys/sem.h> 437c478bd9Sstevel@tonic-gate #include <sys/shm.h> 447c478bd9Sstevel@tonic-gate #include <sys/fstyp.h> 457c478bd9Sstevel@tonic-gate #if defined(__i386) || defined(__amd64) 467c478bd9Sstevel@tonic-gate #include <sys/sysi86.h> 477c478bd9Sstevel@tonic-gate #endif /* __i386 */ 487c478bd9Sstevel@tonic-gate #include <sys/unistd.h> 497c478bd9Sstevel@tonic-gate #include <sys/file.h> 507c478bd9Sstevel@tonic-gate #include <sys/tiuser.h> 517c478bd9Sstevel@tonic-gate #include <sys/timod.h> 527c478bd9Sstevel@tonic-gate #include <sys/stream.h> 537c478bd9Sstevel@tonic-gate #include <sys/stropts.h> 547c478bd9Sstevel@tonic-gate #include <sys/termios.h> 557c478bd9Sstevel@tonic-gate #include <sys/termiox.h> 567c478bd9Sstevel@tonic-gate #include <sys/jioctl.h> 577c478bd9Sstevel@tonic-gate #include <sys/filio.h> 587c478bd9Sstevel@tonic-gate #include <fcntl.h> 597c478bd9Sstevel@tonic-gate #include <sys/termio.h> 607c478bd9Sstevel@tonic-gate #include <sys/stermio.h> 617c478bd9Sstevel@tonic-gate #include <sys/ttold.h> 627c478bd9Sstevel@tonic-gate #include <sys/lock.h> 637c478bd9Sstevel@tonic-gate #include <sys/mount.h> 647c478bd9Sstevel@tonic-gate #include <sys/utssys.h> 657c478bd9Sstevel@tonic-gate #include <sys/sysconfig.h> 667c478bd9Sstevel@tonic-gate #include <sys/statvfs.h> 677c478bd9Sstevel@tonic-gate #include <sys/kstat.h> 687c478bd9Sstevel@tonic-gate #include <sys/audio.h> 697c478bd9Sstevel@tonic-gate #include <sys/mixer.h> 707c478bd9Sstevel@tonic-gate #include <sys/cpc_impl.h> 717c478bd9Sstevel@tonic-gate #include <sys/devpoll.h> 727c478bd9Sstevel@tonic-gate #include <sys/strredir.h> 737c478bd9Sstevel@tonic-gate #include <sys/sockio.h> 747c478bd9Sstevel@tonic-gate #include <netinet/ip_mroute.h> 757c478bd9Sstevel@tonic-gate #include <net/if.h> 767c478bd9Sstevel@tonic-gate #include <net/if_arp.h> 777c478bd9Sstevel@tonic-gate #include <sys/ptyvar.h> 787c478bd9Sstevel@tonic-gate #include <sys/des.h> 797c478bd9Sstevel@tonic-gate #include <sys/prnio.h> 807c478bd9Sstevel@tonic-gate #include <sys/dtrace.h> 817c478bd9Sstevel@tonic-gate #include <sys/crypto/ioctladmin.h> 827c478bd9Sstevel@tonic-gate #include <sys/crypto/ioctl.h> 837c478bd9Sstevel@tonic-gate #include <sys/kbio.h> 847c478bd9Sstevel@tonic-gate #include <sys/ptms.h> 857c478bd9Sstevel@tonic-gate #include <sys/aggr.h> 867c478bd9Sstevel@tonic-gate #include <sys/dld.h> 87b509e89bSRishi Srivatsavai #include <net/simnet.h> 88da14cebeSEric Cheng #include <sys/vnic.h> 89fa9e4066Sahrens #include <sys/fs/zfs.h> 905cd9bd63Skrishna #include <inet/kssl/kssl.h> 9106bbe1e0Sedp #include <sys/dkio.h> 927f0b8309SEdward Pilatowicz #include <sys/fdio.h> 937f0b8309SEdward Pilatowicz #include <sys/cdio.h> 947f0b8309SEdward Pilatowicz #include <sys/scsi/impl/uscsi.h> 957f0b8309SEdward Pilatowicz #include <sys/devinfo_impl.h> 9606bbe1e0Sedp #include <sys/dumpadm.h> 9706bbe1e0Sedp #include <sys/mntio.h> 989d5056eaSjv227347 #include <sys/zcons.h> 99*ddee57faSrui zang - Sun Microsystems - Beijing China #include <sys/usb/clients/hid/hid.h> 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate #include "ramdata.h" 1027c478bd9Sstevel@tonic-gate #include "proto.h" 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gate #define FCNTLMIN F_DUPFD 1054be06494SDan Price #define FCNTLMAX F_BADFD 1067c478bd9Sstevel@tonic-gate const char *const FCNTLname[] = { 1077c478bd9Sstevel@tonic-gate "F_DUPFD", 1087c478bd9Sstevel@tonic-gate "F_GETFD", 1097c478bd9Sstevel@tonic-gate "F_SETFD", 1107c478bd9Sstevel@tonic-gate "F_GETFL", 1117c478bd9Sstevel@tonic-gate "F_SETFL", 1127c478bd9Sstevel@tonic-gate "F_O_GETLK", 1137c478bd9Sstevel@tonic-gate "F_SETLK", 1147c478bd9Sstevel@tonic-gate "F_SETLKW", 1157c478bd9Sstevel@tonic-gate "F_CHKFL", 1167c478bd9Sstevel@tonic-gate "F_DUP2FD", 1177c478bd9Sstevel@tonic-gate "F_ALLOCSP", 1187c478bd9Sstevel@tonic-gate "F_FREESP", 1197c478bd9Sstevel@tonic-gate NULL, /* 12 */ 1207c478bd9Sstevel@tonic-gate NULL, /* 13 */ 1217c478bd9Sstevel@tonic-gate "F_GETLK", 1227c478bd9Sstevel@tonic-gate NULL, /* 15 */ 1237c478bd9Sstevel@tonic-gate NULL, /* 16 */ 1247c478bd9Sstevel@tonic-gate NULL, /* 17 */ 1257c478bd9Sstevel@tonic-gate NULL, /* 18 */ 1267c478bd9Sstevel@tonic-gate NULL, /* 19 */ 1277c478bd9Sstevel@tonic-gate NULL, /* 20 */ 1287c478bd9Sstevel@tonic-gate NULL, /* 21 */ 1297c478bd9Sstevel@tonic-gate NULL, /* 22 */ 1307c478bd9Sstevel@tonic-gate "F_GETOWN", 1317c478bd9Sstevel@tonic-gate "F_SETOWN", 1327c478bd9Sstevel@tonic-gate "F_REVOKE", 1337c478bd9Sstevel@tonic-gate "F_HASREMOTELOCKS", 1347c478bd9Sstevel@tonic-gate "F_FREESP64", 1357c478bd9Sstevel@tonic-gate NULL, /* 28 */ 1367c478bd9Sstevel@tonic-gate NULL, /* 29 */ 1377c478bd9Sstevel@tonic-gate NULL, /* 30 */ 1387c478bd9Sstevel@tonic-gate NULL, /* 31 */ 1397c478bd9Sstevel@tonic-gate NULL, /* 32 */ 1407c478bd9Sstevel@tonic-gate "F_GETLK64", 1417c478bd9Sstevel@tonic-gate "F_SETLK64", 1427c478bd9Sstevel@tonic-gate "F_SETLKW64", 1437c478bd9Sstevel@tonic-gate NULL, /* 36 */ 1447c478bd9Sstevel@tonic-gate NULL, /* 37 */ 1457c478bd9Sstevel@tonic-gate NULL, /* 38 */ 1467c478bd9Sstevel@tonic-gate NULL, /* 39 */ 1477c478bd9Sstevel@tonic-gate "F_SHARE", 1487c478bd9Sstevel@tonic-gate "F_UNSHARE", 1497c478bd9Sstevel@tonic-gate "F_SETLK_NBMAND", 1507c478bd9Sstevel@tonic-gate "F_SHARE_NBMAND", 1514be06494SDan Price "F_SETLK64_NBMAND", 1524be06494SDan Price NULL, /* 45 */ 1534be06494SDan Price "F_BADFD" 1547c478bd9Sstevel@tonic-gate }; 1557c478bd9Sstevel@tonic-gate 1567c478bd9Sstevel@tonic-gate #define SYSFSMIN GETFSIND 1577c478bd9Sstevel@tonic-gate #define SYSFSMAX GETNFSTYP 1587c478bd9Sstevel@tonic-gate const char *const SYSFSname[] = { 1597c478bd9Sstevel@tonic-gate "GETFSIND", 1607c478bd9Sstevel@tonic-gate "GETFSTYP", 1617c478bd9Sstevel@tonic-gate "GETNFSTYP" 1627c478bd9Sstevel@tonic-gate }; 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gate #define PLOCKMIN UNLOCK 1657c478bd9Sstevel@tonic-gate #define PLOCKMAX DATLOCK 1667c478bd9Sstevel@tonic-gate const char *const PLOCKname[] = { 1677c478bd9Sstevel@tonic-gate "UNLOCK", 1687c478bd9Sstevel@tonic-gate "PROCLOCK", 1697c478bd9Sstevel@tonic-gate "TXTLOCK", 1707c478bd9Sstevel@tonic-gate NULL, 1717c478bd9Sstevel@tonic-gate "DATLOCK" 1727c478bd9Sstevel@tonic-gate }; 1737c478bd9Sstevel@tonic-gate 1747c478bd9Sstevel@tonic-gate #define SCONFMIN _CONFIG_NGROUPS 1754be06494SDan Price #define SCONFMAX _CONFIG_EPHID_MAX 1767c478bd9Sstevel@tonic-gate const char *const SCONFname[] = { 1777c478bd9Sstevel@tonic-gate "_CONFIG_NGROUPS", /* 2 */ 1787c478bd9Sstevel@tonic-gate "_CONFIG_CHILD_MAX", /* 3 */ 1797c478bd9Sstevel@tonic-gate "_CONFIG_OPEN_FILES", /* 4 */ 1807c478bd9Sstevel@tonic-gate "_CONFIG_POSIX_VER", /* 5 */ 1817c478bd9Sstevel@tonic-gate "_CONFIG_PAGESIZE", /* 6 */ 1827c478bd9Sstevel@tonic-gate "_CONFIG_CLK_TCK", /* 7 */ 1837c478bd9Sstevel@tonic-gate "_CONFIG_XOPEN_VER", /* 8 */ 1847c478bd9Sstevel@tonic-gate "_CONFIG_HRESCLK_TCK", /* 9 */ 1857c478bd9Sstevel@tonic-gate "_CONFIG_PROF_TCK", /* 10 */ 1867c478bd9Sstevel@tonic-gate "_CONFIG_NPROC_CONF", /* 11 */ 1877c478bd9Sstevel@tonic-gate "_CONFIG_NPROC_ONLN", /* 12 */ 1887c478bd9Sstevel@tonic-gate "_CONFIG_AIO_LISTIO_MAX", /* 13 */ 1897c478bd9Sstevel@tonic-gate "_CONFIG_AIO_MAX", /* 14 */ 1907c478bd9Sstevel@tonic-gate "_CONFIG_AIO_PRIO_DELTA_MAX", /* 15 */ 1917c478bd9Sstevel@tonic-gate "_CONFIG_DELAYTIMER_MAX", /* 16 */ 1927c478bd9Sstevel@tonic-gate "_CONFIG_MQ_OPEN_MAX", /* 17 */ 1937c478bd9Sstevel@tonic-gate "_CONFIG_MQ_PRIO_MAX", /* 18 */ 1947c478bd9Sstevel@tonic-gate "_CONFIG_RTSIG_MAX", /* 19 */ 1957c478bd9Sstevel@tonic-gate "_CONFIG_SEM_NSEMS_MAX", /* 20 */ 1967c478bd9Sstevel@tonic-gate "_CONFIG_SEM_VALUE_MAX", /* 21 */ 1977c478bd9Sstevel@tonic-gate "_CONFIG_SIGQUEUE_MAX", /* 22 */ 1987c478bd9Sstevel@tonic-gate "_CONFIG_SIGRT_MIN", /* 23 */ 1997c478bd9Sstevel@tonic-gate "_CONFIG_SIGRT_MAX", /* 24 */ 2007c478bd9Sstevel@tonic-gate "_CONFIG_TIMER_MAX", /* 25 */ 2017c478bd9Sstevel@tonic-gate "_CONFIG_PHYS_PAGES", /* 26 */ 2027c478bd9Sstevel@tonic-gate "_CONFIG_AVPHYS_PAGES", /* 27 */ 2037c478bd9Sstevel@tonic-gate "_CONFIG_COHERENCY", /* 28 */ 2047c478bd9Sstevel@tonic-gate "_CONFIG_SPLIT_CACHE", /* 29 */ 2057c478bd9Sstevel@tonic-gate "_CONFIG_ICACHESZ", /* 30 */ 2067c478bd9Sstevel@tonic-gate "_CONFIG_DCACHESZ", /* 31 */ 2077c478bd9Sstevel@tonic-gate "_CONFIG_ICACHELINESZ", /* 32 */ 2087c478bd9Sstevel@tonic-gate "_CONFIG_DCACHELINESZ", /* 33 */ 2097c478bd9Sstevel@tonic-gate "_CONFIG_ICACHEBLKSZ", /* 34 */ 2107c478bd9Sstevel@tonic-gate "_CONFIG_DCACHEBLKSZ", /* 35 */ 2117c478bd9Sstevel@tonic-gate "_CONFIG_DCACHETBLKSZ", /* 36 */ 2127c478bd9Sstevel@tonic-gate "_CONFIG_ICACHE_ASSOC", /* 37 */ 2137c478bd9Sstevel@tonic-gate "_CONFIG_DCACHE_ASSOC", /* 38 */ 2147c478bd9Sstevel@tonic-gate NULL, /* 39 */ 2157c478bd9Sstevel@tonic-gate NULL, /* 40 */ 2167c478bd9Sstevel@tonic-gate NULL, /* 41 */ 2177c478bd9Sstevel@tonic-gate "_CONFIG_MAXPID", /* 42 */ 2187c478bd9Sstevel@tonic-gate "_CONFIG_STACK_PROT", /* 43 */ 2197c478bd9Sstevel@tonic-gate "_CONFIG_NPROC_MAX", /* 44 */ 2204be06494SDan Price "_CONFIG_CPUID_MAX", /* 45 */ 2214be06494SDan Price "_CONFIG_SYMLOOP_MAX", /* 46 */ 2224be06494SDan Price "_CONFIG_EPHID_MAX", /* 47 */ 2237c478bd9Sstevel@tonic-gate }; 2247c478bd9Sstevel@tonic-gate 2257c478bd9Sstevel@tonic-gate #define PATHCONFMIN _PC_LINK_MAX 2264be06494SDan Price #define PATHCONFMAX _PC_XATTR_EXISTS 2277c478bd9Sstevel@tonic-gate const char *const PATHCONFname[] = { 2284be06494SDan Price "_PC_LINK_MAX", /* 1 */ 2294be06494SDan Price "_PC_MAX_CANON", /* 2 */ 2304be06494SDan Price "_PC_MAX_INPUT", /* 3 */ 2314be06494SDan Price "_PC_NAME_MAX", /* 4 */ 2324be06494SDan Price "_PC_PATH_MAX", /* 5 */ 2334be06494SDan Price "_PC_PIPE_BUF", /* 6 */ 2344be06494SDan Price "_PC_NO_TRUNC", /* 7 */ 2354be06494SDan Price "_PC_VDISABLE", /* 8 */ 2364be06494SDan Price "_PC_CHOWN_RESTRICTED", /* 9 */ 2374be06494SDan Price "_PC_ASYNC_IO", /* 10 */ 2384be06494SDan Price "_PC_PRIO_IO", /* 11 */ 2394be06494SDan Price "_PC_SYNC_IO", /* 12 */ 2404be06494SDan Price "_PC_ALLOC_SIZE_MIN", /* 13 */ 2414be06494SDan Price "_PC_REC_INCR_XFER_SIZE", /* 14 */ 2424be06494SDan Price "_PC_REC_MAX_XFER_SIZE", /* 15 */ 2434be06494SDan Price "_PC_REC_MIN_XFER_SIZE", /* 16 */ 2444be06494SDan Price "_PC_REC_XFER_ALIGN", /* 17 */ 2454be06494SDan Price "_PC_SYMLINK_MAX", /* 18 */ 2464be06494SDan Price "_PC_2_SYMLINKS", /* 19 */ 2474be06494SDan Price "_PC_ACL_ENABLED", /* 20 */ 2484be06494SDan Price "_PC_MIN_HOLE_SIZE", /* 21 */ 2494be06494SDan Price "_PC_CASE_BEHAVIOR", /* 22 */ 2504be06494SDan Price "_PC_SATTR_ENABLED", /* 23 */ 2514be06494SDan Price "_PC_SATTR_EXISTS", /* 24 */ 252e802abbdSTim Haley "_PC_ACCESS_FILTERING", /* 25 */ 2534be06494SDan Price NULL, /* 26 */ 2544be06494SDan Price NULL, /* 27 */ 2554be06494SDan Price NULL, /* 28 */ 2564be06494SDan Price NULL, /* 29 */ 2574be06494SDan Price NULL, /* 30 */ 2584be06494SDan Price NULL, /* 31 */ 2594be06494SDan Price NULL, /* 32 */ 2604be06494SDan Price NULL, /* 33 */ 2614be06494SDan Price NULL, /* 34 */ 2624be06494SDan Price NULL, /* 35 */ 2634be06494SDan Price NULL, /* 36 */ 2644be06494SDan Price NULL, /* 37 */ 2654be06494SDan Price NULL, /* 38 */ 2664be06494SDan Price NULL, /* 39 */ 2674be06494SDan Price NULL, /* 40 */ 2684be06494SDan Price NULL, /* 41 */ 2694be06494SDan Price NULL, /* 42 */ 2704be06494SDan Price NULL, /* 43 */ 2714be06494SDan Price NULL, /* 44 */ 2724be06494SDan Price NULL, /* 45 */ 2734be06494SDan Price NULL, /* 46 */ 2744be06494SDan Price NULL, /* 47 */ 2754be06494SDan Price NULL, /* 48 */ 2764be06494SDan Price NULL, /* 49 */ 2774be06494SDan Price NULL, /* 50 */ 2784be06494SDan Price NULL, /* 51 */ 2794be06494SDan Price NULL, /* 52 */ 2804be06494SDan Price NULL, /* 53 */ 2814be06494SDan Price NULL, /* 54 */ 2824be06494SDan Price NULL, /* 55 */ 2834be06494SDan Price NULL, /* 56 */ 2844be06494SDan Price NULL, /* 57 */ 2854be06494SDan Price NULL, /* 58 */ 2864be06494SDan Price NULL, /* 59 */ 2874be06494SDan Price NULL, /* 60 */ 2884be06494SDan Price NULL, /* 61 */ 2894be06494SDan Price NULL, /* 62 */ 2904be06494SDan Price NULL, /* 63 */ 2914be06494SDan Price NULL, /* 64 */ 2924be06494SDan Price NULL, /* 65 */ 2934be06494SDan Price NULL, /* 66 */ 2944be06494SDan Price "_PC_FILESIZEBITS", /* 67 */ 2954be06494SDan Price NULL, /* 68 */ 2964be06494SDan Price NULL, /* 69 */ 2974be06494SDan Price NULL, /* 70 */ 2984be06494SDan Price NULL, /* 71 */ 2994be06494SDan Price NULL, /* 72 */ 3004be06494SDan Price NULL, /* 73 */ 3014be06494SDan Price NULL, /* 74 */ 3024be06494SDan Price NULL, /* 75 */ 3034be06494SDan Price NULL, /* 76 */ 3044be06494SDan Price NULL, /* 77 */ 3054be06494SDan Price NULL, /* 78 */ 3064be06494SDan Price NULL, /* 79 */ 3074be06494SDan Price NULL, /* 80 */ 3084be06494SDan Price NULL, /* 81 */ 3094be06494SDan Price NULL, /* 82 */ 3104be06494SDan Price NULL, /* 83 */ 3114be06494SDan Price NULL, /* 84 */ 3124be06494SDan Price NULL, /* 85 */ 3134be06494SDan Price NULL, /* 86 */ 3144be06494SDan Price NULL, /* 87 */ 3154be06494SDan Price NULL, /* 88 */ 3164be06494SDan Price NULL, /* 89 */ 3174be06494SDan Price NULL, /* 90 */ 3184be06494SDan Price NULL, /* 91 */ 3194be06494SDan Price NULL, /* 92 */ 3204be06494SDan Price NULL, /* 93 */ 3214be06494SDan Price NULL, /* 94 */ 3224be06494SDan Price NULL, /* 95 */ 3234be06494SDan Price NULL, /* 96 */ 3244be06494SDan Price NULL, /* 97 */ 3254be06494SDan Price NULL, /* 98 */ 3264be06494SDan Price NULL, /* 99 */ 3274be06494SDan Price "_PC_XATTR_ENABLED", /* 100 */ 3284be06494SDan Price "_PC_XATTR_EXISTS", /* 101, _PC_LAST */ 3297c478bd9Sstevel@tonic-gate }; 3307c478bd9Sstevel@tonic-gate 3317c478bd9Sstevel@tonic-gate const struct ioc { 3327c478bd9Sstevel@tonic-gate uint_t code; 3337c478bd9Sstevel@tonic-gate const char *name; 3347c478bd9Sstevel@tonic-gate const char *datastruct; 3357c478bd9Sstevel@tonic-gate } ioc[] = { 3367c478bd9Sstevel@tonic-gate { (uint_t)TCGETA, "TCGETA", NULL }, 3377c478bd9Sstevel@tonic-gate { (uint_t)TCSETA, "TCSETA", NULL }, 3387c478bd9Sstevel@tonic-gate { (uint_t)TCSETAW, "TCSETAW", NULL }, 3397c478bd9Sstevel@tonic-gate { (uint_t)TCSETAF, "TCSETAF", NULL }, 3407c478bd9Sstevel@tonic-gate { (uint_t)TCFLSH, "TCFLSH", NULL }, 3417c478bd9Sstevel@tonic-gate { (uint_t)TIOCKBON, "TIOCKBON", NULL }, 3427c478bd9Sstevel@tonic-gate { (uint_t)TIOCKBOF, "TIOCKBOF", NULL }, 3437c478bd9Sstevel@tonic-gate { (uint_t)KBENABLED, "KBENABLED", NULL }, 3447c478bd9Sstevel@tonic-gate { (uint_t)TCGETS, "TCGETS", NULL }, 3457c478bd9Sstevel@tonic-gate { (uint_t)TCSETS, "TCSETS", NULL }, 3467c478bd9Sstevel@tonic-gate { (uint_t)TCSETSW, "TCSETSW", NULL }, 3477c478bd9Sstevel@tonic-gate { (uint_t)TCSETSF, "TCSETSF", NULL }, 3487c478bd9Sstevel@tonic-gate { (uint_t)TCXONC, "TCXONC", NULL }, 3497c478bd9Sstevel@tonic-gate { (uint_t)TCSBRK, "TCSBRK", NULL }, 3507c478bd9Sstevel@tonic-gate { (uint_t)TCDSET, "TCDSET", NULL }, 3517c478bd9Sstevel@tonic-gate { (uint_t)RTS_TOG, "RTS_TOG", NULL }, 3527c478bd9Sstevel@tonic-gate { (uint_t)TIOCSWINSZ, "TIOCSWINSZ", NULL }, 3537c478bd9Sstevel@tonic-gate { (uint_t)TIOCGWINSZ, "TIOCGWINSZ", NULL }, 3547c478bd9Sstevel@tonic-gate { (uint_t)TIOCGETD, "TIOCGETD", NULL }, 3557c478bd9Sstevel@tonic-gate { (uint_t)TIOCSETD, "TIOCSETD", NULL }, 3567c478bd9Sstevel@tonic-gate { (uint_t)TIOCHPCL, "TIOCHPCL", NULL }, 3577c478bd9Sstevel@tonic-gate { (uint_t)TIOCGETP, "TIOCGETP", NULL }, 3587c478bd9Sstevel@tonic-gate { (uint_t)TIOCSETP, "TIOCSETP", NULL }, 3597c478bd9Sstevel@tonic-gate { (uint_t)TIOCSETN, "TIOCSETN", NULL }, 3607c478bd9Sstevel@tonic-gate { (uint_t)TIOCEXCL, "TIOCEXCL", NULL }, 3617c478bd9Sstevel@tonic-gate { (uint_t)TIOCNXCL, "TIOCNXCL", NULL }, 3627c478bd9Sstevel@tonic-gate { (uint_t)TIOCFLUSH, "TIOCFLUSH", NULL }, 3637c478bd9Sstevel@tonic-gate { (uint_t)TIOCSETC, "TIOCSETC", NULL }, 3647c478bd9Sstevel@tonic-gate { (uint_t)TIOCGETC, "TIOCGETC", NULL }, 3657c478bd9Sstevel@tonic-gate { (uint_t)TIOCGPGRP, "TIOCGPGRP", NULL }, 3667c478bd9Sstevel@tonic-gate { (uint_t)TIOCSPGRP, "TIOCSPGRP", NULL }, 3677c478bd9Sstevel@tonic-gate { (uint_t)TIOCGSID, "TIOCGSID", NULL }, 3687c478bd9Sstevel@tonic-gate { (uint_t)TIOCSTI, "TIOCSTI", NULL }, 3697c478bd9Sstevel@tonic-gate { (uint_t)TIOCMSET, "TIOCMSET", NULL }, 3707c478bd9Sstevel@tonic-gate { (uint_t)TIOCMBIS, "TIOCMBIS", NULL }, 3717c478bd9Sstevel@tonic-gate { (uint_t)TIOCMBIC, "TIOCMBIC", NULL }, 3727c478bd9Sstevel@tonic-gate { (uint_t)TIOCMGET, "TIOCMGET", NULL }, 3737c478bd9Sstevel@tonic-gate { (uint_t)TIOCREMOTE, "TIOCREMOTE", NULL }, 3747c478bd9Sstevel@tonic-gate { (uint_t)TIOCSIGNAL, "TIOCSIGNAL", NULL }, 3757c478bd9Sstevel@tonic-gate { (uint_t)TIOCSTART, "TIOCSTART", NULL }, 3767c478bd9Sstevel@tonic-gate { (uint_t)TIOCSTOP, "TIOCSTOP", NULL }, 3777c478bd9Sstevel@tonic-gate { (uint_t)TIOCNOTTY, "TIOCNOTTY", NULL }, 378de81e71eSTim Marsland { (uint_t)TIOCSCTTY, "TIOCSCTTY", NULL }, 3797c478bd9Sstevel@tonic-gate { (uint_t)TIOCOUTQ, "TIOCOUTQ", NULL }, 3807c478bd9Sstevel@tonic-gate { (uint_t)TIOCGLTC, "TIOCGLTC", NULL }, 3817c478bd9Sstevel@tonic-gate { (uint_t)TIOCSLTC, "TIOCSLTC", NULL }, 3827c478bd9Sstevel@tonic-gate { (uint_t)TIOCCDTR, "TIOCCDTR", NULL }, 3837c478bd9Sstevel@tonic-gate { (uint_t)TIOCSDTR, "TIOCSDTR", NULL }, 3847c478bd9Sstevel@tonic-gate { (uint_t)TIOCCBRK, "TIOCCBRK", NULL }, 3857c478bd9Sstevel@tonic-gate { (uint_t)TIOCSBRK, "TIOCSBRK", NULL }, 3867c478bd9Sstevel@tonic-gate { (uint_t)TIOCLGET, "TIOCLGET", NULL }, 3877c478bd9Sstevel@tonic-gate { (uint_t)TIOCLSET, "TIOCLSET", NULL }, 3887c478bd9Sstevel@tonic-gate { (uint_t)TIOCLBIC, "TIOCLBIC", NULL }, 3897c478bd9Sstevel@tonic-gate { (uint_t)TIOCLBIS, "TIOCLBIS", NULL }, 3907c478bd9Sstevel@tonic-gate 391de81e71eSTim Marsland { (uint_t)TIOCSILOOP, "TIOCSILOOP", NULL }, 392de81e71eSTim Marsland { (uint_t)TIOCCILOOP, "TIOCSILOOP", NULL }, 393de81e71eSTim Marsland 394de81e71eSTim Marsland { (uint_t)TIOCSETLD, "TIOCSETLD", NULL }, 395de81e71eSTim Marsland { (uint_t)TIOCGETLD, "TIOCGETLD", NULL }, 396de81e71eSTim Marsland 397de81e71eSTim Marsland { (uint_t)TIOCGPPS, "TIOCGPPS", NULL }, 398de81e71eSTim Marsland { (uint_t)TIOCSPPS, "TIOCSPPS", NULL }, 399de81e71eSTim Marsland { (uint_t)TIOCGPPSEV, "TIOCGPPSEV", NULL }, 400de81e71eSTim Marsland 4017c478bd9Sstevel@tonic-gate { (uint_t)TIOCPKT, "TIOCPKT", NULL }, /* ptyvar.h */ 4027c478bd9Sstevel@tonic-gate { (uint_t)TIOCUCNTL, "TIOCUCNTL", NULL }, 4037c478bd9Sstevel@tonic-gate { (uint_t)TIOCTCNTL, "TIOCTCNTL", NULL }, 4047c478bd9Sstevel@tonic-gate { (uint_t)TIOCISPACE, "TIOCISPACE", NULL }, 4057c478bd9Sstevel@tonic-gate { (uint_t)TIOCISIZE, "TIOCISIZE", NULL }, 4067c478bd9Sstevel@tonic-gate { (uint_t)TIOCSSIZE, "TIOCSSIZE", "ttysize" }, 4077c478bd9Sstevel@tonic-gate { (uint_t)TIOCGSIZE, "TIOCGSIZE", "ttysize" }, 4087c478bd9Sstevel@tonic-gate 4097c478bd9Sstevel@tonic-gate /* 4100ba2cbe9Sxc151355 * Unfortunately, the DLIOC and LDIOC codes overlap. Since the LDIOC 4117c478bd9Sstevel@tonic-gate * ioctls (for xenix compatibility) are far less likely to be used, we 4120ba2cbe9Sxc151355 * give preference to DLIOC. 4137c478bd9Sstevel@tonic-gate */ 4147c478bd9Sstevel@tonic-gate { (uint_t)DLIOCRAW, "DLIOCRAW", NULL }, 4150ba2cbe9Sxc151355 { (uint_t)DLIOCNATIVE, "DLIOCNATIVE", NULL }, 416b127ac41SPhilip Kirk { (uint_t)DLIOCIPNETINFO, "DLIOCIPNETINFO", NULL}, 4177c478bd9Sstevel@tonic-gate 4187c478bd9Sstevel@tonic-gate { (uint_t)LDOPEN, "LDOPEN", NULL }, 4197c478bd9Sstevel@tonic-gate { (uint_t)LDCLOSE, "LDCLOSE", NULL }, 4207c478bd9Sstevel@tonic-gate { (uint_t)LDCHG, "LDCHG", NULL }, 4217c478bd9Sstevel@tonic-gate { (uint_t)LDGETT, "LDGETT", NULL }, 4227c478bd9Sstevel@tonic-gate { (uint_t)LDSETT, "LDSETT", NULL }, 4237c478bd9Sstevel@tonic-gate { (uint_t)LDSMAP, "LDSMAP", NULL }, 4247c478bd9Sstevel@tonic-gate { (uint_t)LDGMAP, "LDGMAP", NULL }, 4257c478bd9Sstevel@tonic-gate { (uint_t)LDNMAP, "LDNMAP", NULL }, 4267c478bd9Sstevel@tonic-gate { (uint_t)TCGETX, "TCGETX", NULL }, 4277c478bd9Sstevel@tonic-gate { (uint_t)TCSETX, "TCSETX", NULL }, 4287c478bd9Sstevel@tonic-gate { (uint_t)TCSETXW, "TCSETXW", NULL }, 4297c478bd9Sstevel@tonic-gate { (uint_t)TCSETXF, "TCSETXF", NULL }, 4307c478bd9Sstevel@tonic-gate { (uint_t)FIORDCHK, "FIORDCHK", NULL }, 4317c478bd9Sstevel@tonic-gate { (uint_t)FIOCLEX, "FIOCLEX", NULL }, 4327c478bd9Sstevel@tonic-gate { (uint_t)FIONCLEX, "FIONCLEX", NULL }, 4337c478bd9Sstevel@tonic-gate { (uint_t)FIONREAD, "FIONREAD", NULL }, 4347c478bd9Sstevel@tonic-gate { (uint_t)FIONBIO, "FIONBIO", NULL }, 4357c478bd9Sstevel@tonic-gate { (uint_t)FIOASYNC, "FIOASYNC", NULL }, 4367c478bd9Sstevel@tonic-gate { (uint_t)FIOSETOWN, "FIOSETOWN", NULL }, 4377c478bd9Sstevel@tonic-gate { (uint_t)FIOGETOWN, "FIOGETOWN", NULL }, 4387c478bd9Sstevel@tonic-gate #ifdef DIOCGETP 4397c478bd9Sstevel@tonic-gate { (uint_t)DIOCGETP, "DIOCGETP", NULL }, 4407c478bd9Sstevel@tonic-gate { (uint_t)DIOCSETP, "DIOCSETP", NULL }, 4417c478bd9Sstevel@tonic-gate #endif 4427c478bd9Sstevel@tonic-gate #ifdef DIOCGETC 4437c478bd9Sstevel@tonic-gate { (uint_t)DIOCGETC, "DIOCGETC", NULL }, 4447c478bd9Sstevel@tonic-gate { (uint_t)DIOCGETB, "DIOCGETB", NULL }, 4457c478bd9Sstevel@tonic-gate { (uint_t)DIOCSETE, "DIOCSETE", NULL }, 4467c478bd9Sstevel@tonic-gate #endif 4477c478bd9Sstevel@tonic-gate #ifdef IFFORMAT 4487c478bd9Sstevel@tonic-gate { (uint_t)IFFORMAT, "IFFORMAT", NULL }, 4497c478bd9Sstevel@tonic-gate { (uint_t)IFBCHECK, "IFBCHECK", NULL }, 4507c478bd9Sstevel@tonic-gate { (uint_t)IFCONFIRM, "IFCONFIRM", NULL }, 4517c478bd9Sstevel@tonic-gate #endif 4527c478bd9Sstevel@tonic-gate #ifdef LIOCGETP 4537c478bd9Sstevel@tonic-gate { (uint_t)LIOCGETP, "LIOCGETP", NULL }, 4547c478bd9Sstevel@tonic-gate { (uint_t)LIOCSETP, "LIOCSETP", NULL }, 4557c478bd9Sstevel@tonic-gate { (uint_t)LIOCGETS, "LIOCGETS", NULL }, 4567c478bd9Sstevel@tonic-gate { (uint_t)LIOCSETS, "LIOCSETS", NULL }, 4577c478bd9Sstevel@tonic-gate #endif 4587c478bd9Sstevel@tonic-gate #ifdef JBOOT 4597c478bd9Sstevel@tonic-gate { (uint_t)JBOOT, "JBOOT", NULL }, 4607c478bd9Sstevel@tonic-gate { (uint_t)JTERM, "JTERM", NULL }, 4617c478bd9Sstevel@tonic-gate { (uint_t)JMPX, "JMPX", NULL }, 4627c478bd9Sstevel@tonic-gate #ifdef JTIMO 4637c478bd9Sstevel@tonic-gate { (uint_t)JTIMO, "JTIMO", NULL }, 4647c478bd9Sstevel@tonic-gate #endif 4657c478bd9Sstevel@tonic-gate { (uint_t)JWINSIZE, "JWINSIZE", NULL }, 4667c478bd9Sstevel@tonic-gate { (uint_t)JTIMOM, "JTIMOM", NULL }, 4677c478bd9Sstevel@tonic-gate { (uint_t)JZOMBOOT, "JZOMBOOT", NULL }, 4687c478bd9Sstevel@tonic-gate { (uint_t)JAGENT, "JAGENT", NULL }, 4697c478bd9Sstevel@tonic-gate { (uint_t)JTRUN, "JTRUN", NULL }, 4707c478bd9Sstevel@tonic-gate { (uint_t)JXTPROTO, "JXTPROTO", NULL }, 4717c478bd9Sstevel@tonic-gate #endif 4727c478bd9Sstevel@tonic-gate { (uint_t)KSTAT_IOC_CHAIN_ID, "KSTAT_IOC_CHAIN_ID", NULL }, 4737c478bd9Sstevel@tonic-gate { (uint_t)KSTAT_IOC_READ, "KSTAT_IOC_READ", NULL }, 4747c478bd9Sstevel@tonic-gate { (uint_t)KSTAT_IOC_WRITE, "KSTAT_IOC_WRITE", NULL }, 4757c478bd9Sstevel@tonic-gate { (uint_t)STGET, "STGET", NULL }, 4767c478bd9Sstevel@tonic-gate { (uint_t)STSET, "STSET", NULL }, 4777c478bd9Sstevel@tonic-gate { (uint_t)STTHROW, "STTHROW", NULL }, 4787c478bd9Sstevel@tonic-gate { (uint_t)STWLINE, "STWLINE", NULL }, 4797c478bd9Sstevel@tonic-gate { (uint_t)STTSV, "STTSV", NULL }, 4807c478bd9Sstevel@tonic-gate { (uint_t)I_NREAD, "I_NREAD", NULL }, 4817c478bd9Sstevel@tonic-gate { (uint_t)I_PUSH, "I_PUSH", NULL }, 4827c478bd9Sstevel@tonic-gate { (uint_t)I_POP, "I_POP", NULL }, 4837c478bd9Sstevel@tonic-gate { (uint_t)I_LOOK, "I_LOOK", NULL }, 4847c478bd9Sstevel@tonic-gate { (uint_t)I_FLUSH, "I_FLUSH", NULL }, 4857c478bd9Sstevel@tonic-gate { (uint_t)I_SRDOPT, "I_SRDOPT", NULL }, 4867c478bd9Sstevel@tonic-gate { (uint_t)I_GRDOPT, "I_GRDOPT", NULL }, 4877c478bd9Sstevel@tonic-gate { (uint_t)I_STR, "I_STR", NULL }, 4887c478bd9Sstevel@tonic-gate { (uint_t)I_SETSIG, "I_SETSIG", NULL }, 4897c478bd9Sstevel@tonic-gate { (uint_t)I_GETSIG, "I_GETSIG", NULL }, 4907c478bd9Sstevel@tonic-gate { (uint_t)I_FIND, "I_FIND", NULL }, 4917c478bd9Sstevel@tonic-gate { (uint_t)I_LINK, "I_LINK", NULL }, 4927c478bd9Sstevel@tonic-gate { (uint_t)I_UNLINK, "I_UNLINK", NULL }, 4937c478bd9Sstevel@tonic-gate { (uint_t)I_PEEK, "I_PEEK", NULL }, 4947c478bd9Sstevel@tonic-gate { (uint_t)I_FDINSERT, "I_FDINSERT", NULL }, 4957c478bd9Sstevel@tonic-gate { (uint_t)I_SENDFD, "I_SENDFD", NULL }, 4967c478bd9Sstevel@tonic-gate { (uint_t)I_RECVFD, "I_RECVFD", NULL }, 4977c478bd9Sstevel@tonic-gate { (uint_t)I_SWROPT, "I_SWROPT", NULL }, 4987c478bd9Sstevel@tonic-gate { (uint_t)I_GWROPT, "I_GWROPT", NULL }, 4997c478bd9Sstevel@tonic-gate { (uint_t)I_LIST, "I_LIST", NULL }, 5007c478bd9Sstevel@tonic-gate { (uint_t)I_PLINK, "I_PLINK", NULL }, 5017c478bd9Sstevel@tonic-gate { (uint_t)I_PUNLINK, "I_PUNLINK", NULL }, 5027c478bd9Sstevel@tonic-gate { (uint_t)I_FLUSHBAND, "I_FLUSHBAND", NULL }, 5037c478bd9Sstevel@tonic-gate { (uint_t)I_CKBAND, "I_CKBAND", NULL }, 5047c478bd9Sstevel@tonic-gate { (uint_t)I_GETBAND, "I_GETBAND", NULL }, 5057c478bd9Sstevel@tonic-gate { (uint_t)I_ATMARK, "I_ATMARK", NULL }, 5067c478bd9Sstevel@tonic-gate { (uint_t)I_SETCLTIME, "I_SETCLTIME", NULL }, 5077c478bd9Sstevel@tonic-gate { (uint_t)I_GETCLTIME, "I_GETCLTIME", NULL }, 5087c478bd9Sstevel@tonic-gate { (uint_t)I_CANPUT, "I_CANPUT", NULL }, 5097c478bd9Sstevel@tonic-gate { (uint_t)I_ANCHOR, "I_ANCHOR", NULL }, 510a45f3f93Smeem { (uint_t)_I_CMD, "_I_CMD", NULL }, 5117c478bd9Sstevel@tonic-gate #ifdef TI_GETINFO 5127c478bd9Sstevel@tonic-gate { (uint_t)TI_GETINFO, "TI_GETINFO", NULL }, 5137c478bd9Sstevel@tonic-gate { (uint_t)TI_OPTMGMT, "TI_OPTMGMT", NULL }, 5147c478bd9Sstevel@tonic-gate { (uint_t)TI_BIND, "TI_BIND", NULL }, 5157c478bd9Sstevel@tonic-gate { (uint_t)TI_UNBIND, "TI_UNBIND", NULL }, 5167c478bd9Sstevel@tonic-gate #endif 5177c478bd9Sstevel@tonic-gate #ifdef TI_CAPABILITY 5187c478bd9Sstevel@tonic-gate { (uint_t)TI_CAPABILITY, "TI_CAPABILITY", NULL }, 5197c478bd9Sstevel@tonic-gate #endif 5207c478bd9Sstevel@tonic-gate #ifdef TI_GETMYNAME 5217c478bd9Sstevel@tonic-gate { (uint_t)TI_GETMYNAME, "TI_GETMYNAME", NULL }, 5227c478bd9Sstevel@tonic-gate { (uint_t)TI_GETPEERNAME, "TI_GETPEERNAME", NULL }, 5237c478bd9Sstevel@tonic-gate { (uint_t)TI_SETMYNAME, "TI_SETMYNAME", NULL }, 5247c478bd9Sstevel@tonic-gate { (uint_t)TI_SETPEERNAME, "TI_SETPEERNAME", NULL }, 5257c478bd9Sstevel@tonic-gate #endif 5267c478bd9Sstevel@tonic-gate #ifdef V_PREAD 5277c478bd9Sstevel@tonic-gate { (uint_t)V_PREAD, "V_PREAD", NULL }, 5287c478bd9Sstevel@tonic-gate { (uint_t)V_PWRITE, "V_PWRITE", NULL }, 5297c478bd9Sstevel@tonic-gate { (uint_t)V_PDREAD, "V_PDREAD", NULL }, 5307c478bd9Sstevel@tonic-gate { (uint_t)V_PDWRITE, "V_PDWRITE", NULL }, 5317c478bd9Sstevel@tonic-gate #if !defined(__i386) && !defined(__amd64) 5327c478bd9Sstevel@tonic-gate { (uint_t)V_GETSSZ, "V_GETSSZ", NULL }, 5337c478bd9Sstevel@tonic-gate #endif /* !__i386 */ 5347c478bd9Sstevel@tonic-gate #endif 5357c478bd9Sstevel@tonic-gate /* audio */ 5367c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_GETINFO, "AUDIO_GETINFO", NULL }, 5377c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_SETINFO, "AUDIO_SETINFO", NULL }, 5387c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_DRAIN, "AUDIO_DRAIN", NULL }, 5397c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_GETDEV, "AUDIO_GETDEV", NULL }, 5407c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_DIAG_LOOPBACK, "AUDIO_DIAG_LOOPBACK", NULL }, 5417c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_GET_CH_NUMBER, "AUDIO_GET_CH_NUMBER", NULL }, 5427c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_GET_CH_TYPE, "AUDIO_GET_CH_TYPE", NULL }, 5437c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_GET_NUM_CHS, "AUDIO_GET_NUM_CHS", NULL }, 5447c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_GET_AD_DEV, "AUDIO_GET_AD_DEV", NULL }, 5457c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_GET_APM_DEV, "AUDIO_GET_APM_DEV", NULL }, 5467c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_GET_AS_DEV, "AUDIO_GET_AS_DEV", NULL }, 5477c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_MIXER_MULTIPLE_OPEN, "AUDIO_MIXER_MULTIPLE_OPEN", 5487c478bd9Sstevel@tonic-gate NULL }, 5497c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_MIXER_SINGLE_OPEN, "AUDIO_MIXER_SINGLE_OPEN", 5507c478bd9Sstevel@tonic-gate NULL }, 5517c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_MIXER_GET_SAMPLE_RATES, "AUDIO_MIXER_GET_SAMPLE_RATES", 5527c478bd9Sstevel@tonic-gate NULL }, 5537c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_MIXERCTL_GETINFO, "AUDIO_MIXERCTL_GETINFO", 5547c478bd9Sstevel@tonic-gate NULL }, 5557c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_MIXERCTL_SETINFO, "AUDIO_MIXERCTL_SETINFO", 5567c478bd9Sstevel@tonic-gate NULL }, 5577c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_MIXERCTL_GET_CHINFO, "AUDIO_MIXERCTL_GET_CHINFO", 5587c478bd9Sstevel@tonic-gate NULL }, 5597c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_MIXERCTL_SET_CHINFO, "AUDIO_MIXERCTL_SET_CHINFO", 5607c478bd9Sstevel@tonic-gate NULL }, 5617c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_MIXERCTL_GET_MODE, "AUDIO_MIXERCTL_GET_MODE", 5627c478bd9Sstevel@tonic-gate NULL }, 5637c478bd9Sstevel@tonic-gate { (uint_t)AUDIO_MIXERCTL_SET_MODE, "AUDIO_MIXERCTL_SET_MODE", 5647c478bd9Sstevel@tonic-gate NULL }, 5657c478bd9Sstevel@tonic-gate /* STREAMS redirection ioctls */ 5667c478bd9Sstevel@tonic-gate { (uint_t)SRIOCSREDIR, "SRIOCSREDIR", NULL }, 5677c478bd9Sstevel@tonic-gate { (uint_t)SRIOCISREDIR, "SRIOCISREDIR", NULL }, 5687c478bd9Sstevel@tonic-gate { (uint_t)CPCIO_BIND, "CPCIO_BIND", NULL }, 5697c478bd9Sstevel@tonic-gate { (uint_t)CPCIO_SAMPLE, "CPCIO_SAMPLE", NULL }, 5707c478bd9Sstevel@tonic-gate { (uint_t)CPCIO_RELE, "CPCIO_RELE", NULL }, 5717c478bd9Sstevel@tonic-gate /* /dev/poll ioctl() control codes */ 5727c478bd9Sstevel@tonic-gate { (uint_t)DP_POLL, "DP_POLL", NULL }, 5737c478bd9Sstevel@tonic-gate { (uint_t)DP_ISPOLLED, "DP_ISPOLLED", NULL }, 5747c478bd9Sstevel@tonic-gate /* the old /proc ioctl() control codes */ 5757c478bd9Sstevel@tonic-gate #define PIOC ('q'<<8) 5767c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|1), "PIOCSTATUS", NULL }, 5777c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|2), "PIOCSTOP", NULL }, 5787c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|3), "PIOCWSTOP", NULL }, 5797c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|4), "PIOCRUN", NULL }, 5807c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|5), "PIOCGTRACE", NULL }, 5817c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|6), "PIOCSTRACE", NULL }, 5827c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|7), "PIOCSSIG", NULL }, 5837c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|8), "PIOCKILL", NULL }, 5847c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|9), "PIOCUNKILL", NULL }, 5857c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|10), "PIOCGHOLD", NULL }, 5867c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|11), "PIOCSHOLD", NULL }, 5877c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|12), "PIOCMAXSIG", NULL }, 5887c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|13), "PIOCACTION", NULL }, 5897c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|14), "PIOCGFAULT", NULL }, 5907c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|15), "PIOCSFAULT", NULL }, 5917c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|16), "PIOCCFAULT", NULL }, 5927c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|17), "PIOCGENTRY", NULL }, 5937c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|18), "PIOCSENTRY", NULL }, 5947c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|19), "PIOCGEXIT", NULL }, 5957c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|20), "PIOCSEXIT", NULL }, 5967c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|21), "PIOCSFORK", NULL }, 5977c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|22), "PIOCRFORK", NULL }, 5987c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|23), "PIOCSRLC", NULL }, 5997c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|24), "PIOCRRLC", NULL }, 6007c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|25), "PIOCGREG", NULL }, 6017c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|26), "PIOCSREG", NULL }, 6027c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|27), "PIOCGFPREG", NULL }, 6037c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|28), "PIOCSFPREG", NULL }, 6047c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|29), "PIOCNICE", NULL }, 6057c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|30), "PIOCPSINFO", NULL }, 6067c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|31), "PIOCNMAP", NULL }, 6077c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|32), "PIOCMAP", NULL }, 6087c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|33), "PIOCOPENM", NULL }, 6097c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|34), "PIOCCRED", NULL }, 6107c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|35), "PIOCGROUPS", NULL }, 6117c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|36), "PIOCGETPR", NULL }, 6127c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|37), "PIOCGETU", NULL }, 6137c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|38), "PIOCSET", NULL }, 6147c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|39), "PIOCRESET", NULL }, 6157c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|43), "PIOCUSAGE", NULL }, 6167c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|44), "PIOCOPENPD", NULL }, 6177c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|45), "PIOCLWPIDS", NULL }, 6187c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|46), "PIOCOPENLWP", NULL }, 6197c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|47), "PIOCLSTATUS", NULL }, 6207c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|48), "PIOCLUSAGE", NULL }, 6217c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|49), "PIOCNAUXV", NULL }, 6227c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|50), "PIOCAUXV", NULL }, 6237c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|51), "PIOCGXREGSIZE", NULL }, 6247c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|52), "PIOCGXREG", NULL }, 6257c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|53), "PIOCSXREG", NULL }, 6267c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|101), "PIOCGWIN", NULL }, 6277c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|103), "PIOCNLDT", NULL }, 6287c478bd9Sstevel@tonic-gate { (uint_t)(PIOC|104), "PIOCLDT", NULL }, 6297c478bd9Sstevel@tonic-gate 6307c478bd9Sstevel@tonic-gate /* ioctl's applicable on sockets */ 6317c478bd9Sstevel@tonic-gate { (uint_t)SIOCSHIWAT, "SIOCSHIWAT", NULL }, 6327c478bd9Sstevel@tonic-gate { (uint_t)SIOCGHIWAT, "SIOCGHIWAT", NULL }, 6337c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLOWAT, "SIOCSLOWAT", NULL }, 6347c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLOWAT, "SIOCGLOWAT", NULL }, 6357c478bd9Sstevel@tonic-gate { (uint_t)SIOCATMARK, "SIOCATMARK", NULL }, 6367c478bd9Sstevel@tonic-gate { (uint_t)SIOCSPGRP, "SIOCSPGRP", NULL }, 6377c478bd9Sstevel@tonic-gate { (uint_t)SIOCGPGRP, "SIOCGPGRP", NULL }, 6387c478bd9Sstevel@tonic-gate { (uint_t)SIOCADDRT, "SIOCADDRT", "rtentry" }, 6397c478bd9Sstevel@tonic-gate { (uint_t)SIOCDELRT, "SIOCDELRT", "rtentry" }, 6407c478bd9Sstevel@tonic-gate { (uint_t)SIOCGETVIFCNT, "SIOCGETVIFCNT", "sioc_vif_req" }, 6417c478bd9Sstevel@tonic-gate { (uint_t)SIOCGETSGCNT, "SIOCGETSGCNT", "sioc_sg_req" }, 6427c478bd9Sstevel@tonic-gate { (uint_t)SIOCGETLSGCNT, "SIOCGETLSGCNT", "sioc_lsg_req" }, 6437c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIFADDR, "SIOCSIFADDR", "ifreq" }, 6447c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFADDR, "SIOCGIFADDR", "ifreq" }, 6457c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIFDSTADDR, "SIOCSIFDSTADDR", "ifreq" }, 6467c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFDSTADDR, "SIOCGIFDSTADDR", "ifreq" }, 6477c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIFFLAGS, "SIOCSIFFLAGS", "ifreq" }, 6487c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFFLAGS, "SIOCGIFFLAGS", "ifreq" }, 6497c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIFMEM, "SIOCSIFMEM", "ifreq" }, 6507c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFMEM, "SIOCGIFMEM", "ifreq" }, 6517c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFCONF, "SIOCGIFCONF", "ifconf" }, 6527c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIFMTU, "SIOCSIFMTU", "ifreq" }, 6537c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFMTU, "SIOCGIFMTU", "ifreq" }, 6547c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFBRDADDR, "SIOCGIFBRDADDR", "ifreq" }, 6557c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIFBRDADDR, "SIOCSIFBRDADDR", "ifreq" }, 6567c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFNETMASK, "SIOCGIFNETMASK", "ifreq" }, 6577c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIFNETMASK, "SIOCSIFNETMASK", "ifreq" }, 6587c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFMETRIC, "SIOCGIFMETRIC", "ifreq" }, 6597c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIFMETRIC, "SIOCSIFMETRIC", "ifreq" }, 6607c478bd9Sstevel@tonic-gate { (uint_t)SIOCSARP, "SIOCSARP", "arpreq" }, 6617c478bd9Sstevel@tonic-gate { (uint_t)SIOCGARP, "SIOCGARP", "arpreq" }, 6627c478bd9Sstevel@tonic-gate { (uint_t)SIOCDARP, "SIOCDARP", "arpreq" }, 6637c478bd9Sstevel@tonic-gate { (uint_t)SIOCUPPER, "SIOCUPPER", "ifreq" }, 6647c478bd9Sstevel@tonic-gate { (uint_t)SIOCLOWER, "SIOCLOWER", "ifreq" }, 6657c478bd9Sstevel@tonic-gate { (uint_t)SIOCSETSYNC, "SIOCSETSYNC", "ifreq" }, 6667c478bd9Sstevel@tonic-gate { (uint_t)SIOCGETSYNC, "SIOCGETSYNC", "ifreq" }, 6677c478bd9Sstevel@tonic-gate { (uint_t)SIOCSSDSTATS, "SIOCSSDSTATS", "ifreq" }, 6687c478bd9Sstevel@tonic-gate { (uint_t)SIOCSSESTATS, "SIOCSSESTATS", "ifreq" }, 6697c478bd9Sstevel@tonic-gate { (uint_t)SIOCSPROMISC, "SIOCSPROMISC", NULL }, 6707c478bd9Sstevel@tonic-gate { (uint_t)SIOCADDMULTI, "SIOCADDMULTI", "ifreq" }, 6717c478bd9Sstevel@tonic-gate { (uint_t)SIOCDELMULTI, "SIOCDELMULTI", "ifreq" }, 6727c478bd9Sstevel@tonic-gate { (uint_t)SIOCGETNAME, "SIOCGETNAME", "sockaddr" }, 6737c478bd9Sstevel@tonic-gate { (uint_t)SIOCGETPEER, "SIOCGETPEER", "sockaddr" }, 6747c478bd9Sstevel@tonic-gate { (uint_t)IF_UNITSEL, "IF_UNITSEL", NULL }, 6757c478bd9Sstevel@tonic-gate { (uint_t)SIOCXPROTO, "SIOCXPROTO", NULL }, 6767c478bd9Sstevel@tonic-gate { (uint_t)SIOCIFDETACH, "SIOCIFDETACH", "ifreq" }, 6777c478bd9Sstevel@tonic-gate { (uint_t)SIOCGENPSTATS, "SIOCGENPSTATS", "ifreq" }, 6787c478bd9Sstevel@tonic-gate { (uint_t)SIOCX25XMT, "SIOCX25XMT", "ifreq" }, 6797c478bd9Sstevel@tonic-gate { (uint_t)SIOCX25RCV, "SIOCX25RCV", "ifreq" }, 6807c478bd9Sstevel@tonic-gate { (uint_t)SIOCX25TBL, "SIOCX25TBL", "ifreq" }, 6817c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLGETREQ, "SIOCSLGETREQ", "ifreq" }, 6827c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLSTAT, "SIOCSLSTAT", "ifreq" }, 6837c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIFNAME, "SIOCSIFNAME", "ifreq" }, 6847c478bd9Sstevel@tonic-gate { (uint_t)SIOCGENADDR, "SIOCGENADDR", "ifreq" }, 6857c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFNUM, "SIOCGIFNUM", NULL }, 6867c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFMUXID, "SIOCGIFMUXID", "ifreq" }, 6877c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIFMUXID, "SIOCSIFMUXID", "ifreq" }, 6887c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIFINDEX, "SIOCGIFINDEX", "ifreq" }, 6897c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIFINDEX, "SIOCSIFINDEX", "ifreq" }, 6907c478bd9Sstevel@tonic-gate { (uint_t)SIOCLIFREMOVEIF, "SIOCLIFREMOVEIF", "lifreq" }, 6917c478bd9Sstevel@tonic-gate { (uint_t)SIOCLIFADDIF, "SIOCLIFADDIF", "lifreq" }, 6927c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFADDR, "SIOCSLIFADDR", "lifreq" }, 6937c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFADDR, "SIOCGLIFADDR", "lifreq" }, 6947c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFDSTADDR, "SIOCSLIFDSTADDR", "lifreq" }, 6957c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFDSTADDR, "SIOCGLIFDSTADDR", "lifreq" }, 6967c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFFLAGS, "SIOCSLIFFLAGS", "lifreq" }, 6977c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFFLAGS, "SIOCGLIFFLAGS", "lifreq" }, 6987c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFCONF, "SIOCGLIFCONF", "lifconf" }, 6997c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFMTU, "SIOCSLIFMTU", "lifreq" }, 7007c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFMTU, "SIOCGLIFMTU", "lifreq" }, 7017c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFBRDADDR, "SIOCGLIFBRDADDR", "lifreq" }, 7027c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFBRDADDR, "SIOCSLIFBRDADDR", "lifreq" }, 7037c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFNETMASK, "SIOCGLIFNETMASK", "lifreq" }, 7047c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFNETMASK, "SIOCSLIFNETMASK", "lifreq" }, 7057c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFMETRIC, "SIOCGLIFMETRIC", "lifreq" }, 7067c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFMETRIC, "SIOCSLIFMETRIC", "lifreq" }, 7077c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFNAME, "SIOCSLIFNAME", "lifreq" }, 7087c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFNUM, "SIOCGLIFNUM", "lifnum" }, 7097c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFMUXID, "SIOCGLIFMUXID", "lifreq" }, 7107c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFMUXID, "SIOCSLIFMUXID", "lifreq" }, 7117c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFINDEX, "SIOCGLIFINDEX", "lifreq" }, 7127c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFINDEX, "SIOCSLIFINDEX", "lifreq" }, 7137c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFTOKEN, "SIOCSLIFTOKEN", "lifreq" }, 7147c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFTOKEN, "SIOCGLIFTOKEN", "lifreq" }, 7157c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFSUBNET, "SIOCSLIFSUBNET", "lifreq" }, 7167c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFSUBNET, "SIOCGLIFSUBNET", "lifreq" }, 7177c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFLNKINFO, "SIOCSLIFLNKINFO", "lifreq" }, 7187c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFLNKINFO, "SIOCGLIFLNKINFO", "lifreq" }, 7197c478bd9Sstevel@tonic-gate { (uint_t)SIOCLIFDELND, "SIOCLIFDELND", "lifreq" }, 7207c478bd9Sstevel@tonic-gate { (uint_t)SIOCLIFGETND, "SIOCLIFGETND", "lifreq" }, 7217c478bd9Sstevel@tonic-gate { (uint_t)SIOCLIFSETND, "SIOCLIFSETND", "lifreq" }, 7227c478bd9Sstevel@tonic-gate { (uint_t)SIOCTMYADDR, "SIOCTMYADDR", "sioc_addrreq" }, 7237c478bd9Sstevel@tonic-gate { (uint_t)SIOCTONLINK, "SIOCTONLINK", "sioc_addrreq" }, 7247c478bd9Sstevel@tonic-gate { (uint_t)SIOCTMYSITE, "SIOCTMYSITE", "sioc_addrreq" }, 7257c478bd9Sstevel@tonic-gate { (uint_t)SIOCGTUNPARAM, "SIOCGTUNPARAM", "iftun_req" }, 7267c478bd9Sstevel@tonic-gate { (uint_t)SIOCSTUNPARAM, "SIOCSTUNPARAM", "iftun_req" }, 7277c478bd9Sstevel@tonic-gate { (uint_t)SIOCFIPSECONFIG, "SIOCFIPSECONFIG", NULL }, 7287c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIPSECONFIG, "SIOCSIPSECONFIG", NULL }, 7297c478bd9Sstevel@tonic-gate { (uint_t)SIOCDIPSECONFIG, "SIOCDIPSECONFIG", NULL }, 7307c478bd9Sstevel@tonic-gate { (uint_t)SIOCLIPSECONFIG, "SIOCLIPSECONFIG", NULL }, 731e11c3f44Smeem { (uint_t)SIOCGLIFBINDING, "SIOCGLIFBINDING", "lifreq" }, 7327c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFGROUPNAME, "SIOCSLIFGROUPNAME", "lifreq" }, 7337c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFGROUPNAME, "SIOCGLIFGROUPNAME", "lifreq" }, 734e11c3f44Smeem { (uint_t)SIOCGLIFGROUPINFO, "SIOCGLIFGROUPINFO", "lifgroupinfo" }, 7357c478bd9Sstevel@tonic-gate { (uint_t)SIOCGDSTINFO, "SIOCGDSTINFO", NULL }, 7367c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIP6ADDRPOLICY, "SIOCGIP6ADDRPOLICY", NULL }, 7377c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIP6ADDRPOLICY, "SIOCSIP6ADDRPOLICY", NULL }, 7387c478bd9Sstevel@tonic-gate { (uint_t)SIOCSXARP, "SIOCSXARP", "xarpreq" }, 7397c478bd9Sstevel@tonic-gate { (uint_t)SIOCGXARP, "SIOCGXARP", "xarpreq" }, 7407c478bd9Sstevel@tonic-gate { (uint_t)SIOCDXARP, "SIOCDXARP", "xarpreq" }, 7417c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFZONE, "SIOCGLIFZONE", "lifreq" }, 7427c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFZONE, "SIOCSLIFZONE", "lifreq" }, 7437c478bd9Sstevel@tonic-gate { (uint_t)SIOCSCTPSOPT, "SIOCSCTPSOPT", NULL }, 7447c478bd9Sstevel@tonic-gate { (uint_t)SIOCSCTPGOPT, "SIOCSCTPGOPT", NULL }, 7457c478bd9Sstevel@tonic-gate { (uint_t)SIOCSCTPPEELOFF, "SIOPCSCTPPEELOFF", "int" }, 7467c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFUSESRC, "SIOCGLIFUSESRC", "lifreq" }, 7477c478bd9Sstevel@tonic-gate { (uint_t)SIOCSLIFUSESRC, "SIOCSLIFUSESRC", "lifreq" }, 7487c478bd9Sstevel@tonic-gate { (uint_t)SIOCGLIFSRCOF, "SIOCGLIFSRCOF", "lifsrcof" }, 7497c478bd9Sstevel@tonic-gate { (uint_t)SIOCGMSFILTER, "SIOCGMSFILTER", "group_filter" }, 7507c478bd9Sstevel@tonic-gate { (uint_t)SIOCSMSFILTER, "SIOCSMSFILTER", "group_filter" }, 7517c478bd9Sstevel@tonic-gate { (uint_t)SIOCGIPMSFILTER, "SIOCGIPMSFILTER", "ip_msfilter" }, 7527c478bd9Sstevel@tonic-gate { (uint_t)SIOCSIPMSFILTER, "SIOCSIPMSFILTER", "ip_msfilter" }, 7537c478bd9Sstevel@tonic-gate 7547c478bd9Sstevel@tonic-gate /* DES encryption */ 7557c478bd9Sstevel@tonic-gate { (uint_t)DESIOCBLOCK, "DESIOCBLOCK", "desparams" }, 7567c478bd9Sstevel@tonic-gate { (uint_t)DESIOCQUICK, "DESIOCQUICK", "desparams" }, 7577c478bd9Sstevel@tonic-gate 7587c478bd9Sstevel@tonic-gate /* Printing system */ 7597c478bd9Sstevel@tonic-gate { (uint_t)PRNIOC_GET_IFCAP, "PRNIOC_GET_IFCAP", NULL }, 7607c478bd9Sstevel@tonic-gate { (uint_t)PRNIOC_SET_IFCAP, "PRNIOC_SET_IFCAP", NULL }, 7617c478bd9Sstevel@tonic-gate { (uint_t)PRNIOC_GET_IFINFO, "PRNIOC_GET_IFINFO", 7627c478bd9Sstevel@tonic-gate "prn_interface_info" }, 7637c478bd9Sstevel@tonic-gate { (uint_t)PRNIOC_GET_STATUS, "PRNIOC_GET_STATUS", NULL }, 7647c478bd9Sstevel@tonic-gate { (uint_t)PRNIOC_GET_1284_DEVID, "PRNIOC_GET_1284_DEVID", 7657c478bd9Sstevel@tonic-gate "prn_1284_device_id" }, 7667c478bd9Sstevel@tonic-gate { (uint_t)PRNIOC_GET_1284_STATUS, 7677c478bd9Sstevel@tonic-gate "PRNIOC_GET_IFCANIOC_GET_1284_STATUS", NULL }, 7687c478bd9Sstevel@tonic-gate { (uint_t)PRNIOC_GET_TIMEOUTS, "PRNIOC_GET_TIMEOUTS", 7697c478bd9Sstevel@tonic-gate "prn_timeouts" }, 7707c478bd9Sstevel@tonic-gate { (uint_t)PRNIOC_SET_TIMEOUTS, "PRNIOC_SET_TIMEOUTS", 7717c478bd9Sstevel@tonic-gate "prn_timeouts" }, 7727c478bd9Sstevel@tonic-gate { (uint_t)PRNIOC_RESET, "PRNIOC_RESET", NULL }, 7737c478bd9Sstevel@tonic-gate 7747c478bd9Sstevel@tonic-gate /* DTrace */ 7757c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_PROVIDER, "DTRACEIOC_PROVIDER", NULL }, 7767c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_PROBES, "DTRACEIOC_PROBES", NULL }, 7777c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_BUFSNAP, "DTRACEIOC_BUFSNAP", NULL }, 7787c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_PROBEMATCH, "DTRACEIOC_PROBEMATCH", NULL }, 7797c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_ENABLE, "DTRACEIOC_ENABLE", NULL }, 7807c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_AGGSNAP, "DTRACEIOC_AGGSNAP", NULL }, 7817c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_EPROBE, "DTRACEIOC_EPROBE", NULL }, 7827c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_PROBEARG, "DTRACEIOC_PROBEARG", NULL }, 7837c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_CONF, "DTRACEIOC_CONF", NULL }, 7847c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_STATUS, "DTRACEIOC_STATUS", NULL }, 7857c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_GO, "DTRACEIOC_GO", NULL }, 7867c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_STOP, "DTRACEIOC_STOP", NULL }, 7877c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_AGGDESC, "DTRACEIOC_AGGDESC", NULL }, 7887c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_FORMAT, "DTRACEIOC_FORMAT", NULL }, 7897c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_DOFGET, "DTRACEIOC_DOFGET", NULL }, 7907c478bd9Sstevel@tonic-gate { (uint_t)DTRACEIOC_REPLICATE, "DTRACEIOC_REPLICATE", NULL }, 7917c478bd9Sstevel@tonic-gate 7927c478bd9Sstevel@tonic-gate { (uint_t)DTRACEHIOC_ADD, "DTRACEHIOC_ADD", NULL }, 7937c478bd9Sstevel@tonic-gate { (uint_t)DTRACEHIOC_REMOVE, "DTRACEHIOC_REMOVE", NULL }, 7947c478bd9Sstevel@tonic-gate { (uint_t)DTRACEHIOC_ADDDOF, "DTRACEHIOC_ADDDOF", NULL }, 7957c478bd9Sstevel@tonic-gate 7967c478bd9Sstevel@tonic-gate /* /dev/cryptoadm ioctl() control codes */ 7977c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GET_VERSION, "CRYPTO_GET_VERSION", NULL }, 7987c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GET_DEV_LIST, "CRYPTO_GET_DEV_LIST", NULL }, 7997c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GET_SOFT_LIST, "CRYPTO_GET_SOFT_LIST", NULL }, 8007c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GET_DEV_INFO, "CRYPTO_GET_DEV_INFO", NULL }, 8017c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GET_SOFT_INFO, "CRYPTO_GET_SOFT_INFO", NULL }, 8027c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_LOAD_DEV_DISABLED, "CRYPTO_LOAD_DEV_DISABLED", 8037c478bd9Sstevel@tonic-gate NULL }, 8047c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_LOAD_SOFT_DISABLED, "CRYPTO_LOAD_SOFT_DISABLED", 8057c478bd9Sstevel@tonic-gate NULL }, 8067c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_UNLOAD_SOFT_MODULE, "CRYPTO_UNLOAD_SOFT_MODULE", 8077c478bd9Sstevel@tonic-gate NULL }, 8087c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_LOAD_SOFT_CONFIG, "CRYPTO_LOAD_SOFT_CONFIG", 8097c478bd9Sstevel@tonic-gate NULL }, 8107c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_POOL_CREATE, "CRYPTO_POOL_CREATE", NULL }, 8117c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_POOL_WAIT, "CRYPTO_POOL_WAIT", NULL }, 8127c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_POOL_RUN, "CRYPTO_POOL_RUN", NULL }, 8137c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_LOAD_DOOR, "CRYPTO_LOAD_DOOR", NULL }, 8147c478bd9Sstevel@tonic-gate 8157c478bd9Sstevel@tonic-gate /* /dev/crypto ioctl() control codes */ 8167c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GET_FUNCTION_LIST, "CRYPTO_GET_FUNCTION_LIST", 8177c478bd9Sstevel@tonic-gate NULL }, 8187c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GET_MECHANISM_NUMBER, "CRYPTO_GET_MECHANISM_NUMBER", 8197c478bd9Sstevel@tonic-gate NULL }, 8207c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_OPEN_SESSION, "CRYPTO_OPEN_SESSION", NULL }, 8217c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_CLOSE_SESSION, "CRYPTO_CLOSE_SESSION", NULL }, 8227c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_CLOSE_ALL_SESSIONS, "CRYPTO_CLOSE_ALL_SESSIONS", 8237c478bd9Sstevel@tonic-gate NULL }, 8247c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_LOGIN, "CRYPTO_LOGIN", NULL }, 8257c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_LOGOUT, "CRYPTO_LOGOUT", NULL }, 8267c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_ENCRYPT, "CRYPTO_ENCRYPT", NULL }, 8277c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_ENCRYPT_INIT, "CRYPTO_ENCRYPT_INIT", NULL }, 8287c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_ENCRYPT_UPDATE, "CRYPTO_ENCRYPT_UPDATE", 8297c478bd9Sstevel@tonic-gate NULL }, 8307c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_ENCRYPT_FINAL, "CRYPTO_ENCRYPT_FINAL", NULL }, 8317c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DECRYPT, "CRYPTO_DECRYPT", NULL }, 8327c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DECRYPT_INIT, "CRYPTO_DECRYPT_INIT", NULL }, 8337c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DECRYPT_UPDATE, "CRYPTO_DECRYPT_UPDATE", 8347c478bd9Sstevel@tonic-gate NULL }, 8357c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DECRYPT_FINAL, "CRYPTO_DECRYPT_FINAL", NULL }, 8367c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DIGEST, "CRYPTO_DIGEST", NULL }, 8377c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DIGEST_INIT, "CRYPTO_DIGEST_INIT", NULL }, 8387c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DIGEST_UPDATE, "CRYPTO_DIGEST_UPDATE", NULL }, 8397c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DIGEST_KEY, "CRYPTO_DIGEST_KEY", NULL }, 8407c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DIGEST_FINAL, "CRYPTO_DIGEST_FINAL", NULL }, 8417c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_MAC, "CRYPTO_MAC", NULL }, 8427c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_MAC_INIT, "CRYPTO_MAC_INIT", NULL }, 8437c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_MAC_UPDATE, "CRYPTO_MAC_UPDATE", NULL }, 8447c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_MAC_FINAL, "CRYPTO_MAC_FINAL", NULL }, 8457c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_SIGN, "CRYPTO_SIGN", NULL }, 8467c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_SIGN_INIT, "CRYPTO_SIGN_INIT", NULL }, 8477c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_SIGN_UPDATE, "CRYPTO_SIGN_UPDATE", NULL }, 8487c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_SIGN_FINAL, "CRYPTO_SIGN_FINAL", NULL }, 8497c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_SIGN_RECOVER_INIT, "CRYPTO_SIGN_RECOVER_INIT", 8507c478bd9Sstevel@tonic-gate NULL }, 8517c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_SIGN_RECOVER, "CRYPTO_SIGN_RECOVER", NULL }, 8527c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_VERIFY, "CRYPTO_VERIFY", NULL }, 8537c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_VERIFY_INIT, "CRYPTO_VERIFY_INIT", NULL }, 8547c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_VERIFY_UPDATE, "CRYPTO_VERIFY_UPDATE", NULL }, 8557c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_VERIFY_FINAL, "CRYPTO_VERIFY_FINAL", NULL }, 8567c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_VERIFY_RECOVER_INIT, "CRYPTO_VERIFY_RECOVER_INIT", 8577c478bd9Sstevel@tonic-gate NULL }, 8587c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_VERIFY_RECOVER, "CRYPTO_VERIFY_RECOVER", 8597c478bd9Sstevel@tonic-gate NULL }, 8607c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DIGEST_ENCRYPT_UPDATE, "CRYPTO_DIGEST_ENCRYPT_UPDATE", 8617c478bd9Sstevel@tonic-gate NULL }, 8627c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DECRYPT_DIGEST_UPDATE, "CRYPTO_DECRYPT_DIGEST_UPDATE", 8637c478bd9Sstevel@tonic-gate NULL }, 8647c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_SIGN_ENCRYPT_UPDATE, "CRYPTO_SIGN_ENCRYPT_UPDATE", 8657c478bd9Sstevel@tonic-gate NULL }, 8667c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DECRYPT_VERIFY_UPDATE, "CRYPTO_DECRYPT_VERIFY_UPDATE", 8677c478bd9Sstevel@tonic-gate NULL }, 8687c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_SEED_RANDOM, "CRYPTO_SEED_RANDOM", NULL }, 8697c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GENERATE_RANDOM, "CRYPTO_GENERATE_RANDOM", 8707c478bd9Sstevel@tonic-gate NULL }, 8717c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_OBJECT_CREATE, "CRYPTO_OBJECT_CREATE", NULL }, 8727c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_OBJECT_COPY, "CRYPTO_OBJECT_COPY", NULL }, 8737c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_OBJECT_DESTROY, "CRYPTO_OBJECT_DESTROY", 8747c478bd9Sstevel@tonic-gate NULL }, 8757c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_OBJECT_GET_ATTRIBUTE_VALUE, 8767c478bd9Sstevel@tonic-gate "CRYPTO_OBJECT_GET_ATTRIBUTE_VALUE", NULL }, 8777c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_OBJECT_GET_SIZE, "CRYPTO_OBJECT_GET_SIZE", NULL }, 8787c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_OBJECT_SET_ATTRIBUTE_VALUE, 8797c478bd9Sstevel@tonic-gate "CRYPTO_OBJECT_SET_ATTRIBUTE_VALUE", NULL }, 8807c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_OBJECT_FIND_INIT, "CRYPTO_OBJECT_FIND_INIT", 8817c478bd9Sstevel@tonic-gate NULL }, 8827c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_OBJECT_FIND_UPDATE, "CRYPTO_OBJECT_FIND_UPDATE", 8837c478bd9Sstevel@tonic-gate NULL }, 8847c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_OBJECT_FIND_FINAL, "CRYPTO_OBJECT_FIND_FINAL", 8857c478bd9Sstevel@tonic-gate NULL }, 8867c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GENERATE_KEY, "CRYPTO_GENERATE_KEY", NULL }, 8877c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GENERATE_KEY_PAIR, "CRYPTO_GENERATE_KEY_PAIR", 8887c478bd9Sstevel@tonic-gate NULL }, 8897c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_WRAP_KEY, "CRYPTO_WRAP_KEY", NULL }, 8907c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_UNWRAP_KEY, "CRYPTO_UNWRAP_KEY", NULL }, 8917c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_DERIVE_KEY, "CRYPTO_DERIVE_KEY", NULL }, 8927c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GET_PROVIDER_LIST, "CRYPTO_GET_PROVIDER_LIST", 8937c478bd9Sstevel@tonic-gate NULL }, 8947c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GET_PROVIDER_INFO, "CRYPTO_GET_PROVIDER_INFO", 8957c478bd9Sstevel@tonic-gate NULL }, 8967c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GET_PROVIDER_MECHANISMS, 8977c478bd9Sstevel@tonic-gate "CRYPTO_GET_PROVIDER_MECHANISMS", NULL }, 8987c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_GET_PROVIDER_MECHANISM_INFO, 8997c478bd9Sstevel@tonic-gate "CRYPTO_GET_PROVIDER_MECHANISM_INFO", NULL }, 9007c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_INIT_TOKEN, "CRYPTO_INIT_TOKEN", NULL }, 9017c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_INIT_PIN, "CRYPTO_INIT_PIN", NULL }, 9027c478bd9Sstevel@tonic-gate { (uint_t)CRYPTO_SET_PIN, "CRYPTO_SET_PIN", NULL }, 903034448feSmcpowers { (uint_t)CRYPTO_NOSTORE_GENERATE_KEY, 904034448feSmcpowers "CRYPTO_NOSTORE_GENERATE_KEY", NULL }, 905034448feSmcpowers { (uint_t)CRYPTO_NOSTORE_GENERATE_KEY_PAIR, 906034448feSmcpowers "CRYPTO_NOSTORE_GENERATE_KEY_PAIR", NULL }, 907034448feSmcpowers { (uint_t)CRYPTO_NOSTORE_DERIVE_KEY, 908034448feSmcpowers "CRYPTO_NOSTORE_DERIVE_KEY", NULL }, 9097c478bd9Sstevel@tonic-gate 9107c478bd9Sstevel@tonic-gate /* kbio ioctls */ 9117c478bd9Sstevel@tonic-gate { (uint_t)KIOCTRANS, "KIOCTRANS", NULL }, 9127c478bd9Sstevel@tonic-gate { (uint_t)KIOCGTRANS, "KIOCGTRANS", NULL }, 9137c478bd9Sstevel@tonic-gate { (uint_t)KIOCTRANSABLE, "KIOCTRANSABLE", NULL }, 9147c478bd9Sstevel@tonic-gate { (uint_t)KIOCGTRANSABLE, "KIOCGTRANSABLE", NULL }, 9157c478bd9Sstevel@tonic-gate { (uint_t)KIOCSETKEY, "KIOCSETKEY", NULL }, 9167c478bd9Sstevel@tonic-gate { (uint_t)KIOCGETKEY, "KIOCGETKEY", NULL }, 9177c478bd9Sstevel@tonic-gate { (uint_t)KIOCCMD, "KIOCCMD", NULL }, 9187c478bd9Sstevel@tonic-gate { (uint_t)KIOCTYPE, "KIOCTYPE", NULL }, 9197c478bd9Sstevel@tonic-gate { (uint_t)KIOCSDIRECT, "KIOCSDIRECT", NULL }, 9207c478bd9Sstevel@tonic-gate { (uint_t)KIOCGDIRECT, "KIOCGDIRECT", NULL }, 9217c478bd9Sstevel@tonic-gate { (uint_t)KIOCSKEY, "KIOCSKEY", NULL }, 9227c478bd9Sstevel@tonic-gate { (uint_t)KIOCGKEY, "KIOCGKEY", NULL }, 9237c478bd9Sstevel@tonic-gate { (uint_t)KIOCSLED, "KIOCSLED", NULL }, 9247c478bd9Sstevel@tonic-gate { (uint_t)KIOCGLED, "KIOCGLED", NULL }, 9257c478bd9Sstevel@tonic-gate { (uint_t)KIOCSCOMPAT, "KIOCSCOMPAT", NULL }, 9267c478bd9Sstevel@tonic-gate { (uint_t)KIOCGCOMPAT, "KIOCGCOMPAT", NULL }, 9277c478bd9Sstevel@tonic-gate { (uint_t)KIOCSLAYOUT, "KIOCSLAYOUT", NULL }, 9287c478bd9Sstevel@tonic-gate { (uint_t)KIOCLAYOUT, "KIOCLAYOUT", NULL }, 9297c478bd9Sstevel@tonic-gate { (uint_t)KIOCSKABORTEN, "KIOCSKABORTEN", NULL }, 9307c478bd9Sstevel@tonic-gate { (uint_t)KIOCGRPTDELAY, "KIOCGRPTDELAY", NULL }, 9317c478bd9Sstevel@tonic-gate { (uint_t)KIOCSRPTDELAY, "KIOCSRPTDELAY", NULL }, 9327c478bd9Sstevel@tonic-gate { (uint_t)KIOCGRPTRATE, "KIOCGRPTRATE", NULL }, 9337c478bd9Sstevel@tonic-gate { (uint_t)KIOCSRPTRATE, "KIOCSRPTRATE", NULL }, 9348ffc942dSrz201010 { (uint_t)KIOCSETFREQ, "KIOCSETFREQ", NULL }, 935c35aa225Smarx { (uint_t)KIOCMKTONE, "KIOCMKTONE", NULL }, 9367c478bd9Sstevel@tonic-gate 9377c478bd9Sstevel@tonic-gate /* ptm/pts driver I_STR ioctls */ 9387c478bd9Sstevel@tonic-gate { (uint_t)ISPTM, "ISPTM", NULL}, 9397c478bd9Sstevel@tonic-gate { (uint_t)UNLKPT, "UNLKPT", NULL}, 9407c478bd9Sstevel@tonic-gate { (uint_t)PTSSTTY, "PTSSTTY", NULL}, 9417c478bd9Sstevel@tonic-gate { (uint_t)ZONEPT, "ZONEPT", NULL}, 94249e92448Svikram { (uint_t)OWNERPT, "OWNERPT", NULL}, 9437c478bd9Sstevel@tonic-gate 9447c478bd9Sstevel@tonic-gate /* aggr link aggregation pseudo driver ioctls */ 9457c478bd9Sstevel@tonic-gate { (uint_t)LAIOC_CREATE, "LAIOC_CREATE", "laioc_create"}, 9467c478bd9Sstevel@tonic-gate { (uint_t)LAIOC_DELETE, "LAIOC_DELETE", "laioc_delete"}, 9477c478bd9Sstevel@tonic-gate { (uint_t)LAIOC_INFO, "LAIOC_INFO", "laioc_info"}, 9487c478bd9Sstevel@tonic-gate { (uint_t)LAIOC_ADD, "LAIOC_ADD", 9497c478bd9Sstevel@tonic-gate "laioc_add_rem"}, 9507c478bd9Sstevel@tonic-gate { (uint_t)LAIOC_REMOVE, "LAIOC_REMOVE", 9517c478bd9Sstevel@tonic-gate "laioc_add_rem"}, 9527c478bd9Sstevel@tonic-gate { (uint_t)LAIOC_MODIFY, "LAIOC_MODIFY", "laioc_modify"}, 9537c478bd9Sstevel@tonic-gate 954210db224Sericheng /* dld data-link ioctls */ 955d62bc4baSyz147064 { (uint_t)DLDIOC_ATTR, "DLDIOC_ATTR", "dld_ioc_attr"}, 956d62bc4baSyz147064 { (uint_t)DLDIOC_PHYS_ATTR, "DLDIOC_PHYS_ATTR", 957d62bc4baSyz147064 "dld_ioc_phys_attr"}, 958d62bc4baSyz147064 { (uint_t)DLDIOC_DOORSERVER, "DLDIOC_DOORSERVER", "dld_ioc_door"}, 959d62bc4baSyz147064 { (uint_t)DLDIOC_RENAME, "DLDIOC_RENAME", "dld_ioc_rename"}, 960da14cebeSEric Cheng { (uint_t)DLDIOC_SECOBJ_GET, "DLDIOC_SECOBJ_GET", 961da14cebeSEric Cheng "dld_ioc_secobj_get"}, 962da14cebeSEric Cheng { (uint_t)DLDIOC_SECOBJ_SET, "DLDIOC_SECOBJ_SET", 963da14cebeSEric Cheng "dld_ioc_secobj_set"}, 964da14cebeSEric Cheng { (uint_t)DLDIOC_SECOBJ_UNSET, "DLDIOC_SECOBJ_UNSET", 965da14cebeSEric Cheng "dld_ioc_secobj_unset"}, 966da14cebeSEric Cheng { (uint_t)DLDIOC_MACADDRGET, "DLDIOC_MACADDRGET", 967da14cebeSEric Cheng "dld_ioc_macaddrget"}, 9683bc21d0aSAruna Ramakrishna - Sun Microsystems { (uint_t)DLDIOC_SETMACPROP, "DLDIOC_SETMACPROP", 9693bc21d0aSAruna Ramakrishna - Sun Microsystems "dld_ioc_macprop_s"}, 9703bc21d0aSAruna Ramakrishna - Sun Microsystems { (uint_t)DLDIOC_GETMACPROP, "DLDIOC_GETMACPROP", 9713bc21d0aSAruna Ramakrishna - Sun Microsystems "dld_ioc_macprop_s"}, 972da14cebeSEric Cheng { (uint_t)DLDIOC_ADDFLOW, "DLDIOC_ADDFLOW", 973da14cebeSEric Cheng "dld_ioc_addflow"}, 974da14cebeSEric Cheng { (uint_t)DLDIOC_REMOVEFLOW, "DLDIOC_REMOVEFLOW", 975da14cebeSEric Cheng "dld_ioc_removeflow"}, 976da14cebeSEric Cheng { (uint_t)DLDIOC_MODIFYFLOW, "DLDIOC_MODIFYFLOW", 977da14cebeSEric Cheng "dld_ioc_modifyflow"}, 978da14cebeSEric Cheng { (uint_t)DLDIOC_WALKFLOW, "DLDIOC_WALKFLOW", 979da14cebeSEric Cheng "dld_ioc_walkflow"}, 980da14cebeSEric Cheng { (uint_t)DLDIOC_USAGELOG, "DLDIOC_USAGELOG", 981da14cebeSEric Cheng "dld_ioc_usagelog"}, 982da14cebeSEric Cheng 983b509e89bSRishi Srivatsavai /* simnet ioctls */ 984b509e89bSRishi Srivatsavai { (uint_t)SIMNET_IOC_CREATE, "SIMNET_IOC_CREATE", 985b509e89bSRishi Srivatsavai "simnet_ioc_create"}, 986b509e89bSRishi Srivatsavai { (uint_t)SIMNET_IOC_DELETE, "SIMNET_IOC_DELETE", 987b509e89bSRishi Srivatsavai "simnet_ioc_delete"}, 988b509e89bSRishi Srivatsavai { (uint_t)SIMNET_IOC_INFO, "SIMNET_IOC_INFO", 989b509e89bSRishi Srivatsavai "simnet_ioc_info"}, 990b509e89bSRishi Srivatsavai { (uint_t)SIMNET_IOC_MODIFY, "SIMNET_IOC_MODIFY", 991b509e89bSRishi Srivatsavai "simnet_ioc_info"}, 992b509e89bSRishi Srivatsavai 993da14cebeSEric Cheng /* vnic ioctls */ 994da14cebeSEric Cheng { (uint_t)VNIC_IOC_CREATE, "VNIC_IOC_CREATE", 995da14cebeSEric Cheng "vnic_ioc_create"}, 996da14cebeSEric Cheng { (uint_t)VNIC_IOC_DELETE, "VNIC_IOC_DELETE", 997da14cebeSEric Cheng "vnic_ioc_delete"}, 998da14cebeSEric Cheng { (uint_t)VNIC_IOC_INFO, "VNIC_IOC_INFO", 999da14cebeSEric Cheng "vnic_ioc_info"}, 1000fa9e4066Sahrens 1001fa9e4066Sahrens /* ZFS ioctls */ 1002fa9e4066Sahrens { (uint_t)ZFS_IOC_POOL_CREATE, "ZFS_IOC_POOL_CREATE", 1003fa9e4066Sahrens "zfs_cmd_t" }, 1004fa9e4066Sahrens { (uint_t)ZFS_IOC_POOL_DESTROY, "ZFS_IOC_POOL_DESTROY", 1005fa9e4066Sahrens "zfs_cmd_t" }, 1006fa9e4066Sahrens { (uint_t)ZFS_IOC_POOL_IMPORT, "ZFS_IOC_POOL_IMPORT", 1007fa9e4066Sahrens "zfs_cmd_t" }, 1008fa9e4066Sahrens { (uint_t)ZFS_IOC_POOL_EXPORT, "ZFS_IOC_POOL_EXPORT", 1009fa9e4066Sahrens "zfs_cmd_t" }, 1010fa9e4066Sahrens { (uint_t)ZFS_IOC_POOL_CONFIGS, "ZFS_IOC_POOL_CONFIGS", 1011fa9e4066Sahrens "zfs_cmd_t" }, 1012fa9e4066Sahrens { (uint_t)ZFS_IOC_POOL_STATS, "ZFS_IOC_POOL_STATS", 1013fa9e4066Sahrens "zfs_cmd_t" }, 1014fa9e4066Sahrens { (uint_t)ZFS_IOC_POOL_TRYIMPORT, "ZFS_IOC_POOL_TRYIMPORT", 1015fa9e4066Sahrens "zfs_cmd_t" }, 1016fa9e4066Sahrens { (uint_t)ZFS_IOC_POOL_SCRUB, "ZFS_IOC_POOL_SCRUB", 1017fa9e4066Sahrens "zfs_cmd_t" }, 1018fa9e4066Sahrens { (uint_t)ZFS_IOC_POOL_FREEZE, "ZFS_IOC_POOL_FREEZE", 1019fa9e4066Sahrens "zfs_cmd_t" }, 1020eaca9bbdSeschrock { (uint_t)ZFS_IOC_POOL_UPGRADE, "ZFS_IOC_POOL_UPGRADE", 1021eaca9bbdSeschrock "zfs_cmd_t" }, 102206eeb2adSek110237 { (uint_t)ZFS_IOC_POOL_GET_HISTORY, "ZFS_IOC_POOL_GET_HISTORY", 102306eeb2adSek110237 "zfs_cmd_t" }, 1024fa9e4066Sahrens { (uint_t)ZFS_IOC_VDEV_ADD, "ZFS_IOC_VDEV_ADD", 1025fa9e4066Sahrens "zfs_cmd_t" }, 1026fa9e4066Sahrens { (uint_t)ZFS_IOC_VDEV_REMOVE, "ZFS_IOC_VDEV_REMOVE", 1027fa9e4066Sahrens "zfs_cmd_t" }, 10283d7072f8Seschrock { (uint_t)ZFS_IOC_VDEV_SET_STATE, "ZFS_IOC_VDEV_SET_STATE", 1029fa9e4066Sahrens "zfs_cmd_t" }, 1030fa9e4066Sahrens { (uint_t)ZFS_IOC_VDEV_ATTACH, "ZFS_IOC_VDEV_ATTACH", 1031fa9e4066Sahrens "zfs_cmd_t" }, 1032fa9e4066Sahrens { (uint_t)ZFS_IOC_VDEV_DETACH, "ZFS_IOC_VDEV_DETACH", 1033fa9e4066Sahrens "zfs_cmd_t" }, 1034c67d9675Seschrock { (uint_t)ZFS_IOC_VDEV_SETPATH, "ZFS_IOC_VDEV_SETPATH", 1035c67d9675Seschrock "zfs_cmd_t" }, 10366809eb4eSEric Schrock { (uint_t)ZFS_IOC_VDEV_SETFRU, "ZFS_IOC_VDEV_SETFRU", 10376809eb4eSEric Schrock "zfs_cmd_t" }, 1038fa9e4066Sahrens { (uint_t)ZFS_IOC_OBJSET_STATS, "ZFS_IOC_OBJSET_STATS", 1039fa9e4066Sahrens "zfs_cmd_t" }, 10402be0e98cSTim Haley { (uint_t)ZFS_IOC_OBJSET_ZPLPROPS, "ZFS_IOC_OBJSET_ZPLPROPS", 10412be0e98cSTim Haley "zfs_cmd_t" }, 1042fa9e4066Sahrens { (uint_t)ZFS_IOC_DATASET_LIST_NEXT, "ZFS_IOC_DATASET_LIST_NEXT", 1043fa9e4066Sahrens "zfs_cmd_t" }, 1044fa9e4066Sahrens { (uint_t)ZFS_IOC_SNAPSHOT_LIST_NEXT, "ZFS_IOC_SNAPSHOT_LIST_NEXT", 1045fa9e4066Sahrens "zfs_cmd_t" }, 1046fa9e4066Sahrens { (uint_t)ZFS_IOC_SET_PROP, "ZFS_IOC_SET_PROP", 1047fa9e4066Sahrens "zfs_cmd_t" }, 1048fa9e4066Sahrens { (uint_t)ZFS_IOC_CREATE_MINOR, "ZFS_IOC_CREATE_MINOR", 1049fa9e4066Sahrens "zfs_cmd_t" }, 1050fa9e4066Sahrens { (uint_t)ZFS_IOC_REMOVE_MINOR, "ZFS_IOC_REMOVE_MINOR", 1051fa9e4066Sahrens "zfs_cmd_t" }, 1052fa9e4066Sahrens { (uint_t)ZFS_IOC_CREATE, "ZFS_IOC_CREATE", 1053fa9e4066Sahrens "zfs_cmd_t" }, 1054fa9e4066Sahrens { (uint_t)ZFS_IOC_DESTROY, "ZFS_IOC_DESTROY", 1055fa9e4066Sahrens "zfs_cmd_t" }, 1056fa9e4066Sahrens { (uint_t)ZFS_IOC_ROLLBACK, "ZFS_IOC_ROLLBACK", 1057fa9e4066Sahrens "zfs_cmd_t" }, 1058fa9e4066Sahrens { (uint_t)ZFS_IOC_RENAME, "ZFS_IOC_RENAME", 1059fa9e4066Sahrens "zfs_cmd_t" }, 10603cb34c60Sahrens { (uint_t)ZFS_IOC_RECV, "ZFS_IOC_RECV", 1061fa9e4066Sahrens "zfs_cmd_t" }, 10623cb34c60Sahrens { (uint_t)ZFS_IOC_SEND, "ZFS_IOC_SEND", 1063fa9e4066Sahrens "zfs_cmd_t" }, 1064ea8dc4b6Seschrock { (uint_t)ZFS_IOC_INJECT_FAULT, "ZFS_IOC_INJECT_FAULT", 1065ea8dc4b6Seschrock "zfs_cmd_t" }, 1066ea8dc4b6Seschrock { (uint_t)ZFS_IOC_CLEAR_FAULT, "ZFS_IOC_CLEAR_FAULT", 1067ea8dc4b6Seschrock "zfs_cmd_t" }, 1068ea8dc4b6Seschrock { (uint_t)ZFS_IOC_INJECT_LIST_NEXT, "ZFS_IOC_INJECT_LIST_NEXT", 1069ea8dc4b6Seschrock "zfs_cmd_t" }, 1070ea8dc4b6Seschrock { (uint_t)ZFS_IOC_ERROR_LOG, "ZFS_IOC_ERROR_LOG", 1071ea8dc4b6Seschrock "zfs_cmd_t" }, 1072ea8dc4b6Seschrock { (uint_t)ZFS_IOC_CLEAR, "ZFS_IOC_CLEAR", 1073ea8dc4b6Seschrock "zfs_cmd_t" }, 107499653d4eSeschrock { (uint_t)ZFS_IOC_PROMOTE, "ZFS_IOC_PROMOTE", 107599653d4eSeschrock "zfs_cmd_t" }, 10761d452cf5Sahrens { (uint_t)ZFS_IOC_DESTROY_SNAPS, "ZFS_IOC_DESTROY_SNAPS", 10771d452cf5Sahrens "zfs_cmd_t" }, 10781d452cf5Sahrens { (uint_t)ZFS_IOC_SNAPSHOT, "ZFS_IOC_SNAPSHOT", 10791d452cf5Sahrens "zfs_cmd_t" }, 108055434c77Sek110237 { (uint_t)ZFS_IOC_DSOBJ_TO_DSNAME, "ZFS_IOC_DSOBJ_TO_DSNAME", 108155434c77Sek110237 "zfs_cmd_t" }, 108255434c77Sek110237 { (uint_t)ZFS_IOC_OBJ_TO_PATH, "ZFS_IOC_OBJ_TO_PATH", 108355434c77Sek110237 "zfs_cmd_t" }, 1084b1b8ab34Slling { (uint_t)ZFS_IOC_POOL_SET_PROPS, "ZFS_IOC_POOL_SET_PROPS", 1085b1b8ab34Slling "zfs_cmd_t" }, 1086b1b8ab34Slling { (uint_t)ZFS_IOC_POOL_GET_PROPS, "ZFS_IOC_POOL_GET_PROPS", 1087b1b8ab34Slling "zfs_cmd_t" }, 1088ecd6cf80Smarks { (uint_t)ZFS_IOC_SET_FSACL, "ZFS_IOC_SET_FSACL", 1089ecd6cf80Smarks "zfs_cmd_t" }, 1090ecd6cf80Smarks { (uint_t)ZFS_IOC_GET_FSACL, "ZFS_IOC_GET_FSACL", 1091ecd6cf80Smarks "zfs_cmd_t" }, 1092ecd6cf80Smarks { (uint_t)ZFS_IOC_ISCSI_PERM_CHECK, "ZFS_IOC_ISCSI_PERM_CHECK", 1093ecd6cf80Smarks "zfs_cmd_t" }, 1094ecd6cf80Smarks { (uint_t)ZFS_IOC_SHARE, "ZFS_IOC_SHARE", 1095ecd6cf80Smarks "zfs_cmd_t" }, 1096e45ce728Sahrens { (uint_t)ZFS_IOC_INHERIT_PROP, "ZFS_IOC_INHERIT_PROP", 1097e45ce728Sahrens "zfs_cmd_t" }, 1098743a77edSAlan Wright { (uint_t)ZFS_IOC_SMB_ACL, "ZFS_IOC_SMB_ACL", 1099743a77edSAlan Wright "zfs_cmd_t" }, 110014843421SMatthew Ahrens { (uint_t)ZFS_IOC_USERSPACE_ONE, "ZFS_IOC_USERSPACE_ONE", 110114843421SMatthew Ahrens "zfs_cmd_t" }, 110214843421SMatthew Ahrens { (uint_t)ZFS_IOC_USERSPACE_MANY, "ZFS_IOC_USERSPACE_MANY", 110314843421SMatthew Ahrens "zfs_cmd_t" }, 110414843421SMatthew Ahrens { (uint_t)ZFS_IOC_USERSPACE_UPGRADE, "ZFS_IOC_USERSPACE_UPGRADE", 110514843421SMatthew Ahrens "zfs_cmd_t" }, 1106fa9e4066Sahrens 11075cd9bd63Skrishna /* kssl ioctls */ 11085cd9bd63Skrishna { (uint_t)KSSL_ADD_ENTRY, "KSSL_ADD_ENTRY", 11095cd9bd63Skrishna "kssl_params_t"}, 11105cd9bd63Skrishna { (uint_t)KSSL_DELETE_ENTRY, "KSSL_DELETE_ENTRY", 11115cd9bd63Skrishna "sockaddr_in"}, 11125cd9bd63Skrishna 11137f0b8309SEdward Pilatowicz /* disk ioctls - (0x04 << 8) - dkio.h */ 111406bbe1e0Sedp { (uint_t)DKIOCGGEOM, "DKIOCGGEOM", 111506bbe1e0Sedp "struct dk_geom"}, 111606bbe1e0Sedp { (uint_t)DKIOCINFO, "DKIOCINFO", 111706bbe1e0Sedp "struct dk_info"}, 11187f0b8309SEdward Pilatowicz { (uint_t)DKIOCEJECT, "DKIOCEJECT", 11197f0b8309SEdward Pilatowicz NULL}, 112006bbe1e0Sedp { (uint_t)DKIOCGVTOC, "DKIOCGVTOC", 112106bbe1e0Sedp "struct vtoc"}, 112206bbe1e0Sedp { (uint_t)DKIOCSVTOC, "DKIOCSVTOC", 112306bbe1e0Sedp "struct vtoc"}, 11247f0b8309SEdward Pilatowicz { (uint_t)DKIOCGEXTVTOC, "DKIOCGEXTVTOC", 11257f0b8309SEdward Pilatowicz "struct extvtoc"}, 11267f0b8309SEdward Pilatowicz { (uint_t)DKIOCSEXTVTOC, "DKIOCSEXTVTOC", 11277f0b8309SEdward Pilatowicz "struct extvtoc"}, 11287f0b8309SEdward Pilatowicz { (uint_t)DKIOCFLUSHWRITECACHE, "DKIOCFLUSHWRITECACHE", 112906bbe1e0Sedp NULL}, 11307f0b8309SEdward Pilatowicz { (uint_t)DKIOCGETWCE, "DKIOCGETWCE", 11317f0b8309SEdward Pilatowicz NULL}, 11327f0b8309SEdward Pilatowicz { (uint_t)DKIOCSETWCE, "DKIOCSETWCE", 11337f0b8309SEdward Pilatowicz NULL}, 11347f0b8309SEdward Pilatowicz { (uint_t)DKIOCSGEOM, "DKIOCSGEOM", 11357f0b8309SEdward Pilatowicz "struct dk_geom"}, 11367f0b8309SEdward Pilatowicz { (uint_t)DKIOCSAPART, "DKIOCSAPART", 11377f0b8309SEdward Pilatowicz "struct dk_allmap"}, 11387f0b8309SEdward Pilatowicz { (uint_t)DKIOCGAPART, "DKIOCGAPART", 11397f0b8309SEdward Pilatowicz "struct dk_allmap"}, 114006bbe1e0Sedp { (uint_t)DKIOCG_PHYGEOM, "DKIOCG_PHYGEOM", 114106bbe1e0Sedp "struct dk_geom"}, 114206bbe1e0Sedp { (uint_t)DKIOCG_VIRTGEOM, "DKIOCG_VIRTGEOM", 114306bbe1e0Sedp "struct dk_geom"}, 11447f0b8309SEdward Pilatowicz { (uint_t)DKIOCLOCK, "DKIOCLOCK", 11457f0b8309SEdward Pilatowicz NULL}, 11467f0b8309SEdward Pilatowicz { (uint_t)DKIOCUNLOCK, "DKIOCUNLOCK", 11477f0b8309SEdward Pilatowicz NULL}, 11487f0b8309SEdward Pilatowicz { (uint_t)DKIOCSTATE, "DKIOCSTATE", 11497f0b8309SEdward Pilatowicz NULL}, 11507f0b8309SEdward Pilatowicz { (uint_t)DKIOCREMOVABLE, "DKIOCREMOVABLE", 11517f0b8309SEdward Pilatowicz NULL}, 11527f0b8309SEdward Pilatowicz { (uint_t)DKIOCHOTPLUGGABLE, "DKIOCHOTPLUGGABLE", 11537f0b8309SEdward Pilatowicz NULL}, 11547f0b8309SEdward Pilatowicz { (uint_t)DKIOCADDBAD, "DKIOCADDBAD", 11557f0b8309SEdward Pilatowicz NULL}, 11567f0b8309SEdward Pilatowicz { (uint_t)DKIOCGETDEF, "DKIOCGETDEF", 11577f0b8309SEdward Pilatowicz NULL}, 11587f0b8309SEdward Pilatowicz { (uint_t)DKIOCPARTINFO, "DKIOCPARTINFO", 11597f0b8309SEdward Pilatowicz "struct part_info"}, 11607f0b8309SEdward Pilatowicz { (uint_t)DKIOCEXTPARTINFO, "DKIOCEXTPARTINFO", 11617f0b8309SEdward Pilatowicz "struct extpart_info"}, 116206bbe1e0Sedp { (uint_t)DKIOCGMEDIAINFO, "DKIOCGMEDIAINFO", 116306bbe1e0Sedp "struct dk_minfo"}, 11647f0b8309SEdward Pilatowicz { (uint_t)DKIOCGMBOOT, "DKIOCGMBOOT", 11657f0b8309SEdward Pilatowicz NULL}, 11667f0b8309SEdward Pilatowicz { (uint_t)DKIOCSMBOOT, "DKIOCSMBOOT", 11677f0b8309SEdward Pilatowicz NULL}, 11687f0b8309SEdward Pilatowicz { (uint_t)DKIOCSETEFI, "DKIOCSETEFI", 11697f0b8309SEdward Pilatowicz "struct dk_efi"}, 11707f0b8309SEdward Pilatowicz { (uint_t)DKIOCGETEFI, "DKIOCGETEFI", 11717f0b8309SEdward Pilatowicz "struct dk_efi"}, 11727f0b8309SEdward Pilatowicz { (uint_t)DKIOCPARTITION, "DKIOCPARTITION", 11737f0b8309SEdward Pilatowicz "struct partition64"}, 11747f0b8309SEdward Pilatowicz { (uint_t)DKIOCGETVOLCAP, "DKIOCGETVOLCAP", 11757f0b8309SEdward Pilatowicz "struct volcap_t"}, 11767f0b8309SEdward Pilatowicz { (uint_t)DKIOCSETVOLCAP, "DKIOCSETVOLCAP", 11777f0b8309SEdward Pilatowicz "struct volcap_t"}, 11787f0b8309SEdward Pilatowicz { (uint_t)DKIOCDMR, "DKIOCDMR", 11797f0b8309SEdward Pilatowicz "struct vol_directed_rd"}, 11807f0b8309SEdward Pilatowicz { (uint_t)DKIOCDUMPINIT, "DKIOCDUMPINIT", 11817f0b8309SEdward Pilatowicz NULL}, 11827f0b8309SEdward Pilatowicz { (uint_t)DKIOCDUMPFINI, "DKIOCDUMPFINI", 11837f0b8309SEdward Pilatowicz NULL}, 11847f0b8309SEdward Pilatowicz 11857f0b8309SEdward Pilatowicz /* disk ioctls - (0x04 << 8) - fdio.h */ 11867f0b8309SEdward Pilatowicz { (uint_t)FDIOGCHAR, "FDIOGCHAR", 11877f0b8309SEdward Pilatowicz "struct fd_char"}, 11887f0b8309SEdward Pilatowicz { (uint_t)FDIOSCHAR, "FDIOSCHAR", 11897f0b8309SEdward Pilatowicz "struct fd_char"}, 11907f0b8309SEdward Pilatowicz { (uint_t)FDEJECT, "FDEJECT", 11917f0b8309SEdward Pilatowicz NULL}, 11927f0b8309SEdward Pilatowicz { (uint_t)FDGETCHANGE, "FDGETCHANGE", 11937f0b8309SEdward Pilatowicz NULL}, 11947f0b8309SEdward Pilatowicz { (uint_t)FDGETDRIVECHAR, "FDGETDRIVECHAR", 11957f0b8309SEdward Pilatowicz "struct fd_drive"}, 11967f0b8309SEdward Pilatowicz { (uint_t)FDSETDRIVECHAR, "FDSETDRIVECHAR", 11977f0b8309SEdward Pilatowicz "struct fd_drive"}, 11987f0b8309SEdward Pilatowicz { (uint_t)FDGETSEARCH, "FDGETSEARCH", 11997f0b8309SEdward Pilatowicz NULL}, 12007f0b8309SEdward Pilatowicz { (uint_t)FDSETSEARCH, "FDSETSEARCH", 12017f0b8309SEdward Pilatowicz NULL}, 12027f0b8309SEdward Pilatowicz { (uint_t)FDIOCMD, "FDIOCMD", 12037f0b8309SEdward Pilatowicz "struct fd_cmd"}, 12047f0b8309SEdward Pilatowicz { (uint_t)FDRAW, "FDRAW", 12057f0b8309SEdward Pilatowicz "struct fd_raw"}, 12067f0b8309SEdward Pilatowicz { (uint_t)FDDEFGEOCHAR, "FDDEFGEOCHAR", 12077f0b8309SEdward Pilatowicz NULL}, 12087f0b8309SEdward Pilatowicz 12097f0b8309SEdward Pilatowicz /* disk ioctls - (0x04 << 8) - cdio.h */ 12107f0b8309SEdward Pilatowicz { (uint_t)CDROMPAUSE, "CDROMPAUSE", 12117f0b8309SEdward Pilatowicz NULL}, 12127f0b8309SEdward Pilatowicz { (uint_t)CDROMRESUME, "CDROMRESUME", 12137f0b8309SEdward Pilatowicz NULL}, 12147f0b8309SEdward Pilatowicz { (uint_t)CDROMPLAYMSF, "CDROMPLAYMSF", 12157f0b8309SEdward Pilatowicz "struct cdrom_msf"}, 12167f0b8309SEdward Pilatowicz { (uint_t)CDROMPLAYTRKIND, "CDROMPLAYTRKIND", 12177f0b8309SEdward Pilatowicz "struct cdrom_ti"}, 12187f0b8309SEdward Pilatowicz { (uint_t)CDROMREADTOCHDR, "CDROMREADTOCHDR", 12197f0b8309SEdward Pilatowicz "struct cdrom_tochdr"}, 12207f0b8309SEdward Pilatowicz { (uint_t)CDROMREADTOCENTRY, "CDROMREADTOCENTRY", 12217f0b8309SEdward Pilatowicz "struct cdrom_tocentry"}, 12227f0b8309SEdward Pilatowicz { (uint_t)CDROMSTOP, "CDROMSTOP", 12237f0b8309SEdward Pilatowicz NULL}, 12247f0b8309SEdward Pilatowicz { (uint_t)CDROMSTART, "CDROMSTART", 12257f0b8309SEdward Pilatowicz NULL}, 12267f0b8309SEdward Pilatowicz { (uint_t)CDROMEJECT, "CDROMEJECT", 12277f0b8309SEdward Pilatowicz NULL}, 12287f0b8309SEdward Pilatowicz { (uint_t)CDROMVOLCTRL, "CDROMVOLCTRL", 12297f0b8309SEdward Pilatowicz "struct cdrom_volctrl"}, 12307f0b8309SEdward Pilatowicz { (uint_t)CDROMSUBCHNL, "CDROMSUBCHNL", 12317f0b8309SEdward Pilatowicz "struct cdrom_subchnl"}, 12327f0b8309SEdward Pilatowicz { (uint_t)CDROMREADMODE2, "CDROMREADMODE2", 12337f0b8309SEdward Pilatowicz "struct cdrom_read"}, 12347f0b8309SEdward Pilatowicz { (uint_t)CDROMREADMODE1, "CDROMREADMODE1", 12357f0b8309SEdward Pilatowicz "struct cdrom_read"}, 12367f0b8309SEdward Pilatowicz { (uint_t)CDROMREADOFFSET, "CDROMREADOFFSET", 12377f0b8309SEdward Pilatowicz NULL}, 12387f0b8309SEdward Pilatowicz { (uint_t)CDROMGBLKMODE, "CDROMGBLKMODE", 12397f0b8309SEdward Pilatowicz NULL}, 12407f0b8309SEdward Pilatowicz { (uint_t)CDROMSBLKMODE, "CDROMSBLKMODE", 12417f0b8309SEdward Pilatowicz NULL}, 12427f0b8309SEdward Pilatowicz { (uint_t)CDROMCDDA, "CDROMCDDA", 12437f0b8309SEdward Pilatowicz "struct cdrom_cdda"}, 12447f0b8309SEdward Pilatowicz { (uint_t)CDROMCDXA, "CDROMCDXA", 12457f0b8309SEdward Pilatowicz "struct cdrom_cdxa"}, 12467f0b8309SEdward Pilatowicz { (uint_t)CDROMSUBCODE, "CDROMSUBCODE", 12477f0b8309SEdward Pilatowicz "struct cdrom_subcode"}, 12487f0b8309SEdward Pilatowicz { (uint_t)CDROMGDRVSPEED, "CDROMGDRVSPEED", 12497f0b8309SEdward Pilatowicz NULL}, 12507f0b8309SEdward Pilatowicz { (uint_t)CDROMSDRVSPEED, "CDROMSDRVSPEED", 12517f0b8309SEdward Pilatowicz NULL}, 12527f0b8309SEdward Pilatowicz { (uint_t)CDROMCLOSETRAY, "CDROMCLOSETRAY", 12537f0b8309SEdward Pilatowicz NULL}, 12547f0b8309SEdward Pilatowicz 12557f0b8309SEdward Pilatowicz /* disk ioctls - (0x04 << 8) - uscsi.h */ 12567f0b8309SEdward Pilatowicz { (uint_t)USCSICMD, "USCSICMD", 12577f0b8309SEdward Pilatowicz "struct uscsi_cmd"}, 125806bbe1e0Sedp 125906bbe1e0Sedp /* dumpadm ioctls - (0xdd << 8) */ 126006bbe1e0Sedp { (uint_t)DIOCGETDEV, "DIOCGETDEV", 12617f0b8309SEdward Pilatowicz NULL}, 126206bbe1e0Sedp 126306bbe1e0Sedp /* mntio ioctls - ('m' << 8) */ 126406bbe1e0Sedp { (uint_t)MNTIOC_GETMNTENT, "MNTIOC_GETMNTENT", 126506bbe1e0Sedp "struct extmnttab"}, 126606bbe1e0Sedp 12677f0b8309SEdward Pilatowicz /* devinfo ioctls - ('df' << 8) - devinfo_impl.h */ 12687f0b8309SEdward Pilatowicz { (uint_t)DINFOUSRLD, "DINFOUSRLD", 12697f0b8309SEdward Pilatowicz NULL}, 12707f0b8309SEdward Pilatowicz { (uint_t)DINFOLODRV, "DINFOLODRV", 12717f0b8309SEdward Pilatowicz NULL}, 12727f0b8309SEdward Pilatowicz { (uint_t)DINFOIDENT, "DINFOIDENT", 12737f0b8309SEdward Pilatowicz NULL}, 12747f0b8309SEdward Pilatowicz 12759d5056eaSjv227347 /* zcons ioctls */ 12769d5056eaSjv227347 { (uint_t)ZC_HOLDSLAVE, "ZC_HOLDSLAVE", NULL }, 12779d5056eaSjv227347 { (uint_t)ZC_RELEASESLAVE, "ZC_RELEASESLAVE", NULL }, 12789d5056eaSjv227347 1279*ddee57faSrui zang - Sun Microsystems - Beijing China /* hid ioctls - ('h' << 8) - hid.h */ 1280*ddee57faSrui zang - Sun Microsystems - Beijing China { (uint_t)HIDIOCKMGDIRECT, "HIDIOCKMGDIRECT", NULL }, 1281*ddee57faSrui zang - Sun Microsystems - Beijing China { (uint_t)HIDIOCKMSDIRECT, "HIDIOCKMSDIRECT", NULL }, 1282*ddee57faSrui zang - Sun Microsystems - Beijing China 12837c478bd9Sstevel@tonic-gate { (uint_t)0, NULL, NULL } 12847c478bd9Sstevel@tonic-gate }; 12857c478bd9Sstevel@tonic-gate 12867c478bd9Sstevel@tonic-gate void 12877c478bd9Sstevel@tonic-gate ioctl_ioccom(char *buf, size_t size, uint_t code, int nbytes, int x, int y) 12887c478bd9Sstevel@tonic-gate { 12897c478bd9Sstevel@tonic-gate const char *inoutstr; 12907c478bd9Sstevel@tonic-gate 12917c478bd9Sstevel@tonic-gate if (code & IOC_VOID) 12927c478bd9Sstevel@tonic-gate inoutstr = ""; 12937c478bd9Sstevel@tonic-gate else if ((code & IOC_INOUT) == IOC_INOUT) 12947c478bd9Sstevel@tonic-gate inoutstr = "WR"; 12957c478bd9Sstevel@tonic-gate else 12967c478bd9Sstevel@tonic-gate inoutstr = code & IOC_IN ? "W" : "R"; 12977c478bd9Sstevel@tonic-gate 12987c478bd9Sstevel@tonic-gate if (isascii(x) && isprint(x)) 12997c478bd9Sstevel@tonic-gate (void) snprintf(buf, size, "_IO%sN('%c', %d, %d)", inoutstr, 13007c478bd9Sstevel@tonic-gate x, y, nbytes); 13017c478bd9Sstevel@tonic-gate else 13027c478bd9Sstevel@tonic-gate (void) snprintf(buf, size, "_IO%sN(0x%x, %d, %d)", inoutstr, 13037c478bd9Sstevel@tonic-gate x, y, nbytes); 13047c478bd9Sstevel@tonic-gate } 13057c478bd9Sstevel@tonic-gate 13067c478bd9Sstevel@tonic-gate 13077c478bd9Sstevel@tonic-gate const char * 13087c478bd9Sstevel@tonic-gate ioctlname(private_t *pri, uint_t code) 13097c478bd9Sstevel@tonic-gate { 13107c478bd9Sstevel@tonic-gate const struct ioc *ip; 13117c478bd9Sstevel@tonic-gate const char *str = NULL; 13127c478bd9Sstevel@tonic-gate 13137c478bd9Sstevel@tonic-gate for (ip = &ioc[0]; ip->name; ip++) { 13147c478bd9Sstevel@tonic-gate if (code == ip->code) { 13157c478bd9Sstevel@tonic-gate str = ip->name; 13167c478bd9Sstevel@tonic-gate break; 13177c478bd9Sstevel@tonic-gate } 13187c478bd9Sstevel@tonic-gate } 13197c478bd9Sstevel@tonic-gate 13207c478bd9Sstevel@tonic-gate /* 13217c478bd9Sstevel@tonic-gate * Developers hide ascii ioctl names in the ioctl subcode; for example 13227c478bd9Sstevel@tonic-gate * 0x445210 should be printed 'D'<<16|'R'<<8|10. We allow for all 13237c478bd9Sstevel@tonic-gate * three high order bytes (called hi, mid and lo) to contain ascii 13247c478bd9Sstevel@tonic-gate * characters. 13257c478bd9Sstevel@tonic-gate */ 13267c478bd9Sstevel@tonic-gate if (str == NULL) { 13277c478bd9Sstevel@tonic-gate int c_hi = code >> 24; 13287c478bd9Sstevel@tonic-gate int c_mid = (code >> 16) & 0xff; 13297c478bd9Sstevel@tonic-gate int c_mid_nm = (code >> 16); 13307c478bd9Sstevel@tonic-gate int c_lo = (code >> 8) & 0xff; 13317c478bd9Sstevel@tonic-gate int c_lo_nm = code >> 8; 13327c478bd9Sstevel@tonic-gate 13337c478bd9Sstevel@tonic-gate if (isascii(c_lo) && isprint(c_lo) && 13347c478bd9Sstevel@tonic-gate isascii(c_mid) && isprint(c_mid) && 13357c478bd9Sstevel@tonic-gate isascii(c_hi) && isprint(c_hi)) 13367c478bd9Sstevel@tonic-gate (void) sprintf(pri->code_buf, 13377c478bd9Sstevel@tonic-gate "(('%c'<<24)|('%c'<<16)|('%c'<<8)|%d)", 13387c478bd9Sstevel@tonic-gate c_hi, c_mid, c_lo, code & 0xff); 13397c478bd9Sstevel@tonic-gate else if (isascii(c_lo) && isprint(c_lo) && 13407c478bd9Sstevel@tonic-gate isascii(c_mid_nm) && isprint(c_mid_nm)) 13417c478bd9Sstevel@tonic-gate (void) sprintf(pri->code_buf, 13427c478bd9Sstevel@tonic-gate "(('%c'<<16)|('%c'<<8)|%d)", c_mid, c_lo, 13437c478bd9Sstevel@tonic-gate code & 0xff); 13447c478bd9Sstevel@tonic-gate else if (isascii(c_lo_nm) && isprint(c_lo_nm)) 13457c478bd9Sstevel@tonic-gate (void) sprintf(pri->code_buf, "(('%c'<<8)|%d)", 13467c478bd9Sstevel@tonic-gate c_lo_nm, code & 0xff); 13477c478bd9Sstevel@tonic-gate else if (code & (IOC_VOID|IOC_INOUT)) 13487c478bd9Sstevel@tonic-gate ioctl_ioccom(pri->code_buf, sizeof (pri->code_buf), 13497c478bd9Sstevel@tonic-gate code, c_mid, c_lo, code & 0xff); 13507c478bd9Sstevel@tonic-gate else 13517c478bd9Sstevel@tonic-gate (void) sprintf(pri->code_buf, "0x%.4X", code); 13527c478bd9Sstevel@tonic-gate str = (const char *)pri->code_buf; 13537c478bd9Sstevel@tonic-gate } 13547c478bd9Sstevel@tonic-gate 13557c478bd9Sstevel@tonic-gate return (str); 13567c478bd9Sstevel@tonic-gate } 13577c478bd9Sstevel@tonic-gate 13587c478bd9Sstevel@tonic-gate 13597c478bd9Sstevel@tonic-gate const char * 13607c478bd9Sstevel@tonic-gate ioctldatastruct(uint_t code) 13617c478bd9Sstevel@tonic-gate { 13627c478bd9Sstevel@tonic-gate const struct ioc *ip; 13637c478bd9Sstevel@tonic-gate const char *str = NULL; 13647c478bd9Sstevel@tonic-gate 13657c478bd9Sstevel@tonic-gate for (ip = &ioc[0]; ip->name != NULL; ip++) { 13667c478bd9Sstevel@tonic-gate if (code == ip->code) { 13677c478bd9Sstevel@tonic-gate str = ip->datastruct; 13687c478bd9Sstevel@tonic-gate break; 13697c478bd9Sstevel@tonic-gate } 13707c478bd9Sstevel@tonic-gate } 13717c478bd9Sstevel@tonic-gate return (str); 13727c478bd9Sstevel@tonic-gate } 13737c478bd9Sstevel@tonic-gate 13747c478bd9Sstevel@tonic-gate 13757c478bd9Sstevel@tonic-gate const char * 13767c478bd9Sstevel@tonic-gate fcntlname(int code) 13777c478bd9Sstevel@tonic-gate { 13787c478bd9Sstevel@tonic-gate const char *str = NULL; 13797c478bd9Sstevel@tonic-gate 13807c478bd9Sstevel@tonic-gate if (code >= FCNTLMIN && code <= FCNTLMAX) 13817c478bd9Sstevel@tonic-gate str = FCNTLname[code-FCNTLMIN]; 13827c478bd9Sstevel@tonic-gate return (str); 13837c478bd9Sstevel@tonic-gate } 13847c478bd9Sstevel@tonic-gate 13857c478bd9Sstevel@tonic-gate const char * 13867c478bd9Sstevel@tonic-gate sfsname(int code) 13877c478bd9Sstevel@tonic-gate { 13887c478bd9Sstevel@tonic-gate const char *str = NULL; 13897c478bd9Sstevel@tonic-gate 13907c478bd9Sstevel@tonic-gate if (code >= SYSFSMIN && code <= SYSFSMAX) 13917c478bd9Sstevel@tonic-gate str = SYSFSname[code-SYSFSMIN]; 13927c478bd9Sstevel@tonic-gate return (str); 13937c478bd9Sstevel@tonic-gate } 13947c478bd9Sstevel@tonic-gate 13957c478bd9Sstevel@tonic-gate const char * 13967c478bd9Sstevel@tonic-gate plockname(int code) 13977c478bd9Sstevel@tonic-gate { 13987c478bd9Sstevel@tonic-gate const char *str = NULL; 13997c478bd9Sstevel@tonic-gate 14007c478bd9Sstevel@tonic-gate if (code >= PLOCKMIN && code <= PLOCKMAX) 14017c478bd9Sstevel@tonic-gate str = PLOCKname[code-PLOCKMIN]; 14027c478bd9Sstevel@tonic-gate return (str); 14037c478bd9Sstevel@tonic-gate } 14047c478bd9Sstevel@tonic-gate 14057c478bd9Sstevel@tonic-gate /* ARGSUSED */ 14067c478bd9Sstevel@tonic-gate const char * 14077c478bd9Sstevel@tonic-gate si86name(int code) 14087c478bd9Sstevel@tonic-gate { 14097c478bd9Sstevel@tonic-gate const char *str = NULL; 14107c478bd9Sstevel@tonic-gate 14117c478bd9Sstevel@tonic-gate #if defined(__i386) || defined(__amd64) 14127c478bd9Sstevel@tonic-gate switch (code) { 14137c478bd9Sstevel@tonic-gate case SI86SWPI: str = "SI86SWPI"; break; 14147c478bd9Sstevel@tonic-gate case SI86SYM: str = "SI86SYM"; break; 14157c478bd9Sstevel@tonic-gate case SI86CONF: str = "SI86CONF"; break; 14167c478bd9Sstevel@tonic-gate case SI86BOOT: str = "SI86BOOT"; break; 14177c478bd9Sstevel@tonic-gate case SI86AUTO: str = "SI86AUTO"; break; 14187c478bd9Sstevel@tonic-gate case SI86EDT: str = "SI86EDT"; break; 14197c478bd9Sstevel@tonic-gate case SI86SWAP: str = "SI86SWAP"; break; 14207c478bd9Sstevel@tonic-gate case SI86FPHW: str = "SI86FPHW"; break; 14217c478bd9Sstevel@tonic-gate case SI86FPSTART: str = "SI86FPSTART"; break; 14227c478bd9Sstevel@tonic-gate case GRNON: str = "GRNON"; break; 14237c478bd9Sstevel@tonic-gate case GRNFLASH: str = "GRNFLASH"; break; 14247c478bd9Sstevel@tonic-gate case STIME: str = "STIME"; break; 14257c478bd9Sstevel@tonic-gate case SETNAME: str = "SETNAME"; break; 14267c478bd9Sstevel@tonic-gate case RNVR: str = "RNVR"; break; 14277c478bd9Sstevel@tonic-gate case WNVR: str = "WNVR"; break; 14287c478bd9Sstevel@tonic-gate case RTODC: str = "RTODC"; break; 14297c478bd9Sstevel@tonic-gate case CHKSER: str = "CHKSER"; break; 14307c478bd9Sstevel@tonic-gate case SI86NVPRT: str = "SI86NVPRT"; break; 14317c478bd9Sstevel@tonic-gate case SANUPD: str = "SANUPD"; break; 14327c478bd9Sstevel@tonic-gate case SI86KSTR: str = "SI86KSTR"; break; 14337c478bd9Sstevel@tonic-gate case SI86MEM: str = "SI86MEM"; break; 14347c478bd9Sstevel@tonic-gate case SI86TODEMON: str = "SI86TODEMON"; break; 14357c478bd9Sstevel@tonic-gate case SI86CCDEMON: str = "SI86CCDEMON"; break; 14367c478bd9Sstevel@tonic-gate case SI86CACHE: str = "SI86CACHE"; break; 14377c478bd9Sstevel@tonic-gate case SI86DELMEM: str = "SI86DELMEM"; break; 14387c478bd9Sstevel@tonic-gate case SI86ADDMEM: str = "SI86ADDMEM"; break; 14397c478bd9Sstevel@tonic-gate /* 71 through 74 reserved for VPIX */ 14407c478bd9Sstevel@tonic-gate case SI86V86: str = "SI86V86"; break; 14417c478bd9Sstevel@tonic-gate case SI86SLTIME: str = "SI86SLTIME"; break; 14427c478bd9Sstevel@tonic-gate case SI86DSCR: str = "SI86DSCR"; break; 14437c478bd9Sstevel@tonic-gate case RDUBLK: str = "RDUBLK"; break; 14447c478bd9Sstevel@tonic-gate /* NFA entry point */ 14457c478bd9Sstevel@tonic-gate case SI86NFA: str = "SI86NFA"; break; 14467c478bd9Sstevel@tonic-gate case SI86VM86: str = "SI86VM86"; break; 14477c478bd9Sstevel@tonic-gate case SI86VMENABLE: str = "SI86VMENABLE"; break; 14487c478bd9Sstevel@tonic-gate case SI86LIMUSER: str = "SI86LIMUSER"; break; 14497c478bd9Sstevel@tonic-gate case SI86RDID: str = "SI86RDID"; break; 14507c478bd9Sstevel@tonic-gate case SI86RDBOOT: str = "SI86RDBOOT"; break; 14517c478bd9Sstevel@tonic-gate /* Merged Product defines */ 14527c478bd9Sstevel@tonic-gate case SI86SHFIL: str = "SI86SHFIL"; break; 14537c478bd9Sstevel@tonic-gate case SI86PCHRGN: str = "SI86PCHRGN"; break; 14547c478bd9Sstevel@tonic-gate case SI86BADVISE: str = "SI86BADVISE"; break; 14557c478bd9Sstevel@tonic-gate case SI86SHRGN: str = "SI86SHRGN"; break; 14567c478bd9Sstevel@tonic-gate case SI86CHIDT: str = "SI86CHIDT"; break; 14577c478bd9Sstevel@tonic-gate case SI86EMULRDA: str = "SI86EMULRDA"; break; 14584be06494SDan Price /* RTC commands */ 14594be06494SDan Price case WTODC: str = "WTODC"; break; 14604be06494SDan Price case SGMTL: str = "SGMTL"; break; 14614be06494SDan Price case GGMTL: str = "GGMTL"; break; 14624be06494SDan Price case RTCSYNC: str = "RTCSYNC"; break; 14637c478bd9Sstevel@tonic-gate } 14647c478bd9Sstevel@tonic-gate #endif /* __i386 */ 14657c478bd9Sstevel@tonic-gate 14667c478bd9Sstevel@tonic-gate return (str); 14677c478bd9Sstevel@tonic-gate } 14687c478bd9Sstevel@tonic-gate 14697c478bd9Sstevel@tonic-gate const char * 14707c478bd9Sstevel@tonic-gate utscode(int code) 14717c478bd9Sstevel@tonic-gate { 14727c478bd9Sstevel@tonic-gate const char *str = NULL; 14737c478bd9Sstevel@tonic-gate 14747c478bd9Sstevel@tonic-gate switch (code) { 14757c478bd9Sstevel@tonic-gate case UTS_UNAME: str = "UNAME"; break; 14767c478bd9Sstevel@tonic-gate case UTS_USTAT: str = "USTAT"; break; 14777c478bd9Sstevel@tonic-gate case UTS_FUSERS: str = "FUSERS"; break; 14787c478bd9Sstevel@tonic-gate } 14797c478bd9Sstevel@tonic-gate 14807c478bd9Sstevel@tonic-gate return (str); 14817c478bd9Sstevel@tonic-gate } 14827c478bd9Sstevel@tonic-gate 14837c478bd9Sstevel@tonic-gate const char * 1484aa4a4f3bSnf202958 rctlsyscode(int code) 1485aa4a4f3bSnf202958 { 1486aa4a4f3bSnf202958 const char *str = NULL; 1487aa4a4f3bSnf202958 switch (code) { 1488aa4a4f3bSnf202958 case 0: str = "GETRCTL"; break; 1489aa4a4f3bSnf202958 case 1: str = "SETRCTL"; break; 1490aa4a4f3bSnf202958 case 2: str = "RCTLSYS_LST"; break; 1491aa4a4f3bSnf202958 case 3: str = "RCTLSYS_CTL"; break; 1492532877c4Srd117015 case 4: str = "RCTLSYS_SETPROJ"; break; 1493aa4a4f3bSnf202958 default: str = "UNKNOWN"; break; 1494aa4a4f3bSnf202958 } 1495aa4a4f3bSnf202958 return (str); 1496aa4a4f3bSnf202958 } 1497aa4a4f3bSnf202958 1498aa4a4f3bSnf202958 const char * 1499aa4a4f3bSnf202958 rctl_local_action(private_t *pri, uint_t val) 1500aa4a4f3bSnf202958 { 1501aa4a4f3bSnf202958 uint_t action = val & (~RCTL_LOCAL_ACTION_MASK); 1502aa4a4f3bSnf202958 1503aa4a4f3bSnf202958 char *s = pri->code_buf; 1504aa4a4f3bSnf202958 1505aa4a4f3bSnf202958 *s = '\0'; 1506aa4a4f3bSnf202958 1507aa4a4f3bSnf202958 if (action & RCTL_LOCAL_NOACTION) { 1508aa4a4f3bSnf202958 action ^= RCTL_LOCAL_NOACTION; 1509aa4a4f3bSnf202958 (void) strlcat(s, "|RCTL_LOCAL_NOACTION", 1510aa4a4f3bSnf202958 sizeof (pri->code_buf)); 1511aa4a4f3bSnf202958 } 1512aa4a4f3bSnf202958 if (action & RCTL_LOCAL_SIGNAL) { 1513aa4a4f3bSnf202958 action ^= RCTL_LOCAL_SIGNAL; 1514aa4a4f3bSnf202958 (void) strlcat(s, "|RCTL_LOCAL_SIGNAL", 1515aa4a4f3bSnf202958 sizeof (pri->code_buf)); 1516aa4a4f3bSnf202958 } 1517aa4a4f3bSnf202958 if (action & RCTL_LOCAL_DENY) { 1518aa4a4f3bSnf202958 action ^= RCTL_LOCAL_DENY; 1519aa4a4f3bSnf202958 (void) strlcat(s, "|RCTL_LOCAL_DENY", 1520aa4a4f3bSnf202958 sizeof (pri->code_buf)); 1521aa4a4f3bSnf202958 } 1522aa4a4f3bSnf202958 1523aa4a4f3bSnf202958 if ((action & (~RCTL_LOCAL_ACTION_MASK)) != 0) 1524aa4a4f3bSnf202958 return (NULL); 1525aa4a4f3bSnf202958 else if (*s != '\0') 1526aa4a4f3bSnf202958 return (s+1); 1527aa4a4f3bSnf202958 else 1528aa4a4f3bSnf202958 return (NULL); 1529aa4a4f3bSnf202958 } 1530aa4a4f3bSnf202958 1531aa4a4f3bSnf202958 1532aa4a4f3bSnf202958 const char * 1533aa4a4f3bSnf202958 rctl_local_flags(private_t *pri, uint_t val) 1534aa4a4f3bSnf202958 { 1535aa4a4f3bSnf202958 uint_t pval = val & RCTL_LOCAL_ACTION_MASK; 1536aa4a4f3bSnf202958 char *s = pri->code_buf; 1537aa4a4f3bSnf202958 1538aa4a4f3bSnf202958 *s = '\0'; 1539aa4a4f3bSnf202958 1540aa4a4f3bSnf202958 if (pval & RCTL_LOCAL_MAXIMAL) { 1541aa4a4f3bSnf202958 pval ^= RCTL_LOCAL_MAXIMAL; 1542aa4a4f3bSnf202958 (void) strlcat(s, "|RCTL_LOCAL_MAXIMAL", 1543aa4a4f3bSnf202958 sizeof (pri->code_buf)); 1544aa4a4f3bSnf202958 } 1545aa4a4f3bSnf202958 1546aa4a4f3bSnf202958 if ((pval & RCTL_LOCAL_ACTION_MASK) != 0) 1547aa4a4f3bSnf202958 return (NULL); 1548aa4a4f3bSnf202958 else if (*s != '\0') 1549aa4a4f3bSnf202958 return (s+1); 1550aa4a4f3bSnf202958 else 1551aa4a4f3bSnf202958 return (NULL); 1552aa4a4f3bSnf202958 } 1553aa4a4f3bSnf202958 1554aa4a4f3bSnf202958 1555aa4a4f3bSnf202958 const char * 15567c478bd9Sstevel@tonic-gate sconfname(int code) 15577c478bd9Sstevel@tonic-gate { 15587c478bd9Sstevel@tonic-gate const char *str = NULL; 15597c478bd9Sstevel@tonic-gate 15607c478bd9Sstevel@tonic-gate if (code >= SCONFMIN && code <= SCONFMAX) 15617c478bd9Sstevel@tonic-gate str = SCONFname[code-SCONFMIN]; 15627c478bd9Sstevel@tonic-gate return (str); 15637c478bd9Sstevel@tonic-gate } 15647c478bd9Sstevel@tonic-gate 15657c478bd9Sstevel@tonic-gate const char * 15667c478bd9Sstevel@tonic-gate pathconfname(int code) 15677c478bd9Sstevel@tonic-gate { 15687c478bd9Sstevel@tonic-gate const char *str = NULL; 15697c478bd9Sstevel@tonic-gate 15707c478bd9Sstevel@tonic-gate if (code >= PATHCONFMIN && code <= PATHCONFMAX) 15717c478bd9Sstevel@tonic-gate str = PATHCONFname[code-PATHCONFMIN]; 15727c478bd9Sstevel@tonic-gate return (str); 15737c478bd9Sstevel@tonic-gate } 15747c478bd9Sstevel@tonic-gate 15757c478bd9Sstevel@tonic-gate const char * 15767c478bd9Sstevel@tonic-gate sigarg(private_t *pri, int arg) 15777c478bd9Sstevel@tonic-gate { 15787c478bd9Sstevel@tonic-gate char *str = NULL; 15797c478bd9Sstevel@tonic-gate int sig = (arg & SIGNO_MASK); 15807c478bd9Sstevel@tonic-gate 15817c478bd9Sstevel@tonic-gate str = pri->code_buf; 15827c478bd9Sstevel@tonic-gate arg &= ~SIGNO_MASK; 15837c478bd9Sstevel@tonic-gate if (arg & ~(SIGDEFER|SIGHOLD|SIGRELSE|SIGIGNORE|SIGPAUSE)) 15847c478bd9Sstevel@tonic-gate (void) snprintf(pri->code_buf, sizeof (pri->code_buf), 15857c478bd9Sstevel@tonic-gate "%s|0x%X", signame(pri, sig), arg); 15867c478bd9Sstevel@tonic-gate else { 15877c478bd9Sstevel@tonic-gate (void) strcpy(str, signame(pri, sig)); 15887c478bd9Sstevel@tonic-gate if (arg & SIGDEFER) 15897c478bd9Sstevel@tonic-gate (void) strcat(str, "|SIGDEFER"); 15907c478bd9Sstevel@tonic-gate if (arg & SIGHOLD) 15917c478bd9Sstevel@tonic-gate (void) strcat(str, "|SIGHOLD"); 15927c478bd9Sstevel@tonic-gate if (arg & SIGRELSE) 15937c478bd9Sstevel@tonic-gate (void) strcat(str, "|SIGRELSE"); 15947c478bd9Sstevel@tonic-gate if (arg & SIGIGNORE) 15957c478bd9Sstevel@tonic-gate (void) strcat(str, "|SIGIGNORE"); 15967c478bd9Sstevel@tonic-gate if (arg & SIGPAUSE) 15977c478bd9Sstevel@tonic-gate (void) strcat(str, "|SIGPAUSE"); 15987c478bd9Sstevel@tonic-gate } 15997c478bd9Sstevel@tonic-gate 16007c478bd9Sstevel@tonic-gate return ((const char *)str); 16017c478bd9Sstevel@tonic-gate } 16027c478bd9Sstevel@tonic-gate 16037c478bd9Sstevel@tonic-gate #define ALL_O_FLAGS \ 16047c478bd9Sstevel@tonic-gate (O_NDELAY|O_APPEND|O_SYNC|O_DSYNC|O_NONBLOCK|O_CREAT|O_TRUNC\ 16057c478bd9Sstevel@tonic-gate |O_EXCL|O_NOCTTY|O_LARGEFILE|O_RSYNC|O_XATTR|O_NOFOLLOW|O_NOLINKS) 16067c478bd9Sstevel@tonic-gate 16077c478bd9Sstevel@tonic-gate const char * 16087c478bd9Sstevel@tonic-gate openarg(private_t *pri, int arg) 16097c478bd9Sstevel@tonic-gate { 16107c478bd9Sstevel@tonic-gate char *str = pri->code_buf; 16117c478bd9Sstevel@tonic-gate 16127c478bd9Sstevel@tonic-gate switch (arg & ~ALL_O_FLAGS) { 16137c478bd9Sstevel@tonic-gate default: 16147c478bd9Sstevel@tonic-gate return ((char *)NULL); 16157c478bd9Sstevel@tonic-gate case O_RDONLY: 16167c478bd9Sstevel@tonic-gate (void) strcpy(str, "O_RDONLY"); 16177c478bd9Sstevel@tonic-gate break; 16187c478bd9Sstevel@tonic-gate case O_WRONLY: 16197c478bd9Sstevel@tonic-gate (void) strcpy(str, "O_WRONLY"); 16207c478bd9Sstevel@tonic-gate break; 16217c478bd9Sstevel@tonic-gate case O_RDWR: 16227c478bd9Sstevel@tonic-gate (void) strcpy(str, "O_RDWR"); 16237c478bd9Sstevel@tonic-gate break; 16247c478bd9Sstevel@tonic-gate } 16257c478bd9Sstevel@tonic-gate 16267c478bd9Sstevel@tonic-gate if (arg & O_NDELAY) 16277c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_NDELAY", sizeof (pri->code_buf)); 16287c478bd9Sstevel@tonic-gate if (arg & O_APPEND) 16297c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_APPEND", sizeof (pri->code_buf)); 16307c478bd9Sstevel@tonic-gate if (arg & O_SYNC) 16317c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_SYNC", sizeof (pri->code_buf)); 16327c478bd9Sstevel@tonic-gate if (arg & O_DSYNC) 16337c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_DSYNC", sizeof (pri->code_buf)); 16347c478bd9Sstevel@tonic-gate if (arg & O_NONBLOCK) 16357c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_NONBLOCK", sizeof (pri->code_buf)); 16367c478bd9Sstevel@tonic-gate if (arg & O_CREAT) 16377c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_CREAT", sizeof (pri->code_buf)); 16387c478bd9Sstevel@tonic-gate if (arg & O_TRUNC) 16397c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_TRUNC", sizeof (pri->code_buf)); 16407c478bd9Sstevel@tonic-gate if (arg & O_EXCL) 16417c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_EXCL", sizeof (pri->code_buf)); 16427c478bd9Sstevel@tonic-gate if (arg & O_NOCTTY) 16437c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_NOCTTY", sizeof (pri->code_buf)); 16447c478bd9Sstevel@tonic-gate if (arg & O_LARGEFILE) 16457c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_LARGEFILE", sizeof (pri->code_buf)); 16467c478bd9Sstevel@tonic-gate if (arg & O_RSYNC) 16477c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_RSYNC", sizeof (pri->code_buf)); 16487c478bd9Sstevel@tonic-gate if (arg & O_XATTR) 16497c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_XATTR", sizeof (pri->code_buf)); 16507c478bd9Sstevel@tonic-gate if (arg & O_NOFOLLOW) 16517c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_NOFOLLOW", sizeof (pri->code_buf)); 16527c478bd9Sstevel@tonic-gate if (arg & O_NOLINKS) 16537c478bd9Sstevel@tonic-gate (void) strlcat(str, "|O_NOLINKS", sizeof (pri->code_buf)); 16547c478bd9Sstevel@tonic-gate 16557c478bd9Sstevel@tonic-gate return ((const char *)str); 16567c478bd9Sstevel@tonic-gate } 16577c478bd9Sstevel@tonic-gate 16587c478bd9Sstevel@tonic-gate const char * 16597c478bd9Sstevel@tonic-gate whencearg(int arg) 16607c478bd9Sstevel@tonic-gate { 16617c478bd9Sstevel@tonic-gate const char *str = NULL; 16627c478bd9Sstevel@tonic-gate 16637c478bd9Sstevel@tonic-gate switch (arg) { 16647c478bd9Sstevel@tonic-gate case SEEK_SET: str = "SEEK_SET"; break; 16657c478bd9Sstevel@tonic-gate case SEEK_CUR: str = "SEEK_CUR"; break; 16667c478bd9Sstevel@tonic-gate case SEEK_END: str = "SEEK_END"; break; 16677c478bd9Sstevel@tonic-gate case SEEK_DATA: str = "SEEK_DATA"; break; 16687c478bd9Sstevel@tonic-gate case SEEK_HOLE: str = "SEEK_HOLE"; break; 16697c478bd9Sstevel@tonic-gate } 16707c478bd9Sstevel@tonic-gate 16717c478bd9Sstevel@tonic-gate return (str); 16727c478bd9Sstevel@tonic-gate } 16737c478bd9Sstevel@tonic-gate 16747c478bd9Sstevel@tonic-gate #define IPC_FLAGS (IPC_ALLOC|IPC_CREAT|IPC_EXCL|IPC_NOWAIT) 16757c478bd9Sstevel@tonic-gate 16767c478bd9Sstevel@tonic-gate char * 16777c478bd9Sstevel@tonic-gate ipcflags(private_t *pri, int arg) 16787c478bd9Sstevel@tonic-gate { 16797c478bd9Sstevel@tonic-gate char *str = pri->code_buf; 16807c478bd9Sstevel@tonic-gate 16817c478bd9Sstevel@tonic-gate if (arg & 0777) 16827c478bd9Sstevel@tonic-gate (void) sprintf(str, "0%.3o", arg&0777); 16837c478bd9Sstevel@tonic-gate else 16847c478bd9Sstevel@tonic-gate *str = '\0'; 16857c478bd9Sstevel@tonic-gate 16867c478bd9Sstevel@tonic-gate if (arg & IPC_ALLOC) 16877c478bd9Sstevel@tonic-gate (void) strcat(str, "|IPC_ALLOC"); 16887c478bd9Sstevel@tonic-gate if (arg & IPC_CREAT) 16897c478bd9Sstevel@tonic-gate (void) strcat(str, "|IPC_CREAT"); 16907c478bd9Sstevel@tonic-gate if (arg & IPC_EXCL) 16917c478bd9Sstevel@tonic-gate (void) strcat(str, "|IPC_EXCL"); 16927c478bd9Sstevel@tonic-gate if (arg & IPC_NOWAIT) 16937c478bd9Sstevel@tonic-gate (void) strcat(str, "|IPC_NOWAIT"); 16947c478bd9Sstevel@tonic-gate 16957c478bd9Sstevel@tonic-gate return (str); 16967c478bd9Sstevel@tonic-gate } 16977c478bd9Sstevel@tonic-gate 16987c478bd9Sstevel@tonic-gate const char * 16997c478bd9Sstevel@tonic-gate msgflags(private_t *pri, int arg) 17007c478bd9Sstevel@tonic-gate { 17017c478bd9Sstevel@tonic-gate char *str; 17027c478bd9Sstevel@tonic-gate 17037c478bd9Sstevel@tonic-gate if (arg == 0 || (arg & ~(IPC_FLAGS|MSG_NOERROR|0777)) != 0) 17047c478bd9Sstevel@tonic-gate return ((char *)NULL); 17057c478bd9Sstevel@tonic-gate 17067c478bd9Sstevel@tonic-gate str = ipcflags(pri, arg); 17077c478bd9Sstevel@tonic-gate 17087c478bd9Sstevel@tonic-gate if (arg & MSG_NOERROR) 17097c478bd9Sstevel@tonic-gate (void) strcat(str, "|MSG_NOERROR"); 17107c478bd9Sstevel@tonic-gate 17117c478bd9Sstevel@tonic-gate if (*str == '|') 17127c478bd9Sstevel@tonic-gate str++; 17137c478bd9Sstevel@tonic-gate return ((const char *)str); 17147c478bd9Sstevel@tonic-gate } 17157c478bd9Sstevel@tonic-gate 17167c478bd9Sstevel@tonic-gate const char * 17177c478bd9Sstevel@tonic-gate semflags(private_t *pri, int arg) 17187c478bd9Sstevel@tonic-gate { 17197c478bd9Sstevel@tonic-gate char *str; 17207c478bd9Sstevel@tonic-gate 17217c478bd9Sstevel@tonic-gate if (arg == 0 || (arg & ~(IPC_FLAGS|SEM_UNDO|0777)) != 0) 17227c478bd9Sstevel@tonic-gate return ((char *)NULL); 17237c478bd9Sstevel@tonic-gate 17247c478bd9Sstevel@tonic-gate str = ipcflags(pri, arg); 17257c478bd9Sstevel@tonic-gate 17267c478bd9Sstevel@tonic-gate if (arg & SEM_UNDO) 17277c478bd9Sstevel@tonic-gate (void) strcat(str, "|SEM_UNDO"); 17287c478bd9Sstevel@tonic-gate 17297c478bd9Sstevel@tonic-gate if (*str == '|') 17307c478bd9Sstevel@tonic-gate str++; 17317c478bd9Sstevel@tonic-gate return ((const char *)str); 17327c478bd9Sstevel@tonic-gate } 17337c478bd9Sstevel@tonic-gate 17347c478bd9Sstevel@tonic-gate const char * 17357c478bd9Sstevel@tonic-gate shmflags(private_t *pri, int arg) 17367c478bd9Sstevel@tonic-gate { 17377c478bd9Sstevel@tonic-gate char *str; 17387c478bd9Sstevel@tonic-gate 17397c478bd9Sstevel@tonic-gate if (arg == 0 || (arg & ~(IPC_FLAGS|SHM_RDONLY|SHM_RND|0777)) != 0) 17407c478bd9Sstevel@tonic-gate return ((char *)NULL); 17417c478bd9Sstevel@tonic-gate 17427c478bd9Sstevel@tonic-gate str = ipcflags(pri, arg); 17437c478bd9Sstevel@tonic-gate 17447c478bd9Sstevel@tonic-gate if (arg & SHM_RDONLY) 17457c478bd9Sstevel@tonic-gate (void) strcat(str, "|SHM_RDONLY"); 17467c478bd9Sstevel@tonic-gate if (arg & SHM_RND) 17477c478bd9Sstevel@tonic-gate (void) strcat(str, "|SHM_RND"); 17487c478bd9Sstevel@tonic-gate 17497c478bd9Sstevel@tonic-gate if (*str == '|') 17507c478bd9Sstevel@tonic-gate str++; 17517c478bd9Sstevel@tonic-gate return ((const char *)str); 17527c478bd9Sstevel@tonic-gate } 17537c478bd9Sstevel@tonic-gate 17547c478bd9Sstevel@tonic-gate #define MSGCMDMIN 0 17557c478bd9Sstevel@tonic-gate #define MSGCMDMAX IPC_STAT64 17567c478bd9Sstevel@tonic-gate const char *const MSGCMDname[MSGCMDMAX+1] = { 17577c478bd9Sstevel@tonic-gate NULL, NULL, NULL, NULL, NULL, 17587c478bd9Sstevel@tonic-gate NULL, NULL, NULL, NULL, NULL, 17597c478bd9Sstevel@tonic-gate "IPC_RMID", /* 10 */ 17607c478bd9Sstevel@tonic-gate "IPC_SET", /* 11 */ 17617c478bd9Sstevel@tonic-gate "IPC_STAT", /* 12 */ 17627c478bd9Sstevel@tonic-gate "IPC_SET64", /* 13 */ 17637c478bd9Sstevel@tonic-gate "IPC_STAT64", /* 14 */ 17647c478bd9Sstevel@tonic-gate }; 17657c478bd9Sstevel@tonic-gate 17667c478bd9Sstevel@tonic-gate #define SEMCMDMIN 0 17677c478bd9Sstevel@tonic-gate #define SEMCMDMAX IPC_STAT64 17687c478bd9Sstevel@tonic-gate const char *const SEMCMDname[SEMCMDMAX+1] = { 17697c478bd9Sstevel@tonic-gate NULL, /* 0 */ 17707c478bd9Sstevel@tonic-gate NULL, /* 1 */ 17717c478bd9Sstevel@tonic-gate NULL, /* 2 */ 17727c478bd9Sstevel@tonic-gate "GETNCNT", /* 3 */ 17737c478bd9Sstevel@tonic-gate "GETPID", /* 4 */ 17747c478bd9Sstevel@tonic-gate "GETVAL", /* 5 */ 17757c478bd9Sstevel@tonic-gate "GETALL", /* 6 */ 17767c478bd9Sstevel@tonic-gate "GETZCNT", /* 7 */ 17777c478bd9Sstevel@tonic-gate "SETVAL", /* 8 */ 17787c478bd9Sstevel@tonic-gate "SETALL", /* 9 */ 17797c478bd9Sstevel@tonic-gate "IPC_RMID", /* 10 */ 17807c478bd9Sstevel@tonic-gate "IPC_SET", /* 11 */ 17817c478bd9Sstevel@tonic-gate "IPC_STAT", /* 12 */ 17827c478bd9Sstevel@tonic-gate "IPC_SET64", /* 13 */ 17837c478bd9Sstevel@tonic-gate "IPC_STAT64", /* 14 */ 17847c478bd9Sstevel@tonic-gate }; 17857c478bd9Sstevel@tonic-gate 17867c478bd9Sstevel@tonic-gate #define SHMCMDMIN 0 17877c478bd9Sstevel@tonic-gate #define SHMCMDMAX IPC_STAT64 17887c478bd9Sstevel@tonic-gate const char *const SHMCMDname[SHMCMDMAX+1] = { 17897c478bd9Sstevel@tonic-gate NULL, /* 0 */ 17907c478bd9Sstevel@tonic-gate NULL, /* 1 */ 17917c478bd9Sstevel@tonic-gate NULL, /* 2 */ 17927c478bd9Sstevel@tonic-gate "SHM_LOCK", /* 3 */ 17937c478bd9Sstevel@tonic-gate "SHM_UNLOCK", /* 4 */ 17947c478bd9Sstevel@tonic-gate NULL, NULL, NULL, NULL, NULL, /* 5 NULLs */ 17957c478bd9Sstevel@tonic-gate "IPC_RMID", /* 10 */ 17967c478bd9Sstevel@tonic-gate "IPC_SET", /* 11 */ 17977c478bd9Sstevel@tonic-gate "IPC_STAT", /* 12 */ 17987c478bd9Sstevel@tonic-gate "IPC_SET64", /* 13 */ 17997c478bd9Sstevel@tonic-gate "IPC_STAT64", /* 14 */ 18007c478bd9Sstevel@tonic-gate }; 18017c478bd9Sstevel@tonic-gate 18027c478bd9Sstevel@tonic-gate const char * 18037c478bd9Sstevel@tonic-gate msgcmd(int arg) 18047c478bd9Sstevel@tonic-gate { 18057c478bd9Sstevel@tonic-gate const char *str = NULL; 18067c478bd9Sstevel@tonic-gate 18077c478bd9Sstevel@tonic-gate if (arg >= MSGCMDMIN && arg <= MSGCMDMAX) 18087c478bd9Sstevel@tonic-gate str = MSGCMDname[arg-MSGCMDMIN]; 18097c478bd9Sstevel@tonic-gate return (str); 18107c478bd9Sstevel@tonic-gate } 18117c478bd9Sstevel@tonic-gate 18127c478bd9Sstevel@tonic-gate const char * 18137c478bd9Sstevel@tonic-gate semcmd(int arg) 18147c478bd9Sstevel@tonic-gate { 18157c478bd9Sstevel@tonic-gate const char *str = NULL; 18167c478bd9Sstevel@tonic-gate 18177c478bd9Sstevel@tonic-gate if (arg >= SEMCMDMIN && arg <= SEMCMDMAX) 18187c478bd9Sstevel@tonic-gate str = SEMCMDname[arg-SEMCMDMIN]; 18197c478bd9Sstevel@tonic-gate return (str); 18207c478bd9Sstevel@tonic-gate } 18217c478bd9Sstevel@tonic-gate 18227c478bd9Sstevel@tonic-gate const char * 18237c478bd9Sstevel@tonic-gate shmcmd(int arg) 18247c478bd9Sstevel@tonic-gate { 18257c478bd9Sstevel@tonic-gate const char *str = NULL; 18267c478bd9Sstevel@tonic-gate 18277c478bd9Sstevel@tonic-gate if (arg >= SHMCMDMIN && arg <= SHMCMDMAX) 18287c478bd9Sstevel@tonic-gate str = SHMCMDname[arg-SHMCMDMIN]; 18297c478bd9Sstevel@tonic-gate return (str); 18307c478bd9Sstevel@tonic-gate } 18317c478bd9Sstevel@tonic-gate 18327c478bd9Sstevel@tonic-gate const char * 18337c478bd9Sstevel@tonic-gate strrdopt(int arg) /* streams read option (I_SRDOPT I_GRDOPT) */ 18347c478bd9Sstevel@tonic-gate { 18357c478bd9Sstevel@tonic-gate const char *str = NULL; 18367c478bd9Sstevel@tonic-gate 18377c478bd9Sstevel@tonic-gate switch (arg) { 18387c478bd9Sstevel@tonic-gate case RNORM: str = "RNORM"; break; 18397c478bd9Sstevel@tonic-gate case RMSGD: str = "RMSGD"; break; 18407c478bd9Sstevel@tonic-gate case RMSGN: str = "RMSGN"; break; 18417c478bd9Sstevel@tonic-gate } 18427c478bd9Sstevel@tonic-gate 18437c478bd9Sstevel@tonic-gate return (str); 18447c478bd9Sstevel@tonic-gate } 18457c478bd9Sstevel@tonic-gate 18467c478bd9Sstevel@tonic-gate /* bit map of streams events (I_SETSIG & I_GETSIG) */ 18477c478bd9Sstevel@tonic-gate const char * 18487c478bd9Sstevel@tonic-gate strevents(private_t *pri, int arg) 18497c478bd9Sstevel@tonic-gate { 18507c478bd9Sstevel@tonic-gate char *str = pri->code_buf; 18517c478bd9Sstevel@tonic-gate 18527c478bd9Sstevel@tonic-gate if (arg & ~(S_INPUT|S_HIPRI|S_OUTPUT|S_MSG|S_ERROR|S_HANGUP)) 18537c478bd9Sstevel@tonic-gate return ((char *)NULL); 18547c478bd9Sstevel@tonic-gate 18557c478bd9Sstevel@tonic-gate *str = '\0'; 18567c478bd9Sstevel@tonic-gate if (arg & S_INPUT) 18577c478bd9Sstevel@tonic-gate (void) strcat(str, "|S_INPUT"); 18587c478bd9Sstevel@tonic-gate if (arg & S_HIPRI) 18597c478bd9Sstevel@tonic-gate (void) strcat(str, "|S_HIPRI"); 18607c478bd9Sstevel@tonic-gate if (arg & S_OUTPUT) 18617c478bd9Sstevel@tonic-gate (void) strcat(str, "|S_OUTPUT"); 18627c478bd9Sstevel@tonic-gate if (arg & S_MSG) 18637c478bd9Sstevel@tonic-gate (void) strcat(str, "|S_MSG"); 18647c478bd9Sstevel@tonic-gate if (arg & S_ERROR) 18657c478bd9Sstevel@tonic-gate (void) strcat(str, "|S_ERROR"); 18667c478bd9Sstevel@tonic-gate if (arg & S_HANGUP) 18677c478bd9Sstevel@tonic-gate (void) strcat(str, "|S_HANGUP"); 18687c478bd9Sstevel@tonic-gate 18697c478bd9Sstevel@tonic-gate return ((const char *)(str+1)); 18707c478bd9Sstevel@tonic-gate } 18717c478bd9Sstevel@tonic-gate 18727c478bd9Sstevel@tonic-gate const char * 18737c478bd9Sstevel@tonic-gate tiocflush(private_t *pri, int arg) /* bit map passsed by TIOCFLUSH */ 18747c478bd9Sstevel@tonic-gate { 18757c478bd9Sstevel@tonic-gate char *str = pri->code_buf; 18767c478bd9Sstevel@tonic-gate 18777c478bd9Sstevel@tonic-gate if (arg & ~(FREAD|FWRITE)) 18787c478bd9Sstevel@tonic-gate return ((char *)NULL); 18797c478bd9Sstevel@tonic-gate 18807c478bd9Sstevel@tonic-gate *str = '\0'; 18817c478bd9Sstevel@tonic-gate if (arg & FREAD) 18827c478bd9Sstevel@tonic-gate (void) strcat(str, "|FREAD"); 18837c478bd9Sstevel@tonic-gate if (arg & FWRITE) 18847c478bd9Sstevel@tonic-gate (void) strcat(str, "|FWRITE"); 18857c478bd9Sstevel@tonic-gate 18867c478bd9Sstevel@tonic-gate return ((const char *)(str+1)); 18877c478bd9Sstevel@tonic-gate } 18887c478bd9Sstevel@tonic-gate 18897c478bd9Sstevel@tonic-gate const char * 18907c478bd9Sstevel@tonic-gate strflush(int arg) /* streams flush option (I_FLUSH) */ 18917c478bd9Sstevel@tonic-gate { 18927c478bd9Sstevel@tonic-gate const char *str = NULL; 18937c478bd9Sstevel@tonic-gate 18947c478bd9Sstevel@tonic-gate switch (arg) { 18957c478bd9Sstevel@tonic-gate case FLUSHR: str = "FLUSHR"; break; 18967c478bd9Sstevel@tonic-gate case FLUSHW: str = "FLUSHW"; break; 18977c478bd9Sstevel@tonic-gate case FLUSHRW: str = "FLUSHRW"; break; 18987c478bd9Sstevel@tonic-gate } 18997c478bd9Sstevel@tonic-gate 19007c478bd9Sstevel@tonic-gate return (str); 19017c478bd9Sstevel@tonic-gate } 19027c478bd9Sstevel@tonic-gate 19037c478bd9Sstevel@tonic-gate #define ALL_MOUNT_FLAGS (MS_RDONLY|MS_FSS|MS_DATA|MS_NOSUID|MS_REMOUNT| \ 19047c478bd9Sstevel@tonic-gate MS_NOTRUNC|MS_OVERLAY|MS_OPTIONSTR|MS_GLOBAL|MS_FORCE|MS_NOMNTTAB) 19057c478bd9Sstevel@tonic-gate 19067c478bd9Sstevel@tonic-gate const char * 19077c478bd9Sstevel@tonic-gate mountflags(private_t *pri, int arg) /* bit map of mount syscall flags */ 19087c478bd9Sstevel@tonic-gate { 19097c478bd9Sstevel@tonic-gate char *str = pri->code_buf; 19107c478bd9Sstevel@tonic-gate size_t used = 0; 19117c478bd9Sstevel@tonic-gate 19127c478bd9Sstevel@tonic-gate if (arg & ~ALL_MOUNT_FLAGS) 19137c478bd9Sstevel@tonic-gate return ((char *)NULL); 19147c478bd9Sstevel@tonic-gate 19157c478bd9Sstevel@tonic-gate *str = '\0'; 19167c478bd9Sstevel@tonic-gate if (arg & MS_RDONLY) 19177c478bd9Sstevel@tonic-gate used = strlcat(str, "|MS_RDONLY", sizeof (pri->code_buf)); 19187c478bd9Sstevel@tonic-gate if (arg & MS_FSS) 19197c478bd9Sstevel@tonic-gate used = strlcat(str, "|MS_FSS", sizeof (pri->code_buf)); 19207c478bd9Sstevel@tonic-gate if (arg & MS_DATA) 19217c478bd9Sstevel@tonic-gate used = strlcat(str, "|MS_DATA", sizeof (pri->code_buf)); 19227c478bd9Sstevel@tonic-gate if (arg & MS_NOSUID) 19237c478bd9Sstevel@tonic-gate used = strlcat(str, "|MS_NOSUID", sizeof (pri->code_buf)); 19247c478bd9Sstevel@tonic-gate if (arg & MS_REMOUNT) 19257c478bd9Sstevel@tonic-gate used = strlcat(str, "|MS_REMOUNT", sizeof (pri->code_buf)); 19267c478bd9Sstevel@tonic-gate if (arg & MS_NOTRUNC) 19277c478bd9Sstevel@tonic-gate used = strlcat(str, "|MS_NOTRUNC", sizeof (pri->code_buf)); 19287c478bd9Sstevel@tonic-gate if (arg & MS_OVERLAY) 19297c478bd9Sstevel@tonic-gate used = strlcat(str, "|MS_OVERLAY", sizeof (pri->code_buf)); 19307c478bd9Sstevel@tonic-gate if (arg & MS_OPTIONSTR) 19317c478bd9Sstevel@tonic-gate used = strlcat(str, "|MS_OPTIONSTR", sizeof (pri->code_buf)); 19327c478bd9Sstevel@tonic-gate if (arg & MS_GLOBAL) 19337c478bd9Sstevel@tonic-gate used = strlcat(str, "|MS_GLOBAL", sizeof (pri->code_buf)); 19347c478bd9Sstevel@tonic-gate if (arg & MS_FORCE) 19357c478bd9Sstevel@tonic-gate used = strlcat(str, "|MS_FORCE", sizeof (pri->code_buf)); 19367c478bd9Sstevel@tonic-gate if (arg & MS_NOMNTTAB) 19377c478bd9Sstevel@tonic-gate used = strlcat(str, "|MS_NOMNTTAB", sizeof (pri->code_buf)); 19387c478bd9Sstevel@tonic-gate 19397c478bd9Sstevel@tonic-gate if (used == 0 || used >= sizeof (pri->code_buf)) 19407c478bd9Sstevel@tonic-gate return ((char *)NULL); /* use prt_hex() */ 19417c478bd9Sstevel@tonic-gate 19427c478bd9Sstevel@tonic-gate return ((const char *)(str+1)); 19437c478bd9Sstevel@tonic-gate } 19447c478bd9Sstevel@tonic-gate 19457c478bd9Sstevel@tonic-gate const char * 19467c478bd9Sstevel@tonic-gate svfsflags(private_t *pri, ulong_t arg) /* bit map of statvfs syscall flags */ 19477c478bd9Sstevel@tonic-gate { 19487c478bd9Sstevel@tonic-gate char *str = pri->code_buf; 19497c478bd9Sstevel@tonic-gate 19507c478bd9Sstevel@tonic-gate if (arg & ~(ST_RDONLY|ST_NOSUID|ST_NOTRUNC)) { 19517c478bd9Sstevel@tonic-gate (void) sprintf(str, "0x%lx", arg); 19527c478bd9Sstevel@tonic-gate return (str); 19537c478bd9Sstevel@tonic-gate } 19547c478bd9Sstevel@tonic-gate *str = '\0'; 19557c478bd9Sstevel@tonic-gate if (arg & ST_RDONLY) 19567c478bd9Sstevel@tonic-gate (void) strcat(str, "|ST_RDONLY"); 19577c478bd9Sstevel@tonic-gate if (arg & ST_NOSUID) 19587c478bd9Sstevel@tonic-gate (void) strcat(str, "|ST_NOSUID"); 19597c478bd9Sstevel@tonic-gate if (arg & ST_NOTRUNC) 19607c478bd9Sstevel@tonic-gate (void) strcat(str, "|ST_NOTRUNC"); 19617c478bd9Sstevel@tonic-gate if (*str == '\0') 19627c478bd9Sstevel@tonic-gate (void) strcat(str, "|0"); 19637c478bd9Sstevel@tonic-gate return ((const char *)(str+1)); 19647c478bd9Sstevel@tonic-gate } 19657c478bd9Sstevel@tonic-gate 19667c478bd9Sstevel@tonic-gate const char * 19677c478bd9Sstevel@tonic-gate fuiname(int arg) /* fusers() input argument */ 19687c478bd9Sstevel@tonic-gate { 19697c478bd9Sstevel@tonic-gate const char *str = NULL; 19707c478bd9Sstevel@tonic-gate 19717c478bd9Sstevel@tonic-gate switch (arg) { 19727c478bd9Sstevel@tonic-gate case F_FILE_ONLY: str = "F_FILE_ONLY"; break; 19737c478bd9Sstevel@tonic-gate case F_CONTAINED: str = "F_CONTAINED"; break; 19747c478bd9Sstevel@tonic-gate } 19757c478bd9Sstevel@tonic-gate 19767c478bd9Sstevel@tonic-gate return (str); 19777c478bd9Sstevel@tonic-gate } 19787c478bd9Sstevel@tonic-gate 19797c478bd9Sstevel@tonic-gate const char * 19807c478bd9Sstevel@tonic-gate fuflags(private_t *pri, int arg) /* fusers() output flags */ 19817c478bd9Sstevel@tonic-gate { 19827c478bd9Sstevel@tonic-gate char *str = pri->code_buf; 19837c478bd9Sstevel@tonic-gate 19847c478bd9Sstevel@tonic-gate if (arg & ~(F_CDIR|F_RDIR|F_TEXT|F_MAP|F_OPEN|F_TRACE|F_TTY)) { 19857c478bd9Sstevel@tonic-gate (void) sprintf(str, "0x%x", arg); 19867c478bd9Sstevel@tonic-gate return (str); 19877c478bd9Sstevel@tonic-gate } 19887c478bd9Sstevel@tonic-gate *str = '\0'; 19897c478bd9Sstevel@tonic-gate if (arg & F_CDIR) 19907c478bd9Sstevel@tonic-gate (void) strcat(str, "|F_CDIR"); 19917c478bd9Sstevel@tonic-gate if (arg & F_RDIR) 19927c478bd9Sstevel@tonic-gate (void) strcat(str, "|F_RDIR"); 19937c478bd9Sstevel@tonic-gate if (arg & F_TEXT) 19947c478bd9Sstevel@tonic-gate (void) strcat(str, "|F_TEXT"); 19957c478bd9Sstevel@tonic-gate if (arg & F_MAP) 19967c478bd9Sstevel@tonic-gate (void) strcat(str, "|F_MAP"); 19977c478bd9Sstevel@tonic-gate if (arg & F_OPEN) 19987c478bd9Sstevel@tonic-gate (void) strcat(str, "|F_OPEN"); 19997c478bd9Sstevel@tonic-gate if (arg & F_TRACE) 20007c478bd9Sstevel@tonic-gate (void) strcat(str, "|F_TRACE"); 20017c478bd9Sstevel@tonic-gate if (arg & F_TTY) 20027c478bd9Sstevel@tonic-gate (void) strcat(str, "|F_TTY"); 20037c478bd9Sstevel@tonic-gate if (*str == '\0') 20047c478bd9Sstevel@tonic-gate (void) strcat(str, "|0"); 20057c478bd9Sstevel@tonic-gate return ((const char *)(str+1)); 20067c478bd9Sstevel@tonic-gate } 20077c478bd9Sstevel@tonic-gate 20087c478bd9Sstevel@tonic-gate 20097c478bd9Sstevel@tonic-gate const char * 20107c478bd9Sstevel@tonic-gate ipprotos(int arg) /* IP protocols cf. netinet/in.h */ 20117c478bd9Sstevel@tonic-gate { 20127c478bd9Sstevel@tonic-gate switch (arg) { 20137c478bd9Sstevel@tonic-gate case IPPROTO_IP: return ("IPPROTO_IP"); 20147c478bd9Sstevel@tonic-gate case IPPROTO_ICMP: return ("IPPROTO_ICMP"); 20157c478bd9Sstevel@tonic-gate case IPPROTO_IGMP: return ("IPPROTO_IGMP"); 20167c478bd9Sstevel@tonic-gate case IPPROTO_GGP: return ("IPPROTO_GGP"); 20177c478bd9Sstevel@tonic-gate case IPPROTO_ENCAP: return ("IPPROTO_ENCAP"); 20187c478bd9Sstevel@tonic-gate case IPPROTO_TCP: return ("IPPROTO_TCP"); 20197c478bd9Sstevel@tonic-gate case IPPROTO_EGP: return ("IPPROTO_EGP"); 20207c478bd9Sstevel@tonic-gate case IPPROTO_PUP: return ("IPPROTO_PUP"); 20217c478bd9Sstevel@tonic-gate case IPPROTO_UDP: return ("IPPROTO_UDP"); 20227c478bd9Sstevel@tonic-gate case IPPROTO_IDP: return ("IPPROTO_IDP"); 20237c478bd9Sstevel@tonic-gate case IPPROTO_IPV6: return ("IPPROTO_IPV6"); 20247c478bd9Sstevel@tonic-gate case IPPROTO_ROUTING: return ("IPPROTO_ROUTING"); 20257c478bd9Sstevel@tonic-gate case IPPROTO_FRAGMENT: return ("IPPROTO_FRAGMENT"); 20267c478bd9Sstevel@tonic-gate case IPPROTO_RSVP: return ("IPPROTO_RSVP"); 20277c478bd9Sstevel@tonic-gate case IPPROTO_ESP: return ("IPPROTO_ESP"); 20287c478bd9Sstevel@tonic-gate case IPPROTO_AH: return ("IPPROTO_AH"); 20297c478bd9Sstevel@tonic-gate case IPPROTO_ICMPV6: return ("IPPROTO_ICMPV6"); 20307c478bd9Sstevel@tonic-gate case IPPROTO_NONE: return ("IPPROTO_NONE"); 20317c478bd9Sstevel@tonic-gate case IPPROTO_DSTOPTS: return ("IPPROTO_DSTOPTS"); 20327c478bd9Sstevel@tonic-gate case IPPROTO_HELLO: return ("IPPROTO_HELLO"); 20337c478bd9Sstevel@tonic-gate case IPPROTO_ND: return ("IPPROTO_ND"); 20347c478bd9Sstevel@tonic-gate case IPPROTO_EON: return ("IPPROTO_EON"); 20357c478bd9Sstevel@tonic-gate case IPPROTO_PIM: return ("IPPROTO_PIM"); 20367c478bd9Sstevel@tonic-gate case IPPROTO_SCTP: return ("IPPROTO_SCTP"); 20377c478bd9Sstevel@tonic-gate case IPPROTO_RAW: return ("IPPROTO_RAW"); 20387c478bd9Sstevel@tonic-gate default: return (NULL); 20397c478bd9Sstevel@tonic-gate } 20407c478bd9Sstevel@tonic-gate } 2041