1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 27 /* All Rights Reserved */ 28 29 30 #include <stdio.h> 31 #include <stdlib.h> 32 #include <unistd.h> 33 #include <sys/types.h> 34 #include <libproc.h> 35 36 #include <ctype.h> 37 #include <string.h> 38 #include <sys/dlpi.h> 39 #include <sys/ipc.h> 40 #include <sys/ipc_impl.h> 41 #include <sys/msg.h> 42 #include <sys/sem.h> 43 #include <sys/shm.h> 44 #include <sys/fstyp.h> 45 #if defined(__i386) || defined(__amd64) 46 #include <sys/sysi86.h> 47 #endif /* __i386 */ 48 #include <sys/unistd.h> 49 #include <sys/file.h> 50 #include <sys/tiuser.h> 51 #include <sys/timod.h> 52 #include <sys/stream.h> 53 #include <sys/stropts.h> 54 #include <sys/termios.h> 55 #include <sys/termiox.h> 56 #include <sys/jioctl.h> 57 #include <sys/filio.h> 58 #include <fcntl.h> 59 #include <sys/termio.h> 60 #include <sys/stermio.h> 61 #include <sys/ttold.h> 62 #include <sys/lock.h> 63 #include <sys/mount.h> 64 #include <sys/utssys.h> 65 #include <sys/sysconfig.h> 66 #include <sys/statvfs.h> 67 #include <sys/kstat.h> 68 #include <sys/audio.h> 69 #include <sys/mixer.h> 70 #include <sys/cpc_impl.h> 71 #include <sys/devpoll.h> 72 #include <sys/strredir.h> 73 #include <sys/sockio.h> 74 #include <netinet/ip_mroute.h> 75 #include <net/if.h> 76 #include <net/if_arp.h> 77 #include <sys/ptyvar.h> 78 #include <sys/des.h> 79 #include <sys/prnio.h> 80 #include <sys/dtrace.h> 81 #include <sys/crypto/ioctladmin.h> 82 #include <sys/crypto/ioctl.h> 83 #include <sys/kbio.h> 84 #include <sys/ptms.h> 85 #include <sys/aggr.h> 86 #include <sys/dld.h> 87 #include <net/simnet.h> 88 #include <sys/vnic.h> 89 #include <sys/fs/zfs.h> 90 #include <inet/kssl/kssl.h> 91 #include <sys/dkio.h> 92 #include <sys/fdio.h> 93 #include <sys/cdio.h> 94 #include <sys/scsi/impl/uscsi.h> 95 #include <sys/devinfo_impl.h> 96 #include <sys/dumpadm.h> 97 #include <sys/mntio.h> 98 #include <inet/iptun.h> 99 #include <sys/zcons.h> 100 #include <sys/usb/clients/hid/hid.h> 101 #include <sys/pm.h> 102 #include <sys/soundcard.h> 103 104 #include "ramdata.h" 105 #include "proto.h" 106 107 #define FCNTLMIN F_DUPFD 108 #define FCNTLMAX F_BADFD 109 const char *const FCNTLname[] = { 110 "F_DUPFD", 111 "F_GETFD", 112 "F_SETFD", 113 "F_GETFL", 114 "F_SETFL", 115 "F_O_GETLK", 116 "F_SETLK", 117 "F_SETLKW", 118 "F_CHKFL", 119 "F_DUP2FD", 120 "F_ALLOCSP", 121 "F_FREESP", 122 NULL, /* 12 */ 123 NULL, /* 13 */ 124 "F_GETLK", 125 NULL, /* 15 */ 126 NULL, /* 16 */ 127 NULL, /* 17 */ 128 NULL, /* 18 */ 129 NULL, /* 19 */ 130 NULL, /* 20 */ 131 NULL, /* 21 */ 132 NULL, /* 22 */ 133 "F_GETOWN", 134 "F_SETOWN", 135 "F_REVOKE", 136 "F_HASREMOTELOCKS", 137 "F_FREESP64", 138 NULL, /* 28 */ 139 NULL, /* 29 */ 140 NULL, /* 30 */ 141 NULL, /* 31 */ 142 NULL, /* 32 */ 143 "F_GETLK64", 144 "F_SETLK64", 145 "F_SETLKW64", 146 NULL, /* 36 */ 147 NULL, /* 37 */ 148 NULL, /* 38 */ 149 NULL, /* 39 */ 150 "F_SHARE", 151 "F_UNSHARE", 152 "F_SETLK_NBMAND", 153 "F_SHARE_NBMAND", 154 "F_SETLK64_NBMAND", 155 NULL, /* 45 */ 156 "F_BADFD" 157 }; 158 159 #define SYSFSMIN GETFSIND 160 #define SYSFSMAX GETNFSTYP 161 const char *const SYSFSname[] = { 162 "GETFSIND", 163 "GETFSTYP", 164 "GETNFSTYP" 165 }; 166 167 #define PLOCKMIN UNLOCK 168 #define PLOCKMAX DATLOCK 169 const char *const PLOCKname[] = { 170 "UNLOCK", 171 "PROCLOCK", 172 "TXTLOCK", 173 NULL, 174 "DATLOCK" 175 }; 176 177 #define SCONFMIN _CONFIG_NGROUPS 178 #define SCONFMAX _CONFIG_EPHID_MAX 179 const char *const SCONFname[] = { 180 "_CONFIG_NGROUPS", /* 2 */ 181 "_CONFIG_CHILD_MAX", /* 3 */ 182 "_CONFIG_OPEN_FILES", /* 4 */ 183 "_CONFIG_POSIX_VER", /* 5 */ 184 "_CONFIG_PAGESIZE", /* 6 */ 185 "_CONFIG_CLK_TCK", /* 7 */ 186 "_CONFIG_XOPEN_VER", /* 8 */ 187 "_CONFIG_HRESCLK_TCK", /* 9 */ 188 "_CONFIG_PROF_TCK", /* 10 */ 189 "_CONFIG_NPROC_CONF", /* 11 */ 190 "_CONFIG_NPROC_ONLN", /* 12 */ 191 "_CONFIG_AIO_LISTIO_MAX", /* 13 */ 192 "_CONFIG_AIO_MAX", /* 14 */ 193 "_CONFIG_AIO_PRIO_DELTA_MAX", /* 15 */ 194 "_CONFIG_DELAYTIMER_MAX", /* 16 */ 195 "_CONFIG_MQ_OPEN_MAX", /* 17 */ 196 "_CONFIG_MQ_PRIO_MAX", /* 18 */ 197 "_CONFIG_RTSIG_MAX", /* 19 */ 198 "_CONFIG_SEM_NSEMS_MAX", /* 20 */ 199 "_CONFIG_SEM_VALUE_MAX", /* 21 */ 200 "_CONFIG_SIGQUEUE_MAX", /* 22 */ 201 "_CONFIG_SIGRT_MIN", /* 23 */ 202 "_CONFIG_SIGRT_MAX", /* 24 */ 203 "_CONFIG_TIMER_MAX", /* 25 */ 204 "_CONFIG_PHYS_PAGES", /* 26 */ 205 "_CONFIG_AVPHYS_PAGES", /* 27 */ 206 "_CONFIG_COHERENCY", /* 28 */ 207 "_CONFIG_SPLIT_CACHE", /* 29 */ 208 "_CONFIG_ICACHESZ", /* 30 */ 209 "_CONFIG_DCACHESZ", /* 31 */ 210 "_CONFIG_ICACHELINESZ", /* 32 */ 211 "_CONFIG_DCACHELINESZ", /* 33 */ 212 "_CONFIG_ICACHEBLKSZ", /* 34 */ 213 "_CONFIG_DCACHEBLKSZ", /* 35 */ 214 "_CONFIG_DCACHETBLKSZ", /* 36 */ 215 "_CONFIG_ICACHE_ASSOC", /* 37 */ 216 "_CONFIG_DCACHE_ASSOC", /* 38 */ 217 NULL, /* 39 */ 218 NULL, /* 40 */ 219 NULL, /* 41 */ 220 "_CONFIG_MAXPID", /* 42 */ 221 "_CONFIG_STACK_PROT", /* 43 */ 222 "_CONFIG_NPROC_MAX", /* 44 */ 223 "_CONFIG_CPUID_MAX", /* 45 */ 224 "_CONFIG_SYMLOOP_MAX", /* 46 */ 225 "_CONFIG_EPHID_MAX", /* 47 */ 226 }; 227 228 #define PATHCONFMIN _PC_LINK_MAX 229 #define PATHCONFMAX _PC_XATTR_EXISTS 230 const char *const PATHCONFname[] = { 231 "_PC_LINK_MAX", /* 1 */ 232 "_PC_MAX_CANON", /* 2 */ 233 "_PC_MAX_INPUT", /* 3 */ 234 "_PC_NAME_MAX", /* 4 */ 235 "_PC_PATH_MAX", /* 5 */ 236 "_PC_PIPE_BUF", /* 6 */ 237 "_PC_NO_TRUNC", /* 7 */ 238 "_PC_VDISABLE", /* 8 */ 239 "_PC_CHOWN_RESTRICTED", /* 9 */ 240 "_PC_ASYNC_IO", /* 10 */ 241 "_PC_PRIO_IO", /* 11 */ 242 "_PC_SYNC_IO", /* 12 */ 243 "_PC_ALLOC_SIZE_MIN", /* 13 */ 244 "_PC_REC_INCR_XFER_SIZE", /* 14 */ 245 "_PC_REC_MAX_XFER_SIZE", /* 15 */ 246 "_PC_REC_MIN_XFER_SIZE", /* 16 */ 247 "_PC_REC_XFER_ALIGN", /* 17 */ 248 "_PC_SYMLINK_MAX", /* 18 */ 249 "_PC_2_SYMLINKS", /* 19 */ 250 "_PC_ACL_ENABLED", /* 20 */ 251 "_PC_MIN_HOLE_SIZE", /* 21 */ 252 "_PC_CASE_BEHAVIOR", /* 22 */ 253 "_PC_SATTR_ENABLED", /* 23 */ 254 "_PC_SATTR_EXISTS", /* 24 */ 255 "_PC_ACCESS_FILTERING", /* 25 */ 256 "_PC_TIMESTAMP_RESOLUTION", /* 26 */ 257 NULL, /* 27 */ 258 NULL, /* 28 */ 259 NULL, /* 29 */ 260 NULL, /* 30 */ 261 NULL, /* 31 */ 262 NULL, /* 32 */ 263 NULL, /* 33 */ 264 NULL, /* 34 */ 265 NULL, /* 35 */ 266 NULL, /* 36 */ 267 NULL, /* 37 */ 268 NULL, /* 38 */ 269 NULL, /* 39 */ 270 NULL, /* 40 */ 271 NULL, /* 41 */ 272 NULL, /* 42 */ 273 NULL, /* 43 */ 274 NULL, /* 44 */ 275 NULL, /* 45 */ 276 NULL, /* 46 */ 277 NULL, /* 47 */ 278 NULL, /* 48 */ 279 NULL, /* 49 */ 280 NULL, /* 50 */ 281 NULL, /* 51 */ 282 NULL, /* 52 */ 283 NULL, /* 53 */ 284 NULL, /* 54 */ 285 NULL, /* 55 */ 286 NULL, /* 56 */ 287 NULL, /* 57 */ 288 NULL, /* 58 */ 289 NULL, /* 59 */ 290 NULL, /* 60 */ 291 NULL, /* 61 */ 292 NULL, /* 62 */ 293 NULL, /* 63 */ 294 NULL, /* 64 */ 295 NULL, /* 65 */ 296 NULL, /* 66 */ 297 "_PC_FILESIZEBITS", /* 67 */ 298 NULL, /* 68 */ 299 NULL, /* 69 */ 300 NULL, /* 70 */ 301 NULL, /* 71 */ 302 NULL, /* 72 */ 303 NULL, /* 73 */ 304 NULL, /* 74 */ 305 NULL, /* 75 */ 306 NULL, /* 76 */ 307 NULL, /* 77 */ 308 NULL, /* 78 */ 309 NULL, /* 79 */ 310 NULL, /* 80 */ 311 NULL, /* 81 */ 312 NULL, /* 82 */ 313 NULL, /* 83 */ 314 NULL, /* 84 */ 315 NULL, /* 85 */ 316 NULL, /* 86 */ 317 NULL, /* 87 */ 318 NULL, /* 88 */ 319 NULL, /* 89 */ 320 NULL, /* 90 */ 321 NULL, /* 91 */ 322 NULL, /* 92 */ 323 NULL, /* 93 */ 324 NULL, /* 94 */ 325 NULL, /* 95 */ 326 NULL, /* 96 */ 327 NULL, /* 97 */ 328 NULL, /* 98 */ 329 NULL, /* 99 */ 330 "_PC_XATTR_ENABLED", /* 100 */ 331 "_PC_XATTR_EXISTS", /* 101, _PC_LAST */ 332 }; 333 334 const struct ioc { 335 uint_t code; 336 const char *name; 337 const char *datastruct; 338 } ioc[] = { 339 { (uint_t)TCGETA, "TCGETA", NULL }, 340 { (uint_t)TCSETA, "TCSETA", NULL }, 341 { (uint_t)TCSETAW, "TCSETAW", NULL }, 342 { (uint_t)TCSETAF, "TCSETAF", NULL }, 343 { (uint_t)TCFLSH, "TCFLSH", NULL }, 344 { (uint_t)TIOCKBON, "TIOCKBON", NULL }, 345 { (uint_t)TIOCKBOF, "TIOCKBOF", NULL }, 346 { (uint_t)KBENABLED, "KBENABLED", NULL }, 347 { (uint_t)TCGETS, "TCGETS", NULL }, 348 { (uint_t)TCSETS, "TCSETS", NULL }, 349 { (uint_t)TCSETSW, "TCSETSW", NULL }, 350 { (uint_t)TCSETSF, "TCSETSF", NULL }, 351 { (uint_t)TCXONC, "TCXONC", NULL }, 352 { (uint_t)TCSBRK, "TCSBRK", NULL }, 353 { (uint_t)TCDSET, "TCDSET", NULL }, 354 { (uint_t)RTS_TOG, "RTS_TOG", NULL }, 355 { (uint_t)TIOCSWINSZ, "TIOCSWINSZ", NULL }, 356 { (uint_t)TIOCGWINSZ, "TIOCGWINSZ", NULL }, 357 { (uint_t)TIOCGETD, "TIOCGETD", NULL }, 358 { (uint_t)TIOCSETD, "TIOCSETD", NULL }, 359 { (uint_t)TIOCHPCL, "TIOCHPCL", NULL }, 360 { (uint_t)TIOCGETP, "TIOCGETP", NULL }, 361 { (uint_t)TIOCSETP, "TIOCSETP", NULL }, 362 { (uint_t)TIOCSETN, "TIOCSETN", NULL }, 363 { (uint_t)TIOCEXCL, "TIOCEXCL", NULL }, 364 { (uint_t)TIOCNXCL, "TIOCNXCL", NULL }, 365 { (uint_t)TIOCFLUSH, "TIOCFLUSH", NULL }, 366 { (uint_t)TIOCSETC, "TIOCSETC", NULL }, 367 { (uint_t)TIOCGETC, "TIOCGETC", NULL }, 368 { (uint_t)TIOCGPGRP, "TIOCGPGRP", NULL }, 369 { (uint_t)TIOCSPGRP, "TIOCSPGRP", NULL }, 370 { (uint_t)TIOCGSID, "TIOCGSID", NULL }, 371 { (uint_t)TIOCSTI, "TIOCSTI", NULL }, 372 { (uint_t)TIOCMSET, "TIOCMSET", NULL }, 373 { (uint_t)TIOCMBIS, "TIOCMBIS", NULL }, 374 { (uint_t)TIOCMBIC, "TIOCMBIC", NULL }, 375 { (uint_t)TIOCMGET, "TIOCMGET", NULL }, 376 { (uint_t)TIOCREMOTE, "TIOCREMOTE", NULL }, 377 { (uint_t)TIOCSIGNAL, "TIOCSIGNAL", NULL }, 378 { (uint_t)TIOCSTART, "TIOCSTART", NULL }, 379 { (uint_t)TIOCSTOP, "TIOCSTOP", NULL }, 380 { (uint_t)TIOCNOTTY, "TIOCNOTTY", NULL }, 381 { (uint_t)TIOCSCTTY, "TIOCSCTTY", NULL }, 382 { (uint_t)TIOCOUTQ, "TIOCOUTQ", NULL }, 383 { (uint_t)TIOCGLTC, "TIOCGLTC", NULL }, 384 { (uint_t)TIOCSLTC, "TIOCSLTC", NULL }, 385 { (uint_t)TIOCCDTR, "TIOCCDTR", NULL }, 386 { (uint_t)TIOCSDTR, "TIOCSDTR", NULL }, 387 { (uint_t)TIOCCBRK, "TIOCCBRK", NULL }, 388 { (uint_t)TIOCSBRK, "TIOCSBRK", NULL }, 389 { (uint_t)TIOCLGET, "TIOCLGET", NULL }, 390 { (uint_t)TIOCLSET, "TIOCLSET", NULL }, 391 { (uint_t)TIOCLBIC, "TIOCLBIC", NULL }, 392 { (uint_t)TIOCLBIS, "TIOCLBIS", NULL }, 393 394 { (uint_t)TIOCSILOOP, "TIOCSILOOP", NULL }, 395 { (uint_t)TIOCCILOOP, "TIOCSILOOP", NULL }, 396 397 { (uint_t)TIOCSETLD, "TIOCSETLD", NULL }, 398 { (uint_t)TIOCGETLD, "TIOCGETLD", NULL }, 399 400 { (uint_t)TIOCGPPS, "TIOCGPPS", NULL }, 401 { (uint_t)TIOCSPPS, "TIOCSPPS", NULL }, 402 { (uint_t)TIOCGPPSEV, "TIOCGPPSEV", NULL }, 403 404 { (uint_t)TIOCPKT, "TIOCPKT", NULL }, /* ptyvar.h */ 405 { (uint_t)TIOCUCNTL, "TIOCUCNTL", NULL }, 406 { (uint_t)TIOCTCNTL, "TIOCTCNTL", NULL }, 407 { (uint_t)TIOCISPACE, "TIOCISPACE", NULL }, 408 { (uint_t)TIOCISIZE, "TIOCISIZE", NULL }, 409 { (uint_t)TIOCSSIZE, "TIOCSSIZE", "ttysize" }, 410 { (uint_t)TIOCGSIZE, "TIOCGSIZE", "ttysize" }, 411 412 /* 413 * Unfortunately, the DLIOC and LDIOC codes overlap. Since the LDIOC 414 * ioctls (for xenix compatibility) are far less likely to be used, we 415 * give preference to DLIOC. 416 */ 417 { (uint_t)DLIOCRAW, "DLIOCRAW", NULL }, 418 { (uint_t)DLIOCNATIVE, "DLIOCNATIVE", NULL }, 419 { (uint_t)DLIOCIPNETINFO, "DLIOCIPNETINFO", NULL}, 420 { (uint_t)DLIOCLOWLINK, "DLIOCLOWLINK", NULL }, 421 422 { (uint_t)LDOPEN, "LDOPEN", NULL }, 423 { (uint_t)LDCLOSE, "LDCLOSE", NULL }, 424 { (uint_t)LDCHG, "LDCHG", NULL }, 425 { (uint_t)LDGETT, "LDGETT", NULL }, 426 { (uint_t)LDSETT, "LDSETT", NULL }, 427 { (uint_t)LDSMAP, "LDSMAP", NULL }, 428 { (uint_t)LDGMAP, "LDGMAP", NULL }, 429 { (uint_t)LDNMAP, "LDNMAP", NULL }, 430 { (uint_t)TCGETX, "TCGETX", NULL }, 431 { (uint_t)TCSETX, "TCSETX", NULL }, 432 { (uint_t)TCSETXW, "TCSETXW", NULL }, 433 { (uint_t)TCSETXF, "TCSETXF", NULL }, 434 { (uint_t)FIORDCHK, "FIORDCHK", NULL }, 435 { (uint_t)FIOCLEX, "FIOCLEX", NULL }, 436 { (uint_t)FIONCLEX, "FIONCLEX", NULL }, 437 { (uint_t)FIONREAD, "FIONREAD", NULL }, 438 { (uint_t)FIONBIO, "FIONBIO", NULL }, 439 { (uint_t)FIOASYNC, "FIOASYNC", NULL }, 440 { (uint_t)FIOSETOWN, "FIOSETOWN", NULL }, 441 { (uint_t)FIOGETOWN, "FIOGETOWN", NULL }, 442 #ifdef DIOCGETP 443 { (uint_t)DIOCGETP, "DIOCGETP", NULL }, 444 { (uint_t)DIOCSETP, "DIOCSETP", NULL }, 445 #endif 446 #ifdef DIOCGETC 447 { (uint_t)DIOCGETC, "DIOCGETC", NULL }, 448 { (uint_t)DIOCGETB, "DIOCGETB", NULL }, 449 { (uint_t)DIOCSETE, "DIOCSETE", NULL }, 450 #endif 451 #ifdef IFFORMAT 452 { (uint_t)IFFORMAT, "IFFORMAT", NULL }, 453 { (uint_t)IFBCHECK, "IFBCHECK", NULL }, 454 { (uint_t)IFCONFIRM, "IFCONFIRM", NULL }, 455 #endif 456 #ifdef LIOCGETP 457 { (uint_t)LIOCGETP, "LIOCGETP", NULL }, 458 { (uint_t)LIOCSETP, "LIOCSETP", NULL }, 459 { (uint_t)LIOCGETS, "LIOCGETS", NULL }, 460 { (uint_t)LIOCSETS, "LIOCSETS", NULL }, 461 #endif 462 #ifdef JBOOT 463 { (uint_t)JBOOT, "JBOOT", NULL }, 464 { (uint_t)JTERM, "JTERM", NULL }, 465 { (uint_t)JMPX, "JMPX", NULL }, 466 #ifdef JTIMO 467 { (uint_t)JTIMO, "JTIMO", NULL }, 468 #endif 469 { (uint_t)JWINSIZE, "JWINSIZE", NULL }, 470 { (uint_t)JTIMOM, "JTIMOM", NULL }, 471 { (uint_t)JZOMBOOT, "JZOMBOOT", NULL }, 472 { (uint_t)JAGENT, "JAGENT", NULL }, 473 { (uint_t)JTRUN, "JTRUN", NULL }, 474 { (uint_t)JXTPROTO, "JXTPROTO", NULL }, 475 #endif 476 { (uint_t)KSTAT_IOC_CHAIN_ID, "KSTAT_IOC_CHAIN_ID", NULL }, 477 { (uint_t)KSTAT_IOC_READ, "KSTAT_IOC_READ", NULL }, 478 { (uint_t)KSTAT_IOC_WRITE, "KSTAT_IOC_WRITE", NULL }, 479 { (uint_t)STGET, "STGET", NULL }, 480 { (uint_t)STSET, "STSET", NULL }, 481 { (uint_t)STTHROW, "STTHROW", NULL }, 482 { (uint_t)STWLINE, "STWLINE", NULL }, 483 { (uint_t)STTSV, "STTSV", NULL }, 484 { (uint_t)I_NREAD, "I_NREAD", NULL }, 485 { (uint_t)I_PUSH, "I_PUSH", NULL }, 486 { (uint_t)I_POP, "I_POP", NULL }, 487 { (uint_t)I_LOOK, "I_LOOK", NULL }, 488 { (uint_t)I_FLUSH, "I_FLUSH", NULL }, 489 { (uint_t)I_SRDOPT, "I_SRDOPT", NULL }, 490 { (uint_t)I_GRDOPT, "I_GRDOPT", NULL }, 491 { (uint_t)I_STR, "I_STR", NULL }, 492 { (uint_t)I_SETSIG, "I_SETSIG", NULL }, 493 { (uint_t)I_GETSIG, "I_GETSIG", NULL }, 494 { (uint_t)I_FIND, "I_FIND", NULL }, 495 { (uint_t)I_LINK, "I_LINK", NULL }, 496 { (uint_t)I_UNLINK, "I_UNLINK", NULL }, 497 { (uint_t)I_PEEK, "I_PEEK", NULL }, 498 { (uint_t)I_FDINSERT, "I_FDINSERT", NULL }, 499 { (uint_t)I_SENDFD, "I_SENDFD", NULL }, 500 { (uint_t)I_RECVFD, "I_RECVFD", NULL }, 501 { (uint_t)I_SWROPT, "I_SWROPT", NULL }, 502 { (uint_t)I_GWROPT, "I_GWROPT", NULL }, 503 { (uint_t)I_LIST, "I_LIST", NULL }, 504 { (uint_t)I_PLINK, "I_PLINK", NULL }, 505 { (uint_t)I_PUNLINK, "I_PUNLINK", NULL }, 506 { (uint_t)I_FLUSHBAND, "I_FLUSHBAND", NULL }, 507 { (uint_t)I_CKBAND, "I_CKBAND", NULL }, 508 { (uint_t)I_GETBAND, "I_GETBAND", NULL }, 509 { (uint_t)I_ATMARK, "I_ATMARK", NULL }, 510 { (uint_t)I_SETCLTIME, "I_SETCLTIME", NULL }, 511 { (uint_t)I_GETCLTIME, "I_GETCLTIME", NULL }, 512 { (uint_t)I_CANPUT, "I_CANPUT", NULL }, 513 { (uint_t)I_ANCHOR, "I_ANCHOR", NULL }, 514 { (uint_t)_I_CMD, "_I_CMD", NULL }, 515 #ifdef TI_GETINFO 516 { (uint_t)TI_GETINFO, "TI_GETINFO", NULL }, 517 { (uint_t)TI_OPTMGMT, "TI_OPTMGMT", NULL }, 518 { (uint_t)TI_BIND, "TI_BIND", NULL }, 519 { (uint_t)TI_UNBIND, "TI_UNBIND", NULL }, 520 #endif 521 #ifdef TI_CAPABILITY 522 { (uint_t)TI_CAPABILITY, "TI_CAPABILITY", NULL }, 523 #endif 524 #ifdef TI_GETMYNAME 525 { (uint_t)TI_GETMYNAME, "TI_GETMYNAME", NULL }, 526 { (uint_t)TI_GETPEERNAME, "TI_GETPEERNAME", NULL }, 527 { (uint_t)TI_SETMYNAME, "TI_SETMYNAME", NULL }, 528 { (uint_t)TI_SETPEERNAME, "TI_SETPEERNAME", NULL }, 529 #endif 530 #ifdef V_PREAD 531 { (uint_t)V_PREAD, "V_PREAD", NULL }, 532 { (uint_t)V_PWRITE, "V_PWRITE", NULL }, 533 { (uint_t)V_PDREAD, "V_PDREAD", NULL }, 534 { (uint_t)V_PDWRITE, "V_PDWRITE", NULL }, 535 #if !defined(__i386) && !defined(__amd64) 536 { (uint_t)V_GETSSZ, "V_GETSSZ", NULL }, 537 #endif /* !__i386 */ 538 #endif 539 /* audio */ 540 { (uint_t)AUDIO_GETINFO, "AUDIO_GETINFO", NULL }, 541 { (uint_t)AUDIO_SETINFO, "AUDIO_SETINFO", NULL }, 542 { (uint_t)AUDIO_DRAIN, "AUDIO_DRAIN", NULL }, 543 { (uint_t)AUDIO_GETDEV, "AUDIO_GETDEV", NULL }, 544 { (uint_t)AUDIO_DIAG_LOOPBACK, "AUDIO_DIAG_LOOPBACK", NULL }, 545 { (uint_t)AUDIO_GET_CH_NUMBER, "AUDIO_GET_CH_NUMBER", NULL }, 546 { (uint_t)AUDIO_GET_CH_TYPE, "AUDIO_GET_CH_TYPE", NULL }, 547 { (uint_t)AUDIO_GET_NUM_CHS, "AUDIO_GET_NUM_CHS", NULL }, 548 { (uint_t)AUDIO_GET_AD_DEV, "AUDIO_GET_AD_DEV", NULL }, 549 { (uint_t)AUDIO_GET_APM_DEV, "AUDIO_GET_APM_DEV", NULL }, 550 { (uint_t)AUDIO_GET_AS_DEV, "AUDIO_GET_AS_DEV", NULL }, 551 { (uint_t)AUDIO_MIXER_MULTIPLE_OPEN, "AUDIO_MIXER_MULTIPLE_OPEN", 552 NULL }, 553 { (uint_t)AUDIO_MIXER_SINGLE_OPEN, "AUDIO_MIXER_SINGLE_OPEN", 554 NULL }, 555 { (uint_t)AUDIO_MIXER_GET_SAMPLE_RATES, "AUDIO_MIXER_GET_SAMPLE_RATES", 556 NULL }, 557 { (uint_t)AUDIO_MIXERCTL_GETINFO, "AUDIO_MIXERCTL_GETINFO", 558 NULL }, 559 { (uint_t)AUDIO_MIXERCTL_SETINFO, "AUDIO_MIXERCTL_SETINFO", 560 NULL }, 561 { (uint_t)AUDIO_MIXERCTL_GET_CHINFO, "AUDIO_MIXERCTL_GET_CHINFO", 562 NULL }, 563 { (uint_t)AUDIO_MIXERCTL_SET_CHINFO, "AUDIO_MIXERCTL_SET_CHINFO", 564 NULL }, 565 { (uint_t)AUDIO_MIXERCTL_GET_MODE, "AUDIO_MIXERCTL_GET_MODE", 566 NULL }, 567 { (uint_t)AUDIO_MIXERCTL_SET_MODE, "AUDIO_MIXERCTL_SET_MODE", 568 NULL }, 569 /* new style Boomer (OSS) ioctls */ 570 { (uint_t)SNDCTL_SYSINFO, "SNDCTL_SYSINFO", NULL }, 571 { (uint_t)SNDCTL_AUDIOINFO, "SNDCTL_AUDIOINFO", NULL }, 572 { (uint_t)SNDCTL_AUDIOINFO_EX, "SNDCTL_AUDIOINFO_EX", NULL }, 573 { (uint_t)SNDCTL_MIXERINFO, "SNDCTL_MIXERINFO", NULL }, 574 { (uint_t)SNDCTL_CARDINFO, "SNDCTL_CARDINFO", NULL }, 575 { (uint_t)SNDCTL_ENGINEINFO, "SNDCTL_ENGINEINFO", NULL }, 576 { (uint_t)SNDCTL_MIX_NRMIX, "SNDCTL_MIX_NRMIX", NULL }, 577 { (uint_t)SNDCTL_MIX_NREXT, "SNDCTL_MIX_NREXT", NULL }, 578 { (uint_t)SNDCTL_MIX_EXTINFO, "SNDCTL_MIX_EXTINFO", NULL }, 579 { (uint_t)SNDCTL_MIX_READ, "SNDCTL_MIX_READ", NULL }, 580 { (uint_t)SNDCTL_MIX_WRITE, "SNDCTL_MIX_WRITE", NULL }, 581 { (uint_t)SNDCTL_MIX_ENUMINFO, "SNDCTL_MIX_ENUMINFO", NULL }, 582 { (uint_t)SNDCTL_MIX_DESCRIPTION, "SNDCTL_MIX_DESCRIPTION", 583 NULL }, 584 { (uint_t)SNDCTL_SETSONG, "SNDCTL_SETSONG", NULL }, 585 { (uint_t)SNDCTL_GETSONG, "SNDCTL_GETSONG", NULL }, 586 { (uint_t)SNDCTL_SETNAME, "SNDCTL_SETNAME", NULL }, 587 { (uint_t)SNDCTL_SETLABEL, "SNDCTL_SETLABEL", NULL }, 588 { (uint_t)SNDCTL_GETLABEL, "SNDCTL_GETLABEL", NULL }, 589 { (uint_t)SNDCTL_DSP_HALT, "SNDCTL_DSP_HALT", NULL }, 590 { (uint_t)SNDCTL_DSP_RESET, "SNDCTL_DSP_RESET", NULL }, 591 { (uint_t)SNDCTL_DSP_SYNC, "SNDCTL_DSP_SYNC", NULL }, 592 { (uint_t)SNDCTL_DSP_SPEED, "SNDCTL_DSP_SPEED", NULL }, 593 { (uint_t)SNDCTL_DSP_STEREO, "SNDCTL_DSP_STEREO", NULL }, 594 { (uint_t)SNDCTL_DSP_GETBLKSIZE, "SNDCTL_DSP_GETBLKSIZE", 595 NULL }, 596 { (uint_t)SNDCTL_DSP_SAMPLESIZE, "SNDCTL_DSP_SAMPLESIZE", 597 NULL }, 598 { (uint_t)SNDCTL_DSP_CHANNELS, "SNDCTL_DSP_CHANNELS", NULL }, 599 { (uint_t)SNDCTL_DSP_POST, "SNDCTL_DSP_POST", NULL }, 600 { (uint_t)SNDCTL_DSP_SUBDIVIDE, "SNDCTL_DSP_SUBDIVIDE", NULL }, 601 { (uint_t)SNDCTL_DSP_SETFRAGMENT, "SNDCTL_DSP_SETFRAGMENT", 602 NULL }, 603 { (uint_t)SNDCTL_DSP_GETFMTS, "SNDCTL_DSP_GETFMTS", NULL }, 604 { (uint_t)SNDCTL_DSP_SETFMT, "SNDCTL_DSP_SETFMT", NULL }, 605 { (uint_t)SNDCTL_DSP_GETOSPACE, "SNDCTL_DSP_GETOSPACE", NULL }, 606 { (uint_t)SNDCTL_DSP_GETISPACE, "SNDCTL_DSP_GETISPACE", NULL }, 607 { (uint_t)SNDCTL_DSP_GETCAPS, "SNDCTL_DSP_CAPS", NULL }, 608 { (uint_t)SNDCTL_DSP_GETTRIGGER, "SNDCTL_DSP_GETTRIGGER", 609 NULL }, 610 { (uint_t)SNDCTL_DSP_SETTRIGGER, "SNDCTL_DSP_SETTRIGGER", 611 NULL }, 612 { (uint_t)SNDCTL_DSP_GETIPTR, "SNDCTL_DSP_GETIPTR", NULL }, 613 { (uint_t)SNDCTL_DSP_GETOPTR, "SNDCTL_DSP_GETOPTR", NULL }, 614 { (uint_t)SNDCTL_DSP_SETSYNCRO, "SNDCTL_DSP_SETSYNCRO", NULL }, 615 { (uint_t)SNDCTL_DSP_SETDUPLEX, "SNDCTL_DSP_SETDUPLEX", NULL }, 616 { (uint_t)SNDCTL_DSP_PROFILE, "SNDCTL_DSP_PROFILE", NULL }, 617 { (uint_t)SNDCTL_DSP_GETODELAY, "SNDCTL_DSP_GETODELAY", NULL }, 618 { (uint_t)SNDCTL_DSP_GETPLAYVOL, "SNDCTL_DSP_GETPLAYVOL", 619 NULL }, 620 { (uint_t)SNDCTL_DSP_SETPLAYVOL, "SNDCTL_DSP_SETPLAYVOL", 621 NULL }, 622 { (uint_t)SNDCTL_DSP_GETERROR, "SNDCTL_DSP_GETERROR", NULL }, 623 { (uint_t)SNDCTL_DSP_READCTL, "SNDCTL_DSP_READCTL", NULL }, 624 { (uint_t)SNDCTL_DSP_WRITECTL, "SNDCTL_DSP_WRITECTL", NULL }, 625 { (uint_t)SNDCTL_DSP_SYNCGROUP, "SNDCTL_DSP_SYNCGROUP", NULL }, 626 { (uint_t)SNDCTL_DSP_SYNCSTART, "SNDCTL_DSP_SYNCSTART", NULL }, 627 { (uint_t)SNDCTL_DSP_COOKEDMODE, "SNDCTL_DSP_COOKEDMODE", 628 NULL }, 629 { (uint_t)SNDCTL_DSP_SILENCE, "SNDCTL_DSP_SILENCE", NULL }, 630 { (uint_t)SNDCTL_DSP_SKIP, "SNDCTL_DSP_SKIP", NULL }, 631 { (uint_t)SNDCTL_DSP_HALT_INPUT, "SNDCTL_DSP_HALT_INPUT", 632 NULL }, 633 { (uint_t)SNDCTL_DSP_HALT_OUTPUT, "SNDCTL_DSP_HALT_OUTPUT", 634 NULL }, 635 { (uint_t)SNDCTL_DSP_LOW_WATER, "SNDCTL_DSP_LOW_WATER", NULL }, 636 { (uint_t)SNDCTL_DSP_CURRENT_OPTR, "SNDCTL_DSP_CURRENT_OPTR", 637 NULL }, 638 { (uint_t)SNDCTL_DSP_CURRENT_IPTR, "SNDCTL_DSP_CURRENT_IPTR", 639 NULL }, 640 { (uint_t)SNDCTL_DSP_GET_RECSRC_NAMES, "SNDCTL_DSP_GET_RECSRC_NAMES", 641 NULL }, 642 { (uint_t)SNDCTL_DSP_GET_RECSRC, "SNDCTL_DSP_GET_RECSRC", 643 NULL }, 644 { (uint_t)SNDCTL_DSP_SET_RECSRC, "SNDCTL_DSP_SET_RECSRC", 645 NULL }, 646 { (uint_t)SNDCTL_DSP_GET_PLAYTGT_NAMES, "SNDCTL_DSP_GET_PLAYTGT_NAMES", 647 NULL }, 648 { (uint_t)SNDCTL_DSP_GET_PLAYTGT, "SNDCTL_DSP_GET_PLAYTGT", 649 NULL }, 650 { (uint_t)SNDCTL_DSP_SET_PLAYTGT, "SNDCTL_DSP_SET_PLAYTGT", 651 NULL }, 652 { (uint_t)SNDCTL_DSP_GETRECVOL, "SNDCTL_DSP_GETRECVOL", 653 NULL }, 654 { (uint_t)SNDCTL_DSP_SETRECVOL, "SNDCTL_DSP_SETRECVOL", 655 NULL }, 656 { (uint_t)SNDCTL_DSP_GET_CHNORDER, "SNDCTL_DSP_GET_CHNORDER", 657 NULL }, 658 { (uint_t)SNDCTL_DSP_SET_CHNORDER, "SNDCTL_DSP_SET_CHNORDER", 659 NULL }, 660 { (uint_t)SNDCTL_DSP_GETIPEAKS, "SNDCTL_DSP_GETIPEAKS", NULL }, 661 { (uint_t)SNDCTL_DSP_GETOPEAKS, "SNDCTL_DSP_GETOPEAKS", NULL }, 662 { (uint_t)SNDCTL_DSP_POLICY, "SNDCTL_DSP_POLICY", NULL }, 663 { (uint_t)SNDCTL_DSP_GETCHANNELMASK, "SNDCTL_DSP_GETCHANNELMASK", 664 NULL }, 665 { (uint_t)SNDCTL_DSP_BIND_CHANNEL, "SNDCTL_DSP_BIND_CHANNEL", 666 NULL }, 667 { (uint_t)SOUND_MIXER_READ_VOLUME, "SOUND_MIXER_READ_VOLUME", 668 NULL }, 669 { (uint_t)SOUND_MIXER_READ_OGAIN, "SOUND_MIXER_READ_OGAIN", 670 NULL }, 671 { (uint_t)SOUND_MIXER_READ_PCM, "SOUND_MIXER_READ_PCM", NULL }, 672 { (uint_t)SOUND_MIXER_READ_IGAIN, "SOUND_MIXER_READ_IGAIN", 673 NULL }, 674 { (uint_t)SOUND_MIXER_READ_RECLEV, "SOUND_MIXER_READ_RECLEV", 675 NULL }, 676 { (uint_t)SOUND_MIXER_READ_RECSRC, "SOUND_MIXER_READ_RECSRC", 677 NULL }, 678 { (uint_t)SOUND_MIXER_READ_DEVMASK, "SOUND_MIXER_READ_DEVMASK", 679 NULL }, 680 { (uint_t)SOUND_MIXER_READ_RECMASK, "SOUND_MIXER_READ_RECMASK", 681 NULL }, 682 { (uint_t)SOUND_MIXER_READ_CAPS, "SOUND_MIXER_READ_CAPS", 683 NULL }, 684 { (uint_t)SOUND_MIXER_READ_STEREODEVS, "SOUND_MIXER_READ_STEREODEVS", 685 NULL }, 686 { (uint_t)SOUND_MIXER_READ_RECGAIN, "SOUND_MIXER_READ_RECGAIN", 687 NULL }, 688 { (uint_t)SOUND_MIXER_READ_MONGAIN, "SOUND_MIXER_READ_MONGAIN", 689 NULL }, 690 { (uint_t)SOUND_MIXER_WRITE_VOLUME, "SOUND_MIXER_WRITE_VOLUME", 691 NULL }, 692 { (uint_t)SOUND_MIXER_WRITE_OGAIN, "SOUND_MIXER_WRITE_OGAIN", 693 NULL }, 694 { (uint_t)SOUND_MIXER_WRITE_PCM, "SOUND_MIXER_WRITE_PCM", 695 NULL }, 696 { (uint_t)SOUND_MIXER_WRITE_IGAIN, "SOUND_MIXER_WRITE_IGAIN", 697 NULL }, 698 { (uint_t)SOUND_MIXER_WRITE_RECLEV, "SOUND_MIXER_WRITE_RECLEV", 699 NULL }, 700 { (uint_t)SOUND_MIXER_WRITE_RECSRC, "SOUND_MIXER_WRITE_RECSRC", 701 NULL }, 702 { (uint_t)SOUND_MIXER_WRITE_RECGAIN, "SOUND_MIXER_WRITE_RECGAIN", 703 NULL }, 704 { (uint_t)SOUND_MIXER_WRITE_MONGAIN, "SOUND_MIXER_WRITE_MONGAIN", 705 NULL }, 706 707 /* STREAMS redirection ioctls */ 708 { (uint_t)SRIOCSREDIR, "SRIOCSREDIR", NULL }, 709 { (uint_t)SRIOCISREDIR, "SRIOCISREDIR", NULL }, 710 { (uint_t)CPCIO_BIND, "CPCIO_BIND", NULL }, 711 { (uint_t)CPCIO_SAMPLE, "CPCIO_SAMPLE", NULL }, 712 { (uint_t)CPCIO_RELE, "CPCIO_RELE", NULL }, 713 /* /dev/poll ioctl() control codes */ 714 { (uint_t)DP_POLL, "DP_POLL", NULL }, 715 { (uint_t)DP_ISPOLLED, "DP_ISPOLLED", NULL }, 716 /* the old /proc ioctl() control codes */ 717 #define PIOC ('q'<<8) 718 { (uint_t)(PIOC|1), "PIOCSTATUS", NULL }, 719 { (uint_t)(PIOC|2), "PIOCSTOP", NULL }, 720 { (uint_t)(PIOC|3), "PIOCWSTOP", NULL }, 721 { (uint_t)(PIOC|4), "PIOCRUN", NULL }, 722 { (uint_t)(PIOC|5), "PIOCGTRACE", NULL }, 723 { (uint_t)(PIOC|6), "PIOCSTRACE", NULL }, 724 { (uint_t)(PIOC|7), "PIOCSSIG", NULL }, 725 { (uint_t)(PIOC|8), "PIOCKILL", NULL }, 726 { (uint_t)(PIOC|9), "PIOCUNKILL", NULL }, 727 { (uint_t)(PIOC|10), "PIOCGHOLD", NULL }, 728 { (uint_t)(PIOC|11), "PIOCSHOLD", NULL }, 729 { (uint_t)(PIOC|12), "PIOCMAXSIG", NULL }, 730 { (uint_t)(PIOC|13), "PIOCACTION", NULL }, 731 { (uint_t)(PIOC|14), "PIOCGFAULT", NULL }, 732 { (uint_t)(PIOC|15), "PIOCSFAULT", NULL }, 733 { (uint_t)(PIOC|16), "PIOCCFAULT", NULL }, 734 { (uint_t)(PIOC|17), "PIOCGENTRY", NULL }, 735 { (uint_t)(PIOC|18), "PIOCSENTRY", NULL }, 736 { (uint_t)(PIOC|19), "PIOCGEXIT", NULL }, 737 { (uint_t)(PIOC|20), "PIOCSEXIT", NULL }, 738 { (uint_t)(PIOC|21), "PIOCSFORK", NULL }, 739 { (uint_t)(PIOC|22), "PIOCRFORK", NULL }, 740 { (uint_t)(PIOC|23), "PIOCSRLC", NULL }, 741 { (uint_t)(PIOC|24), "PIOCRRLC", NULL }, 742 { (uint_t)(PIOC|25), "PIOCGREG", NULL }, 743 { (uint_t)(PIOC|26), "PIOCSREG", NULL }, 744 { (uint_t)(PIOC|27), "PIOCGFPREG", NULL }, 745 { (uint_t)(PIOC|28), "PIOCSFPREG", NULL }, 746 { (uint_t)(PIOC|29), "PIOCNICE", NULL }, 747 { (uint_t)(PIOC|30), "PIOCPSINFO", NULL }, 748 { (uint_t)(PIOC|31), "PIOCNMAP", NULL }, 749 { (uint_t)(PIOC|32), "PIOCMAP", NULL }, 750 { (uint_t)(PIOC|33), "PIOCOPENM", NULL }, 751 { (uint_t)(PIOC|34), "PIOCCRED", NULL }, 752 { (uint_t)(PIOC|35), "PIOCGROUPS", NULL }, 753 { (uint_t)(PIOC|36), "PIOCGETPR", NULL }, 754 { (uint_t)(PIOC|37), "PIOCGETU", NULL }, 755 { (uint_t)(PIOC|38), "PIOCSET", NULL }, 756 { (uint_t)(PIOC|39), "PIOCRESET", NULL }, 757 { (uint_t)(PIOC|43), "PIOCUSAGE", NULL }, 758 { (uint_t)(PIOC|44), "PIOCOPENPD", NULL }, 759 { (uint_t)(PIOC|45), "PIOCLWPIDS", NULL }, 760 { (uint_t)(PIOC|46), "PIOCOPENLWP", NULL }, 761 { (uint_t)(PIOC|47), "PIOCLSTATUS", NULL }, 762 { (uint_t)(PIOC|48), "PIOCLUSAGE", NULL }, 763 { (uint_t)(PIOC|49), "PIOCNAUXV", NULL }, 764 { (uint_t)(PIOC|50), "PIOCAUXV", NULL }, 765 { (uint_t)(PIOC|51), "PIOCGXREGSIZE", NULL }, 766 { (uint_t)(PIOC|52), "PIOCGXREG", NULL }, 767 { (uint_t)(PIOC|53), "PIOCSXREG", NULL }, 768 { (uint_t)(PIOC|101), "PIOCGWIN", NULL }, 769 { (uint_t)(PIOC|103), "PIOCNLDT", NULL }, 770 { (uint_t)(PIOC|104), "PIOCLDT", NULL }, 771 772 /* ioctl's applicable on sockets */ 773 { (uint_t)SIOCSHIWAT, "SIOCSHIWAT", NULL }, 774 { (uint_t)SIOCGHIWAT, "SIOCGHIWAT", NULL }, 775 { (uint_t)SIOCSLOWAT, "SIOCSLOWAT", NULL }, 776 { (uint_t)SIOCGLOWAT, "SIOCGLOWAT", NULL }, 777 { (uint_t)SIOCATMARK, "SIOCATMARK", NULL }, 778 { (uint_t)SIOCSPGRP, "SIOCSPGRP", NULL }, 779 { (uint_t)SIOCGPGRP, "SIOCGPGRP", NULL }, 780 { (uint_t)SIOCADDRT, "SIOCADDRT", "rtentry" }, 781 { (uint_t)SIOCDELRT, "SIOCDELRT", "rtentry" }, 782 { (uint_t)SIOCGETVIFCNT, "SIOCGETVIFCNT", "sioc_vif_req" }, 783 { (uint_t)SIOCGETSGCNT, "SIOCGETSGCNT", "sioc_sg_req" }, 784 { (uint_t)SIOCGETLSGCNT, "SIOCGETLSGCNT", "sioc_lsg_req" }, 785 { (uint_t)SIOCSIFADDR, "SIOCSIFADDR", "ifreq" }, 786 { (uint_t)SIOCGIFADDR, "SIOCGIFADDR", "ifreq" }, 787 { (uint_t)SIOCSIFDSTADDR, "SIOCSIFDSTADDR", "ifreq" }, 788 { (uint_t)SIOCGIFDSTADDR, "SIOCGIFDSTADDR", "ifreq" }, 789 { (uint_t)SIOCSIFFLAGS, "SIOCSIFFLAGS", "ifreq" }, 790 { (uint_t)SIOCGIFFLAGS, "SIOCGIFFLAGS", "ifreq" }, 791 { (uint_t)SIOCSIFMEM, "SIOCSIFMEM", "ifreq" }, 792 { (uint_t)SIOCGIFMEM, "SIOCGIFMEM", "ifreq" }, 793 { (uint_t)SIOCGIFCONF, "SIOCGIFCONF", "ifconf" }, 794 { (uint_t)SIOCSIFMTU, "SIOCSIFMTU", "ifreq" }, 795 { (uint_t)SIOCGIFMTU, "SIOCGIFMTU", "ifreq" }, 796 { (uint_t)SIOCGIFBRDADDR, "SIOCGIFBRDADDR", "ifreq" }, 797 { (uint_t)SIOCSIFBRDADDR, "SIOCSIFBRDADDR", "ifreq" }, 798 { (uint_t)SIOCGIFNETMASK, "SIOCGIFNETMASK", "ifreq" }, 799 { (uint_t)SIOCSIFNETMASK, "SIOCSIFNETMASK", "ifreq" }, 800 { (uint_t)SIOCGIFMETRIC, "SIOCGIFMETRIC", "ifreq" }, 801 { (uint_t)SIOCSIFMETRIC, "SIOCSIFMETRIC", "ifreq" }, 802 { (uint_t)SIOCSARP, "SIOCSARP", "arpreq" }, 803 { (uint_t)SIOCGARP, "SIOCGARP", "arpreq" }, 804 { (uint_t)SIOCDARP, "SIOCDARP", "arpreq" }, 805 { (uint_t)SIOCUPPER, "SIOCUPPER", "ifreq" }, 806 { (uint_t)SIOCLOWER, "SIOCLOWER", "ifreq" }, 807 { (uint_t)SIOCSETSYNC, "SIOCSETSYNC", "ifreq" }, 808 { (uint_t)SIOCGETSYNC, "SIOCGETSYNC", "ifreq" }, 809 { (uint_t)SIOCSSDSTATS, "SIOCSSDSTATS", "ifreq" }, 810 { (uint_t)SIOCSSESTATS, "SIOCSSESTATS", "ifreq" }, 811 { (uint_t)SIOCSPROMISC, "SIOCSPROMISC", NULL }, 812 { (uint_t)SIOCADDMULTI, "SIOCADDMULTI", "ifreq" }, 813 { (uint_t)SIOCDELMULTI, "SIOCDELMULTI", "ifreq" }, 814 { (uint_t)SIOCGETNAME, "SIOCGETNAME", "sockaddr" }, 815 { (uint_t)SIOCGETPEER, "SIOCGETPEER", "sockaddr" }, 816 { (uint_t)IF_UNITSEL, "IF_UNITSEL", NULL }, 817 { (uint_t)SIOCXPROTO, "SIOCXPROTO", NULL }, 818 { (uint_t)SIOCIFDETACH, "SIOCIFDETACH", "ifreq" }, 819 { (uint_t)SIOCGENPSTATS, "SIOCGENPSTATS", "ifreq" }, 820 { (uint_t)SIOCX25XMT, "SIOCX25XMT", "ifreq" }, 821 { (uint_t)SIOCX25RCV, "SIOCX25RCV", "ifreq" }, 822 { (uint_t)SIOCX25TBL, "SIOCX25TBL", "ifreq" }, 823 { (uint_t)SIOCSLGETREQ, "SIOCSLGETREQ", "ifreq" }, 824 { (uint_t)SIOCSLSTAT, "SIOCSLSTAT", "ifreq" }, 825 { (uint_t)SIOCSIFNAME, "SIOCSIFNAME", "ifreq" }, 826 { (uint_t)SIOCGENADDR, "SIOCGENADDR", "ifreq" }, 827 { (uint_t)SIOCGIFNUM, "SIOCGIFNUM", NULL }, 828 { (uint_t)SIOCGIFMUXID, "SIOCGIFMUXID", "ifreq" }, 829 { (uint_t)SIOCSIFMUXID, "SIOCSIFMUXID", "ifreq" }, 830 { (uint_t)SIOCGIFINDEX, "SIOCGIFINDEX", "ifreq" }, 831 { (uint_t)SIOCSIFINDEX, "SIOCSIFINDEX", "ifreq" }, 832 { (uint_t)SIOCLIFREMOVEIF, "SIOCLIFREMOVEIF", "lifreq" }, 833 { (uint_t)SIOCLIFADDIF, "SIOCLIFADDIF", "lifreq" }, 834 { (uint_t)SIOCSLIFADDR, "SIOCSLIFADDR", "lifreq" }, 835 { (uint_t)SIOCGLIFADDR, "SIOCGLIFADDR", "lifreq" }, 836 { (uint_t)SIOCSLIFDSTADDR, "SIOCSLIFDSTADDR", "lifreq" }, 837 { (uint_t)SIOCGLIFDSTADDR, "SIOCGLIFDSTADDR", "lifreq" }, 838 { (uint_t)SIOCSLIFFLAGS, "SIOCSLIFFLAGS", "lifreq" }, 839 { (uint_t)SIOCGLIFFLAGS, "SIOCGLIFFLAGS", "lifreq" }, 840 { (uint_t)SIOCGLIFCONF, "SIOCGLIFCONF", "lifconf" }, 841 { (uint_t)SIOCSLIFMTU, "SIOCSLIFMTU", "lifreq" }, 842 { (uint_t)SIOCGLIFMTU, "SIOCGLIFMTU", "lifreq" }, 843 { (uint_t)SIOCGLIFBRDADDR, "SIOCGLIFBRDADDR", "lifreq" }, 844 { (uint_t)SIOCSLIFBRDADDR, "SIOCSLIFBRDADDR", "lifreq" }, 845 { (uint_t)SIOCGLIFNETMASK, "SIOCGLIFNETMASK", "lifreq" }, 846 { (uint_t)SIOCSLIFNETMASK, "SIOCSLIFNETMASK", "lifreq" }, 847 { (uint_t)SIOCGLIFMETRIC, "SIOCGLIFMETRIC", "lifreq" }, 848 { (uint_t)SIOCSLIFMETRIC, "SIOCSLIFMETRIC", "lifreq" }, 849 { (uint_t)SIOCSLIFNAME, "SIOCSLIFNAME", "lifreq" }, 850 { (uint_t)SIOCGLIFNUM, "SIOCGLIFNUM", "lifnum" }, 851 { (uint_t)SIOCGLIFMUXID, "SIOCGLIFMUXID", "lifreq" }, 852 { (uint_t)SIOCSLIFMUXID, "SIOCSLIFMUXID", "lifreq" }, 853 { (uint_t)SIOCGLIFINDEX, "SIOCGLIFINDEX", "lifreq" }, 854 { (uint_t)SIOCSLIFINDEX, "SIOCSLIFINDEX", "lifreq" }, 855 { (uint_t)SIOCSLIFTOKEN, "SIOCSLIFTOKEN", "lifreq" }, 856 { (uint_t)SIOCGLIFTOKEN, "SIOCGLIFTOKEN", "lifreq" }, 857 { (uint_t)SIOCSLIFSUBNET, "SIOCSLIFSUBNET", "lifreq" }, 858 { (uint_t)SIOCGLIFSUBNET, "SIOCGLIFSUBNET", "lifreq" }, 859 { (uint_t)SIOCSLIFLNKINFO, "SIOCSLIFLNKINFO", "lifreq" }, 860 { (uint_t)SIOCGLIFLNKINFO, "SIOCGLIFLNKINFO", "lifreq" }, 861 { (uint_t)SIOCLIFDELND, "SIOCLIFDELND", "lifreq" }, 862 { (uint_t)SIOCLIFGETND, "SIOCLIFGETND", "lifreq" }, 863 { (uint_t)SIOCLIFSETND, "SIOCLIFSETND", "lifreq" }, 864 { (uint_t)SIOCTMYADDR, "SIOCTMYADDR", "sioc_addrreq" }, 865 { (uint_t)SIOCTONLINK, "SIOCTONLINK", "sioc_addrreq" }, 866 { (uint_t)SIOCTMYSITE, "SIOCTMYSITE", "sioc_addrreq" }, 867 { (uint_t)SIOCFIPSECONFIG, "SIOCFIPSECONFIG", NULL }, 868 { (uint_t)SIOCSIPSECONFIG, "SIOCSIPSECONFIG", NULL }, 869 { (uint_t)SIOCDIPSECONFIG, "SIOCDIPSECONFIG", NULL }, 870 { (uint_t)SIOCLIPSECONFIG, "SIOCLIPSECONFIG", NULL }, 871 { (uint_t)SIOCGLIFBINDING, "SIOCGLIFBINDING", "lifreq" }, 872 { (uint_t)SIOCSLIFGROUPNAME, "SIOCSLIFGROUPNAME", "lifreq" }, 873 { (uint_t)SIOCGLIFGROUPNAME, "SIOCGLIFGROUPNAME", "lifreq" }, 874 { (uint_t)SIOCGLIFGROUPINFO, "SIOCGLIFGROUPINFO", "lifgroupinfo" }, 875 { (uint_t)SIOCGDSTINFO, "SIOCGDSTINFO", NULL }, 876 { (uint_t)SIOCGIP6ADDRPOLICY, "SIOCGIP6ADDRPOLICY", NULL }, 877 { (uint_t)SIOCSIP6ADDRPOLICY, "SIOCSIP6ADDRPOLICY", NULL }, 878 { (uint_t)SIOCSXARP, "SIOCSXARP", "xarpreq" }, 879 { (uint_t)SIOCGXARP, "SIOCGXARP", "xarpreq" }, 880 { (uint_t)SIOCDXARP, "SIOCDXARP", "xarpreq" }, 881 { (uint_t)SIOCGLIFZONE, "SIOCGLIFZONE", "lifreq" }, 882 { (uint_t)SIOCSLIFZONE, "SIOCSLIFZONE", "lifreq" }, 883 { (uint_t)SIOCSCTPSOPT, "SIOCSCTPSOPT", NULL }, 884 { (uint_t)SIOCSCTPGOPT, "SIOCSCTPGOPT", NULL }, 885 { (uint_t)SIOCSCTPPEELOFF, "SIOPCSCTPPEELOFF", "int" }, 886 { (uint_t)SIOCGLIFUSESRC, "SIOCGLIFUSESRC", "lifreq" }, 887 { (uint_t)SIOCSLIFUSESRC, "SIOCSLIFUSESRC", "lifreq" }, 888 { (uint_t)SIOCGLIFSRCOF, "SIOCGLIFSRCOF", "lifsrcof" }, 889 { (uint_t)SIOCGMSFILTER, "SIOCGMSFILTER", "group_filter" }, 890 { (uint_t)SIOCSMSFILTER, "SIOCSMSFILTER", "group_filter" }, 891 { (uint_t)SIOCGIPMSFILTER, "SIOCGIPMSFILTER", "ip_msfilter" }, 892 { (uint_t)SIOCSIPMSFILTER, "SIOCSIPMSFILTER", "ip_msfilter" }, 893 894 /* DES encryption */ 895 { (uint_t)DESIOCBLOCK, "DESIOCBLOCK", "desparams" }, 896 { (uint_t)DESIOCQUICK, "DESIOCQUICK", "desparams" }, 897 898 /* Printing system */ 899 { (uint_t)PRNIOC_GET_IFCAP, "PRNIOC_GET_IFCAP", NULL }, 900 { (uint_t)PRNIOC_SET_IFCAP, "PRNIOC_SET_IFCAP", NULL }, 901 { (uint_t)PRNIOC_GET_IFINFO, "PRNIOC_GET_IFINFO", 902 "prn_interface_info" }, 903 { (uint_t)PRNIOC_GET_STATUS, "PRNIOC_GET_STATUS", NULL }, 904 { (uint_t)PRNIOC_GET_1284_DEVID, "PRNIOC_GET_1284_DEVID", 905 "prn_1284_device_id" }, 906 { (uint_t)PRNIOC_GET_1284_STATUS, 907 "PRNIOC_GET_IFCANIOC_GET_1284_STATUS", NULL }, 908 { (uint_t)PRNIOC_GET_TIMEOUTS, "PRNIOC_GET_TIMEOUTS", 909 "prn_timeouts" }, 910 { (uint_t)PRNIOC_SET_TIMEOUTS, "PRNIOC_SET_TIMEOUTS", 911 "prn_timeouts" }, 912 { (uint_t)PRNIOC_RESET, "PRNIOC_RESET", NULL }, 913 914 /* DTrace */ 915 { (uint_t)DTRACEIOC_PROVIDER, "DTRACEIOC_PROVIDER", NULL }, 916 { (uint_t)DTRACEIOC_PROBES, "DTRACEIOC_PROBES", NULL }, 917 { (uint_t)DTRACEIOC_BUFSNAP, "DTRACEIOC_BUFSNAP", NULL }, 918 { (uint_t)DTRACEIOC_PROBEMATCH, "DTRACEIOC_PROBEMATCH", NULL }, 919 { (uint_t)DTRACEIOC_ENABLE, "DTRACEIOC_ENABLE", NULL }, 920 { (uint_t)DTRACEIOC_AGGSNAP, "DTRACEIOC_AGGSNAP", NULL }, 921 { (uint_t)DTRACEIOC_EPROBE, "DTRACEIOC_EPROBE", NULL }, 922 { (uint_t)DTRACEIOC_PROBEARG, "DTRACEIOC_PROBEARG", NULL }, 923 { (uint_t)DTRACEIOC_CONF, "DTRACEIOC_CONF", NULL }, 924 { (uint_t)DTRACEIOC_STATUS, "DTRACEIOC_STATUS", NULL }, 925 { (uint_t)DTRACEIOC_GO, "DTRACEIOC_GO", NULL }, 926 { (uint_t)DTRACEIOC_STOP, "DTRACEIOC_STOP", NULL }, 927 { (uint_t)DTRACEIOC_AGGDESC, "DTRACEIOC_AGGDESC", NULL }, 928 { (uint_t)DTRACEIOC_FORMAT, "DTRACEIOC_FORMAT", NULL }, 929 { (uint_t)DTRACEIOC_DOFGET, "DTRACEIOC_DOFGET", NULL }, 930 { (uint_t)DTRACEIOC_REPLICATE, "DTRACEIOC_REPLICATE", NULL }, 931 932 { (uint_t)DTRACEHIOC_ADD, "DTRACEHIOC_ADD", NULL }, 933 { (uint_t)DTRACEHIOC_REMOVE, "DTRACEHIOC_REMOVE", NULL }, 934 { (uint_t)DTRACEHIOC_ADDDOF, "DTRACEHIOC_ADDDOF", NULL }, 935 936 /* /dev/cryptoadm ioctl() control codes */ 937 { (uint_t)CRYPTO_GET_VERSION, "CRYPTO_GET_VERSION", NULL }, 938 { (uint_t)CRYPTO_GET_DEV_LIST, "CRYPTO_GET_DEV_LIST", NULL }, 939 { (uint_t)CRYPTO_GET_SOFT_LIST, "CRYPTO_GET_SOFT_LIST", NULL }, 940 { (uint_t)CRYPTO_GET_DEV_INFO, "CRYPTO_GET_DEV_INFO", NULL }, 941 { (uint_t)CRYPTO_GET_SOFT_INFO, "CRYPTO_GET_SOFT_INFO", NULL }, 942 { (uint_t)CRYPTO_LOAD_DEV_DISABLED, "CRYPTO_LOAD_DEV_DISABLED", 943 NULL }, 944 { (uint_t)CRYPTO_LOAD_SOFT_DISABLED, "CRYPTO_LOAD_SOFT_DISABLED", 945 NULL }, 946 { (uint_t)CRYPTO_UNLOAD_SOFT_MODULE, "CRYPTO_UNLOAD_SOFT_MODULE", 947 NULL }, 948 { (uint_t)CRYPTO_LOAD_SOFT_CONFIG, "CRYPTO_LOAD_SOFT_CONFIG", 949 NULL }, 950 { (uint_t)CRYPTO_POOL_CREATE, "CRYPTO_POOL_CREATE", NULL }, 951 { (uint_t)CRYPTO_POOL_WAIT, "CRYPTO_POOL_WAIT", NULL }, 952 { (uint_t)CRYPTO_POOL_RUN, "CRYPTO_POOL_RUN", NULL }, 953 { (uint_t)CRYPTO_LOAD_DOOR, "CRYPTO_LOAD_DOOR", NULL }, 954 955 /* /dev/crypto ioctl() control codes */ 956 { (uint_t)CRYPTO_GET_FUNCTION_LIST, "CRYPTO_GET_FUNCTION_LIST", 957 NULL }, 958 { (uint_t)CRYPTO_GET_MECHANISM_NUMBER, "CRYPTO_GET_MECHANISM_NUMBER", 959 NULL }, 960 { (uint_t)CRYPTO_OPEN_SESSION, "CRYPTO_OPEN_SESSION", NULL }, 961 { (uint_t)CRYPTO_CLOSE_SESSION, "CRYPTO_CLOSE_SESSION", NULL }, 962 { (uint_t)CRYPTO_CLOSE_ALL_SESSIONS, "CRYPTO_CLOSE_ALL_SESSIONS", 963 NULL }, 964 { (uint_t)CRYPTO_LOGIN, "CRYPTO_LOGIN", NULL }, 965 { (uint_t)CRYPTO_LOGOUT, "CRYPTO_LOGOUT", NULL }, 966 { (uint_t)CRYPTO_ENCRYPT, "CRYPTO_ENCRYPT", NULL }, 967 { (uint_t)CRYPTO_ENCRYPT_INIT, "CRYPTO_ENCRYPT_INIT", NULL }, 968 { (uint_t)CRYPTO_ENCRYPT_UPDATE, "CRYPTO_ENCRYPT_UPDATE", 969 NULL }, 970 { (uint_t)CRYPTO_ENCRYPT_FINAL, "CRYPTO_ENCRYPT_FINAL", NULL }, 971 { (uint_t)CRYPTO_DECRYPT, "CRYPTO_DECRYPT", NULL }, 972 { (uint_t)CRYPTO_DECRYPT_INIT, "CRYPTO_DECRYPT_INIT", NULL }, 973 { (uint_t)CRYPTO_DECRYPT_UPDATE, "CRYPTO_DECRYPT_UPDATE", 974 NULL }, 975 { (uint_t)CRYPTO_DECRYPT_FINAL, "CRYPTO_DECRYPT_FINAL", NULL }, 976 { (uint_t)CRYPTO_DIGEST, "CRYPTO_DIGEST", NULL }, 977 { (uint_t)CRYPTO_DIGEST_INIT, "CRYPTO_DIGEST_INIT", NULL }, 978 { (uint_t)CRYPTO_DIGEST_UPDATE, "CRYPTO_DIGEST_UPDATE", NULL }, 979 { (uint_t)CRYPTO_DIGEST_KEY, "CRYPTO_DIGEST_KEY", NULL }, 980 { (uint_t)CRYPTO_DIGEST_FINAL, "CRYPTO_DIGEST_FINAL", NULL }, 981 { (uint_t)CRYPTO_MAC, "CRYPTO_MAC", NULL }, 982 { (uint_t)CRYPTO_MAC_INIT, "CRYPTO_MAC_INIT", NULL }, 983 { (uint_t)CRYPTO_MAC_UPDATE, "CRYPTO_MAC_UPDATE", NULL }, 984 { (uint_t)CRYPTO_MAC_FINAL, "CRYPTO_MAC_FINAL", NULL }, 985 { (uint_t)CRYPTO_SIGN, "CRYPTO_SIGN", NULL }, 986 { (uint_t)CRYPTO_SIGN_INIT, "CRYPTO_SIGN_INIT", NULL }, 987 { (uint_t)CRYPTO_SIGN_UPDATE, "CRYPTO_SIGN_UPDATE", NULL }, 988 { (uint_t)CRYPTO_SIGN_FINAL, "CRYPTO_SIGN_FINAL", NULL }, 989 { (uint_t)CRYPTO_SIGN_RECOVER_INIT, "CRYPTO_SIGN_RECOVER_INIT", 990 NULL }, 991 { (uint_t)CRYPTO_SIGN_RECOVER, "CRYPTO_SIGN_RECOVER", NULL }, 992 { (uint_t)CRYPTO_VERIFY, "CRYPTO_VERIFY", NULL }, 993 { (uint_t)CRYPTO_VERIFY_INIT, "CRYPTO_VERIFY_INIT", NULL }, 994 { (uint_t)CRYPTO_VERIFY_UPDATE, "CRYPTO_VERIFY_UPDATE", NULL }, 995 { (uint_t)CRYPTO_VERIFY_FINAL, "CRYPTO_VERIFY_FINAL", NULL }, 996 { (uint_t)CRYPTO_VERIFY_RECOVER_INIT, "CRYPTO_VERIFY_RECOVER_INIT", 997 NULL }, 998 { (uint_t)CRYPTO_VERIFY_RECOVER, "CRYPTO_VERIFY_RECOVER", 999 NULL }, 1000 { (uint_t)CRYPTO_DIGEST_ENCRYPT_UPDATE, "CRYPTO_DIGEST_ENCRYPT_UPDATE", 1001 NULL }, 1002 { (uint_t)CRYPTO_DECRYPT_DIGEST_UPDATE, "CRYPTO_DECRYPT_DIGEST_UPDATE", 1003 NULL }, 1004 { (uint_t)CRYPTO_SIGN_ENCRYPT_UPDATE, "CRYPTO_SIGN_ENCRYPT_UPDATE", 1005 NULL }, 1006 { (uint_t)CRYPTO_DECRYPT_VERIFY_UPDATE, "CRYPTO_DECRYPT_VERIFY_UPDATE", 1007 NULL }, 1008 { (uint_t)CRYPTO_SEED_RANDOM, "CRYPTO_SEED_RANDOM", NULL }, 1009 { (uint_t)CRYPTO_GENERATE_RANDOM, "CRYPTO_GENERATE_RANDOM", 1010 NULL }, 1011 { (uint_t)CRYPTO_OBJECT_CREATE, "CRYPTO_OBJECT_CREATE", NULL }, 1012 { (uint_t)CRYPTO_OBJECT_COPY, "CRYPTO_OBJECT_COPY", NULL }, 1013 { (uint_t)CRYPTO_OBJECT_DESTROY, "CRYPTO_OBJECT_DESTROY", 1014 NULL }, 1015 { (uint_t)CRYPTO_OBJECT_GET_ATTRIBUTE_VALUE, 1016 "CRYPTO_OBJECT_GET_ATTRIBUTE_VALUE", NULL }, 1017 { (uint_t)CRYPTO_OBJECT_GET_SIZE, "CRYPTO_OBJECT_GET_SIZE", NULL }, 1018 { (uint_t)CRYPTO_OBJECT_SET_ATTRIBUTE_VALUE, 1019 "CRYPTO_OBJECT_SET_ATTRIBUTE_VALUE", NULL }, 1020 { (uint_t)CRYPTO_OBJECT_FIND_INIT, "CRYPTO_OBJECT_FIND_INIT", 1021 NULL }, 1022 { (uint_t)CRYPTO_OBJECT_FIND_UPDATE, "CRYPTO_OBJECT_FIND_UPDATE", 1023 NULL }, 1024 { (uint_t)CRYPTO_OBJECT_FIND_FINAL, "CRYPTO_OBJECT_FIND_FINAL", 1025 NULL }, 1026 { (uint_t)CRYPTO_GENERATE_KEY, "CRYPTO_GENERATE_KEY", NULL }, 1027 { (uint_t)CRYPTO_GENERATE_KEY_PAIR, "CRYPTO_GENERATE_KEY_PAIR", 1028 NULL }, 1029 { (uint_t)CRYPTO_WRAP_KEY, "CRYPTO_WRAP_KEY", NULL }, 1030 { (uint_t)CRYPTO_UNWRAP_KEY, "CRYPTO_UNWRAP_KEY", NULL }, 1031 { (uint_t)CRYPTO_DERIVE_KEY, "CRYPTO_DERIVE_KEY", NULL }, 1032 { (uint_t)CRYPTO_GET_PROVIDER_LIST, "CRYPTO_GET_PROVIDER_LIST", 1033 NULL }, 1034 { (uint_t)CRYPTO_GET_PROVIDER_INFO, "CRYPTO_GET_PROVIDER_INFO", 1035 NULL }, 1036 { (uint_t)CRYPTO_GET_PROVIDER_MECHANISMS, 1037 "CRYPTO_GET_PROVIDER_MECHANISMS", NULL }, 1038 { (uint_t)CRYPTO_GET_PROVIDER_MECHANISM_INFO, 1039 "CRYPTO_GET_PROVIDER_MECHANISM_INFO", NULL }, 1040 { (uint_t)CRYPTO_INIT_TOKEN, "CRYPTO_INIT_TOKEN", NULL }, 1041 { (uint_t)CRYPTO_INIT_PIN, "CRYPTO_INIT_PIN", NULL }, 1042 { (uint_t)CRYPTO_SET_PIN, "CRYPTO_SET_PIN", NULL }, 1043 { (uint_t)CRYPTO_NOSTORE_GENERATE_KEY, 1044 "CRYPTO_NOSTORE_GENERATE_KEY", NULL }, 1045 { (uint_t)CRYPTO_NOSTORE_GENERATE_KEY_PAIR, 1046 "CRYPTO_NOSTORE_GENERATE_KEY_PAIR", NULL }, 1047 { (uint_t)CRYPTO_NOSTORE_DERIVE_KEY, 1048 "CRYPTO_NOSTORE_DERIVE_KEY", NULL }, 1049 { (uint_t)CRYPTO_FIPS140_STATUS, "CRYPTO_FIPS140_STATUS", NULL }, 1050 { (uint_t)CRYPTO_FIPS140_SET, "CRYPTO_FIPS140_SET", NULL }, 1051 1052 /* kbio ioctls */ 1053 { (uint_t)KIOCTRANS, "KIOCTRANS", NULL }, 1054 { (uint_t)KIOCGTRANS, "KIOCGTRANS", NULL }, 1055 { (uint_t)KIOCTRANSABLE, "KIOCTRANSABLE", NULL }, 1056 { (uint_t)KIOCGTRANSABLE, "KIOCGTRANSABLE", NULL }, 1057 { (uint_t)KIOCSETKEY, "KIOCSETKEY", NULL }, 1058 { (uint_t)KIOCGETKEY, "KIOCGETKEY", NULL }, 1059 { (uint_t)KIOCCMD, "KIOCCMD", NULL }, 1060 { (uint_t)KIOCTYPE, "KIOCTYPE", NULL }, 1061 { (uint_t)KIOCSDIRECT, "KIOCSDIRECT", NULL }, 1062 { (uint_t)KIOCGDIRECT, "KIOCGDIRECT", NULL }, 1063 { (uint_t)KIOCSKEY, "KIOCSKEY", NULL }, 1064 { (uint_t)KIOCGKEY, "KIOCGKEY", NULL }, 1065 { (uint_t)KIOCSLED, "KIOCSLED", NULL }, 1066 { (uint_t)KIOCGLED, "KIOCGLED", NULL }, 1067 { (uint_t)KIOCSCOMPAT, "KIOCSCOMPAT", NULL }, 1068 { (uint_t)KIOCGCOMPAT, "KIOCGCOMPAT", NULL }, 1069 { (uint_t)KIOCSLAYOUT, "KIOCSLAYOUT", NULL }, 1070 { (uint_t)KIOCLAYOUT, "KIOCLAYOUT", NULL }, 1071 { (uint_t)KIOCSKABORTEN, "KIOCSKABORTEN", NULL }, 1072 { (uint_t)KIOCGRPTDELAY, "KIOCGRPTDELAY", NULL }, 1073 { (uint_t)KIOCSRPTDELAY, "KIOCSRPTDELAY", NULL }, 1074 { (uint_t)KIOCGRPTRATE, "KIOCGRPTRATE", NULL }, 1075 { (uint_t)KIOCSRPTRATE, "KIOCSRPTRATE", NULL }, 1076 { (uint_t)KIOCSETFREQ, "KIOCSETFREQ", NULL }, 1077 { (uint_t)KIOCMKTONE, "KIOCMKTONE", NULL }, 1078 1079 /* ptm/pts driver I_STR ioctls */ 1080 { (uint_t)ISPTM, "ISPTM", NULL}, 1081 { (uint_t)UNLKPT, "UNLKPT", NULL}, 1082 { (uint_t)PTSSTTY, "PTSSTTY", NULL}, 1083 { (uint_t)ZONEPT, "ZONEPT", NULL}, 1084 { (uint_t)OWNERPT, "OWNERPT", NULL}, 1085 1086 /* aggr link aggregation pseudo driver ioctls */ 1087 { (uint_t)LAIOC_CREATE, "LAIOC_CREATE", "laioc_create"}, 1088 { (uint_t)LAIOC_DELETE, "LAIOC_DELETE", "laioc_delete"}, 1089 { (uint_t)LAIOC_INFO, "LAIOC_INFO", "laioc_info"}, 1090 { (uint_t)LAIOC_ADD, "LAIOC_ADD", 1091 "laioc_add_rem"}, 1092 { (uint_t)LAIOC_REMOVE, "LAIOC_REMOVE", 1093 "laioc_add_rem"}, 1094 { (uint_t)LAIOC_MODIFY, "LAIOC_MODIFY", "laioc_modify"}, 1095 1096 /* dld data-link ioctls */ 1097 { (uint_t)DLDIOC_ATTR, "DLDIOC_ATTR", "dld_ioc_attr"}, 1098 { (uint_t)DLDIOC_PHYS_ATTR, "DLDIOC_PHYS_ATTR", 1099 "dld_ioc_phys_attr"}, 1100 { (uint_t)DLDIOC_DOORSERVER, "DLDIOC_DOORSERVER", "dld_ioc_door"}, 1101 { (uint_t)DLDIOC_RENAME, "DLDIOC_RENAME", "dld_ioc_rename"}, 1102 { (uint_t)DLDIOC_SECOBJ_GET, "DLDIOC_SECOBJ_GET", 1103 "dld_ioc_secobj_get"}, 1104 { (uint_t)DLDIOC_SECOBJ_SET, "DLDIOC_SECOBJ_SET", 1105 "dld_ioc_secobj_set"}, 1106 { (uint_t)DLDIOC_SECOBJ_UNSET, "DLDIOC_SECOBJ_UNSET", 1107 "dld_ioc_secobj_unset"}, 1108 { (uint_t)DLDIOC_MACADDRGET, "DLDIOC_MACADDRGET", 1109 "dld_ioc_macaddrget"}, 1110 { (uint_t)DLDIOC_SETMACPROP, "DLDIOC_SETMACPROP", 1111 "dld_ioc_macprop_s"}, 1112 { (uint_t)DLDIOC_GETMACPROP, "DLDIOC_GETMACPROP", 1113 "dld_ioc_macprop_s"}, 1114 { (uint_t)DLDIOC_ADDFLOW, "DLDIOC_ADDFLOW", 1115 "dld_ioc_addflow"}, 1116 { (uint_t)DLDIOC_REMOVEFLOW, "DLDIOC_REMOVEFLOW", 1117 "dld_ioc_removeflow"}, 1118 { (uint_t)DLDIOC_MODIFYFLOW, "DLDIOC_MODIFYFLOW", 1119 "dld_ioc_modifyflow"}, 1120 { (uint_t)DLDIOC_WALKFLOW, "DLDIOC_WALKFLOW", 1121 "dld_ioc_walkflow"}, 1122 { (uint_t)DLDIOC_USAGELOG, "DLDIOC_USAGELOG", 1123 "dld_ioc_usagelog"}, 1124 1125 /* simnet ioctls */ 1126 { (uint_t)SIMNET_IOC_CREATE, "SIMNET_IOC_CREATE", 1127 "simnet_ioc_create"}, 1128 { (uint_t)SIMNET_IOC_DELETE, "SIMNET_IOC_DELETE", 1129 "simnet_ioc_delete"}, 1130 { (uint_t)SIMNET_IOC_INFO, "SIMNET_IOC_INFO", 1131 "simnet_ioc_info"}, 1132 { (uint_t)SIMNET_IOC_MODIFY, "SIMNET_IOC_MODIFY", 1133 "simnet_ioc_info"}, 1134 1135 /* vnic ioctls */ 1136 { (uint_t)VNIC_IOC_CREATE, "VNIC_IOC_CREATE", 1137 "vnic_ioc_create"}, 1138 { (uint_t)VNIC_IOC_DELETE, "VNIC_IOC_DELETE", 1139 "vnic_ioc_delete"}, 1140 { (uint_t)VNIC_IOC_INFO, "VNIC_IOC_INFO", 1141 "vnic_ioc_info"}, 1142 1143 /* ZFS ioctls */ 1144 { (uint_t)ZFS_IOC_POOL_CREATE, "ZFS_IOC_POOL_CREATE", 1145 "zfs_cmd_t" }, 1146 { (uint_t)ZFS_IOC_POOL_DESTROY, "ZFS_IOC_POOL_DESTROY", 1147 "zfs_cmd_t" }, 1148 { (uint_t)ZFS_IOC_POOL_IMPORT, "ZFS_IOC_POOL_IMPORT", 1149 "zfs_cmd_t" }, 1150 { (uint_t)ZFS_IOC_POOL_EXPORT, "ZFS_IOC_POOL_EXPORT", 1151 "zfs_cmd_t" }, 1152 { (uint_t)ZFS_IOC_POOL_CONFIGS, "ZFS_IOC_POOL_CONFIGS", 1153 "zfs_cmd_t" }, 1154 { (uint_t)ZFS_IOC_POOL_STATS, "ZFS_IOC_POOL_STATS", 1155 "zfs_cmd_t" }, 1156 { (uint_t)ZFS_IOC_POOL_TRYIMPORT, "ZFS_IOC_POOL_TRYIMPORT", 1157 "zfs_cmd_t" }, 1158 { (uint_t)ZFS_IOC_POOL_SCRUB, "ZFS_IOC_POOL_SCRUB", 1159 "zfs_cmd_t" }, 1160 { (uint_t)ZFS_IOC_POOL_FREEZE, "ZFS_IOC_POOL_FREEZE", 1161 "zfs_cmd_t" }, 1162 { (uint_t)ZFS_IOC_POOL_UPGRADE, "ZFS_IOC_POOL_UPGRADE", 1163 "zfs_cmd_t" }, 1164 { (uint_t)ZFS_IOC_POOL_GET_HISTORY, "ZFS_IOC_POOL_GET_HISTORY", 1165 "zfs_cmd_t" }, 1166 { (uint_t)ZFS_IOC_VDEV_ADD, "ZFS_IOC_VDEV_ADD", 1167 "zfs_cmd_t" }, 1168 { (uint_t)ZFS_IOC_VDEV_REMOVE, "ZFS_IOC_VDEV_REMOVE", 1169 "zfs_cmd_t" }, 1170 { (uint_t)ZFS_IOC_VDEV_SET_STATE, "ZFS_IOC_VDEV_SET_STATE", 1171 "zfs_cmd_t" }, 1172 { (uint_t)ZFS_IOC_VDEV_ATTACH, "ZFS_IOC_VDEV_ATTACH", 1173 "zfs_cmd_t" }, 1174 { (uint_t)ZFS_IOC_VDEV_DETACH, "ZFS_IOC_VDEV_DETACH", 1175 "zfs_cmd_t" }, 1176 { (uint_t)ZFS_IOC_VDEV_SETPATH, "ZFS_IOC_VDEV_SETPATH", 1177 "zfs_cmd_t" }, 1178 { (uint_t)ZFS_IOC_VDEV_SETFRU, "ZFS_IOC_VDEV_SETFRU", 1179 "zfs_cmd_t" }, 1180 { (uint_t)ZFS_IOC_OBJSET_STATS, "ZFS_IOC_OBJSET_STATS", 1181 "zfs_cmd_t" }, 1182 { (uint_t)ZFS_IOC_OBJSET_ZPLPROPS, "ZFS_IOC_OBJSET_ZPLPROPS", 1183 "zfs_cmd_t" }, 1184 { (uint_t)ZFS_IOC_DATASET_LIST_NEXT, "ZFS_IOC_DATASET_LIST_NEXT", 1185 "zfs_cmd_t" }, 1186 { (uint_t)ZFS_IOC_SNAPSHOT_LIST_NEXT, "ZFS_IOC_SNAPSHOT_LIST_NEXT", 1187 "zfs_cmd_t" }, 1188 { (uint_t)ZFS_IOC_SET_PROP, "ZFS_IOC_SET_PROP", 1189 "zfs_cmd_t" }, 1190 { (uint_t)ZFS_IOC_CREATE, "ZFS_IOC_CREATE", 1191 "zfs_cmd_t" }, 1192 { (uint_t)ZFS_IOC_DESTROY, "ZFS_IOC_DESTROY", 1193 "zfs_cmd_t" }, 1194 { (uint_t)ZFS_IOC_ROLLBACK, "ZFS_IOC_ROLLBACK", 1195 "zfs_cmd_t" }, 1196 { (uint_t)ZFS_IOC_RENAME, "ZFS_IOC_RENAME", 1197 "zfs_cmd_t" }, 1198 { (uint_t)ZFS_IOC_RECV, "ZFS_IOC_RECV", 1199 "zfs_cmd_t" }, 1200 { (uint_t)ZFS_IOC_SEND, "ZFS_IOC_SEND", 1201 "zfs_cmd_t" }, 1202 { (uint_t)ZFS_IOC_INJECT_FAULT, "ZFS_IOC_INJECT_FAULT", 1203 "zfs_cmd_t" }, 1204 { (uint_t)ZFS_IOC_CLEAR_FAULT, "ZFS_IOC_CLEAR_FAULT", 1205 "zfs_cmd_t" }, 1206 { (uint_t)ZFS_IOC_INJECT_LIST_NEXT, "ZFS_IOC_INJECT_LIST_NEXT", 1207 "zfs_cmd_t" }, 1208 { (uint_t)ZFS_IOC_ERROR_LOG, "ZFS_IOC_ERROR_LOG", 1209 "zfs_cmd_t" }, 1210 { (uint_t)ZFS_IOC_CLEAR, "ZFS_IOC_CLEAR", 1211 "zfs_cmd_t" }, 1212 { (uint_t)ZFS_IOC_PROMOTE, "ZFS_IOC_PROMOTE", 1213 "zfs_cmd_t" }, 1214 { (uint_t)ZFS_IOC_DESTROY_SNAPS, "ZFS_IOC_DESTROY_SNAPS", 1215 "zfs_cmd_t" }, 1216 { (uint_t)ZFS_IOC_SNAPSHOT, "ZFS_IOC_SNAPSHOT", 1217 "zfs_cmd_t" }, 1218 { (uint_t)ZFS_IOC_DSOBJ_TO_DSNAME, "ZFS_IOC_DSOBJ_TO_DSNAME", 1219 "zfs_cmd_t" }, 1220 { (uint_t)ZFS_IOC_OBJ_TO_PATH, "ZFS_IOC_OBJ_TO_PATH", 1221 "zfs_cmd_t" }, 1222 { (uint_t)ZFS_IOC_POOL_SET_PROPS, "ZFS_IOC_POOL_SET_PROPS", 1223 "zfs_cmd_t" }, 1224 { (uint_t)ZFS_IOC_POOL_GET_PROPS, "ZFS_IOC_POOL_GET_PROPS", 1225 "zfs_cmd_t" }, 1226 { (uint_t)ZFS_IOC_SET_FSACL, "ZFS_IOC_SET_FSACL", 1227 "zfs_cmd_t" }, 1228 { (uint_t)ZFS_IOC_GET_FSACL, "ZFS_IOC_GET_FSACL", 1229 "zfs_cmd_t" }, 1230 { (uint_t)ZFS_IOC_ISCSI_PERM_CHECK, "ZFS_IOC_ISCSI_PERM_CHECK", 1231 "zfs_cmd_t" }, 1232 { (uint_t)ZFS_IOC_SHARE, "ZFS_IOC_SHARE", 1233 "zfs_cmd_t" }, 1234 { (uint_t)ZFS_IOC_INHERIT_PROP, "ZFS_IOC_INHERIT_PROP", 1235 "zfs_cmd_t" }, 1236 { (uint_t)ZFS_IOC_SMB_ACL, "ZFS_IOC_SMB_ACL", 1237 "zfs_cmd_t" }, 1238 { (uint_t)ZFS_IOC_USERSPACE_ONE, "ZFS_IOC_USERSPACE_ONE", 1239 "zfs_cmd_t" }, 1240 { (uint_t)ZFS_IOC_USERSPACE_MANY, "ZFS_IOC_USERSPACE_MANY", 1241 "zfs_cmd_t" }, 1242 { (uint_t)ZFS_IOC_USERSPACE_UPGRADE, "ZFS_IOC_USERSPACE_UPGRADE", 1243 "zfs_cmd_t" }, 1244 { (uint_t)ZFS_IOC_HOLD, "ZFS_IOC_HOLD", 1245 "zfs_cmd_t" }, 1246 { (uint_t)ZFS_IOC_RELEASE, "ZFS_IOC_RELEASE", 1247 "zfs_cmd_t" }, 1248 { (uint_t)ZFS_IOC_GET_HOLDS, "ZFS_IOC_GET_HOLDS", 1249 "zfs_cmd_t" }, 1250 1251 /* kssl ioctls */ 1252 { (uint_t)KSSL_ADD_ENTRY, "KSSL_ADD_ENTRY", 1253 "kssl_params_t"}, 1254 { (uint_t)KSSL_DELETE_ENTRY, "KSSL_DELETE_ENTRY", 1255 "sockaddr_in"}, 1256 1257 /* disk ioctls - (0x04 << 8) - dkio.h */ 1258 { (uint_t)DKIOCGGEOM, "DKIOCGGEOM", 1259 "struct dk_geom"}, 1260 { (uint_t)DKIOCINFO, "DKIOCINFO", 1261 "struct dk_info"}, 1262 { (uint_t)DKIOCEJECT, "DKIOCEJECT", 1263 NULL}, 1264 { (uint_t)DKIOCGVTOC, "DKIOCGVTOC", 1265 "struct vtoc"}, 1266 { (uint_t)DKIOCSVTOC, "DKIOCSVTOC", 1267 "struct vtoc"}, 1268 { (uint_t)DKIOCGEXTVTOC, "DKIOCGEXTVTOC", 1269 "struct extvtoc"}, 1270 { (uint_t)DKIOCSEXTVTOC, "DKIOCSEXTVTOC", 1271 "struct extvtoc"}, 1272 { (uint_t)DKIOCFLUSHWRITECACHE, "DKIOCFLUSHWRITECACHE", 1273 NULL}, 1274 { (uint_t)DKIOCGETWCE, "DKIOCGETWCE", 1275 NULL}, 1276 { (uint_t)DKIOCSETWCE, "DKIOCSETWCE", 1277 NULL}, 1278 { (uint_t)DKIOCSGEOM, "DKIOCSGEOM", 1279 "struct dk_geom"}, 1280 { (uint_t)DKIOCSAPART, "DKIOCSAPART", 1281 "struct dk_allmap"}, 1282 { (uint_t)DKIOCGAPART, "DKIOCGAPART", 1283 "struct dk_allmap"}, 1284 { (uint_t)DKIOCG_PHYGEOM, "DKIOCG_PHYGEOM", 1285 "struct dk_geom"}, 1286 { (uint_t)DKIOCG_VIRTGEOM, "DKIOCG_VIRTGEOM", 1287 "struct dk_geom"}, 1288 { (uint_t)DKIOCLOCK, "DKIOCLOCK", 1289 NULL}, 1290 { (uint_t)DKIOCUNLOCK, "DKIOCUNLOCK", 1291 NULL}, 1292 { (uint_t)DKIOCSTATE, "DKIOCSTATE", 1293 NULL}, 1294 { (uint_t)DKIOCREMOVABLE, "DKIOCREMOVABLE", 1295 NULL}, 1296 { (uint_t)DKIOCHOTPLUGGABLE, "DKIOCHOTPLUGGABLE", 1297 NULL}, 1298 { (uint_t)DKIOCADDBAD, "DKIOCADDBAD", 1299 NULL}, 1300 { (uint_t)DKIOCGETDEF, "DKIOCGETDEF", 1301 NULL}, 1302 { (uint_t)DKIOCPARTINFO, "DKIOCPARTINFO", 1303 "struct part_info"}, 1304 { (uint_t)DKIOCEXTPARTINFO, "DKIOCEXTPARTINFO", 1305 "struct extpart_info"}, 1306 { (uint_t)DKIOCGMEDIAINFO, "DKIOCGMEDIAINFO", 1307 "struct dk_minfo"}, 1308 { (uint_t)DKIOCGMBOOT, "DKIOCGMBOOT", 1309 NULL}, 1310 { (uint_t)DKIOCSMBOOT, "DKIOCSMBOOT", 1311 NULL}, 1312 { (uint_t)DKIOCSETEFI, "DKIOCSETEFI", 1313 "struct dk_efi"}, 1314 { (uint_t)DKIOCGETEFI, "DKIOCGETEFI", 1315 "struct dk_efi"}, 1316 { (uint_t)DKIOCPARTITION, "DKIOCPARTITION", 1317 "struct partition64"}, 1318 { (uint_t)DKIOCGETVOLCAP, "DKIOCGETVOLCAP", 1319 "struct volcap_t"}, 1320 { (uint_t)DKIOCSETVOLCAP, "DKIOCSETVOLCAP", 1321 "struct volcap_t"}, 1322 { (uint_t)DKIOCDMR, "DKIOCDMR", 1323 "struct vol_directed_rd"}, 1324 { (uint_t)DKIOCDUMPINIT, "DKIOCDUMPINIT", 1325 NULL}, 1326 { (uint_t)DKIOCDUMPFINI, "DKIOCDUMPFINI", 1327 NULL}, 1328 1329 /* disk ioctls - (0x04 << 8) - fdio.h */ 1330 { (uint_t)FDIOGCHAR, "FDIOGCHAR", 1331 "struct fd_char"}, 1332 { (uint_t)FDIOSCHAR, "FDIOSCHAR", 1333 "struct fd_char"}, 1334 { (uint_t)FDEJECT, "FDEJECT", 1335 NULL}, 1336 { (uint_t)FDGETCHANGE, "FDGETCHANGE", 1337 NULL}, 1338 { (uint_t)FDGETDRIVECHAR, "FDGETDRIVECHAR", 1339 "struct fd_drive"}, 1340 { (uint_t)FDSETDRIVECHAR, "FDSETDRIVECHAR", 1341 "struct fd_drive"}, 1342 { (uint_t)FDGETSEARCH, "FDGETSEARCH", 1343 NULL}, 1344 { (uint_t)FDSETSEARCH, "FDSETSEARCH", 1345 NULL}, 1346 { (uint_t)FDIOCMD, "FDIOCMD", 1347 "struct fd_cmd"}, 1348 { (uint_t)FDRAW, "FDRAW", 1349 "struct fd_raw"}, 1350 { (uint_t)FDDEFGEOCHAR, "FDDEFGEOCHAR", 1351 NULL}, 1352 1353 /* disk ioctls - (0x04 << 8) - cdio.h */ 1354 { (uint_t)CDROMPAUSE, "CDROMPAUSE", 1355 NULL}, 1356 { (uint_t)CDROMRESUME, "CDROMRESUME", 1357 NULL}, 1358 { (uint_t)CDROMPLAYMSF, "CDROMPLAYMSF", 1359 "struct cdrom_msf"}, 1360 { (uint_t)CDROMPLAYTRKIND, "CDROMPLAYTRKIND", 1361 "struct cdrom_ti"}, 1362 { (uint_t)CDROMREADTOCHDR, "CDROMREADTOCHDR", 1363 "struct cdrom_tochdr"}, 1364 { (uint_t)CDROMREADTOCENTRY, "CDROMREADTOCENTRY", 1365 "struct cdrom_tocentry"}, 1366 { (uint_t)CDROMSTOP, "CDROMSTOP", 1367 NULL}, 1368 { (uint_t)CDROMSTART, "CDROMSTART", 1369 NULL}, 1370 { (uint_t)CDROMEJECT, "CDROMEJECT", 1371 NULL}, 1372 { (uint_t)CDROMVOLCTRL, "CDROMVOLCTRL", 1373 "struct cdrom_volctrl"}, 1374 { (uint_t)CDROMSUBCHNL, "CDROMSUBCHNL", 1375 "struct cdrom_subchnl"}, 1376 { (uint_t)CDROMREADMODE2, "CDROMREADMODE2", 1377 "struct cdrom_read"}, 1378 { (uint_t)CDROMREADMODE1, "CDROMREADMODE1", 1379 "struct cdrom_read"}, 1380 { (uint_t)CDROMREADOFFSET, "CDROMREADOFFSET", 1381 NULL}, 1382 { (uint_t)CDROMGBLKMODE, "CDROMGBLKMODE", 1383 NULL}, 1384 { (uint_t)CDROMSBLKMODE, "CDROMSBLKMODE", 1385 NULL}, 1386 { (uint_t)CDROMCDDA, "CDROMCDDA", 1387 "struct cdrom_cdda"}, 1388 { (uint_t)CDROMCDXA, "CDROMCDXA", 1389 "struct cdrom_cdxa"}, 1390 { (uint_t)CDROMSUBCODE, "CDROMSUBCODE", 1391 "struct cdrom_subcode"}, 1392 { (uint_t)CDROMGDRVSPEED, "CDROMGDRVSPEED", 1393 NULL}, 1394 { (uint_t)CDROMSDRVSPEED, "CDROMSDRVSPEED", 1395 NULL}, 1396 { (uint_t)CDROMCLOSETRAY, "CDROMCLOSETRAY", 1397 NULL}, 1398 1399 /* disk ioctls - (0x04 << 8) - uscsi.h */ 1400 { (uint_t)USCSICMD, "USCSICMD", 1401 "struct uscsi_cmd"}, 1402 1403 /* dumpadm ioctls - (0xdd << 8) */ 1404 { (uint_t)DIOCGETDEV, "DIOCGETDEV", 1405 NULL}, 1406 1407 /* mntio ioctls - ('m' << 8) */ 1408 { (uint_t)MNTIOC_NMNTS, "MNTIOC_NMNTS", 1409 NULL}, 1410 { (uint_t)MNTIOC_GETDEVLIST, "MNTIOC_GETDEVLIST", 1411 NULL}, 1412 { (uint_t)MNTIOC_SETTAG, "MNTIOC_SETTAG", 1413 "struct mnttagdesc"}, 1414 { (uint_t)MNTIOC_CLRTAG, "MNTIOC_CLRTAG", 1415 "struct mnttagdesc"}, 1416 { (uint_t)MNTIOC_SHOWHIDDEN, "MNTIOC_SHOWHIDDEN", 1417 NULL}, 1418 { (uint_t)MNTIOC_GETMNTENT, "MNTIOC_GETMNTENT", 1419 "struct mnttab"}, 1420 { (uint_t)MNTIOC_GETEXTMNTENT, "MNTIOC_GETEXTMNTENT", 1421 "struct extmnttab"}, 1422 { (uint_t)MNTIOC_GETMNTANY, "MNTIOC_GETMNTANY", 1423 "struct mnttab"}, 1424 1425 /* devinfo ioctls - ('df' << 8) - devinfo_impl.h */ 1426 { (uint_t)DINFOUSRLD, "DINFOUSRLD", 1427 NULL}, 1428 { (uint_t)DINFOLODRV, "DINFOLODRV", 1429 NULL}, 1430 { (uint_t)DINFOIDENT, "DINFOIDENT", 1431 NULL}, 1432 1433 { (uint_t)IPTUN_CREATE, "IPTUN_CREATE", "iptun_kparams_t"}, 1434 { (uint_t)IPTUN_DELETE, "IPTUN_DELETE", "datalink_id_t"}, 1435 { (uint_t)IPTUN_MODIFY, "IPTUN_MODIFY", "iptun_kparams_t"}, 1436 { (uint_t)IPTUN_INFO, "IPTUN_INFO", NULL}, 1437 { (uint_t)IPTUN_SET_6TO4RELAY, "IPTUN_SET_6TO4RELAY", NULL}, 1438 { (uint_t)IPTUN_GET_6TO4RELAY, "IPTUN_GET_6TO4RELAY", NULL}, 1439 1440 /* zcons ioctls */ 1441 { (uint_t)ZC_HOLDSLAVE, "ZC_HOLDSLAVE", NULL }, 1442 { (uint_t)ZC_RELEASESLAVE, "ZC_RELEASESLAVE", NULL }, 1443 1444 /* hid ioctls - ('h' << 8) - hid.h */ 1445 { (uint_t)HIDIOCKMGDIRECT, "HIDIOCKMGDIRECT", NULL }, 1446 { (uint_t)HIDIOCKMSDIRECT, "HIDIOCKMSDIRECT", NULL }, 1447 1448 /* pm ioctls */ 1449 { (uint_t)PM_SCHEDULE, "PM_SCHEDULE", NULL }, 1450 { (uint_t)PM_GET_IDLE_TIME, "PM_GET_IDLE_TIME", NULL }, 1451 { (uint_t)PM_GET_NUM_CMPTS, "PM_GET_NUM_CMPTS", NULL }, 1452 { (uint_t)PM_GET_THRESHOLD, "PM_GET_THRESHOLD", NULL }, 1453 { (uint_t)PM_SET_THRESHOLD, "PM_SET_THRESHOLD", NULL }, 1454 { (uint_t)PM_GET_NORM_PWR, "PM_GET_NORM_PWR", NULL }, 1455 { (uint_t)PM_SET_CUR_PWR, "PM_SET_CUR_PWR", NULL }, 1456 { (uint_t)PM_GET_CUR_PWR, "PM_GET_CUR_PWR", NULL }, 1457 { (uint_t)PM_GET_NUM_DEPS, "PM_GET_NUM_DEPS", NULL }, 1458 { (uint_t)PM_GET_DEP, "PM_GET_DEP", NULL }, 1459 { (uint_t)PM_ADD_DEP, "PM_ADD_DEP", NULL }, 1460 { (uint_t)PM_REM_DEP, "PM_REM_DEP", NULL }, 1461 { (uint_t)PM_REM_DEVICE, "PM_REM_DEVICE", NULL }, 1462 { (uint_t)PM_REM_DEVICES, "PM_REM_DEVICES", NULL }, 1463 { (uint_t)PM_DISABLE_AUTOPM, "PM_DISABLE_AUTOPM", NULL }, 1464 { (uint_t)PM_REENABLE_AUTOPM, "PM_REENABLE_AUTOPM", NULL }, 1465 { (uint_t)PM_SET_NORM_PWR, "PM_SET_NORM_PWR", NULL }, 1466 { (uint_t)PM_GET_SYSTEM_THRESHOLD, "PM_GET_SYSTEM_THRESHOLD", 1467 NULL }, 1468 { (uint_t)PM_GET_DEFAULT_SYSTEM_THRESHOLD, 1469 "PM_GET_DEFAULT_SYSTEM_THRESHOLD", NULL }, 1470 { (uint_t)PM_SET_SYSTEM_THRESHOLD, "PM_SET_SYSTEM_THRESHOLD", 1471 NULL }, 1472 { (uint_t)PM_START_PM, "PM_START_PM", NULL }, 1473 { (uint_t)PM_STOP_PM, "PM_STOP_PM", NULL }, 1474 { (uint_t)PM_RESET_PM, "PM_RESET_PM", NULL }, 1475 { (uint_t)PM_GET_PM_STATE, "PM_GET_PM_STATE", NULL }, 1476 { (uint_t)PM_GET_AUTOS3_STATE, "PM_GET_AUTOS3_STATE", NULL }, 1477 { (uint_t)PM_GET_S3_SUPPORT_STATE, "PM_GET_S3_SUPPORT_STATE", 1478 NULL }, 1479 { (uint_t)PM_IDLE_DOWN, "PM_IDLE_DOWN", NULL }, 1480 { (uint_t)PM_START_CPUPM, "PM_START_CPUPM", NULL }, 1481 { (uint_t)PM_START_CPUPM_EV, "PM_START_CPUPM_EV", NULL }, 1482 { (uint_t)PM_START_CPUPM_POLL, "PM_START_CPUPM_POLL", NULL }, 1483 { (uint_t)PM_STOP_CPUPM, "PM_STOP_CPUPM", NULL }, 1484 { (uint_t)PM_GET_CPU_THRESHOLD, "PM_GET_CPU_THRESHOLD", NULL }, 1485 { (uint_t)PM_SET_CPU_THRESHOLD, "PM_SET_CPU_THRESHOLD", NULL }, 1486 { (uint_t)PM_GET_CPUPM_STATE, "PM_GET_CPUPM_STATE", NULL }, 1487 { (uint_t)PM_START_AUTOS3, "PM_START_AUTOS3", NULL }, 1488 { (uint_t)PM_STOP_AUTOS3, "PM_STOP_AUTOS3", NULL }, 1489 { (uint_t)PM_ENABLE_S3, "PM_ENABLE_S3", NULL }, 1490 { (uint_t)PM_DISABLE_S3, "PM_DISABLE_S3", NULL }, 1491 { (uint_t)PM_ENTER_S3, "PM_ENTER_S3", NULL }, 1492 { (uint_t)PM_DISABLE_CPU_DEEP_IDLE, "PM_DISABLE_CPU_DEEP_IDLE", 1493 NULL }, 1494 { (uint_t)PM_ENABLE_CPU_DEEP_IDLE, "PM_START_CPU_DEEP_IDLE", 1495 NULL }, 1496 { (uint_t)PM_DEFAULT_CPU_DEEP_IDLE, "PM_DFLT_CPU_DEEP_IDLE", 1497 NULL }, 1498 #ifdef _SYSCALL32 1499 { (uint_t)PM_GET_STATE_CHANGE, "PM_GET_STATE_CHANGE", 1500 "pm_state_change32_t" }, 1501 { (uint_t)PM_GET_STATE_CHANGE_WAIT, "PM_GET_STATE_CHANGE_WAIT", 1502 "pm_state_change32_t" }, 1503 { (uint_t)PM_DIRECT_NOTIFY, "PM_DIRECT_NOTIFY", 1504 "pm_state_change32_t" }, 1505 { (uint_t)PM_DIRECT_NOTIFY_WAIT, "PM_DIRECT_NOTIFY_WAIT", 1506 "pm_state_change32_t" }, 1507 { (uint_t)PM_REPARSE_PM_PROPS, "PM_REPARSE_PM_PROPS", 1508 "pm_req32_t" }, 1509 { (uint_t)PM_SET_DEVICE_THRESHOLD, "PM_SET_DEVICE_THRESHOLD", 1510 "pm_req32_t" }, 1511 { (uint_t)PM_GET_STATS, "PM_GET_STATS", 1512 "pm_req32_t" }, 1513 { (uint_t)PM_GET_DEVICE_THRESHOLD, "PM_GET_DEVICE_THRESHOLD", 1514 "pm_req32_t" }, 1515 { (uint_t)PM_GET_POWER_NAME, "PM_GET_POWER_NAME", 1516 "pm_req32_t" }, 1517 { (uint_t)PM_GET_POWER_LEVELS, "PM_GET_POWER_LEVELS", 1518 "pm_req32_t" }, 1519 { (uint_t)PM_GET_NUM_COMPONENTS, "PM_GET_NUM_COMPONENTS", 1520 "pm_req32_t" }, 1521 { (uint_t)PM_GET_COMPONENT_NAME, "PM_GET_COMPONENT_NAME", 1522 "pm_req32_t" }, 1523 { (uint_t)PM_GET_NUM_POWER_LEVELS, "PM_GET_NUM_POWER_LEVELS", 1524 "pm_req32_t" }, 1525 { (uint_t)PM_DIRECT_PM, "PM_DIRECT_PM", 1526 "pm_req32_t" }, 1527 { (uint_t)PM_RELEASE_DIRECT_PM, "PM_RELEASE_DIRECT_PM", 1528 "pm_req32_t" }, 1529 { (uint_t)PM_RESET_DEVICE_THRESHOLD, "PM_RESET_DEVICE_THRESHOLD", 1530 "pm_req32_t" }, 1531 { (uint_t)PM_GET_DEVICE_TYPE, "PM_GET_DEVICE_TYPE", 1532 "pm_req32_t" }, 1533 { (uint_t)PM_SET_COMPONENT_THRESHOLDS, "PM_SET_COMPONENT_THRESHOLDS", 1534 "pm_req32_t" }, 1535 { (uint_t)PM_GET_COMPONENT_THRESHOLDS, "PM_GET_COMPONENT_THRESHOLDS", 1536 "pm_req32_t" }, 1537 { (uint_t)PM_GET_DEVICE_THRESHOLD_BASIS, 1538 "PM_GET_DEVICE_THRESHOLD_BASIS", "pm_req32_t" }, 1539 { (uint_t)PM_SET_CURRENT_POWER, "PM_SET_CURRENT_POWER", 1540 "pm_req32_t" }, 1541 { (uint_t)PM_GET_CURRENT_POWER, "PM_GET_CURRENT_POWER", 1542 "pm_req32_t" }, 1543 { (uint_t)PM_GET_FULL_POWER, "PM_GET_FULL_POWER", 1544 "pm_req32_t" }, 1545 { (uint_t)PM_ADD_DEPENDENT, "PM_ADD_DEPENDENT", 1546 "pm_req32_t" }, 1547 { (uint_t)PM_GET_TIME_IDLE, "PM_GET_TIME_IDLE", 1548 "pm_req32_t" }, 1549 { (uint_t)PM_ADD_DEPENDENT_PROPERTY, "PM_ADD_DEPENDENT_PROPERTY", 1550 "pm_req32_t" }, 1551 { (uint_t)PM_GET_CMD_NAME, "PM_GET_CMD_NAME", 1552 "pm_req32_t" }, 1553 { (uint_t)PM_SEARCH_LIST, "PM_SEARCH_LIST", 1554 "pm_searchargs32_t" }, 1555 #else /* _SYSCALL32 */ 1556 { (uint_t)PM_GET_STATE_CHANGE, "PM_GET_STATE_CHANGE", 1557 "pm_state_change_t" }, 1558 { (uint_t)PM_GET_STATE_CHANGE_WAIT, "PM_GET_STATE_CHANGE_WAIT", 1559 "pm_state_change_t" }, 1560 { (uint_t)PM_DIRECT_NOTIFY, "PM_DIRECT_NOTIFY", 1561 "pm_state_change_t" }, 1562 { (uint_t)PM_DIRECT_NOTIFY_WAIT, "PM_DIRECT_NOTIFY_WAIT", 1563 "pm_state_change_t" }, 1564 { (uint_t)PM_REPARSE_PM_PROPS, "PM_REPARSE_PM_PROPS", 1565 "pm_req_t" }, 1566 { (uint_t)PM_SET_DEVICE_THRESHOLD, "PM_SET_DEVICE_THRESHOLD", 1567 "pm_req_t" }, 1568 { (uint_t)PM_GET_STATS, "PM_GET_STATS", 1569 "pm_req_t" }, 1570 { (uint_t)PM_GET_DEVICE_THRESHOLD, "PM_GET_DEVICE_THRESHOLD", 1571 "pm_req_t" }, 1572 { (uint_t)PM_GET_POWER_NAME, "PM_GET_POWER_NAME", 1573 "pm_req_t" }, 1574 { (uint_t)PM_GET_POWER_LEVELS, "PM_GET_POWER_LEVELS", 1575 "pm_req_t" }, 1576 { (uint_t)PM_GET_NUM_COMPONENTS, "PM_GET_NUM_COMPONENTS", 1577 "pm_req_t" }, 1578 { (uint_t)PM_GET_COMPONENT_NAME, "PM_GET_COMPONENT_NAME", 1579 "pm_req_t" }, 1580 { (uint_t)PM_GET_NUM_POWER_LEVELS, "PM_GET_NUM_POWER_LEVELS", 1581 "pm_req_t" }, 1582 { (uint_t)PM_DIRECT_PM, "PM_DIRECT_PM", 1583 "pm_req_t" }, 1584 { (uint_t)PM_RELEASE_DIRECT_PM, "PM_RELEASE_DIRECT_PM", 1585 "pm_req_t" }, 1586 { (uint_t)PM_RESET_DEVICE_THRESHOLD, "PM_RESET_DEVICE_THRESHOLD", 1587 "pm_req_t" }, 1588 { (uint_t)PM_GET_DEVICE_TYPE, "PM_GET_DEVICE_TYPE", 1589 "pm_req_t" }, 1590 { (uint_t)PM_SET_COMPONENT_THRESHOLDS, "PM_SET_COMPONENT_THRESHOLDS", 1591 "pm_req_t" }, 1592 { (uint_t)PM_GET_COMPONENT_THRESHOLDS, "PM_GET_COMPONENT_THRESHOLDS", 1593 "pm_req_t" }, 1594 { (uint_t)PM_GET_DEVICE_THRESHOLD_BASIS, 1595 "PM_GET_DEVICE_THRESHOLD_BASIS", "pm_req_t" }, 1596 { (uint_t)PM_SET_CURRENT_POWER, "PM_SET_CURRENT_POWER", 1597 "pm_req_t" }, 1598 { (uint_t)PM_GET_CURRENT_POWER, "PM_GET_CURRENT_POWER", 1599 "pm_req_t" }, 1600 { (uint_t)PM_GET_FULL_POWER, "PM_GET_FULL_POWER", 1601 "pm_req_t" }, 1602 { (uint_t)PM_ADD_DEPENDENT, "PM_ADD_DEPENDENT", 1603 "pm_req_t" }, 1604 { (uint_t)PM_GET_TIME_IDLE, "PM_GET_TIME_IDLE", 1605 "pm_req_t" }, 1606 { (uint_t)PM_ADD_DEPENDENT_PROPERTY, "PM_ADD_DEPENDENT_PROPERTY", 1607 "pm_req_t" }, 1608 { (uint_t)PM_GET_CMD_NAME, "PM_GET_CMD_NAME", 1609 "pm_req_t" }, 1610 { (uint_t)PM_SEARCH_LIST, "PM_SEARCH_LIST", 1611 "pm_searchargs_t" }, 1612 #endif /* _SYSCALL */ 1613 1614 { (uint_t)0, NULL, NULL } 1615 }; 1616 1617 void 1618 ioctl_ioccom(char *buf, size_t size, uint_t code, int nbytes, int x, int y) 1619 { 1620 const char *inoutstr; 1621 1622 if (code & IOC_VOID) 1623 inoutstr = ""; 1624 else if ((code & IOC_INOUT) == IOC_INOUT) 1625 inoutstr = "WR"; 1626 else 1627 inoutstr = code & IOC_IN ? "W" : "R"; 1628 1629 if (isascii(x) && isprint(x)) 1630 (void) snprintf(buf, size, "_IO%sN('%c', %d, %d)", inoutstr, 1631 x, y, nbytes); 1632 else 1633 (void) snprintf(buf, size, "_IO%sN(0x%x, %d, %d)", inoutstr, 1634 x, y, nbytes); 1635 } 1636 1637 1638 const char * 1639 ioctlname(private_t *pri, uint_t code) 1640 { 1641 const struct ioc *ip; 1642 const char *str = NULL; 1643 1644 for (ip = &ioc[0]; ip->name; ip++) { 1645 if (code == ip->code) { 1646 str = ip->name; 1647 break; 1648 } 1649 } 1650 1651 /* 1652 * Developers hide ascii ioctl names in the ioctl subcode; for example 1653 * 0x445210 should be printed 'D'<<16|'R'<<8|10. We allow for all 1654 * three high order bytes (called hi, mid and lo) to contain ascii 1655 * characters. 1656 */ 1657 if (str == NULL) { 1658 int c_hi = code >> 24; 1659 int c_mid = (code >> 16) & 0xff; 1660 int c_mid_nm = (code >> 16); 1661 int c_lo = (code >> 8) & 0xff; 1662 int c_lo_nm = code >> 8; 1663 1664 if (isascii(c_lo) && isprint(c_lo) && 1665 isascii(c_mid) && isprint(c_mid) && 1666 isascii(c_hi) && isprint(c_hi)) 1667 (void) sprintf(pri->code_buf, 1668 "(('%c'<<24)|('%c'<<16)|('%c'<<8)|%d)", 1669 c_hi, c_mid, c_lo, code & 0xff); 1670 else if (isascii(c_lo) && isprint(c_lo) && 1671 isascii(c_mid_nm) && isprint(c_mid_nm)) 1672 (void) sprintf(pri->code_buf, 1673 "(('%c'<<16)|('%c'<<8)|%d)", c_mid, c_lo, 1674 code & 0xff); 1675 else if (isascii(c_lo_nm) && isprint(c_lo_nm)) 1676 (void) sprintf(pri->code_buf, "(('%c'<<8)|%d)", 1677 c_lo_nm, code & 0xff); 1678 else if (code & (IOC_VOID|IOC_INOUT)) 1679 ioctl_ioccom(pri->code_buf, sizeof (pri->code_buf), 1680 code, c_mid, c_lo, code & 0xff); 1681 else 1682 (void) sprintf(pri->code_buf, "0x%.4X", code); 1683 str = (const char *)pri->code_buf; 1684 } 1685 1686 return (str); 1687 } 1688 1689 1690 const char * 1691 ioctldatastruct(uint_t code) 1692 { 1693 const struct ioc *ip; 1694 const char *str = NULL; 1695 1696 for (ip = &ioc[0]; ip->name != NULL; ip++) { 1697 if (code == ip->code) { 1698 str = ip->datastruct; 1699 break; 1700 } 1701 } 1702 return (str); 1703 } 1704 1705 1706 const char * 1707 fcntlname(int code) 1708 { 1709 const char *str = NULL; 1710 1711 if (code >= FCNTLMIN && code <= FCNTLMAX) 1712 str = FCNTLname[code-FCNTLMIN]; 1713 return (str); 1714 } 1715 1716 const char * 1717 sfsname(int code) 1718 { 1719 const char *str = NULL; 1720 1721 if (code >= SYSFSMIN && code <= SYSFSMAX) 1722 str = SYSFSname[code-SYSFSMIN]; 1723 return (str); 1724 } 1725 1726 const char * 1727 plockname(int code) 1728 { 1729 const char *str = NULL; 1730 1731 if (code >= PLOCKMIN && code <= PLOCKMAX) 1732 str = PLOCKname[code-PLOCKMIN]; 1733 return (str); 1734 } 1735 1736 /* ARGSUSED */ 1737 const char * 1738 si86name(int code) 1739 { 1740 const char *str = NULL; 1741 1742 #if defined(__i386) || defined(__amd64) 1743 switch (code) { 1744 case SI86SWPI: str = "SI86SWPI"; break; 1745 case SI86SYM: str = "SI86SYM"; break; 1746 case SI86CONF: str = "SI86CONF"; break; 1747 case SI86BOOT: str = "SI86BOOT"; break; 1748 case SI86AUTO: str = "SI86AUTO"; break; 1749 case SI86EDT: str = "SI86EDT"; break; 1750 case SI86SWAP: str = "SI86SWAP"; break; 1751 case SI86FPHW: str = "SI86FPHW"; break; 1752 case SI86FPSTART: str = "SI86FPSTART"; break; 1753 case GRNON: str = "GRNON"; break; 1754 case GRNFLASH: str = "GRNFLASH"; break; 1755 case STIME: str = "STIME"; break; 1756 case SETNAME: str = "SETNAME"; break; 1757 case RNVR: str = "RNVR"; break; 1758 case WNVR: str = "WNVR"; break; 1759 case RTODC: str = "RTODC"; break; 1760 case CHKSER: str = "CHKSER"; break; 1761 case SI86NVPRT: str = "SI86NVPRT"; break; 1762 case SANUPD: str = "SANUPD"; break; 1763 case SI86KSTR: str = "SI86KSTR"; break; 1764 case SI86MEM: str = "SI86MEM"; break; 1765 case SI86TODEMON: str = "SI86TODEMON"; break; 1766 case SI86CCDEMON: str = "SI86CCDEMON"; break; 1767 case SI86CACHE: str = "SI86CACHE"; break; 1768 case SI86DELMEM: str = "SI86DELMEM"; break; 1769 case SI86ADDMEM: str = "SI86ADDMEM"; break; 1770 /* 71 through 74 reserved for VPIX */ 1771 case SI86V86: str = "SI86V86"; break; 1772 case SI86SLTIME: str = "SI86SLTIME"; break; 1773 case SI86DSCR: str = "SI86DSCR"; break; 1774 case RDUBLK: str = "RDUBLK"; break; 1775 /* NFA entry point */ 1776 case SI86NFA: str = "SI86NFA"; break; 1777 case SI86VM86: str = "SI86VM86"; break; 1778 case SI86VMENABLE: str = "SI86VMENABLE"; break; 1779 case SI86LIMUSER: str = "SI86LIMUSER"; break; 1780 case SI86RDID: str = "SI86RDID"; break; 1781 case SI86RDBOOT: str = "SI86RDBOOT"; break; 1782 /* Merged Product defines */ 1783 case SI86SHFIL: str = "SI86SHFIL"; break; 1784 case SI86PCHRGN: str = "SI86PCHRGN"; break; 1785 case SI86BADVISE: str = "SI86BADVISE"; break; 1786 case SI86SHRGN: str = "SI86SHRGN"; break; 1787 case SI86CHIDT: str = "SI86CHIDT"; break; 1788 case SI86EMULRDA: str = "SI86EMULRDA"; break; 1789 /* RTC commands */ 1790 case WTODC: str = "WTODC"; break; 1791 case SGMTL: str = "SGMTL"; break; 1792 case GGMTL: str = "GGMTL"; break; 1793 case RTCSYNC: str = "RTCSYNC"; break; 1794 } 1795 #endif /* __i386 */ 1796 1797 return (str); 1798 } 1799 1800 const char * 1801 utscode(int code) 1802 { 1803 const char *str = NULL; 1804 1805 switch (code) { 1806 case UTS_UNAME: str = "UNAME"; break; 1807 case UTS_USTAT: str = "USTAT"; break; 1808 case UTS_FUSERS: str = "FUSERS"; break; 1809 } 1810 1811 return (str); 1812 } 1813 1814 const char * 1815 rctlsyscode(int code) 1816 { 1817 const char *str = NULL; 1818 switch (code) { 1819 case 0: str = "GETRCTL"; break; 1820 case 1: str = "SETRCTL"; break; 1821 case 2: str = "RCTLSYS_LST"; break; 1822 case 3: str = "RCTLSYS_CTL"; break; 1823 case 4: str = "RCTLSYS_SETPROJ"; break; 1824 default: str = "UNKNOWN"; break; 1825 } 1826 return (str); 1827 } 1828 1829 const char * 1830 rctl_local_action(private_t *pri, uint_t val) 1831 { 1832 uint_t action = val & (~RCTL_LOCAL_ACTION_MASK); 1833 1834 char *s = pri->code_buf; 1835 1836 *s = '\0'; 1837 1838 if (action & RCTL_LOCAL_NOACTION) { 1839 action ^= RCTL_LOCAL_NOACTION; 1840 (void) strlcat(s, "|RCTL_LOCAL_NOACTION", 1841 sizeof (pri->code_buf)); 1842 } 1843 if (action & RCTL_LOCAL_SIGNAL) { 1844 action ^= RCTL_LOCAL_SIGNAL; 1845 (void) strlcat(s, "|RCTL_LOCAL_SIGNAL", 1846 sizeof (pri->code_buf)); 1847 } 1848 if (action & RCTL_LOCAL_DENY) { 1849 action ^= RCTL_LOCAL_DENY; 1850 (void) strlcat(s, "|RCTL_LOCAL_DENY", 1851 sizeof (pri->code_buf)); 1852 } 1853 1854 if ((action & (~RCTL_LOCAL_ACTION_MASK)) != 0) 1855 return (NULL); 1856 else if (*s != '\0') 1857 return (s+1); 1858 else 1859 return (NULL); 1860 } 1861 1862 1863 const char * 1864 rctl_local_flags(private_t *pri, uint_t val) 1865 { 1866 uint_t pval = val & RCTL_LOCAL_ACTION_MASK; 1867 char *s = pri->code_buf; 1868 1869 *s = '\0'; 1870 1871 if (pval & RCTL_LOCAL_MAXIMAL) { 1872 pval ^= RCTL_LOCAL_MAXIMAL; 1873 (void) strlcat(s, "|RCTL_LOCAL_MAXIMAL", 1874 sizeof (pri->code_buf)); 1875 } 1876 1877 if ((pval & RCTL_LOCAL_ACTION_MASK) != 0) 1878 return (NULL); 1879 else if (*s != '\0') 1880 return (s+1); 1881 else 1882 return (NULL); 1883 } 1884 1885 1886 const char * 1887 sconfname(int code) 1888 { 1889 const char *str = NULL; 1890 1891 if (code >= SCONFMIN && code <= SCONFMAX) 1892 str = SCONFname[code-SCONFMIN]; 1893 return (str); 1894 } 1895 1896 const char * 1897 pathconfname(int code) 1898 { 1899 const char *str = NULL; 1900 1901 if (code >= PATHCONFMIN && code <= PATHCONFMAX) 1902 str = PATHCONFname[code-PATHCONFMIN]; 1903 return (str); 1904 } 1905 1906 const char * 1907 sigarg(private_t *pri, int arg) 1908 { 1909 char *str = NULL; 1910 int sig = (arg & SIGNO_MASK); 1911 1912 str = pri->code_buf; 1913 arg &= ~SIGNO_MASK; 1914 if (arg & ~(SIGDEFER|SIGHOLD|SIGRELSE|SIGIGNORE|SIGPAUSE)) 1915 (void) snprintf(pri->code_buf, sizeof (pri->code_buf), 1916 "%s|0x%X", signame(pri, sig), arg); 1917 else { 1918 (void) strcpy(str, signame(pri, sig)); 1919 if (arg & SIGDEFER) 1920 (void) strcat(str, "|SIGDEFER"); 1921 if (arg & SIGHOLD) 1922 (void) strcat(str, "|SIGHOLD"); 1923 if (arg & SIGRELSE) 1924 (void) strcat(str, "|SIGRELSE"); 1925 if (arg & SIGIGNORE) 1926 (void) strcat(str, "|SIGIGNORE"); 1927 if (arg & SIGPAUSE) 1928 (void) strcat(str, "|SIGPAUSE"); 1929 } 1930 1931 return ((const char *)str); 1932 } 1933 1934 #define ALL_O_FLAGS \ 1935 (O_NDELAY|O_APPEND|O_SYNC|O_DSYNC|O_NONBLOCK|O_CREAT|O_TRUNC\ 1936 |O_EXCL|O_NOCTTY|O_LARGEFILE|O_RSYNC|O_XATTR|O_NOFOLLOW|O_NOLINKS) 1937 1938 const char * 1939 openarg(private_t *pri, int arg) 1940 { 1941 char *str = pri->code_buf; 1942 1943 switch (arg & ~ALL_O_FLAGS) { 1944 default: 1945 return ((char *)NULL); 1946 case O_RDONLY: 1947 (void) strcpy(str, "O_RDONLY"); 1948 break; 1949 case O_WRONLY: 1950 (void) strcpy(str, "O_WRONLY"); 1951 break; 1952 case O_RDWR: 1953 (void) strcpy(str, "O_RDWR"); 1954 break; 1955 } 1956 1957 if (arg & O_NDELAY) 1958 (void) strlcat(str, "|O_NDELAY", sizeof (pri->code_buf)); 1959 if (arg & O_APPEND) 1960 (void) strlcat(str, "|O_APPEND", sizeof (pri->code_buf)); 1961 if (arg & O_SYNC) 1962 (void) strlcat(str, "|O_SYNC", sizeof (pri->code_buf)); 1963 if (arg & O_DSYNC) 1964 (void) strlcat(str, "|O_DSYNC", sizeof (pri->code_buf)); 1965 if (arg & O_NONBLOCK) 1966 (void) strlcat(str, "|O_NONBLOCK", sizeof (pri->code_buf)); 1967 if (arg & O_CREAT) 1968 (void) strlcat(str, "|O_CREAT", sizeof (pri->code_buf)); 1969 if (arg & O_TRUNC) 1970 (void) strlcat(str, "|O_TRUNC", sizeof (pri->code_buf)); 1971 if (arg & O_EXCL) 1972 (void) strlcat(str, "|O_EXCL", sizeof (pri->code_buf)); 1973 if (arg & O_NOCTTY) 1974 (void) strlcat(str, "|O_NOCTTY", sizeof (pri->code_buf)); 1975 if (arg & O_LARGEFILE) 1976 (void) strlcat(str, "|O_LARGEFILE", sizeof (pri->code_buf)); 1977 if (arg & O_RSYNC) 1978 (void) strlcat(str, "|O_RSYNC", sizeof (pri->code_buf)); 1979 if (arg & O_XATTR) 1980 (void) strlcat(str, "|O_XATTR", sizeof (pri->code_buf)); 1981 if (arg & O_NOFOLLOW) 1982 (void) strlcat(str, "|O_NOFOLLOW", sizeof (pri->code_buf)); 1983 if (arg & O_NOLINKS) 1984 (void) strlcat(str, "|O_NOLINKS", sizeof (pri->code_buf)); 1985 1986 return ((const char *)str); 1987 } 1988 1989 const char * 1990 whencearg(int arg) 1991 { 1992 const char *str = NULL; 1993 1994 switch (arg) { 1995 case SEEK_SET: str = "SEEK_SET"; break; 1996 case SEEK_CUR: str = "SEEK_CUR"; break; 1997 case SEEK_END: str = "SEEK_END"; break; 1998 case SEEK_DATA: str = "SEEK_DATA"; break; 1999 case SEEK_HOLE: str = "SEEK_HOLE"; break; 2000 } 2001 2002 return (str); 2003 } 2004 2005 #define IPC_FLAGS (IPC_ALLOC|IPC_CREAT|IPC_EXCL|IPC_NOWAIT) 2006 2007 char * 2008 ipcflags(private_t *pri, int arg) 2009 { 2010 char *str = pri->code_buf; 2011 2012 if (arg & 0777) 2013 (void) sprintf(str, "0%.3o", arg&0777); 2014 else 2015 *str = '\0'; 2016 2017 if (arg & IPC_ALLOC) 2018 (void) strcat(str, "|IPC_ALLOC"); 2019 if (arg & IPC_CREAT) 2020 (void) strcat(str, "|IPC_CREAT"); 2021 if (arg & IPC_EXCL) 2022 (void) strcat(str, "|IPC_EXCL"); 2023 if (arg & IPC_NOWAIT) 2024 (void) strcat(str, "|IPC_NOWAIT"); 2025 2026 return (str); 2027 } 2028 2029 const char * 2030 msgflags(private_t *pri, int arg) 2031 { 2032 char *str; 2033 2034 if (arg == 0 || (arg & ~(IPC_FLAGS|MSG_NOERROR|0777)) != 0) 2035 return ((char *)NULL); 2036 2037 str = ipcflags(pri, arg); 2038 2039 if (arg & MSG_NOERROR) 2040 (void) strcat(str, "|MSG_NOERROR"); 2041 2042 if (*str == '|') 2043 str++; 2044 return ((const char *)str); 2045 } 2046 2047 const char * 2048 semflags(private_t *pri, int arg) 2049 { 2050 char *str; 2051 2052 if (arg == 0 || (arg & ~(IPC_FLAGS|SEM_UNDO|0777)) != 0) 2053 return ((char *)NULL); 2054 2055 str = ipcflags(pri, arg); 2056 2057 if (arg & SEM_UNDO) 2058 (void) strcat(str, "|SEM_UNDO"); 2059 2060 if (*str == '|') 2061 str++; 2062 return ((const char *)str); 2063 } 2064 2065 const char * 2066 shmflags(private_t *pri, int arg) 2067 { 2068 char *str; 2069 2070 if (arg == 0 || (arg & ~(IPC_FLAGS|SHM_RDONLY|SHM_RND|0777)) != 0) 2071 return ((char *)NULL); 2072 2073 str = ipcflags(pri, arg); 2074 2075 if (arg & SHM_RDONLY) 2076 (void) strcat(str, "|SHM_RDONLY"); 2077 if (arg & SHM_RND) 2078 (void) strcat(str, "|SHM_RND"); 2079 2080 if (*str == '|') 2081 str++; 2082 return ((const char *)str); 2083 } 2084 2085 #define MSGCMDMIN 0 2086 #define MSGCMDMAX IPC_STAT64 2087 const char *const MSGCMDname[MSGCMDMAX+1] = { 2088 NULL, NULL, NULL, NULL, NULL, 2089 NULL, NULL, NULL, NULL, NULL, 2090 "IPC_RMID", /* 10 */ 2091 "IPC_SET", /* 11 */ 2092 "IPC_STAT", /* 12 */ 2093 "IPC_SET64", /* 13 */ 2094 "IPC_STAT64", /* 14 */ 2095 }; 2096 2097 #define SEMCMDMIN 0 2098 #define SEMCMDMAX IPC_STAT64 2099 const char *const SEMCMDname[SEMCMDMAX+1] = { 2100 NULL, /* 0 */ 2101 NULL, /* 1 */ 2102 NULL, /* 2 */ 2103 "GETNCNT", /* 3 */ 2104 "GETPID", /* 4 */ 2105 "GETVAL", /* 5 */ 2106 "GETALL", /* 6 */ 2107 "GETZCNT", /* 7 */ 2108 "SETVAL", /* 8 */ 2109 "SETALL", /* 9 */ 2110 "IPC_RMID", /* 10 */ 2111 "IPC_SET", /* 11 */ 2112 "IPC_STAT", /* 12 */ 2113 "IPC_SET64", /* 13 */ 2114 "IPC_STAT64", /* 14 */ 2115 }; 2116 2117 #define SHMCMDMIN 0 2118 #define SHMCMDMAX IPC_STAT64 2119 const char *const SHMCMDname[SHMCMDMAX+1] = { 2120 NULL, /* 0 */ 2121 NULL, /* 1 */ 2122 NULL, /* 2 */ 2123 "SHM_LOCK", /* 3 */ 2124 "SHM_UNLOCK", /* 4 */ 2125 NULL, NULL, NULL, NULL, NULL, /* 5 NULLs */ 2126 "IPC_RMID", /* 10 */ 2127 "IPC_SET", /* 11 */ 2128 "IPC_STAT", /* 12 */ 2129 "IPC_SET64", /* 13 */ 2130 "IPC_STAT64", /* 14 */ 2131 }; 2132 2133 const char * 2134 msgcmd(int arg) 2135 { 2136 const char *str = NULL; 2137 2138 if (arg >= MSGCMDMIN && arg <= MSGCMDMAX) 2139 str = MSGCMDname[arg-MSGCMDMIN]; 2140 return (str); 2141 } 2142 2143 const char * 2144 semcmd(int arg) 2145 { 2146 const char *str = NULL; 2147 2148 if (arg >= SEMCMDMIN && arg <= SEMCMDMAX) 2149 str = SEMCMDname[arg-SEMCMDMIN]; 2150 return (str); 2151 } 2152 2153 const char * 2154 shmcmd(int arg) 2155 { 2156 const char *str = NULL; 2157 2158 if (arg >= SHMCMDMIN && arg <= SHMCMDMAX) 2159 str = SHMCMDname[arg-SHMCMDMIN]; 2160 return (str); 2161 } 2162 2163 const char * 2164 strrdopt(int arg) /* streams read option (I_SRDOPT I_GRDOPT) */ 2165 { 2166 const char *str = NULL; 2167 2168 switch (arg) { 2169 case RNORM: str = "RNORM"; break; 2170 case RMSGD: str = "RMSGD"; break; 2171 case RMSGN: str = "RMSGN"; break; 2172 } 2173 2174 return (str); 2175 } 2176 2177 /* bit map of streams events (I_SETSIG & I_GETSIG) */ 2178 const char * 2179 strevents(private_t *pri, int arg) 2180 { 2181 char *str = pri->code_buf; 2182 2183 if (arg & ~(S_INPUT|S_HIPRI|S_OUTPUT|S_MSG|S_ERROR|S_HANGUP)) 2184 return ((char *)NULL); 2185 2186 *str = '\0'; 2187 if (arg & S_INPUT) 2188 (void) strcat(str, "|S_INPUT"); 2189 if (arg & S_HIPRI) 2190 (void) strcat(str, "|S_HIPRI"); 2191 if (arg & S_OUTPUT) 2192 (void) strcat(str, "|S_OUTPUT"); 2193 if (arg & S_MSG) 2194 (void) strcat(str, "|S_MSG"); 2195 if (arg & S_ERROR) 2196 (void) strcat(str, "|S_ERROR"); 2197 if (arg & S_HANGUP) 2198 (void) strcat(str, "|S_HANGUP"); 2199 2200 return ((const char *)(str+1)); 2201 } 2202 2203 const char * 2204 tiocflush(private_t *pri, int arg) /* bit map passsed by TIOCFLUSH */ 2205 { 2206 char *str = pri->code_buf; 2207 2208 if (arg & ~(FREAD|FWRITE)) 2209 return ((char *)NULL); 2210 2211 *str = '\0'; 2212 if (arg & FREAD) 2213 (void) strcat(str, "|FREAD"); 2214 if (arg & FWRITE) 2215 (void) strcat(str, "|FWRITE"); 2216 2217 return ((const char *)(str+1)); 2218 } 2219 2220 const char * 2221 strflush(int arg) /* streams flush option (I_FLUSH) */ 2222 { 2223 const char *str = NULL; 2224 2225 switch (arg) { 2226 case FLUSHR: str = "FLUSHR"; break; 2227 case FLUSHW: str = "FLUSHW"; break; 2228 case FLUSHRW: str = "FLUSHRW"; break; 2229 } 2230 2231 return (str); 2232 } 2233 2234 #define ALL_MOUNT_FLAGS (MS_RDONLY|MS_FSS|MS_DATA|MS_NOSUID|MS_REMOUNT| \ 2235 MS_NOTRUNC|MS_OVERLAY|MS_OPTIONSTR|MS_GLOBAL|MS_FORCE|MS_NOMNTTAB) 2236 2237 const char * 2238 mountflags(private_t *pri, int arg) /* bit map of mount syscall flags */ 2239 { 2240 char *str = pri->code_buf; 2241 size_t used = 0; 2242 2243 if (arg & ~ALL_MOUNT_FLAGS) 2244 return ((char *)NULL); 2245 2246 *str = '\0'; 2247 if (arg & MS_RDONLY) 2248 used = strlcat(str, "|MS_RDONLY", sizeof (pri->code_buf)); 2249 if (arg & MS_FSS) 2250 used = strlcat(str, "|MS_FSS", sizeof (pri->code_buf)); 2251 if (arg & MS_DATA) 2252 used = strlcat(str, "|MS_DATA", sizeof (pri->code_buf)); 2253 if (arg & MS_NOSUID) 2254 used = strlcat(str, "|MS_NOSUID", sizeof (pri->code_buf)); 2255 if (arg & MS_REMOUNT) 2256 used = strlcat(str, "|MS_REMOUNT", sizeof (pri->code_buf)); 2257 if (arg & MS_NOTRUNC) 2258 used = strlcat(str, "|MS_NOTRUNC", sizeof (pri->code_buf)); 2259 if (arg & MS_OVERLAY) 2260 used = strlcat(str, "|MS_OVERLAY", sizeof (pri->code_buf)); 2261 if (arg & MS_OPTIONSTR) 2262 used = strlcat(str, "|MS_OPTIONSTR", sizeof (pri->code_buf)); 2263 if (arg & MS_GLOBAL) 2264 used = strlcat(str, "|MS_GLOBAL", sizeof (pri->code_buf)); 2265 if (arg & MS_FORCE) 2266 used = strlcat(str, "|MS_FORCE", sizeof (pri->code_buf)); 2267 if (arg & MS_NOMNTTAB) 2268 used = strlcat(str, "|MS_NOMNTTAB", sizeof (pri->code_buf)); 2269 2270 if (used == 0 || used >= sizeof (pri->code_buf)) 2271 return ((char *)NULL); /* use prt_hex() */ 2272 2273 return ((const char *)(str+1)); 2274 } 2275 2276 const char * 2277 svfsflags(private_t *pri, ulong_t arg) /* bit map of statvfs syscall flags */ 2278 { 2279 char *str = pri->code_buf; 2280 2281 if (arg & ~(ST_RDONLY|ST_NOSUID|ST_NOTRUNC)) { 2282 (void) sprintf(str, "0x%lx", arg); 2283 return (str); 2284 } 2285 *str = '\0'; 2286 if (arg & ST_RDONLY) 2287 (void) strcat(str, "|ST_RDONLY"); 2288 if (arg & ST_NOSUID) 2289 (void) strcat(str, "|ST_NOSUID"); 2290 if (arg & ST_NOTRUNC) 2291 (void) strcat(str, "|ST_NOTRUNC"); 2292 if (*str == '\0') 2293 (void) strcat(str, "|0"); 2294 return ((const char *)(str+1)); 2295 } 2296 2297 const char * 2298 fuiname(int arg) /* fusers() input argument */ 2299 { 2300 const char *str = NULL; 2301 2302 switch (arg) { 2303 case F_FILE_ONLY: str = "F_FILE_ONLY"; break; 2304 case F_CONTAINED: str = "F_CONTAINED"; break; 2305 } 2306 2307 return (str); 2308 } 2309 2310 const char * 2311 fuflags(private_t *pri, int arg) /* fusers() output flags */ 2312 { 2313 char *str = pri->code_buf; 2314 2315 if (arg & ~(F_CDIR|F_RDIR|F_TEXT|F_MAP|F_OPEN|F_TRACE|F_TTY)) { 2316 (void) sprintf(str, "0x%x", arg); 2317 return (str); 2318 } 2319 *str = '\0'; 2320 if (arg & F_CDIR) 2321 (void) strcat(str, "|F_CDIR"); 2322 if (arg & F_RDIR) 2323 (void) strcat(str, "|F_RDIR"); 2324 if (arg & F_TEXT) 2325 (void) strcat(str, "|F_TEXT"); 2326 if (arg & F_MAP) 2327 (void) strcat(str, "|F_MAP"); 2328 if (arg & F_OPEN) 2329 (void) strcat(str, "|F_OPEN"); 2330 if (arg & F_TRACE) 2331 (void) strcat(str, "|F_TRACE"); 2332 if (arg & F_TTY) 2333 (void) strcat(str, "|F_TTY"); 2334 if (*str == '\0') 2335 (void) strcat(str, "|0"); 2336 return ((const char *)(str+1)); 2337 } 2338 2339 2340 const char * 2341 ipprotos(int arg) /* IP protocols cf. netinet/in.h */ 2342 { 2343 switch (arg) { 2344 case IPPROTO_IP: return ("IPPROTO_IP"); 2345 case IPPROTO_ICMP: return ("IPPROTO_ICMP"); 2346 case IPPROTO_IGMP: return ("IPPROTO_IGMP"); 2347 case IPPROTO_GGP: return ("IPPROTO_GGP"); 2348 case IPPROTO_ENCAP: return ("IPPROTO_ENCAP"); 2349 case IPPROTO_TCP: return ("IPPROTO_TCP"); 2350 case IPPROTO_EGP: return ("IPPROTO_EGP"); 2351 case IPPROTO_PUP: return ("IPPROTO_PUP"); 2352 case IPPROTO_UDP: return ("IPPROTO_UDP"); 2353 case IPPROTO_IDP: return ("IPPROTO_IDP"); 2354 case IPPROTO_IPV6: return ("IPPROTO_IPV6"); 2355 case IPPROTO_ROUTING: return ("IPPROTO_ROUTING"); 2356 case IPPROTO_FRAGMENT: return ("IPPROTO_FRAGMENT"); 2357 case IPPROTO_RSVP: return ("IPPROTO_RSVP"); 2358 case IPPROTO_ESP: return ("IPPROTO_ESP"); 2359 case IPPROTO_AH: return ("IPPROTO_AH"); 2360 case IPPROTO_ICMPV6: return ("IPPROTO_ICMPV6"); 2361 case IPPROTO_NONE: return ("IPPROTO_NONE"); 2362 case IPPROTO_DSTOPTS: return ("IPPROTO_DSTOPTS"); 2363 case IPPROTO_HELLO: return ("IPPROTO_HELLO"); 2364 case IPPROTO_ND: return ("IPPROTO_ND"); 2365 case IPPROTO_EON: return ("IPPROTO_EON"); 2366 case IPPROTO_PIM: return ("IPPROTO_PIM"); 2367 case IPPROTO_SCTP: return ("IPPROTO_SCTP"); 2368 case IPPROTO_RAW: return ("IPPROTO_RAW"); 2369 default: return (NULL); 2370 } 2371 } 2372