2 * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
3 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
4 * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
5 * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. The name of the author may not be used to endorse or promote products
17 * derived from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 #define _LINUX_SOCKET_H
39 #define MS_RDONLY 1 /* Mount read-only */
40 #define MS_NOSUID 2 /* Ignore suid and sgid bits */
41 #define MS_NODEV 4 /* Disallow access to device special files */
42 #define MS_NOEXEC 8 /* Disallow program execution */
43 #define MS_SYNCHRONOUS 16 /* Writes are synced at once */
44 #define MS_REMOUNT 32 /* Alter flags of a mounted FS */
46 #include <sys/socket.h>
47 #include <netinet/in.h>
48 #include <arpa/inet.h>
50 #include <sys/syscall.h>
52 #ifdef SYS_personality
53 /* Workaround for kernel namespace pollution. */
54 #define _LINUX_PTRACE_H
55 /* Yuck yuck yuck. We can't include linux/ptrace.h, but personality.h
56 makes a declaration with struct pt_regs, which is defined there. */
58 #define sys_personality kernel_sys_personality
59 #include <linux/personality.h>
60 #undef sys_personality
61 #endif /* SYS_personality */
64 #include <linux/capability.h>
68 #include <asm/cachectl.h>
72 #include <linux/sysctl.h>
75 static struct xlat mount_flags[] = {
76 { MS_RDONLY, "MS_RDONLY" },
77 { MS_NOSUID, "MS_NOSUID" },
78 { MS_NODEV, "MS_NODEV" },
79 { MS_NOEXEC, "MS_NOEXEC" },
81 { MS_SYNCHRONOUS,"MS_SYNCHRONOUS"},
83 { MS_SYNC, "MS_SYNC" },
85 { MS_REMOUNT, "MS_REMOUNT" },
94 printpath(tcp, tcp->u_arg[0]);
96 printpath(tcp, tcp->u_arg[1]);
98 printpath(tcp, tcp->u_arg[2]);
100 printflags(mount_flags, tcp->u_arg[3]);
101 tprintf(", %#lx", tcp->u_arg[4]);
111 printstr(tcp, tcp->u_arg[0], -1);
113 if (tcp->u_arg[1] & 1)
114 tprintf("MNT_FORCE");
121 static struct xlat personality_options[] = {
123 { PER_LINUX, "PER_LINUX" },
125 #ifdef PER_LINUX_32BIT
126 { PER_LINUX_32BIT, "PER_LINUX" },
129 { PER_SVR4, "PER_SVR4" },
132 { PER_SVR3, "PER_SVR3" },
135 { PER_SCOSVR3, "PER_SCOSVR3" },
138 { PER_WYSEV386, "PER_WYSEV386" },
141 { PER_ISCR4, "PER_ISCR4" },
144 { PER_BSD, "PER_BSD" },
147 { PER_XENIX, "PER_XENIX" },
157 printxval(personality_options, tcp->u_arg[0], "PER_???");
162 static struct xlat cacheflush_scope[] = {
163 #ifdef FLUSH_SCOPE_LINE
164 { FLUSH_SCOPE_LINE, "FLUSH_SCOPE_LINE" },
166 #ifdef FLUSH_SCOPE_PAGE
167 { FLUSH_SCOPE_PAGE, "FLUSH_SCOPE_PAGE" },
169 #ifdef FLUSH_SCOPE_ALL
170 { FLUSH_SCOPE_ALL, "FLUSH_SCOPE_ALL" },
175 static struct xlat cacheflush_flags[] = {
176 #ifdef FLUSH_CACHE_BOTH
177 { FLUSH_CACHE_BOTH, "FLUSH_CACHE_BOTH" },
179 #ifdef FLUSH_CACHE_DATA
180 { FLUSH_CACHE_DATA, "FLUSH_CACHE_DATA" },
182 #ifdef FLUSH_CACHE_INSN
183 { FLUSH_CACHE_INSN, "FLUSH_CACHE_INSN" },
194 tprintf("%#lx, ", tcp->u_arg[0]);
196 printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???");
199 printflags(cacheflush_flags, tcp->u_arg[2]);
201 tprintf(", %lu", tcp->u_arg[3]);
211 #include <sys/reboot.h>
216 #include <sys/mount.h>
217 #include <sys/socket.h>
218 #include <nfs/export.h>
219 #include <rpc/types.h>
220 #include <rpc/auth.h>
230 static struct xlat bootflags[] = {
231 { RB_AUTOBOOT, "RB_AUTOBOOT" }, /* for system auto-booting itself */
232 { RB_ASKNAME, "RB_ASKNAME" }, /* ask for file name to reboot from */
233 { RB_SINGLE, "RB_SINGLE" }, /* reboot to single user only */
234 { RB_NOSYNC, "RB_NOSYNC" }, /* dont sync before reboot */
235 { RB_HALT, "RB_HALT" }, /* don't reboot, just halt */
236 { RB_INITNAME, "RB_INITNAME" }, /* name given for /etc/init */
237 { RB_NOBOOTRC, "RB_NOBOOTRC" }, /* don't run /etc/rc.boot */
238 { RB_DEBUG, "RB_DEBUG" }, /* being run under debugger */
239 { RB_DUMP, "RB_DUMP" }, /* dump system core */
240 { RB_WRITABLE, "RB_WRITABLE" }, /* mount root read/write */
241 { RB_STRING, "RB_STRING" }, /* pass boot args to prom monitor */
250 if (!printflags(bootflags, tcp->u_arg[0]))
252 if (tcp->u_arg[0] & RB_STRING) {
253 printstr(tcp, tcp->u_arg[1], -1);
264 printstr(tcp, tcp->u_arg[0], -1);
274 printstr(tcp, tcp->u_arg[0], -1);
284 printsock(tcp, tcp->u_arg[0]);
289 static struct xlat mountflags[] = {
290 { M_RDONLY, "M_RDONLY" },
291 { M_NOSUID, "M_NOSUID" },
292 { M_NEWTYPE, "M_NEWTYPE" },
293 { M_GRPID, "M_GRPID" },
295 { M_REMOUNT, "M_REMOUNT" },
298 { M_NOSUB, "M_NOSUB" },
301 { M_MULTI, "M_MULTI" },
304 { M_SYS5, "M_SYS5" },
309 static struct xlat nfsflags[] = {
310 { NFSMNT_SOFT, "NFSMNT_SOFT" },
311 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
312 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
313 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
314 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
315 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
316 { NFSMNT_INT, "NFSMNT_INT" },
317 { NFSMNT_NOAC, "NFSMNT_NOAC" },
318 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
319 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
320 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
321 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
323 { NFSMNT_SECURE, "NFSMNT_SECURE" },
326 { NFSMNT_NOCTO, "NFSMNT_NOCTO" },
329 { NFSMNT_POSIX, "NFSMNT_POSIX" },
341 if (!(tcp->u_arg[2] & M_NEWTYPE) || umovestr(tcp,
342 tcp->u_arg[0], sizeof type, type) < 0) {
343 tprintf("OLDTYPE:#%lx", tcp->u_arg[0]);
345 tprintf("\"%s\", ", type);
347 printstr(tcp, tcp->u_arg[1], -1);
349 if (!printflags(mountflags, tcp->u_arg[2] & ~M_NEWTYPE))
353 if (strcmp(type, "4.2") == 0) {
355 if (umove(tcp, tcp->u_arg[3], &a) < 0)
357 printstr(tcp, (int)a.fspec, -1);
358 } else if (strcmp(type, "lo") == 0) {
360 if (umove(tcp, tcp->u_arg[3], &a) < 0)
362 printstr(tcp, (int)a.fsdir, -1);
363 } else if (strcmp(type, "nfs") == 0) {
365 if (umove(tcp, tcp->u_arg[3], &a) < 0)
368 printsock(tcp, (int) a.addr);
370 if (!printflags(nfsflags, a.flags))
371 tprintf("NFSMNT_???");
372 tprintf(", ws:%u,rs:%u,to:%u,re:%u,",
373 a.wsize, a.rsize, a.timeo, a.retrans);
374 if (a.flags & NFSMNT_HOSTNAME && a.hostname)
375 printstr(tcp, (int)a.hostname, -1);
377 tprintf("%#lx", (unsigned long) a.hostname);
378 tprintf(",reg-min:%u,max:%u,dir-min:%u,max:%u,",
379 a.acregmin, a.acregmax, a.acdirmin, a.acdirmax);
380 if ((a.flags & NFSMNT_SECURE) && a.netname)
381 printstr(tcp, (int) a.netname, -1);
383 tprintf("%#lx", (unsigned long) a.netname);
385 } else if (strcmp(type, "rfs") == 0) {
388 if (umove(tcp, tcp->u_arg[3], &a) < 0)
391 printstr(tcp, (int)a.rmtfs, -1);
392 if (umove(tcp, (int)a.token, &t) < 0)
394 tprintf(", %u, %s]", t.t_id, t.t_uname);
395 } else if (strcmp(type, "pcfs") == 0) {
397 if (umove(tcp, tcp->u_arg[3], &a) < 0)
399 printstr(tcp, (int)a.fspec, -1);
410 printstr(tcp, tcp->u_arg[0], -1);
419 return sys_unmount(tcp);
426 /* XXX - no information available */
427 return printargs(tcp);
430 static struct xlat ex_auth_flags[] = {
431 { AUTH_UNIX, "AUTH_UNIX" },
432 { AUTH_DES, "AUTH_DES" },
444 printstr(tcp, tcp->u_arg[0], -1);
445 if (umove(tcp, tcp->u_arg[1], &e) < 0) {
446 tprintf("%#lx", tcp->u_arg[1]);
449 tprintf("{fl:%u, anon:%u, ", e.ex_flags, e.ex_anon);
450 printxval(ex_auth_flags, e.ex_auth, "AUTH_???");
451 tprintf(", roots:[");
452 if (e.ex_auth == AUTH_UNIX) {
453 for (i=0; i<e.ex_u.exunix.rootaddrs.naddrs; i++) {
455 (int)&e.ex_u.exunix.rootaddrs.addrvec[i]);
457 tprintf("], writers:[");
458 for (i=0; i<e.ex_writeaddrs.naddrs; i++) {
460 (int)&e.ex_writeaddrs.addrvec[i]);
464 for (i=0; i<e.ex_u.exdes.nnames; i++) {
466 (int)&e.ex_u.exdes.rootnames[i]);
469 tprintf("], window:%u", e.ex_u.exdes.window);
476 static struct xlat sysconflimits[] = {
478 { _SC_ARG_MAX, "_SC_ARG_MAX" }, /* space for argv & envp */
481 { _SC_CHILD_MAX, "_SC_CHILD_MAX" }, /* maximum children per process??? */
484 { _SC_CLK_TCK, "_SC_CLK_TCK" }, /* clock ticks/sec */
486 #ifdef _SC_NGROUPS_MAX
487 { _SC_NGROUPS_MAX, "_SC_NGROUPS_MAX" }, /* number of groups if multple supp. */
490 { _SC_OPEN_MAX, "_SC_OPEN_MAX" }, /* max open files per process */
492 #ifdef _SC_JOB_CONTROL
493 { _SC_JOB_CONTROL, "_SC_JOB_CONTROL" }, /* do we have job control */
496 { _SC_SAVED_IDS, "_SC_SAVED_IDS" }, /* do we have saved uid/gids */
499 { _SC_VERSION, "_SC_VERSION" }, /* POSIX version supported */
504 static struct xlat pathconflimits[] = {
506 { _PC_LINK_MAX, "_PC_LINK_MAX" }, /* max links to file/dir */
509 { _PC_MAX_CANON, "_PC_MAX_CANON" }, /* max line length */
512 { _PC_MAX_INPUT, "_PC_MAX_INPUT" }, /* max "packet" to a tty device */
515 { _PC_NAME_MAX, "_PC_NAME_MAX" }, /* max pathname component length */
518 { _PC_PATH_MAX, "_PC_PATH_MAX" }, /* max pathname length */
521 { _PC_PIPE_BUF, "_PC_PIPE_BUF" }, /* size of a pipe */
523 #ifdef _PC_CHOWN_RESTRICTED
524 { _PC_CHOWN_RESTRICTED, "_PC_CHOWN_RESTRICTED" }, /* can we give away files */
527 { _PC_NO_TRUNC, "_PC_NO_TRUNC" }, /* trunc or error on >NAME_MAX */
530 { _PC_VDISABLE, "_PC_VDISABLE" }, /* best char to shut off tty c_cc */
540 printxval(sysconflimits, tcp->u_arg[0], "_SC_???");
550 printstr(tcp, tcp->u_arg[0], -1);
552 printxval(pathconflimits, tcp->u_arg[1], "_SC_???");
562 tprintf("%lu, ", tcp->u_arg[0]);
563 printxval(pathconflimits, tcp->u_arg[1], "_SC_???");
572 #ifdef HAVE_SYS_SYSCONFIG_H
573 #include <sys/sysconfig.h>
574 #endif /* HAVE_SYS_SYSCONFIG_H */
576 #include <sys/mount.h>
577 #include <sys/systeminfo.h>
578 #include <sys/utsname.h>
580 static struct xlat sysconfig_options[] = {
581 #ifdef _CONFIG_NGROUPS
582 { _CONFIG_NGROUPS, "_CONFIG_NGROUPS" },
584 #ifdef _CONFIG_CHILD_MAX
585 { _CONFIG_CHILD_MAX, "_CONFIG_CHILD_MAX" },
587 #ifdef _CONFIG_OPEN_FILES
588 { _CONFIG_OPEN_FILES, "_CONFIG_OPEN_FILES" },
590 #ifdef _CONFIG_POSIX_VER
591 { _CONFIG_POSIX_VER, "_CONFIG_POSIX_VER" },
593 #ifdef _CONFIG_PAGESIZE
594 { _CONFIG_PAGESIZE, "_CONFIG_PAGESIZE" },
596 #ifdef _CONFIG_CLK_TCK
597 { _CONFIG_CLK_TCK, "_CONFIG_CLK_TCK" },
599 #ifdef _CONFIG_XOPEN_VER
600 { _CONFIG_XOPEN_VER, "_CONFIG_XOPEN_VER" },
602 #ifdef _CONFIG_PROF_TCK
603 { _CONFIG_PROF_TCK, "_CONFIG_PROF_TCK" },
605 #ifdef _CONFIG_NPROC_CONF
606 { _CONFIG_NPROC_CONF, "_CONFIG_NPROC_CONF" },
608 #ifdef _CONFIG_NPROC_ONLN
609 { _CONFIG_NPROC_ONLN, "_CONFIG_NPROC_ONLN" },
611 #ifdef _CONFIG_AIO_LISTIO_MAX
612 { _CONFIG_AIO_LISTIO_MAX, "_CONFIG_AIO_LISTIO_MAX" },
614 #ifdef _CONFIG_AIO_MAX
615 { _CONFIG_AIO_MAX, "_CONFIG_AIO_MAX" },
617 #ifdef _CONFIG_AIO_PRIO_DELTA_MAX
618 { _CONFIG_AIO_PRIO_DELTA_MAX, "_CONFIG_AIO_PRIO_DELTA_MAX" },
620 #ifdef _CONFIG_CONFIG_DELAYTIMER_MAX
621 { _CONFIG_DELAYTIMER_MAX, "_CONFIG_DELAYTIMER_MAX" },
623 #ifdef _CONFIG_MQ_OPEN_MAX
624 { _CONFIG_MQ_OPEN_MAX, "_CONFIG_MQ_OPEN_MAX" },
626 #ifdef _CONFIG_MQ_PRIO_MAX
627 { _CONFIG_MQ_PRIO_MAX, "_CONFIG_MQ_PRIO_MAX" },
629 #ifdef _CONFIG_RTSIG_MAX
630 { _CONFIG_RTSIG_MAX, "_CONFIG_RTSIG_MAX" },
632 #ifdef _CONFIG_SEM_NSEMS_MAX
633 { _CONFIG_SEM_NSEMS_MAX, "_CONFIG_SEM_NSEMS_MAX" },
635 #ifdef _CONFIG_SEM_VALUE_MAX
636 { _CONFIG_SEM_VALUE_MAX, "_CONFIG_SEM_VALUE_MAX" },
638 #ifdef _CONFIG_SIGQUEUE_MAX
639 { _CONFIG_SIGQUEUE_MAX, "_CONFIG_SIGQUEUE_MAX" },
641 #ifdef _CONFIG_SIGRT_MIN
642 { _CONFIG_SIGRT_MIN, "_CONFIG_SIGRT_MIN" },
644 #ifdef _CONFIG_SIGRT_MAX
645 { _CONFIG_SIGRT_MAX, "_CONFIG_SIGRT_MAX" },
647 #ifdef _CONFIG_TIMER_MAX
648 { _CONFIG_TIMER_MAX, "_CONFIG_TIMER_MAX" },
650 #ifdef _CONFIG_CONFIG_PHYS_PAGES
651 { _CONFIG_PHYS_PAGES, "_CONFIG_PHYS_PAGES" },
653 #ifdef _CONFIG_AVPHYS_PAGES
654 { _CONFIG_AVPHYS_PAGES, "_CONFIG_AVPHYS_PAGES" },
664 printxval(sysconfig_options, tcp->u_arg[0], "_CONFIG_???");
668 static struct xlat sysinfo_options[] = {
669 { SI_SYSNAME, "SI_SYSNAME" },
670 { SI_HOSTNAME, "SI_HOSTNAME" },
671 { SI_RELEASE, "SI_RELEASE" },
672 { SI_VERSION, "SI_VERSION" },
673 { SI_MACHINE, "SI_MACHINE" },
674 { SI_ARCHITECTURE, "SI_ARCHITECTURE" },
675 { SI_HW_SERIAL, "SI_HW_SERIAL" },
676 { SI_HW_PROVIDER, "SI_HW_PROVIDER" },
677 { SI_SRPC_DOMAIN, "SI_SRPC_DOMAIN" },
678 #ifdef SI_SET_HOSTNAME
679 { SI_SET_HOSTNAME, "SI_SET_HOSTNAME" },
681 #ifdef SI_SET_SRPC_DOMAIN
682 { SI_SET_SRPC_DOMAIN, "SI_SET_SRPC_DOMAIN" },
684 #ifdef SI_SET_KERB_REALM
685 { SI_SET_KERB_REALM, "SI_SET_KERB_REALM" },
688 { SI_KERB_REALM, "SI_KERB_REALM" },
698 printxval(sysinfo_options, tcp->u_arg[0], "SI_???");
702 /* Technically some calls write values. So what. */
704 tprintf("%#lx", tcp->u_arg[1]);
706 printpath(tcp, tcp->u_arg[1]);
707 tprintf(", %lu", tcp->u_arg[2]);
714 #include <sys/syssgi.h>
716 static struct xlat syssgi_options[] = {
717 { SGI_SYSID, "SGI_SYSID" },
719 { SGI_RDUBLK, "SGI_RDUBLK" },
721 { SGI_TUNE, "SGI_TUNE" },
722 { SGI_IDBG, "SGI_IDBG" },
723 { SGI_INVENT, "SGI_INVENT" },
724 { SGI_RDNAME, "SGI_RDNAME" },
725 { SGI_SETLED, "SGI_SETLED" },
726 { SGI_SETNVRAM, "SGI_SETNVRAM" },
727 { SGI_GETNVRAM, "SGI_GETNVRAM" },
728 { SGI_QUERY_FTIMER, "SGI_QUERY_FTIMER" },
729 { SGI_QUERY_CYCLECNTR, "SGI_QUERY_CYCLECNTR" },
730 { SGI_PROCSZ, "SGI_PROCSZ" },
731 { SGI_SIGACTION, "SGI_SIGACTION" },
732 { SGI_SIGPENDING, "SGI_SIGPENDING" },
733 { SGI_SIGPROCMASK, "SGI_SIGPROCMASK" },
734 { SGI_SIGSUSPEND, "SGI_SIGSUSPEND" },
735 { SGI_SETSID, "SGI_SETSID" },
736 { SGI_SETPGID, "SGI_SETPGID" },
737 { SGI_SYSCONF, "SGI_SYSCONF" },
738 { SGI_WAIT4, "SGI_WAIT4" },
739 { SGI_PATHCONF, "SGI_PATHCONF" },
740 { SGI_READB, "SGI_READB" },
741 { SGI_WRITEB, "SGI_WRITEB" },
742 { SGI_SETGROUPS, "SGI_SETGROUPS" },
743 { SGI_GETGROUPS, "SGI_GETGROUPS" },
744 { SGI_SETTIMEOFDAY, "SGI_SETTIMEOFDAY" },
745 { SGI_SETTIMETRIM, "SGI_SETTIMETRIM" },
746 { SGI_GETTIMETRIM, "SGI_GETTIMETRIM" },
747 { SGI_SPROFIL, "SGI_SPROFIL" },
748 { SGI_RUSAGE, "SGI_RUSAGE" },
749 { SGI_SIGSTACK, "SGI_SIGSTACK" },
750 { SGI_SIGSTATUS, "SGI_SIGSTATUS" },
751 { SGI_NETPROC, "SGI_NETPROC" },
752 { SGI_SIGALTSTACK, "SGI_SIGALTSTACK" },
753 { SGI_BDFLUSHCNT, "SGI_BDFLUSHCNT" },
754 { SGI_SSYNC, "SGI_SSYNC" },
755 { SGI_NFSCNVT, "SGI_NFSCNVT" },
756 { SGI_GETPGID, "SGI_GETPGID" },
757 { SGI_GETSID, "SGI_GETSID" },
758 { SGI_IOPROBE, "SGI_IOPROBE" },
759 { SGI_CONFIG, "SGI_CONFIG" },
760 { SGI_ELFMAP, "SGI_ELFMAP" },
761 { SGI_MCONFIG, "SGI_MCONFIG" },
762 { SGI_GETPLABEL, "SGI_GETPLABEL" },
763 { SGI_SETPLABEL, "SGI_SETPLABEL" },
764 { SGI_GETLABEL, "SGI_GETLABEL" },
765 { SGI_SETLABEL, "SGI_SETLABEL" },
766 { SGI_SATREAD, "SGI_SATREAD" },
767 { SGI_SATWRITE, "SGI_SATWRITE" },
768 { SGI_SATCTL, "SGI_SATCTL" },
769 { SGI_LOADATTR, "SGI_LOADATTR" },
770 { SGI_UNLOADATTR, "SGI_UNLOADATTR" },
772 { SGI_RECVLMSG, "SGI_RECVLMSG" },
774 { SGI_PLANGMOUNT, "SGI_PLANGMOUNT" },
775 { SGI_GETPSOACL, "SGI_GETPSOACL" },
776 { SGI_SETPSOACL, "SGI_SETPSOACL" },
777 #ifdef SGI_EAG_GET_ATTR
778 { SGI_EAG_GET_ATTR, "SGI_EAG_GET_ATTR" },
780 #ifdef SGI_EAG_SET_ATTR
781 { SGI_EAG_SET_ATTR, "SGI_EAG_SET_ATTR" },
783 #ifdef SGI_EAG_GET_PROCATTR
784 { SGI_EAG_GET_PROCATTR, "SGI_EAG_GET_PROCATTR" },
786 #ifdef SGI_EAG_SET_PROCATTR
787 { SGI_EAG_SET_PROCATTR, "SGI_EAG_SET_PROCATTR" },
790 { SGI_FREVOKE, "SGI_FREVOKE" },
792 #ifdef SGI_SBE_GET_INFO
793 { SGI_SBE_GET_INFO, "SGI_SBE_GET_INFO" },
795 #ifdef SGI_SBE_CLR_INFO
796 { SGI_SBE_CLR_INFO, "SGI_SBE_CLR_INFO" },
798 { SGI_RMI_FIXECC, "SGI_RMI_FIXECC" },
799 { SGI_R4K_CERRS, "SGI_R4K_CERRS" },
800 { SGI_GET_EVCONF, "SGI_GET_EVCONF" },
801 { SGI_MPCWAROFF, "SGI_MPCWAROFF" },
802 { SGI_SET_AUTOPWRON, "SGI_SET_AUTOPWRON" },
803 { SGI_SPIPE, "SGI_SPIPE" },
804 { SGI_SYMTAB, "SGI_SYMTAB" },
805 #ifdef SGI_SET_FPDEBUG
806 { SGI_SET_FPDEBUG, "SGI_SET_FPDEBUG" },
808 #ifdef SGI_SET_FP_PRECISE
809 { SGI_SET_FP_PRECISE, "SGI_SET_FP_PRECISE" },
811 { SGI_TOSSTSAVE, "SGI_TOSSTSAVE" },
812 { SGI_FDHI, "SGI_FDHI" },
813 #ifdef SGI_SET_CONFIG_SMM
814 { SGI_SET_CONFIG_SMM, "SGI_SET_CONFIG_SMM" },
816 #ifdef SGI_SET_FP_PRESERVE
817 { SGI_SET_FP_PRESERVE, "SGI_SET_FP_PRESERVE" },
819 { SGI_MINRSS, "SGI_MINRSS" },
821 { SGI_GRIO, "SGI_GRIO" },
823 #ifdef SGI_XLV_SET_TAB
824 { SGI_XLV_SET_TAB, "SGI_XLV_SET_TAB" },
826 #ifdef SGI_XLV_GET_TAB
827 { SGI_XLV_GET_TAB, "SGI_XLV_GET_TAB" },
829 #ifdef SGI_GET_FP_PRECISE
830 { SGI_GET_FP_PRECISE, "SGI_GET_FP_PRECISE" },
832 #ifdef SGI_GET_CONFIG_SMM
833 { SGI_GET_CONFIG_SMM, "SGI_GET_CONFIG_SMM" },
835 #ifdef SGI_FP_IMPRECISE_SUPP
836 { SGI_FP_IMPRECISE_SUPP,"SGI_FP_IMPRECISE_SUPP" },
838 #ifdef SGI_CONFIG_NSMM_SUPP
839 { SGI_CONFIG_NSMM_SUPP, "SGI_CONFIG_NSMM_SUPP" },
841 #ifdef SGI_RT_TSTAMP_CREATE
842 { SGI_RT_TSTAMP_CREATE, "SGI_RT_TSTAMP_CREATE" },
844 #ifdef SGI_RT_TSTAMP_DELETE
845 { SGI_RT_TSTAMP_DELETE, "SGI_RT_TSTAMP_DELETE" },
847 #ifdef SGI_RT_TSTAMP_START
848 { SGI_RT_TSTAMP_START, "SGI_RT_TSTAMP_START" },
850 #ifdef SGI_RT_TSTAMP_STOP
851 { SGI_RT_TSTAMP_STOP, "SGI_RT_TSTAMP_STOP" },
853 #ifdef SGI_RT_TSTAMP_ADDR
854 { SGI_RT_TSTAMP_ADDR, "SGI_RT_TSTAMP_ADDR" },
856 #ifdef SGI_RT_TSTAMP_MASK
857 { SGI_RT_TSTAMP_MASK, "SGI_RT_TSTAMP_MASK" },
859 #ifdef SGI_RT_TSTAMP_EOB_MODE
860 { SGI_RT_TSTAMP_EOB_MODE,"SGI_RT_TSTAMP_EOB_MODE"},
862 #ifdef SGI_USE_FP_BCOPY
863 { SGI_USE_FP_BCOPY, "SGI_USE_FP_BCOPY" },
866 { SGI_GET_UST, "SGI_GET_UST" },
868 #ifdef SGI_SPECULATIVE_EXEC
869 { SGI_SPECULATIVE_EXEC, "SGI_SPECULATIVE_EXEC" },
871 #ifdef SGI_XLV_NEXT_RQST
872 { SGI_XLV_NEXT_RQST, "SGI_XLV_NEXT_RQST" },
874 #ifdef SGI_XLV_ATTR_CURSOR
875 { SGI_XLV_ATTR_CURSOR, "SGI_XLV_ATTR_CURSOR" },
877 #ifdef SGI_XLV_ATTR_GET
878 { SGI_XLV_ATTR_GET, "SGI_XLV_ATTR_GET" },
880 #ifdef SGI_XLV_ATTR_SET
881 { SGI_XLV_ATTR_SET, "SGI_XLV_ATTR_SET" },
884 { SGI_BTOOLSIZE, "SGI_BTOOLSIZE" },
887 { SGI_BTOOLGET, "SGI_BTOOLGET" },
889 #ifdef SGI_BTOOLREINIT
890 { SGI_BTOOLREINIT, "SGI_BTOOLREINIT" },
892 #ifdef SGI_CREATE_UUID
893 { SGI_CREATE_UUID, "SGI_CREATE_UUID" },
896 { SGI_NOFPE, "SGI_NOFPE" },
898 #ifdef SGI_OLD_SOFTFP
899 { SGI_OLD_SOFTFP, "SGI_OLD_SOFTFP" },
901 #ifdef SGI_FS_INUMBERS
902 { SGI_FS_INUMBERS, "SGI_FS_INUMBERS" },
904 #ifdef SGI_FS_BULKSTAT
905 { SGI_FS_BULKSTAT, "SGI_FS_BULKSTAT" },
907 #ifdef SGI_RT_TSTAMP_WAIT
908 { SGI_RT_TSTAMP_WAIT, "SGI_RT_TSTAMP_WAIT" },
910 #ifdef SGI_RT_TSTAMP_UPDATE
911 { SGI_RT_TSTAMP_UPDATE, "SGI_RT_TSTAMP_UPDATE" },
913 #ifdef SGI_PATH_TO_HANDLE
914 { SGI_PATH_TO_HANDLE, "SGI_PATH_TO_HANDLE" },
916 #ifdef SGI_PATH_TO_FSHANDLE
917 { SGI_PATH_TO_FSHANDLE, "SGI_PATH_TO_FSHANDLE" },
919 #ifdef SGI_FD_TO_HANDLE
920 { SGI_FD_TO_HANDLE, "SGI_FD_TO_HANDLE" },
922 #ifdef SGI_OPEN_BY_HANDLE
923 { SGI_OPEN_BY_HANDLE, "SGI_OPEN_BY_HANDLE" },
925 #ifdef SGI_READLINK_BY_HANDLE
926 { SGI_READLINK_BY_HANDLE,"SGI_READLINK_BY_HANDLE"},
928 #ifdef SGI_READ_DANGID
929 { SGI_READ_DANGID, "SGI_READ_DANGID" },
932 { SGI_CONST, "SGI_CONST" },
934 #ifdef SGI_XFS_FSOPERATIONS
935 { SGI_XFS_FSOPERATIONS, "SGI_XFS_FSOPERATIONS" },
938 { SGI_SETASH, "SGI_SETASH" },
941 { SGI_GETASH, "SGI_GETASH" },
944 { SGI_SETPRID, "SGI_SETPRID" },
947 { SGI_GETPRID, "SGI_GETPRID" },
950 { SGI_SETSPINFO, "SGI_SETSPINFO" },
953 { SGI_GETSPINFO, "SGI_GETSPINFO" },
956 { SGI_SHAREII, "SGI_SHAREII" },
958 #ifdef SGI_NEWARRAYSESS
959 { SGI_NEWARRAYSESS, "SGI_NEWARRAYSESS" },
961 #ifdef SGI_GETDFLTPRID
962 { SGI_GETDFLTPRID, "SGI_GETDFLTPRID" },
964 #ifdef SGI_SET_DISMISSED_EXC_CNT
965 { SGI_SET_DISMISSED_EXC_CNT,"SGI_SET_DISMISSED_EXC_CNT" },
967 #ifdef SGI_GET_DISMISSED_EXC_CNT
968 { SGI_GET_DISMISSED_EXC_CNT,"SGI_GET_DISMISSED_EXC_CNT" },
970 #ifdef SGI_CYCLECNTR_SIZE
971 { SGI_CYCLECNTR_SIZE, "SGI_CYCLECNTR_SIZE" },
973 #ifdef SGI_QUERY_FASTTIMER
974 { SGI_QUERY_FASTTIMER, "SGI_QUERY_FASTTIMER" },
977 { SGI_PIDSINASH, "SGI_PIDSINASH" },
980 { SGI_ULI, "SGI_ULI" },
982 #ifdef SGI_LPG_SHMGET
983 { SGI_LPG_SHMGET, "SGI_LPG_SHMGET" },
986 { SGI_LPG_MAP, "SGI_LPG_MAP" },
988 #ifdef SGI_CACHEFS_SYS
989 { SGI_CACHEFS_SYS, "SGI_CACHEFS_SYS" },
992 { SGI_NFSNOTIFY, "SGI_NFSNOTIFY" },
995 { SGI_LOCKDSYS, "SGI_LOCKDSYS" },
998 { SGI_EVENTCTR, "SGI_EVENTCTR" },
1000 #ifdef SGI_GETPRUSAGE
1001 { SGI_GETPRUSAGE, "SGI_GETPRUSAGE" },
1003 #ifdef SGI_PROCMASK_LOCATION
1004 { SGI_PROCMASK_LOCATION,"SGI_PROCMASK_LOCATION" },
1007 { SGI_UNUSED, "SGI_UNUSED" },
1010 { SGI_CKPT_SYS, "SGI_CKPT_SYS" },
1013 { SGI_CKPT_SYS, "SGI_CKPT_SYS" },
1015 #ifdef SGI_GETGRPPID
1016 { SGI_GETGRPPID, "SGI_GETGRPPID" },
1018 #ifdef SGI_GETSESPID
1019 { SGI_GETSESPID, "SGI_GETSESPID" },
1022 { SGI_ENUMASHS, "SGI_ENUMASHS" },
1024 #ifdef SGI_SETASMACHID
1025 { SGI_SETASMACHID, "SGI_SETASMACHID" },
1027 #ifdef SGI_GETASMACHID
1028 { SGI_GETASMACHID, "SGI_GETASMACHID" },
1030 #ifdef SGI_GETARSESS
1031 { SGI_GETARSESS, "SGI_GETARSESS" },
1033 #ifdef SGI_JOINARRAYSESS
1034 { SGI_JOINARRAYSESS, "SGI_JOINARRAYSESS" },
1036 #ifdef SGI_SPROC_KILL
1037 { SGI_SPROC_KILL, "SGI_SPROC_KILL" },
1039 #ifdef SGI_DBA_CONFIG
1040 { SGI_DBA_CONFIG, "SGI_DBA_CONFIG" },
1042 #ifdef SGI_RELEASE_NAME
1043 { SGI_RELEASE_NAME, "SGI_RELEASE_NAME" },
1045 #ifdef SGI_SYNCH_CACHE_HANDLER
1046 { SGI_SYNCH_CACHE_HANDLER,"SGI_SYNCH_CACHE_HANDLER"},
1048 #ifdef SGI_SWASH_INIT
1049 { SGI_SWASH_INIT, "SGI_SWASH_INIT" },
1051 #ifdef SGI_NUMA_MIGR_PAGE
1052 { SGI_NUMA_MIGR_PAGE, "SGI_NUMA_MIGR_PAGE" },
1054 #ifdef SGI_NUMA_MIGR_PAGE_ALT
1055 { SGI_NUMA_MIGR_PAGE_ALT,"SGI_NUMA_MIGR_PAGE_ALT"},
1057 #ifdef SGI_KAIO_USERINIT
1058 { SGI_KAIO_USERINIT, "SGI_KAIO_USERINIT" },
1060 #ifdef SGI_KAIO_READ
1061 { SGI_KAIO_READ, "SGI_KAIO_READ" },
1063 #ifdef SGI_KAIO_WRITE
1064 { SGI_KAIO_WRITE, "SGI_KAIO_WRITE" },
1066 #ifdef SGI_KAIO_SUSPEND
1067 { SGI_KAIO_SUSPEND, "SGI_KAIO_SUSPEND" },
1069 #ifdef SGI_KAIO_STATS
1070 { SGI_KAIO_STATS, "SGI_KAIO_STATS" },
1072 #ifdef SGI_INITIAL_PT_SPROC
1073 { SGI_INITIAL_PT_SPROC, "SGI_INITIAL_PT_SPROC" },
1084 if (entering(tcp)) {
1085 printxval(syssgi_options, tcp->u_arg[0], "SGI_???");
1086 switch (tcp->u_arg[0]) {
1088 for (i = 1; i < tcp->u_nargs; i++)
1089 tprintf(", %#lx", tcp->u_arg[i]);
1096 #include <sys/types.h>
1097 #include <rpc/rpc.h>
1100 #include <sys/fsid.h>
1101 #include <sys/vnode.h>
1102 #include <sys/fs/nfs.h>
1103 #include <sys/fs/nfs_clnt.h>
1105 static struct xlat mount_flags[] = {
1106 { MS_RDONLY, "MS_RDONLY" },
1107 { MS_FSS, "MS_FSS" },
1108 { MS_DATA, "MS_DATA" },
1109 { MS_NOSUID, "MS_NOSUID" },
1110 { MS_REMOUNT, "MS_REMOUNT" },
1111 { MS_NOTRUNC, "MS_NOTRUNC" },
1112 { MS_GRPID, "MS_GRPID" },
1113 { MS_NODEV, "MS_NODEV" },
1114 { MS_BEFORE, "MS_BEFORE" },
1115 { MS_AFTER, "MS_AFTER" },
1119 static struct xlat nfs_flags[] = {
1120 { NFSMNT_SOFT, "NFSMNT_SOFT" },
1121 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
1122 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
1123 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
1124 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
1125 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
1126 #ifdef NFSMNT_NOINT /* IRIX 6 */
1127 { NFSMNT_NOINT, "NFSMNT_NOINT" },
1129 #ifdef NFSMNT_INT /* IRIX 5 */
1130 { NFSMNT_INT, "NFSMNT_INT" },
1132 { NFSMNT_NOAC, "NFSMNT_NOAC" },
1133 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
1134 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
1135 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
1136 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
1137 { NFSMNT_PRIVATE, "NFSMNT_PRIVATE" },
1138 { NFSMNT_SYMTTL, "NFSMNT_SYMTTL" },
1139 { NFSMNT_LOOPBACK, "NFSMNT_LOOPBACK" },
1140 { NFSMNT_BASETYPE, "NFSMNT_BASETYPE" },
1141 { NFSMNT_NAMEMAX, "NFSMNT_NAMEMAX" },
1142 #ifdef NFSMNT_SHORTUID /* IRIX 6 */
1143 { NFSMNT_SHORTUID, "NFSMNT_SHORTUID" },
1145 #ifdef NFSMNT_ASYNCNLM /* IRIX 6 */
1146 { NFSMNT_ASYNCNLM, "NFSMNT_ASYNCNLM" },
1155 if (entering(tcp)) {
1156 printpath(tcp, tcp->u_arg[0]);
1158 printpath(tcp, tcp->u_arg[1]);
1160 printflags(mount_flags, tcp->u_arg[2]);
1161 if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
1163 tprintf("%ld", tcp->u_arg[3]);
1165 if (tcp->u_arg[2] & MS_DATA) {
1166 int nfs_type = sysfs(GETFSIND, FSID_NFS);
1169 if (tcp->u_arg[3] == nfs_type) {
1170 struct nfs_args args;
1171 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1172 tprintf("%#lx", tcp->u_arg[4]);
1175 printsock(tcp, (int) args.addr);
1176 tprintf(", flags=");
1177 if (!printflags(nfs_flags, args.flags))
1178 tprintf("NFSMNT_???");
1179 tprintf(", hostname=");
1180 printstr(tcp, (int) args.hostname, -1);
1185 tprintf("%#lx", tcp->u_arg[4]);
1186 tprintf(", %ld", tcp->u_arg[5]);
1196 #include <sys/types.h>
1197 #include <sys/fstyp.h>
1198 #include <sys/mount.h>
1199 #include <sys/xti.h>
1202 #include <nfs/mount.h>
1204 #include <sys/fs/vx_ioctl.h>
1206 static struct xlat mount_flags[] = {
1207 { MS_RDONLY, "MS_RDONLY" },
1208 { MS_FSS, "MS_FSS" },
1209 { MS_DATA, "MS_DATA" },
1210 { MS_HADBAD, "MS_HADBAD" },
1211 { MS_NOSUID, "MS_NOSUID" },
1212 { MS_REMOUNT, "MS_REMOUNT" },
1213 { MS_NOTRUNC, "MS_NOTRUNC" },
1214 { MS_SOFTMNT, "MS_SOFTMNT" },
1215 { MS_SYSSPACE, "MS_SYSSPACE" },
1220 static struct xlat vxfs_flags[] = {
1221 { VX_MS_NOLOG, "VX_MS_NOLOG" },
1222 { VX_MS_BLKCLEAR, "VX_MS_BLKCLEAR" },
1223 { VX_MS_SNAPSHOT, "VX_MS_SNAPSHOT" },
1224 { VX_MS_NODATAINLOG, "VX_MS_NODATAINLOG" },
1225 { VX_MS_DELAYLOG, "VX_MS_DELAYLOG" },
1226 { VX_MS_TMPLOG, "VX_MS_TMPLOG" },
1227 { VX_MS_FILESET, "VX_MS_FILESET" },
1229 { VX_MS_CACHE_DIRECT, "VX_MS_CACHE_DIRECT" },
1230 { VX_MS_CACHE_DSYNC, "VX_MS_CACHE_DSYNC" },
1231 { VX_MS_CACHE_CLOSESYNC,"VX_MS_CACHE_CLOSESYNC" },
1232 { VX_MS_CACHE_TMPCACHE, "VX_MS_CACHE_TMPCACHE" },
1234 { VX_MS_OSYNC_DIRECT, "VX_MS_OSYNC_DIRECT" },
1235 { VX_MS_OSYNC_DSYNC, "VX_MS_OSYNC_DSYNC" },
1236 { VX_MS_OSYNC_CLOSESYNC,"VX_MS_OSYNC_CLOSESYNC" },
1237 { VX_MS_OSYNC_DELAY, "VX_MS_OSYNC_DELAY" },
1242 static struct xlat nfs_flags[] = {
1243 { NFSMNT_SOFT, "NFSMNT_SOFT" },
1244 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
1245 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
1246 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
1247 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
1248 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
1249 { NFSMNT_INT, "NFSMNT_INT" },
1250 { NFSMNT_NOAC, "NFSMNT_NOAC" },
1251 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
1252 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
1253 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
1254 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
1255 { NFSMNT_SECURE, "NFSMNT_SECURE" },
1256 { NFSMNT_NOCTO, "NFSMNT_NOCTO" },
1257 { NFSMNT_GRPID, "NFSMNT_GRPID" },
1258 { NFSMNT_RPCTIMESYNC, "NFSMNT_RPCTIMESYNC" },
1259 { NFSMNT_LWPSMAX, "NFSMNT_LWPSMAX" },
1267 if (entering(tcp)) {
1268 char fstyp [FSTYPSZ];
1269 printpath(tcp, tcp->u_arg[0]);
1271 printpath(tcp, tcp->u_arg[1]);
1273 printflags(mount_flags, tcp->u_arg[2]);
1274 /* The doc sez that the file system type is given as a
1275 fsindex, and we should use sysfs to work out the name.
1276 This appears to be untrue for UW. Maybe it's untrue
1278 if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
1279 if (umovestr(tcp, tcp->u_arg[3], FSTYPSZ, fstyp) < 0) {
1281 tprintf(", %ld", tcp->u_arg[3]);
1284 tprintf(", \"%s\"", fstyp);
1286 if (tcp->u_arg[2] & MS_DATA) {
1289 /* On UW7 they don't give us the defines and structs
1290 we need to see what is going on. Bummer. */
1291 if (strcmp (fstyp, "vxfs") == 0) {
1292 struct vx_mountargs5 args;
1293 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1294 tprintf("%#lx", tcp->u_arg[4]);
1296 tprintf("{ flags=");
1297 if (!printflags(vxfs_flags, args.mflags))
1298 tprintf("0x%08x", args.mflags);
1299 if (args.mflags & VX_MS_SNAPSHOT) {
1300 tprintf (", snapof=");
1302 (long) args.primaryspec,
1304 if (args.snapsize > 0)
1305 tprintf (", snapsize=%ld", args.snapsize);
1312 if (strcmp (fstyp, "specfs") == 0) {
1314 printstr (tcp, tcp->u_arg[4], -1);
1317 if (strcmp (fstyp, "nfs") == 0) {
1318 struct nfs_args args;
1319 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1320 tprintf("%#lx", tcp->u_arg[4]);
1324 if (umove (tcp, (int) args.addr, &addr) < 0) {
1325 tprintf ("%#lx", (long) args.addr);
1328 printsock(tcp, (int) addr.buf, addr.len);
1330 tprintf(", flags=");
1331 if (!printflags(nfs_flags, args.flags))
1332 tprintf("NFSMNT_???");
1333 tprintf(", hostname=");
1334 printstr(tcp, (int) args.hostname, -1);
1339 tprintf("%#lx", tcp->u_arg[4]);
1340 tprintf(", %ld", tcp->u_arg[5]);
1346 #else /* !UNIXWARE */
1352 if (entering(tcp)) {
1353 printpath(tcp, tcp->u_arg[0]);
1355 printpath(tcp, tcp->u_arg[1]);
1360 #endif /* !UNIXWARE */
1371 cap_user_header_t arg0;
1372 cap_user_data_t arg1;
1374 if(!entering(tcp)) {
1375 arg0 = (cap_user_header_t)tcp->u_arg[0];
1376 arg1 = (cap_user_data_t)tcp->u_arg[1];
1377 tprintf("{%lx, %d}, ", (unsigned long)arg0->version, arg0->pid);
1378 tprintf("{%lx, %lx, %lx}", (unsigned long)arg1->effective,
1379 (unsigned long)arg1->permitted, (unsigned long)arg1->inheritable);
1388 cap_user_header_t arg0;
1389 cap_user_data_t arg1;
1392 arg0 = (cap_user_header_t)tcp->u_arg[0];
1393 arg1 = (cap_user_data_t)tcp->u_arg[1];
1394 tprintf("{%lx, %d}, ", (unsigned long)arg0->version, arg0->pid);
1395 tprintf("{%lx, %lx, %lx}", (unsigned long)arg1->effective,
1396 (unsigned long)arg1->permitted, (unsigned long)arg1->inheritable);
1406 return printargs(tcp);
1412 return printargs(tcp);
1418 static struct xlat sysctl_root[] = {
1419 { CTL_KERN, "CTL_KERN" },
1420 { CTL_VM, "CTL_VM" },
1421 { CTL_NET, "CTL_NET" },
1422 { CTL_PROC, "CTL_PROC" },
1423 { CTL_FS, "CTL_FS" },
1424 { CTL_DEBUG, "CTL_DEBUG" },
1425 { CTL_DEV, "CTL_DEV" },
1429 static struct xlat sysctl_kern[] = {
1430 { KERN_OSTYPE, "KERN_OSTYPE" },
1431 { KERN_OSRELEASE, "KERN_OSRELEASE" },
1432 { KERN_OSREV, "KERN_OSREV" },
1433 { KERN_VERSION, "KERN_VERSION" },
1434 { KERN_SECUREMASK, "KERN_SECUREMASK" },
1435 { KERN_PROF, "KERN_PROF" },
1436 { KERN_NODENAME, "KERN_NODENAME" },
1437 { KERN_DOMAINNAME, "KERN_DOMAINNAME" },
1438 #ifdef KERN_SECURELVL
1439 { KERN_SECURELVL, "KERN_SECURELVL" },
1441 { KERN_PANIC, "KERN_PANIC" },
1442 #ifdef KERN_REALROOTDEV
1443 { KERN_REALROOTDEV, "KERN_REALROOTDEV" },
1445 #ifdef KERN_JAVA_INTERPRETER
1446 { KERN_JAVA_INTERPRETER, "KERN_JAVA_INTERPRETER" },
1448 #ifdef KERN_JAVA_APPLETVIEWER
1449 { KERN_JAVA_APPLETVIEWER, "KERN_JAVA_APPLETVIEWER" },
1451 { KERN_SPARC_REBOOT, "KERN_SPARC_REBOOT" },
1452 { KERN_CTLALTDEL, "KERN_CTLALTDEL" },
1453 { KERN_PRINTK, "KERN_PRINTK" },
1454 { KERN_NAMETRANS, "KERN_NAMETRANS" },
1455 { KERN_PPC_HTABRECLAIM, "KERN_PPC_HTABRECLAIM" },
1456 { KERN_PPC_ZEROPAGED, "KERN_PPC_ZEROPAGED" },
1457 { KERN_PPC_POWERSAVE_NAP, "KERN_PPC_POWERSAVE_NAP" },
1458 { KERN_MODPROBE, "KERN_MODPROBE" },
1459 { KERN_SG_BIG_BUFF, "KERN_SG_BIG_BUFF" },
1460 { KERN_ACCT, "KERN_ACCT" },
1461 { KERN_PPC_L2CR, "KERN_PPC_L2CR" },
1462 { KERN_RTSIGNR, "KERN_RTSIGNR" },
1463 { KERN_RTSIGMAX, "KERN_RTSIGMAX" },
1464 { KERN_SHMMAX, "KERN_SHMMAX" },
1465 { KERN_MSGMAX, "KERN_MSGMAX" },
1466 { KERN_MSGMNB, "KERN_MSGMNB" },
1467 { KERN_MSGPOOL, "KERN_MSGPOOL" },
1471 static struct xlat sysctl_vm[] = {
1472 { VM_SWAPCTL, "VM_SWAPCTL" },
1473 { VM_SWAPOUT, "VM_SWAPOUT" },
1474 { VM_FREEPG, "VM_FREEPG" },
1475 { VM_BDFLUSH, "VM_BDFLUSH" },
1476 { VM_OVERCOMMIT_MEMORY, "VM_OVERCOMMIT_MEMORY" },
1477 { VM_BUFFERMEM, "VM_BUFFERMEM" },
1478 { VM_PAGECACHE, "VM_PAGECACHE" },
1479 { VM_PAGERDAEMON, "VM_PAGERDAEMON" },
1480 { VM_PGT_CACHE, "VM_PGT_CACHE" },
1481 { VM_PAGE_CLUSTER, "VM_PAGE_CLUSTER" },
1485 static struct xlat sysctl_net[] = {
1486 { NET_CORE, "NET_CORE" },
1487 { NET_ETHER, "NET_ETHER" },
1488 { NET_802, "NET_802" },
1489 { NET_UNIX, "NET_UNIX" },
1490 { NET_IPV4, "NET_IPV4" },
1491 { NET_IPX, "NET_IPX" },
1492 { NET_ATALK, "NET_ATALK" },
1493 { NET_NETROM, "NET_NETROM" },
1494 { NET_AX25, "NET_AX25" },
1495 { NET_BRIDGE, "NET_BRIDGE" },
1496 { NET_ROSE, "NET_ROSE" },
1497 { NET_IPV6, "NET_IPV6" },
1498 { NET_X25, "NET_X25" },
1499 { NET_TR, "NET_TR" },
1500 { NET_DECNET, "NET_DECNET" },
1504 static struct xlat sysctl_net_core[] = {
1505 { NET_CORE_WMEM_MAX, "NET_CORE_WMEM_MAX" },
1506 { NET_CORE_RMEM_MAX, "NET_CORE_RMEM_MAX" },
1507 { NET_CORE_WMEM_DEFAULT, "NET_CORE_WMEM_DEFAULT" },
1508 { NET_CORE_RMEM_DEFAULT, "NET_CORE_RMEM_DEFAULT" },
1509 { NET_CORE_MAX_BACKLOG, "NET_CORE_MAX_BACKLOG" },
1510 { NET_CORE_FASTROUTE, "NET_CORE_FASTROUTE" },
1511 { NET_CORE_MSG_COST, "NET_CORE_MSG_COST" },
1512 { NET_CORE_MSG_BURST, "NET_CORE_MSG_BURST" },
1513 { NET_CORE_OPTMEM_MAX, "NET_CORE_OPTMEM_MAX" },
1517 static struct xlat sysctl_net_unix[] = {
1518 { NET_UNIX_DESTROY_DELAY, "NET_UNIX_DESTROY_DELAY" },
1519 { NET_UNIX_DELETE_DELAY, "NET_UNIX_DELETE_DELAY" },
1523 static struct xlat sysctl_net_ipv4[] = {
1524 { NET_IPV4_FORWARD, "NET_IPV4_FORWARD" },
1525 { NET_IPV4_DYNADDR, "NET_IPV4_DYNADDR" },
1526 { NET_IPV4_CONF, "NET_IPV4_CONF" },
1527 { NET_IPV4_NEIGH, "NET_IPV4_NEIGH" },
1528 { NET_IPV4_ROUTE, "NET_IPV4_ROUTE" },
1529 { NET_IPV4_FIB_HASH, "NET_IPV4_FIB_HASH" },
1530 { NET_IPV4_TCP_TIMESTAMPS, "NET_IPV4_TCP_TIMESTAMPS" },
1531 { NET_IPV4_TCP_WINDOW_SCALING, "NET_IPV4_TCP_WINDOW_SCALING" },
1532 { NET_IPV4_TCP_SACK, "NET_IPV4_TCP_SACK" },
1533 { NET_IPV4_TCP_RETRANS_COLLAPSE, "NET_IPV4_TCP_RETRANS_COLLAPSE" },
1534 { NET_IPV4_DEFAULT_TTL, "NET_IPV4_DEFAULT_TTL" },
1535 { NET_IPV4_AUTOCONFIG, "NET_IPV4_AUTOCONFIG" },
1536 { NET_IPV4_NO_PMTU_DISC, "NET_IPV4_NO_PMTU_DISC" },
1537 { NET_IPV4_TCP_SYN_RETRIES, "NET_IPV4_TCP_SYN_RETRIES" },
1538 { NET_IPV4_IPFRAG_HIGH_THRESH, "NET_IPV4_IPFRAG_HIGH_THRESH" },
1539 { NET_IPV4_IPFRAG_LOW_THRESH, "NET_IPV4_IPFRAG_LOW_THRESH" },
1540 { NET_IPV4_IPFRAG_TIME, "NET_IPV4_IPFRAG_TIME" },
1541 { NET_IPV4_TCP_MAX_KA_PROBES, "NET_IPV4_TCP_MAX_KA_PROBES" },
1542 { NET_IPV4_TCP_KEEPALIVE_TIME, "NET_IPV4_TCP_KEEPALIVE_TIME" },
1543 { NET_IPV4_TCP_KEEPALIVE_PROBES, "NET_IPV4_TCP_KEEPALIVE_PROBES" },
1544 { NET_IPV4_TCP_RETRIES1, "NET_IPV4_TCP_RETRIES1" },
1545 { NET_IPV4_TCP_RETRIES2, "NET_IPV4_TCP_RETRIES2" },
1546 { NET_IPV4_TCP_FIN_TIMEOUT, "NET_IPV4_TCP_FIN_TIMEOUT" },
1547 { NET_IPV4_IP_MASQ_DEBUG, "NET_IPV4_IP_MASQ_DEBUG" },
1548 { NET_TCP_SYNCOOKIES, "NET_TCP_SYNCOOKIES" },
1549 { NET_TCP_STDURG, "NET_TCP_STDURG" },
1550 { NET_TCP_RFC1337, "NET_TCP_RFC1337" },
1551 { NET_TCP_SYN_TAILDROP, "NET_TCP_SYN_TAILDROP" },
1552 { NET_TCP_MAX_SYN_BACKLOG, "NET_TCP_MAX_SYN_BACKLOG" },
1553 { NET_IPV4_LOCAL_PORT_RANGE, "NET_IPV4_LOCAL_PORT_RANGE" },
1554 { NET_IPV4_ICMP_ECHO_IGNORE_ALL, "NET_IPV4_ICMP_ECHO_IGNORE_ALL" },
1555 { NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS, "NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS" },
1556 { NET_IPV4_ICMP_SOURCEQUENCH_RATE, "NET_IPV4_ICMP_SOURCEQUENCH_RATE" },
1557 { NET_IPV4_ICMP_DESTUNREACH_RATE, "NET_IPV4_ICMP_DESTUNREACH_RATE" },
1558 { NET_IPV4_ICMP_TIMEEXCEED_RATE, "NET_IPV4_ICMP_TIMEEXCEED_RATE" },
1559 { NET_IPV4_ICMP_PARAMPROB_RATE, "NET_IPV4_ICMP_PARAMPROB_RATE" },
1560 { NET_IPV4_ICMP_ECHOREPLY_RATE, "NET_IPV4_ICMP_ECHOREPLY_RATE" },
1561 { NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES, "NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES" },
1562 { NET_IPV4_IGMP_MAX_MEMBERSHIPS, "NET_IPV4_IGMP_MAX_MEMBERSHIPS" },
1566 static struct xlat sysctl_net_ipv4_route[] = {
1567 { NET_IPV4_ROUTE_FLUSH, "NET_IPV4_ROUTE_FLUSH" },
1568 { NET_IPV4_ROUTE_MIN_DELAY, "NET_IPV4_ROUTE_MIN_DELAY" },
1569 { NET_IPV4_ROUTE_MAX_DELAY, "NET_IPV4_ROUTE_MAX_DELAY" },
1570 { NET_IPV4_ROUTE_GC_THRESH, "NET_IPV4_ROUTE_GC_THRESH" },
1571 { NET_IPV4_ROUTE_MAX_SIZE, "NET_IPV4_ROUTE_MAX_SIZE" },
1572 { NET_IPV4_ROUTE_GC_MIN_INTERVAL, "NET_IPV4_ROUTE_GC_MIN_INTERVAL" },
1573 { NET_IPV4_ROUTE_GC_TIMEOUT, "NET_IPV4_ROUTE_GC_TIMEOUT" },
1574 { NET_IPV4_ROUTE_GC_INTERVAL, "NET_IPV4_ROUTE_GC_INTERVAL" },
1575 { NET_IPV4_ROUTE_REDIRECT_LOAD, "NET_IPV4_ROUTE_REDIRECT_LOAD" },
1576 { NET_IPV4_ROUTE_REDIRECT_NUMBER, "NET_IPV4_ROUTE_REDIRECT_NUMBER" },
1577 { NET_IPV4_ROUTE_REDIRECT_SILENCE, "NET_IPV4_ROUTE_REDIRECT_SILENCE" },
1578 { NET_IPV4_ROUTE_ERROR_COST, "NET_IPV4_ROUTE_ERROR_COST" },
1579 { NET_IPV4_ROUTE_ERROR_BURST, "NET_IPV4_ROUTE_ERROR_BURST" },
1580 { NET_IPV4_ROUTE_GC_ELASTICITY, "NET_IPV4_ROUTE_GC_ELASTICITY" },
1584 static struct xlat sysctl_net_ipv4_conf[] = {
1585 { NET_IPV4_CONF_FORWARDING, "NET_IPV4_CONF_FORWARDING" },
1586 { NET_IPV4_CONF_MC_FORWARDING, "NET_IPV4_CONF_MC_FORWARDING" },
1587 { NET_IPV4_CONF_PROXY_ARP, "NET_IPV4_CONF_PROXY_ARP" },
1588 { NET_IPV4_CONF_ACCEPT_REDIRECTS, "NET_IPV4_CONF_ACCEPT_REDIRECTS" },
1589 { NET_IPV4_CONF_SECURE_REDIRECTS, "NET_IPV4_CONF_SECURE_REDIRECTS" },
1590 { NET_IPV4_CONF_SEND_REDIRECTS, "NET_IPV4_CONF_SEND_REDIRECTS" },
1591 { NET_IPV4_CONF_SHARED_MEDIA, "NET_IPV4_CONF_SHARED_MEDIA" },
1592 { NET_IPV4_CONF_RP_FILTER, "NET_IPV4_CONF_RP_FILTER" },
1593 { NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE, "NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE" },
1594 { NET_IPV4_CONF_BOOTP_RELAY, "NET_IPV4_CONF_BOOTP_RELAY" },
1595 { NET_IPV4_CONF_LOG_MARTIANS, "NET_IPV4_CONF_LOG_MARTIANS" },
1599 static struct xlat sysctl_net_ipv6[] = {
1600 { NET_IPV6_CONF, "NET_IPV6_CONF" },
1601 { NET_IPV6_NEIGH, "NET_IPV6_NEIGH" },
1602 { NET_IPV6_ROUTE, "NET_IPV6_ROUTE" },
1606 static struct xlat sysctl_net_ipv6_route[] = {
1607 { NET_IPV6_ROUTE_FLUSH, "NET_IPV6_ROUTE_FLUSH" },
1608 { NET_IPV6_ROUTE_GC_THRESH, "NET_IPV6_ROUTE_GC_THRESH" },
1609 { NET_IPV6_ROUTE_MAX_SIZE, "NET_IPV6_ROUTE_MAX_SIZE" },
1610 { NET_IPV6_ROUTE_GC_MIN_INTERVAL, "NET_IPV6_ROUTE_GC_MIN_INTERVAL" },
1611 { NET_IPV6_ROUTE_GC_TIMEOUT, "NET_IPV6_ROUTE_GC_TIMEOUT" },
1612 { NET_IPV6_ROUTE_GC_INTERVAL, "NET_IPV6_ROUTE_GC_INTERVAL" },
1613 { NET_IPV6_ROUTE_GC_ELASTICITY, "NET_IPV6_ROUTE_GC_ELASTICITY" },
1621 struct __sysctl_args info;
1623 umove (tcp, tcp->u_arg[0], &info);
1625 name = alloca (sizeof (int) * info.nlen);
1626 umoven(tcp, (size_t) info.name, sizeof (int) * info.nlen, (char *) name);
1628 if (entering(tcp)) {
1635 printxval(sysctl_root, name[0], "CTL_???");
1643 printxval(sysctl_kern, name[1], "KERN_???");
1648 printxval(sysctl_vm, name[1], "VM_???");
1653 printxval(sysctl_net, name[1], "NET_???");
1661 printxval(sysctl_net_core, name[2],
1666 printxval(sysctl_net_unix, name[2],
1671 printxval(sysctl_net_ipv4, name[2],
1677 case NET_IPV4_ROUTE:
1679 printxval(sysctl_net_ipv4_route,
1681 "NET_IPV4_ROUTE_???");
1685 printxval(sysctl_net_ipv4_conf,
1687 "NET_IPV4_CONF_???");
1695 printxval(sysctl_net_ipv6, name[2],
1701 case NET_IPV6_ROUTE:
1703 printxval(sysctl_net_ipv6_route,
1705 "NET_IPV6_ROUTE_???");
1719 while (cnt < info.nlen)
1720 tprintf(", %x", name[cnt++]);
1721 tprintf("}, %d, ", info.nlen);
1724 umove(tcp, (size_t)info.oldlenp, &oldlen);
1726 && ((name[0] == CTL_KERN
1727 && (name[1] == KERN_OSRELEASE
1728 || name[1] == KERN_OSTYPE
1729 #ifdef KERN_JAVA_INTERPRETER
1730 || name[1] == KERN_JAVA_INTERPRETER
1732 #ifdef KERN_JAVA_APPLETVIEWER
1733 || name[1] == KERN_JAVA_APPLETVIEWER
1736 printpath(tcp, (size_t)info.oldval);
1737 tprintf(", %d, ", oldlen);
1738 if (info.newval == 0)
1740 else if (syserror(tcp))
1741 tprintf("%p", info.newval);
1743 printpath(tcp, (size_t)info.newval);
1744 tprintf(", %Zd", info.newlen);
1746 tprintf("%p, %d, %p, %Zd", info.oldval, oldlen,
1747 info.newval, info.newlen);
1757 return printargs(tcp);