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 */
45 #define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */
46 #define MS_DIRSYNC 128 /* Directory modifications are synchronous */
47 #define MS_NOATIME 1024 /* Do not update access times. */
48 #define MS_NODIRATIME 2048 /* Do not update directory access times */
52 #define MS_VERBOSE 32768
53 #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */
54 #define MS_ACTIVE (1<<30)
55 #define MS_NOUSER (1<<31)
57 #include <sys/socket.h>
58 #include <netinet/in.h>
59 #include <arpa/inet.h>
61 #include <sys/syscall.h>
64 #include <linux/capability.h>
68 #include <asm/cachectl.h>
71 #ifdef HAVE_LINUX_USTNAME_H
72 #include <linux/utsname.h>
76 #include <asm/sysmips.h>
79 #include <linux/sysctl.h>
81 static const struct xlat mount_flags[] = {
82 { MS_RDONLY, "MS_RDONLY" },
83 { MS_NOSUID, "MS_NOSUID" },
84 { MS_NODEV, "MS_NODEV" },
85 { MS_NOEXEC, "MS_NOEXEC" },
86 { MS_SYNCHRONOUS,"MS_SYNCHRONOUS"},
87 { MS_REMOUNT, "MS_REMOUNT" },
88 { MS_MANDLOCK, "MS_MANDLOCK" },
89 { MS_NOATIME, "MS_NOATIME" },
90 { MS_NODIRATIME,"MS_NODIRATIME" },
91 { MS_BIND, "MS_BIND" },
92 { MS_MOVE, "MS_MOVE" },
94 { MS_VERBOSE, "MS_VERBOSE" },
95 { MS_POSIXACL, "MS_POSIXACL" },
96 { MS_ACTIVE, "MS_ACTIVE" },
97 { MS_NOUSER, "MS_NOUSER" },
106 printpath(tcp, tcp->u_arg[0]);
108 printpath(tcp, tcp->u_arg[1]);
110 if ((tcp->u_arg[3] & (MS_BIND|MS_MOVE|MS_REMOUNT)) == 0)
111 printpath(tcp, tcp->u_arg[2]);
113 tprintf("%#lx", tcp->u_arg[2]);
115 printflags(mount_flags, tcp->u_arg[3]);
116 tprintf(", %#lx", tcp->u_arg[4]);
126 printstr(tcp, tcp->u_arg[0], -1);
128 if (tcp->u_arg[1] & 1)
129 tprintf("MNT_FORCE");
136 /* These are not macros, but enums. We just copy the values by hand
137 from Linux 2.6.9 here. */
138 static const struct xlat personality_options[] = {
140 { 0x00800000, "PER_LINUX_32BIT"},
141 { 0x04100001, "PER_SVR4" },
142 { 0x05000002, "PER_SVR3" },
143 { 0x07000003, "PER_SCOSVR3" },
144 { 0x06000003, "PER_OSR5" },
145 { 0x05000004, "PER_WYSEV386" },
146 { 0x04000005, "PER_ISCR4" },
147 { 0x00000006, "PER_BSD" },
148 { 0x04000006, "PER_SUNOS" },
149 { 0x05000007, "PER_XENIX" },
150 { 0x00000008, "PER_LINUX32" },
151 { 0x08000008, "PER_LINUX32_3GB"},
152 { 0x04000009, "PER_IRIX32" },
153 { 0x0400000a, "PER_IRIXN32" },
154 { 0x0400000b, "PER_IRIX64" },
155 { 0x0000000c, "PER_RISCOS" },
156 { 0x0400000d, "PER_SOLARIS" },
157 { 0x0410000e, "PER_UW7" },
158 { 0x0000000f, "PER_OSF4" },
159 { 0x00000010, "PER_HPUX" },
168 printxval(personality_options, tcp->u_arg[0], "PER_???");
172 #include <linux/reboot.h>
173 static const struct xlat bootflags1[] = {
174 { LINUX_REBOOT_MAGIC1, "LINUX_REBOOT_MAGIC1" },
178 static const struct xlat bootflags2[] = {
179 { LINUX_REBOOT_MAGIC2, "LINUX_REBOOT_MAGIC2" },
180 { LINUX_REBOOT_MAGIC2A, "LINUX_REBOOT_MAGIC2A" },
181 { LINUX_REBOOT_MAGIC2B, "LINUX_REBOOT_MAGIC2B" },
185 static const struct xlat bootflags3[] = {
186 { LINUX_REBOOT_CMD_CAD_OFF, "LINUX_REBOOT_CMD_CAD_OFF" },
187 { LINUX_REBOOT_CMD_RESTART, "LINUX_REBOOT_CMD_RESTART" },
188 { LINUX_REBOOT_CMD_HALT, "LINUX_REBOOT_CMD_HALT" },
189 { LINUX_REBOOT_CMD_CAD_ON, "LINUX_REBOOT_CMD_CAD_ON" },
190 { LINUX_REBOOT_CMD_POWER_OFF, "LINUX_REBOOT_CMD_POWER_OFF" },
191 { LINUX_REBOOT_CMD_RESTART2, "LINUX_REBOOT_CMD_RESTART2" },
200 if (!printflags(bootflags1, tcp->u_arg[0]))
201 tprintf("LINUX_REBOOT_MAGIC???");
203 if (!printflags(bootflags2, tcp->u_arg[1]))
204 tprintf("LINUX_REBOOT_MAGIC???");
206 if (!printflags(bootflags3, tcp->u_arg[2]))
207 tprintf("LINUX_REBOOT_CMD_???");
208 if (tcp->u_arg[2] == LINUX_REBOOT_CMD_RESTART2) {
210 printstr(tcp, tcp->u_arg[3], -1);
217 static const struct xlat cacheflush_scope[] = {
218 #ifdef FLUSH_SCOPE_LINE
219 { FLUSH_SCOPE_LINE, "FLUSH_SCOPE_LINE" },
221 #ifdef FLUSH_SCOPE_PAGE
222 { FLUSH_SCOPE_PAGE, "FLUSH_SCOPE_PAGE" },
224 #ifdef FLUSH_SCOPE_ALL
225 { FLUSH_SCOPE_ALL, "FLUSH_SCOPE_ALL" },
230 static const struct xlat cacheflush_flags[] = {
231 #ifdef FLUSH_CACHE_BOTH
232 { FLUSH_CACHE_BOTH, "FLUSH_CACHE_BOTH" },
234 #ifdef FLUSH_CACHE_DATA
235 { FLUSH_CACHE_DATA, "FLUSH_CACHE_DATA" },
237 #ifdef FLUSH_CACHE_INSN
238 { FLUSH_CACHE_INSN, "FLUSH_CACHE_INSN" },
249 tprintf("%#lx, ", tcp->u_arg[0]);
251 printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???");
254 printflags(cacheflush_flags, tcp->u_arg[2]);
256 tprintf(", %lu", tcp->u_arg[3]);
266 #include <sys/reboot.h>
271 #include <sys/mount.h>
272 #include <sys/socket.h>
273 #include <nfs/export.h>
274 #include <rpc/types.h>
275 #include <rpc/auth.h>
285 static const struct xlat bootflags[] = {
286 { RB_AUTOBOOT, "RB_AUTOBOOT" }, /* for system auto-booting itself */
287 { RB_ASKNAME, "RB_ASKNAME" }, /* ask for file name to reboot from */
288 { RB_SINGLE, "RB_SINGLE" }, /* reboot to single user only */
289 { RB_NOSYNC, "RB_NOSYNC" }, /* dont sync before reboot */
290 { RB_HALT, "RB_HALT" }, /* don't reboot, just halt */
291 { RB_INITNAME, "RB_INITNAME" }, /* name given for /etc/init */
292 { RB_NOBOOTRC, "RB_NOBOOTRC" }, /* don't run /etc/rc.boot */
293 { RB_DEBUG, "RB_DEBUG" }, /* being run under debugger */
294 { RB_DUMP, "RB_DUMP" }, /* dump system core */
295 { RB_WRITABLE, "RB_WRITABLE" }, /* mount root read/write */
296 { RB_STRING, "RB_STRING" }, /* pass boot args to prom monitor */
305 if (!printflags(bootflags, tcp->u_arg[0]))
307 if (tcp->u_arg[0] & RB_STRING) {
308 printstr(tcp, tcp->u_arg[1], -1);
319 printstr(tcp, tcp->u_arg[0], -1);
329 printstr(tcp, tcp->u_arg[0], -1);
339 printsock(tcp, tcp->u_arg[0]);
344 static const struct xlat mountflags[] = {
345 { M_RDONLY, "M_RDONLY" },
346 { M_NOSUID, "M_NOSUID" },
347 { M_NEWTYPE, "M_NEWTYPE" },
348 { M_GRPID, "M_GRPID" },
350 { M_REMOUNT, "M_REMOUNT" },
353 { M_NOSUB, "M_NOSUB" },
356 { M_MULTI, "M_MULTI" },
359 { M_SYS5, "M_SYS5" },
364 static const struct xlat nfsflags[] = {
365 { NFSMNT_SOFT, "NFSMNT_SOFT" },
366 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
367 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
368 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
369 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
370 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
371 { NFSMNT_INT, "NFSMNT_INT" },
372 { NFSMNT_NOAC, "NFSMNT_NOAC" },
373 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
374 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
375 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
376 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
378 { NFSMNT_SECURE, "NFSMNT_SECURE" },
381 { NFSMNT_NOCTO, "NFSMNT_NOCTO" },
384 { NFSMNT_POSIX, "NFSMNT_POSIX" },
396 if (!(tcp->u_arg[2] & M_NEWTYPE) || umovestr(tcp,
397 tcp->u_arg[0], sizeof type, type) < 0) {
398 tprintf("OLDTYPE:#%lx", tcp->u_arg[0]);
400 tprintf("\"%s\", ", type);
402 printstr(tcp, tcp->u_arg[1], -1);
404 if (!printflags(mountflags, tcp->u_arg[2] & ~M_NEWTYPE))
408 if (strcmp(type, "4.2") == 0) {
410 if (umove(tcp, tcp->u_arg[3], &a) < 0)
412 printstr(tcp, (int)a.fspec, -1);
413 } else if (strcmp(type, "lo") == 0) {
415 if (umove(tcp, tcp->u_arg[3], &a) < 0)
417 printstr(tcp, (int)a.fsdir, -1);
418 } else if (strcmp(type, "nfs") == 0) {
420 if (umove(tcp, tcp->u_arg[3], &a) < 0)
423 printsock(tcp, (int) a.addr);
425 if (!printflags(nfsflags, a.flags))
426 tprintf("NFSMNT_???");
427 tprintf(", ws:%u,rs:%u,to:%u,re:%u,",
428 a.wsize, a.rsize, a.timeo, a.retrans);
429 if (a.flags & NFSMNT_HOSTNAME && a.hostname)
430 printstr(tcp, (int)a.hostname, -1);
432 tprintf("%#lx", (unsigned long) a.hostname);
433 tprintf(",reg-min:%u,max:%u,dir-min:%u,max:%u,",
434 a.acregmin, a.acregmax, a.acdirmin, a.acdirmax);
435 if ((a.flags & NFSMNT_SECURE) && a.netname)
436 printstr(tcp, (int) a.netname, -1);
438 tprintf("%#lx", (unsigned long) a.netname);
440 } else if (strcmp(type, "rfs") == 0) {
443 if (umove(tcp, tcp->u_arg[3], &a) < 0)
446 printstr(tcp, (int)a.rmtfs, -1);
447 if (umove(tcp, (int)a.token, &t) < 0)
449 tprintf(", %u, %s]", t.t_id, t.t_uname);
450 } else if (strcmp(type, "pcfs") == 0) {
452 if (umove(tcp, tcp->u_arg[3], &a) < 0)
454 printstr(tcp, (int)a.fspec, -1);
465 printstr(tcp, tcp->u_arg[0], -1);
474 return sys_unmount(tcp);
481 /* XXX - no information available */
482 return printargs(tcp);
485 static const struct xlat ex_auth_flags[] = {
486 { AUTH_UNIX, "AUTH_UNIX" },
487 { AUTH_DES, "AUTH_DES" },
499 printstr(tcp, tcp->u_arg[0], -1);
500 if (umove(tcp, tcp->u_arg[1], &e) < 0) {
501 tprintf("%#lx", tcp->u_arg[1]);
504 tprintf("{fl:%u, anon:%u, ", e.ex_flags, e.ex_anon);
505 printxval(ex_auth_flags, e.ex_auth, "AUTH_???");
506 tprintf(", roots:[");
507 if (e.ex_auth == AUTH_UNIX) {
508 for (i=0; i<e.ex_u.exunix.rootaddrs.naddrs; i++) {
510 (int)&e.ex_u.exunix.rootaddrs.addrvec[i]);
512 tprintf("], writers:[");
513 for (i=0; i<e.ex_writeaddrs.naddrs; i++) {
515 (int)&e.ex_writeaddrs.addrvec[i]);
519 for (i=0; i<e.ex_u.exdes.nnames; i++) {
521 (int)&e.ex_u.exdes.rootnames[i]);
524 tprintf("], window:%u", e.ex_u.exdes.window);
531 static const struct xlat sysconflimits[] = {
533 { _SC_ARG_MAX, "_SC_ARG_MAX" }, /* space for argv & envp */
536 { _SC_CHILD_MAX, "_SC_CHILD_MAX" }, /* maximum children per process??? */
539 { _SC_CLK_TCK, "_SC_CLK_TCK" }, /* clock ticks/sec */
541 #ifdef _SC_NGROUPS_MAX
542 { _SC_NGROUPS_MAX, "_SC_NGROUPS_MAX" }, /* number of groups if multple supp. */
545 { _SC_OPEN_MAX, "_SC_OPEN_MAX" }, /* max open files per process */
547 #ifdef _SC_JOB_CONTROL
548 { _SC_JOB_CONTROL, "_SC_JOB_CONTROL" }, /* do we have job control */
551 { _SC_SAVED_IDS, "_SC_SAVED_IDS" }, /* do we have saved uid/gids */
554 { _SC_VERSION, "_SC_VERSION" }, /* POSIX version supported */
564 printxval(sysconflimits, tcp->u_arg[0], "_SC_???");
571 #if defined(SUNOS4) || defined(FREEBSD)
572 static const struct xlat pathconflimits[] = {
574 { _PC_LINK_MAX, "_PC_LINK_MAX" }, /* max links to file/dir */
577 { _PC_MAX_CANON, "_PC_MAX_CANON" }, /* max line length */
580 { _PC_MAX_INPUT, "_PC_MAX_INPUT" }, /* max "packet" to a tty device */
583 { _PC_NAME_MAX, "_PC_NAME_MAX" }, /* max pathname component length */
586 { _PC_PATH_MAX, "_PC_PATH_MAX" }, /* max pathname length */
589 { _PC_PIPE_BUF, "_PC_PIPE_BUF" }, /* size of a pipe */
591 #ifdef _PC_CHOWN_RESTRICTED
592 { _PC_CHOWN_RESTRICTED, "_PC_CHOWN_RESTRICTED" }, /* can we give away files */
595 { _PC_NO_TRUNC, "_PC_NO_TRUNC" }, /* trunc or error on >NAME_MAX */
598 { _PC_VDISABLE, "_PC_VDISABLE" }, /* best char to shut off tty c_cc */
609 printstr(tcp, tcp->u_arg[0], -1);
611 printxval(pathconflimits, tcp->u_arg[1], "_PC_???");
621 tprintf("%lu, ", tcp->u_arg[0]);
622 printxval(pathconflimits, tcp->u_arg[1], "_PC_???");
627 #endif /* SUNOS4 || FREEBSD */
631 #ifdef HAVE_SYS_SYSCONFIG_H
632 #include <sys/sysconfig.h>
633 #endif /* HAVE_SYS_SYSCONFIG_H */
635 #include <sys/mount.h>
636 #include <sys/systeminfo.h>
637 #include <sys/utsname.h>
639 static const struct xlat sysconfig_options[] = {
640 #ifdef _CONFIG_NGROUPS
641 { _CONFIG_NGROUPS, "_CONFIG_NGROUPS" },
643 #ifdef _CONFIG_CHILD_MAX
644 { _CONFIG_CHILD_MAX, "_CONFIG_CHILD_MAX" },
646 #ifdef _CONFIG_OPEN_FILES
647 { _CONFIG_OPEN_FILES, "_CONFIG_OPEN_FILES" },
649 #ifdef _CONFIG_POSIX_VER
650 { _CONFIG_POSIX_VER, "_CONFIG_POSIX_VER" },
652 #ifdef _CONFIG_PAGESIZE
653 { _CONFIG_PAGESIZE, "_CONFIG_PAGESIZE" },
655 #ifdef _CONFIG_CLK_TCK
656 { _CONFIG_CLK_TCK, "_CONFIG_CLK_TCK" },
658 #ifdef _CONFIG_XOPEN_VER
659 { _CONFIG_XOPEN_VER, "_CONFIG_XOPEN_VER" },
661 #ifdef _CONFIG_PROF_TCK
662 { _CONFIG_PROF_TCK, "_CONFIG_PROF_TCK" },
664 #ifdef _CONFIG_NPROC_CONF
665 { _CONFIG_NPROC_CONF, "_CONFIG_NPROC_CONF" },
667 #ifdef _CONFIG_NPROC_ONLN
668 { _CONFIG_NPROC_ONLN, "_CONFIG_NPROC_ONLN" },
670 #ifdef _CONFIG_AIO_LISTIO_MAX
671 { _CONFIG_AIO_LISTIO_MAX, "_CONFIG_AIO_LISTIO_MAX" },
673 #ifdef _CONFIG_AIO_MAX
674 { _CONFIG_AIO_MAX, "_CONFIG_AIO_MAX" },
676 #ifdef _CONFIG_AIO_PRIO_DELTA_MAX
677 { _CONFIG_AIO_PRIO_DELTA_MAX, "_CONFIG_AIO_PRIO_DELTA_MAX" },
679 #ifdef _CONFIG_CONFIG_DELAYTIMER_MAX
680 { _CONFIG_DELAYTIMER_MAX, "_CONFIG_DELAYTIMER_MAX" },
682 #ifdef _CONFIG_MQ_OPEN_MAX
683 { _CONFIG_MQ_OPEN_MAX, "_CONFIG_MQ_OPEN_MAX" },
685 #ifdef _CONFIG_MQ_PRIO_MAX
686 { _CONFIG_MQ_PRIO_MAX, "_CONFIG_MQ_PRIO_MAX" },
688 #ifdef _CONFIG_RTSIG_MAX
689 { _CONFIG_RTSIG_MAX, "_CONFIG_RTSIG_MAX" },
691 #ifdef _CONFIG_SEM_NSEMS_MAX
692 { _CONFIG_SEM_NSEMS_MAX, "_CONFIG_SEM_NSEMS_MAX" },
694 #ifdef _CONFIG_SEM_VALUE_MAX
695 { _CONFIG_SEM_VALUE_MAX, "_CONFIG_SEM_VALUE_MAX" },
697 #ifdef _CONFIG_SIGQUEUE_MAX
698 { _CONFIG_SIGQUEUE_MAX, "_CONFIG_SIGQUEUE_MAX" },
700 #ifdef _CONFIG_SIGRT_MIN
701 { _CONFIG_SIGRT_MIN, "_CONFIG_SIGRT_MIN" },
703 #ifdef _CONFIG_SIGRT_MAX
704 { _CONFIG_SIGRT_MAX, "_CONFIG_SIGRT_MAX" },
706 #ifdef _CONFIG_TIMER_MAX
707 { _CONFIG_TIMER_MAX, "_CONFIG_TIMER_MAX" },
709 #ifdef _CONFIG_CONFIG_PHYS_PAGES
710 { _CONFIG_PHYS_PAGES, "_CONFIG_PHYS_PAGES" },
712 #ifdef _CONFIG_AVPHYS_PAGES
713 { _CONFIG_AVPHYS_PAGES, "_CONFIG_AVPHYS_PAGES" },
723 printxval(sysconfig_options, tcp->u_arg[0], "_CONFIG_???");
727 static const struct xlat sysinfo_options[] = {
728 { SI_SYSNAME, "SI_SYSNAME" },
729 { SI_HOSTNAME, "SI_HOSTNAME" },
730 { SI_RELEASE, "SI_RELEASE" },
731 { SI_VERSION, "SI_VERSION" },
732 { SI_MACHINE, "SI_MACHINE" },
733 { SI_ARCHITECTURE, "SI_ARCHITECTURE" },
734 { SI_HW_SERIAL, "SI_HW_SERIAL" },
735 { SI_HW_PROVIDER, "SI_HW_PROVIDER" },
736 { SI_SRPC_DOMAIN, "SI_SRPC_DOMAIN" },
737 #ifdef SI_SET_HOSTNAME
738 { SI_SET_HOSTNAME, "SI_SET_HOSTNAME" },
740 #ifdef SI_SET_SRPC_DOMAIN
741 { SI_SET_SRPC_DOMAIN, "SI_SET_SRPC_DOMAIN" },
743 #ifdef SI_SET_KERB_REALM
744 { SI_SET_KERB_REALM, "SI_SET_KERB_REALM" },
747 { SI_KERB_REALM, "SI_KERB_REALM" },
757 printxval(sysinfo_options, tcp->u_arg[0], "SI_???");
761 /* Technically some calls write values. So what. */
763 tprintf("%#lx", tcp->u_arg[1]);
765 printpath(tcp, tcp->u_arg[1]);
766 tprintf(", %lu", tcp->u_arg[2]);
773 #include <sys/syssgi.h>
775 static const struct xlat syssgi_options[] = {
776 { SGI_SYSID, "SGI_SYSID" },
778 { SGI_RDUBLK, "SGI_RDUBLK" },
780 { SGI_TUNE, "SGI_TUNE" },
781 { SGI_IDBG, "SGI_IDBG" },
782 { SGI_INVENT, "SGI_INVENT" },
783 { SGI_RDNAME, "SGI_RDNAME" },
784 { SGI_SETLED, "SGI_SETLED" },
785 { SGI_SETNVRAM, "SGI_SETNVRAM" },
786 { SGI_GETNVRAM, "SGI_GETNVRAM" },
787 { SGI_QUERY_FTIMER, "SGI_QUERY_FTIMER" },
788 { SGI_QUERY_CYCLECNTR, "SGI_QUERY_CYCLECNTR" },
789 { SGI_PROCSZ, "SGI_PROCSZ" },
790 { SGI_SIGACTION, "SGI_SIGACTION" },
791 { SGI_SIGPENDING, "SGI_SIGPENDING" },
792 { SGI_SIGPROCMASK, "SGI_SIGPROCMASK" },
793 { SGI_SIGSUSPEND, "SGI_SIGSUSPEND" },
794 { SGI_SETSID, "SGI_SETSID" },
795 { SGI_SETPGID, "SGI_SETPGID" },
796 { SGI_SYSCONF, "SGI_SYSCONF" },
797 { SGI_WAIT4, "SGI_WAIT4" },
798 { SGI_PATHCONF, "SGI_PATHCONF" },
799 { SGI_READB, "SGI_READB" },
800 { SGI_WRITEB, "SGI_WRITEB" },
801 { SGI_SETGROUPS, "SGI_SETGROUPS" },
802 { SGI_GETGROUPS, "SGI_GETGROUPS" },
803 { SGI_SETTIMEOFDAY, "SGI_SETTIMEOFDAY" },
804 { SGI_SETTIMETRIM, "SGI_SETTIMETRIM" },
805 { SGI_GETTIMETRIM, "SGI_GETTIMETRIM" },
806 { SGI_SPROFIL, "SGI_SPROFIL" },
807 { SGI_RUSAGE, "SGI_RUSAGE" },
808 { SGI_SIGSTACK, "SGI_SIGSTACK" },
809 { SGI_SIGSTATUS, "SGI_SIGSTATUS" },
810 { SGI_NETPROC, "SGI_NETPROC" },
811 { SGI_SIGALTSTACK, "SGI_SIGALTSTACK" },
812 { SGI_BDFLUSHCNT, "SGI_BDFLUSHCNT" },
813 { SGI_SSYNC, "SGI_SSYNC" },
814 { SGI_NFSCNVT, "SGI_NFSCNVT" },
815 { SGI_GETPGID, "SGI_GETPGID" },
816 { SGI_GETSID, "SGI_GETSID" },
817 { SGI_IOPROBE, "SGI_IOPROBE" },
818 { SGI_CONFIG, "SGI_CONFIG" },
819 { SGI_ELFMAP, "SGI_ELFMAP" },
820 { SGI_MCONFIG, "SGI_MCONFIG" },
821 { SGI_GETPLABEL, "SGI_GETPLABEL" },
822 { SGI_SETPLABEL, "SGI_SETPLABEL" },
823 { SGI_GETLABEL, "SGI_GETLABEL" },
824 { SGI_SETLABEL, "SGI_SETLABEL" },
825 { SGI_SATREAD, "SGI_SATREAD" },
826 { SGI_SATWRITE, "SGI_SATWRITE" },
827 { SGI_SATCTL, "SGI_SATCTL" },
828 { SGI_LOADATTR, "SGI_LOADATTR" },
829 { SGI_UNLOADATTR, "SGI_UNLOADATTR" },
831 { SGI_RECVLMSG, "SGI_RECVLMSG" },
833 { SGI_PLANGMOUNT, "SGI_PLANGMOUNT" },
834 { SGI_GETPSOACL, "SGI_GETPSOACL" },
835 { SGI_SETPSOACL, "SGI_SETPSOACL" },
836 #ifdef SGI_EAG_GET_ATTR
837 { SGI_EAG_GET_ATTR, "SGI_EAG_GET_ATTR" },
839 #ifdef SGI_EAG_SET_ATTR
840 { SGI_EAG_SET_ATTR, "SGI_EAG_SET_ATTR" },
842 #ifdef SGI_EAG_GET_PROCATTR
843 { SGI_EAG_GET_PROCATTR, "SGI_EAG_GET_PROCATTR" },
845 #ifdef SGI_EAG_SET_PROCATTR
846 { SGI_EAG_SET_PROCATTR, "SGI_EAG_SET_PROCATTR" },
849 { SGI_FREVOKE, "SGI_FREVOKE" },
851 #ifdef SGI_SBE_GET_INFO
852 { SGI_SBE_GET_INFO, "SGI_SBE_GET_INFO" },
854 #ifdef SGI_SBE_CLR_INFO
855 { SGI_SBE_CLR_INFO, "SGI_SBE_CLR_INFO" },
857 { SGI_RMI_FIXECC, "SGI_RMI_FIXECC" },
858 { SGI_R4K_CERRS, "SGI_R4K_CERRS" },
859 { SGI_GET_EVCONF, "SGI_GET_EVCONF" },
860 { SGI_MPCWAROFF, "SGI_MPCWAROFF" },
861 { SGI_SET_AUTOPWRON, "SGI_SET_AUTOPWRON" },
862 { SGI_SPIPE, "SGI_SPIPE" },
863 { SGI_SYMTAB, "SGI_SYMTAB" },
864 #ifdef SGI_SET_FPDEBUG
865 { SGI_SET_FPDEBUG, "SGI_SET_FPDEBUG" },
867 #ifdef SGI_SET_FP_PRECISE
868 { SGI_SET_FP_PRECISE, "SGI_SET_FP_PRECISE" },
870 { SGI_TOSSTSAVE, "SGI_TOSSTSAVE" },
871 { SGI_FDHI, "SGI_FDHI" },
872 #ifdef SGI_SET_CONFIG_SMM
873 { SGI_SET_CONFIG_SMM, "SGI_SET_CONFIG_SMM" },
875 #ifdef SGI_SET_FP_PRESERVE
876 { SGI_SET_FP_PRESERVE, "SGI_SET_FP_PRESERVE" },
878 { SGI_MINRSS, "SGI_MINRSS" },
880 { SGI_GRIO, "SGI_GRIO" },
882 #ifdef SGI_XLV_SET_TAB
883 { SGI_XLV_SET_TAB, "SGI_XLV_SET_TAB" },
885 #ifdef SGI_XLV_GET_TAB
886 { SGI_XLV_GET_TAB, "SGI_XLV_GET_TAB" },
888 #ifdef SGI_GET_FP_PRECISE
889 { SGI_GET_FP_PRECISE, "SGI_GET_FP_PRECISE" },
891 #ifdef SGI_GET_CONFIG_SMM
892 { SGI_GET_CONFIG_SMM, "SGI_GET_CONFIG_SMM" },
894 #ifdef SGI_FP_IMPRECISE_SUPP
895 { SGI_FP_IMPRECISE_SUPP,"SGI_FP_IMPRECISE_SUPP" },
897 #ifdef SGI_CONFIG_NSMM_SUPP
898 { SGI_CONFIG_NSMM_SUPP, "SGI_CONFIG_NSMM_SUPP" },
900 #ifdef SGI_RT_TSTAMP_CREATE
901 { SGI_RT_TSTAMP_CREATE, "SGI_RT_TSTAMP_CREATE" },
903 #ifdef SGI_RT_TSTAMP_DELETE
904 { SGI_RT_TSTAMP_DELETE, "SGI_RT_TSTAMP_DELETE" },
906 #ifdef SGI_RT_TSTAMP_START
907 { SGI_RT_TSTAMP_START, "SGI_RT_TSTAMP_START" },
909 #ifdef SGI_RT_TSTAMP_STOP
910 { SGI_RT_TSTAMP_STOP, "SGI_RT_TSTAMP_STOP" },
912 #ifdef SGI_RT_TSTAMP_ADDR
913 { SGI_RT_TSTAMP_ADDR, "SGI_RT_TSTAMP_ADDR" },
915 #ifdef SGI_RT_TSTAMP_MASK
916 { SGI_RT_TSTAMP_MASK, "SGI_RT_TSTAMP_MASK" },
918 #ifdef SGI_RT_TSTAMP_EOB_MODE
919 { SGI_RT_TSTAMP_EOB_MODE,"SGI_RT_TSTAMP_EOB_MODE"},
921 #ifdef SGI_USE_FP_BCOPY
922 { SGI_USE_FP_BCOPY, "SGI_USE_FP_BCOPY" },
925 { SGI_GET_UST, "SGI_GET_UST" },
927 #ifdef SGI_SPECULATIVE_EXEC
928 { SGI_SPECULATIVE_EXEC, "SGI_SPECULATIVE_EXEC" },
930 #ifdef SGI_XLV_NEXT_RQST
931 { SGI_XLV_NEXT_RQST, "SGI_XLV_NEXT_RQST" },
933 #ifdef SGI_XLV_ATTR_CURSOR
934 { SGI_XLV_ATTR_CURSOR, "SGI_XLV_ATTR_CURSOR" },
936 #ifdef SGI_XLV_ATTR_GET
937 { SGI_XLV_ATTR_GET, "SGI_XLV_ATTR_GET" },
939 #ifdef SGI_XLV_ATTR_SET
940 { SGI_XLV_ATTR_SET, "SGI_XLV_ATTR_SET" },
943 { SGI_BTOOLSIZE, "SGI_BTOOLSIZE" },
946 { SGI_BTOOLGET, "SGI_BTOOLGET" },
948 #ifdef SGI_BTOOLREINIT
949 { SGI_BTOOLREINIT, "SGI_BTOOLREINIT" },
951 #ifdef SGI_CREATE_UUID
952 { SGI_CREATE_UUID, "SGI_CREATE_UUID" },
955 { SGI_NOFPE, "SGI_NOFPE" },
957 #ifdef SGI_OLD_SOFTFP
958 { SGI_OLD_SOFTFP, "SGI_OLD_SOFTFP" },
960 #ifdef SGI_FS_INUMBERS
961 { SGI_FS_INUMBERS, "SGI_FS_INUMBERS" },
963 #ifdef SGI_FS_BULKSTAT
964 { SGI_FS_BULKSTAT, "SGI_FS_BULKSTAT" },
966 #ifdef SGI_RT_TSTAMP_WAIT
967 { SGI_RT_TSTAMP_WAIT, "SGI_RT_TSTAMP_WAIT" },
969 #ifdef SGI_RT_TSTAMP_UPDATE
970 { SGI_RT_TSTAMP_UPDATE, "SGI_RT_TSTAMP_UPDATE" },
972 #ifdef SGI_PATH_TO_HANDLE
973 { SGI_PATH_TO_HANDLE, "SGI_PATH_TO_HANDLE" },
975 #ifdef SGI_PATH_TO_FSHANDLE
976 { SGI_PATH_TO_FSHANDLE, "SGI_PATH_TO_FSHANDLE" },
978 #ifdef SGI_FD_TO_HANDLE
979 { SGI_FD_TO_HANDLE, "SGI_FD_TO_HANDLE" },
981 #ifdef SGI_OPEN_BY_HANDLE
982 { SGI_OPEN_BY_HANDLE, "SGI_OPEN_BY_HANDLE" },
984 #ifdef SGI_READLINK_BY_HANDLE
985 { SGI_READLINK_BY_HANDLE,"SGI_READLINK_BY_HANDLE"},
987 #ifdef SGI_READ_DANGID
988 { SGI_READ_DANGID, "SGI_READ_DANGID" },
991 { SGI_CONST, "SGI_CONST" },
993 #ifdef SGI_XFS_FSOPERATIONS
994 { SGI_XFS_FSOPERATIONS, "SGI_XFS_FSOPERATIONS" },
997 { SGI_SETASH, "SGI_SETASH" },
1000 { SGI_GETASH, "SGI_GETASH" },
1003 { SGI_SETPRID, "SGI_SETPRID" },
1006 { SGI_GETPRID, "SGI_GETPRID" },
1008 #ifdef SGI_SETSPINFO
1009 { SGI_SETSPINFO, "SGI_SETSPINFO" },
1011 #ifdef SGI_GETSPINFO
1012 { SGI_GETSPINFO, "SGI_GETSPINFO" },
1015 { SGI_SHAREII, "SGI_SHAREII" },
1017 #ifdef SGI_NEWARRAYSESS
1018 { SGI_NEWARRAYSESS, "SGI_NEWARRAYSESS" },
1020 #ifdef SGI_GETDFLTPRID
1021 { SGI_GETDFLTPRID, "SGI_GETDFLTPRID" },
1023 #ifdef SGI_SET_DISMISSED_EXC_CNT
1024 { SGI_SET_DISMISSED_EXC_CNT,"SGI_SET_DISMISSED_EXC_CNT" },
1026 #ifdef SGI_GET_DISMISSED_EXC_CNT
1027 { SGI_GET_DISMISSED_EXC_CNT,"SGI_GET_DISMISSED_EXC_CNT" },
1029 #ifdef SGI_CYCLECNTR_SIZE
1030 { SGI_CYCLECNTR_SIZE, "SGI_CYCLECNTR_SIZE" },
1032 #ifdef SGI_QUERY_FASTTIMER
1033 { SGI_QUERY_FASTTIMER, "SGI_QUERY_FASTTIMER" },
1035 #ifdef SGI_PIDSINASH
1036 { SGI_PIDSINASH, "SGI_PIDSINASH" },
1039 { SGI_ULI, "SGI_ULI" },
1041 #ifdef SGI_LPG_SHMGET
1042 { SGI_LPG_SHMGET, "SGI_LPG_SHMGET" },
1045 { SGI_LPG_MAP, "SGI_LPG_MAP" },
1047 #ifdef SGI_CACHEFS_SYS
1048 { SGI_CACHEFS_SYS, "SGI_CACHEFS_SYS" },
1050 #ifdef SGI_NFSNOTIFY
1051 { SGI_NFSNOTIFY, "SGI_NFSNOTIFY" },
1054 { SGI_LOCKDSYS, "SGI_LOCKDSYS" },
1057 { SGI_EVENTCTR, "SGI_EVENTCTR" },
1059 #ifdef SGI_GETPRUSAGE
1060 { SGI_GETPRUSAGE, "SGI_GETPRUSAGE" },
1062 #ifdef SGI_PROCMASK_LOCATION
1063 { SGI_PROCMASK_LOCATION,"SGI_PROCMASK_LOCATION" },
1066 { SGI_UNUSED, "SGI_UNUSED" },
1069 { SGI_CKPT_SYS, "SGI_CKPT_SYS" },
1072 { SGI_CKPT_SYS, "SGI_CKPT_SYS" },
1074 #ifdef SGI_GETGRPPID
1075 { SGI_GETGRPPID, "SGI_GETGRPPID" },
1077 #ifdef SGI_GETSESPID
1078 { SGI_GETSESPID, "SGI_GETSESPID" },
1081 { SGI_ENUMASHS, "SGI_ENUMASHS" },
1083 #ifdef SGI_SETASMACHID
1084 { SGI_SETASMACHID, "SGI_SETASMACHID" },
1086 #ifdef SGI_GETASMACHID
1087 { SGI_GETASMACHID, "SGI_GETASMACHID" },
1089 #ifdef SGI_GETARSESS
1090 { SGI_GETARSESS, "SGI_GETARSESS" },
1092 #ifdef SGI_JOINARRAYSESS
1093 { SGI_JOINARRAYSESS, "SGI_JOINARRAYSESS" },
1095 #ifdef SGI_SPROC_KILL
1096 { SGI_SPROC_KILL, "SGI_SPROC_KILL" },
1098 #ifdef SGI_DBA_CONFIG
1099 { SGI_DBA_CONFIG, "SGI_DBA_CONFIG" },
1101 #ifdef SGI_RELEASE_NAME
1102 { SGI_RELEASE_NAME, "SGI_RELEASE_NAME" },
1104 #ifdef SGI_SYNCH_CACHE_HANDLER
1105 { SGI_SYNCH_CACHE_HANDLER,"SGI_SYNCH_CACHE_HANDLER"},
1107 #ifdef SGI_SWASH_INIT
1108 { SGI_SWASH_INIT, "SGI_SWASH_INIT" },
1110 #ifdef SGI_NUMA_MIGR_PAGE
1111 { SGI_NUMA_MIGR_PAGE, "SGI_NUMA_MIGR_PAGE" },
1113 #ifdef SGI_NUMA_MIGR_PAGE_ALT
1114 { SGI_NUMA_MIGR_PAGE_ALT,"SGI_NUMA_MIGR_PAGE_ALT"},
1116 #ifdef SGI_KAIO_USERINIT
1117 { SGI_KAIO_USERINIT, "SGI_KAIO_USERINIT" },
1119 #ifdef SGI_KAIO_READ
1120 { SGI_KAIO_READ, "SGI_KAIO_READ" },
1122 #ifdef SGI_KAIO_WRITE
1123 { SGI_KAIO_WRITE, "SGI_KAIO_WRITE" },
1125 #ifdef SGI_KAIO_SUSPEND
1126 { SGI_KAIO_SUSPEND, "SGI_KAIO_SUSPEND" },
1128 #ifdef SGI_KAIO_STATS
1129 { SGI_KAIO_STATS, "SGI_KAIO_STATS" },
1131 #ifdef SGI_INITIAL_PT_SPROC
1132 { SGI_INITIAL_PT_SPROC, "SGI_INITIAL_PT_SPROC" },
1143 if (entering(tcp)) {
1144 printxval(syssgi_options, tcp->u_arg[0], "SGI_???");
1145 switch (tcp->u_arg[0]) {
1147 for (i = 1; i < tcp->u_nargs; i++)
1148 tprintf(", %#lx", tcp->u_arg[i]);
1155 #include <sys/types.h>
1156 #include <rpc/rpc.h>
1159 #include <sys/fsid.h>
1160 #include <sys/vnode.h>
1161 #include <sys/fs/nfs.h>
1162 #include <sys/fs/nfs_clnt.h>
1164 static const struct xlat mount_flags[] = {
1165 { MS_RDONLY, "MS_RDONLY" },
1166 { MS_FSS, "MS_FSS" },
1167 { MS_DATA, "MS_DATA" },
1168 { MS_NOSUID, "MS_NOSUID" },
1169 { MS_REMOUNT, "MS_REMOUNT" },
1170 { MS_NOTRUNC, "MS_NOTRUNC" },
1171 { MS_GRPID, "MS_GRPID" },
1172 { MS_NODEV, "MS_NODEV" },
1173 { MS_BEFORE, "MS_BEFORE" },
1174 { MS_AFTER, "MS_AFTER" },
1178 static const struct xlat nfs_flags[] = {
1179 { NFSMNT_SOFT, "NFSMNT_SOFT" },
1180 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
1181 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
1182 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
1183 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
1184 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
1185 #ifdef NFSMNT_NOINT /* IRIX 6 */
1186 { NFSMNT_NOINT, "NFSMNT_NOINT" },
1188 #ifdef NFSMNT_INT /* IRIX 5 */
1189 { NFSMNT_INT, "NFSMNT_INT" },
1191 { NFSMNT_NOAC, "NFSMNT_NOAC" },
1192 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
1193 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
1194 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
1195 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
1196 { NFSMNT_PRIVATE, "NFSMNT_PRIVATE" },
1197 { NFSMNT_SYMTTL, "NFSMNT_SYMTTL" },
1198 { NFSMNT_LOOPBACK, "NFSMNT_LOOPBACK" },
1199 { NFSMNT_BASETYPE, "NFSMNT_BASETYPE" },
1200 { NFSMNT_NAMEMAX, "NFSMNT_NAMEMAX" },
1201 #ifdef NFSMNT_SHORTUID /* IRIX 6 */
1202 { NFSMNT_SHORTUID, "NFSMNT_SHORTUID" },
1204 #ifdef NFSMNT_ASYNCNLM /* IRIX 6 */
1205 { NFSMNT_ASYNCNLM, "NFSMNT_ASYNCNLM" },
1214 if (entering(tcp)) {
1215 printpath(tcp, tcp->u_arg[0]);
1217 printpath(tcp, tcp->u_arg[1]);
1219 printflags(mount_flags, tcp->u_arg[2]);
1220 if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
1222 tprintf("%ld", tcp->u_arg[3]);
1224 if (tcp->u_arg[2] & MS_DATA) {
1225 int nfs_type = sysfs(GETFSIND, FSID_NFS);
1228 if (tcp->u_arg[3] == nfs_type) {
1229 struct nfs_args args;
1230 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1231 tprintf("%#lx", tcp->u_arg[4]);
1234 printsock(tcp, (int) args.addr);
1235 tprintf(", flags=");
1236 if (!printflags(nfs_flags, args.flags))
1237 tprintf("NFSMNT_???");
1238 tprintf(", hostname=");
1239 printstr(tcp, (int) args.hostname, -1);
1244 tprintf("%#lx", tcp->u_arg[4]);
1245 tprintf(", %ld", tcp->u_arg[5]);
1255 #include <sys/types.h>
1256 #include <sys/fstyp.h>
1257 #include <sys/mount.h>
1258 #include <sys/xti.h>
1261 #include <nfs/mount.h>
1263 #include <sys/fs/vx_ioctl.h>
1265 static const struct xlat mount_flags[] = {
1266 { MS_RDONLY, "MS_RDONLY" },
1267 { MS_FSS, "MS_FSS" },
1268 { MS_DATA, "MS_DATA" },
1269 { MS_HADBAD, "MS_HADBAD" },
1270 { MS_NOSUID, "MS_NOSUID" },
1271 { MS_REMOUNT, "MS_REMOUNT" },
1272 { MS_NOTRUNC, "MS_NOTRUNC" },
1273 { MS_SOFTMNT, "MS_SOFTMNT" },
1274 { MS_SYSSPACE, "MS_SYSSPACE" },
1279 static const struct xlat vxfs_flags[] = {
1280 { VX_MS_NOLOG, "VX_MS_NOLOG" },
1281 { VX_MS_BLKCLEAR, "VX_MS_BLKCLEAR" },
1282 { VX_MS_SNAPSHOT, "VX_MS_SNAPSHOT" },
1283 { VX_MS_NODATAINLOG, "VX_MS_NODATAINLOG" },
1284 { VX_MS_DELAYLOG, "VX_MS_DELAYLOG" },
1285 { VX_MS_TMPLOG, "VX_MS_TMPLOG" },
1286 { VX_MS_FILESET, "VX_MS_FILESET" },
1288 { VX_MS_CACHE_DIRECT, "VX_MS_CACHE_DIRECT" },
1289 { VX_MS_CACHE_DSYNC, "VX_MS_CACHE_DSYNC" },
1290 { VX_MS_CACHE_CLOSESYNC,"VX_MS_CACHE_CLOSESYNC" },
1291 { VX_MS_CACHE_TMPCACHE, "VX_MS_CACHE_TMPCACHE" },
1293 { VX_MS_OSYNC_DIRECT, "VX_MS_OSYNC_DIRECT" },
1294 { VX_MS_OSYNC_DSYNC, "VX_MS_OSYNC_DSYNC" },
1295 { VX_MS_OSYNC_CLOSESYNC,"VX_MS_OSYNC_CLOSESYNC" },
1296 { VX_MS_OSYNC_DELAY, "VX_MS_OSYNC_DELAY" },
1301 static const struct xlat nfs_flags[] = {
1302 { NFSMNT_SOFT, "NFSMNT_SOFT" },
1303 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
1304 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
1305 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
1306 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
1307 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
1308 { NFSMNT_INT, "NFSMNT_INT" },
1309 { NFSMNT_NOAC, "NFSMNT_NOAC" },
1310 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
1311 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
1312 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
1313 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
1314 { NFSMNT_SECURE, "NFSMNT_SECURE" },
1315 { NFSMNT_NOCTO, "NFSMNT_NOCTO" },
1316 { NFSMNT_GRPID, "NFSMNT_GRPID" },
1317 { NFSMNT_RPCTIMESYNC, "NFSMNT_RPCTIMESYNC" },
1318 { NFSMNT_LWPSMAX, "NFSMNT_LWPSMAX" },
1326 if (entering(tcp)) {
1327 char fstyp [FSTYPSZ];
1328 printpath(tcp, tcp->u_arg[0]);
1330 printpath(tcp, tcp->u_arg[1]);
1332 printflags(mount_flags, tcp->u_arg[2]);
1333 /* The doc sez that the file system type is given as a
1334 fsindex, and we should use sysfs to work out the name.
1335 This appears to be untrue for UW. Maybe it's untrue
1337 if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
1338 if (umovestr(tcp, tcp->u_arg[3], FSTYPSZ, fstyp) < 0) {
1340 tprintf(", %ld", tcp->u_arg[3]);
1343 tprintf(", \"%s\"", fstyp);
1345 if (tcp->u_arg[2] & MS_DATA) {
1348 /* On UW7 they don't give us the defines and structs
1349 we need to see what is going on. Bummer. */
1350 if (strcmp (fstyp, "vxfs") == 0) {
1351 struct vx_mountargs5 args;
1352 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1353 tprintf("%#lx", tcp->u_arg[4]);
1355 tprintf("{ flags=");
1356 if (!printflags(vxfs_flags, args.mflags))
1357 tprintf("0x%08x", args.mflags);
1358 if (args.mflags & VX_MS_SNAPSHOT) {
1359 tprintf (", snapof=");
1361 (long) args.primaryspec,
1363 if (args.snapsize > 0)
1364 tprintf (", snapsize=%ld", args.snapsize);
1371 if (strcmp (fstyp, "specfs") == 0) {
1373 printstr (tcp, tcp->u_arg[4], -1);
1376 if (strcmp (fstyp, "nfs") == 0) {
1377 struct nfs_args args;
1378 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1379 tprintf("%#lx", tcp->u_arg[4]);
1383 if (umove (tcp, (int) args.addr, &addr) < 0) {
1384 tprintf ("%#lx", (long) args.addr);
1387 printsock(tcp, (int) addr.buf, addr.len);
1389 tprintf(", flags=");
1390 if (!printflags(nfs_flags, args.flags))
1391 tprintf("NFSMNT_???");
1392 tprintf(", hostname=");
1393 printstr(tcp, (int) args.hostname, -1);
1398 tprintf("%#lx", tcp->u_arg[4]);
1399 tprintf(", %ld", tcp->u_arg[5]);
1405 #else /* !UNIXWARE */
1411 if (entering(tcp)) {
1412 printpath(tcp, tcp->u_arg[0]);
1414 printpath(tcp, tcp->u_arg[1]);
1419 #endif /* !UNIXWARE */
1427 static const struct xlat capabilities[] = {
1428 { 1<<CAP_CHOWN, "CAP_CHOWN" },
1429 { 1<<CAP_DAC_OVERRIDE, "CAP_DAC_OVERRIDE"},
1430 { 1<<CAP_DAC_READ_SEARCH,"CAP_DAC_READ_SEARCH"},
1431 { 1<<CAP_FOWNER, "CAP_FOWNER" },
1432 { 1<<CAP_FSETID, "CAP_FSETID" },
1433 { 1<<CAP_KILL, "CAP_KILL" },
1434 { 1<<CAP_SETGID, "CAP_SETGID" },
1435 { 1<<CAP_SETUID, "CAP_SETUID" },
1436 { 1<<CAP_SETPCAP, "CAP_SETPCAP" },
1437 { 1<<CAP_LINUX_IMMUTABLE,"CAP_LINUX_IMMUTABLE"},
1438 { 1<<CAP_NET_BIND_SERVICE,"CAP_NET_BIND_SERVICE"},
1439 { 1<<CAP_NET_BROADCAST, "CAP_NET_BROADCAST"},
1440 { 1<<CAP_NET_ADMIN, "CAP_NET_ADMIN" },
1441 { 1<<CAP_NET_RAW, "CAP_NET_RAW" },
1442 { 1<<CAP_IPC_LOCK, "CAP_IPC_LOCK" },
1443 { 1<<CAP_IPC_OWNER, "CAP_IPC_OWNER" },
1444 { 1<<CAP_SYS_MODULE, "CAP_SYS_MODULE"},
1445 { 1<<CAP_SYS_RAWIO, "CAP_SYS_RAWIO" },
1446 { 1<<CAP_SYS_CHROOT, "CAP_SYS_CHROOT"},
1447 { 1<<CAP_SYS_PTRACE, "CAP_SYS_PTRACE"},
1448 { 1<<CAP_SYS_PACCT, "CAP_SYS_PACCT" },
1449 { 1<<CAP_SYS_ADMIN, "CAP_SYS_ADMIN" },
1450 { 1<<CAP_SYS_BOOT, "CAP_SYS_BOOT" },
1451 { 1<<CAP_SYS_NICE, "CAP_SYS_NICE" },
1452 { 1<<CAP_SYS_RESOURCE, "CAP_SYS_RESOURCE"},
1453 { 1<<CAP_SYS_TIME, "CAP_SYS_TIME" },
1454 { 1<<CAP_SYS_TTY_CONFIG,"CAP_SYS_TTY_CONFIG"},
1463 static cap_user_header_t arg0 = NULL;
1464 static cap_user_data_t arg1 = NULL;
1466 if(!entering(tcp)) {
1468 if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
1469 fprintf(stderr, "sys_capget: no memory\n");
1470 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1475 if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
1476 fprintf(stderr, "sys_capget: no memory\n");
1477 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1484 else if (!verbose(tcp))
1485 tprintf("%#lx", tcp->u_arg[0]);
1486 else if (umoven(tcp, tcp->u_arg[0], sizeof(*arg0), (char *) arg0) < 0)
1489 tprintf("%#x, %d", arg0->version, arg0->pid);
1494 else if (!verbose(tcp))
1495 tprintf("%#lx", tcp->u_arg[1]);
1496 else if (umoven(tcp, tcp->u_arg[1], sizeof(*arg1), (char *) arg1) < 0)
1500 printflags(capabilities, arg1->effective);
1502 printflags(capabilities, arg1->permitted);
1504 printflags(capabilities, arg1->inheritable);
1515 static cap_user_header_t arg0 = NULL;
1516 static cap_user_data_t arg1 = NULL;
1520 if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
1521 fprintf(stderr, "sys_capset: no memory\n");
1522 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1527 if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
1528 fprintf(stderr, "sys_capset: no memory\n");
1529 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1536 else if (!verbose(tcp))
1537 tprintf("%#lx", tcp->u_arg[0]);
1538 else if (umoven(tcp, tcp->u_arg[0], sizeof(*arg0), (char *) arg0) < 0)
1541 tprintf("%#x, %d", arg0->version, arg0->pid);
1546 else if (!verbose(tcp))
1547 tprintf("%#lx", tcp->u_arg[1]);
1548 else if (umoven(tcp, tcp->u_arg[1], sizeof(*arg1), (char *) arg1) < 0)
1552 printflags(capabilities, arg1->effective);
1554 printflags(capabilities, arg1->permitted);
1556 printflags(capabilities, arg1->inheritable);
1568 return printargs(tcp);
1574 return printargs(tcp);
1580 static const struct xlat sysctl_root[] = {
1581 { CTL_KERN, "CTL_KERN" },
1582 { CTL_VM, "CTL_VM" },
1583 { CTL_NET, "CTL_NET" },
1584 { CTL_PROC, "CTL_PROC" },
1585 { CTL_FS, "CTL_FS" },
1586 { CTL_DEBUG, "CTL_DEBUG" },
1587 { CTL_DEV, "CTL_DEV" },
1591 static const struct xlat sysctl_kern[] = {
1592 { KERN_OSTYPE, "KERN_OSTYPE" },
1593 { KERN_OSRELEASE, "KERN_OSRELEASE" },
1594 { KERN_OSREV, "KERN_OSREV" },
1595 { KERN_VERSION, "KERN_VERSION" },
1596 { KERN_SECUREMASK, "KERN_SECUREMASK" },
1597 { KERN_PROF, "KERN_PROF" },
1598 { KERN_NODENAME, "KERN_NODENAME" },
1599 { KERN_DOMAINNAME, "KERN_DOMAINNAME" },
1600 #ifdef KERN_SECURELVL
1601 { KERN_SECURELVL, "KERN_SECURELVL" },
1603 { KERN_PANIC, "KERN_PANIC" },
1604 #ifdef KERN_REALROOTDEV
1605 { KERN_REALROOTDEV, "KERN_REALROOTDEV" },
1607 #ifdef KERN_JAVA_INTERPRETER
1608 { KERN_JAVA_INTERPRETER, "KERN_JAVA_INTERPRETER" },
1610 #ifdef KERN_JAVA_APPLETVIEWER
1611 { KERN_JAVA_APPLETVIEWER, "KERN_JAVA_APPLETVIEWER" },
1613 { KERN_SPARC_REBOOT, "KERN_SPARC_REBOOT" },
1614 { KERN_CTLALTDEL, "KERN_CTLALTDEL" },
1615 { KERN_PRINTK, "KERN_PRINTK" },
1616 { KERN_NAMETRANS, "KERN_NAMETRANS" },
1617 { KERN_PPC_HTABRECLAIM, "KERN_PPC_HTABRECLAIM" },
1618 { KERN_PPC_ZEROPAGED, "KERN_PPC_ZEROPAGED" },
1619 { KERN_PPC_POWERSAVE_NAP, "KERN_PPC_POWERSAVE_NAP" },
1620 { KERN_MODPROBE, "KERN_MODPROBE" },
1621 { KERN_SG_BIG_BUFF, "KERN_SG_BIG_BUFF" },
1622 { KERN_ACCT, "KERN_ACCT" },
1623 { KERN_PPC_L2CR, "KERN_PPC_L2CR" },
1624 { KERN_RTSIGNR, "KERN_RTSIGNR" },
1625 { KERN_RTSIGMAX, "KERN_RTSIGMAX" },
1626 { KERN_SHMMAX, "KERN_SHMMAX" },
1627 { KERN_MSGMAX, "KERN_MSGMAX" },
1628 { KERN_MSGMNB, "KERN_MSGMNB" },
1629 { KERN_MSGPOOL, "KERN_MSGPOOL" },
1633 static const struct xlat sysctl_vm[] = {
1635 { VM_SWAPCTL, "VM_SWAPCTL" },
1638 { VM_UNUSED1, "VM_UNUSED1" },
1641 { VM_SWAPOUT, "VM_SWAPOUT" },
1644 { VM_UNUSED2, "VM_UNUSED2" },
1647 { VM_FREEPG, "VM_FREEPG" },
1650 { VM_UNUSED3, "VM_UNUSED3" },
1653 { VM_BDFLUSH, "VM_BDFLUSH" },
1656 { VM_UNUSED4, "VM_UNUSED4" },
1658 { VM_OVERCOMMIT_MEMORY, "VM_OVERCOMMIT_MEMORY" },
1660 { VM_BUFFERMEM, "VM_BUFFERMEM" },
1663 { VM_UNUSED5, "VM_UNUSED5" },
1666 { VM_PAGECACHE, "VM_PAGECACHE" },
1669 { VM_UNUSED7, "VM_UNUSED7" },
1671 #ifdef VM_PAGERDAEMON
1672 { VM_PAGERDAEMON, "VM_PAGERDAEMON" },
1675 { VM_UNUSED8, "VM_UNUSED8" },
1678 { VM_PGT_CACHE, "VM_PGT_CACHE" },
1681 { VM_UNUSED9, "VM_UNUSED9" },
1683 { VM_PAGE_CLUSTER, "VM_PAGE_CLUSTER" },
1687 static const struct xlat sysctl_net[] = {
1688 { NET_CORE, "NET_CORE" },
1689 { NET_ETHER, "NET_ETHER" },
1690 { NET_802, "NET_802" },
1691 { NET_UNIX, "NET_UNIX" },
1692 { NET_IPV4, "NET_IPV4" },
1693 { NET_IPX, "NET_IPX" },
1694 { NET_ATALK, "NET_ATALK" },
1695 { NET_NETROM, "NET_NETROM" },
1696 { NET_AX25, "NET_AX25" },
1697 { NET_BRIDGE, "NET_BRIDGE" },
1698 { NET_ROSE, "NET_ROSE" },
1699 { NET_IPV6, "NET_IPV6" },
1700 { NET_X25, "NET_X25" },
1701 { NET_TR, "NET_TR" },
1702 { NET_DECNET, "NET_DECNET" },
1706 static const struct xlat sysctl_net_core[] = {
1707 { NET_CORE_WMEM_MAX, "NET_CORE_WMEM_MAX" },
1708 { NET_CORE_RMEM_MAX, "NET_CORE_RMEM_MAX" },
1709 { NET_CORE_WMEM_DEFAULT, "NET_CORE_WMEM_DEFAULT" },
1710 { NET_CORE_RMEM_DEFAULT, "NET_CORE_RMEM_DEFAULT" },
1711 { NET_CORE_MAX_BACKLOG, "NET_CORE_MAX_BACKLOG" },
1712 { NET_CORE_FASTROUTE, "NET_CORE_FASTROUTE" },
1713 { NET_CORE_MSG_COST, "NET_CORE_MSG_COST" },
1714 { NET_CORE_MSG_BURST, "NET_CORE_MSG_BURST" },
1715 { NET_CORE_OPTMEM_MAX, "NET_CORE_OPTMEM_MAX" },
1719 static const struct xlat sysctl_net_unix[] = {
1720 { NET_UNIX_DESTROY_DELAY, "NET_UNIX_DESTROY_DELAY" },
1721 { NET_UNIX_DELETE_DELAY, "NET_UNIX_DELETE_DELAY" },
1725 static const struct xlat sysctl_net_ipv4[] = {
1726 { NET_IPV4_FORWARD, "NET_IPV4_FORWARD" },
1727 { NET_IPV4_DYNADDR, "NET_IPV4_DYNADDR" },
1728 { NET_IPV4_CONF, "NET_IPV4_CONF" },
1729 { NET_IPV4_NEIGH, "NET_IPV4_NEIGH" },
1730 { NET_IPV4_ROUTE, "NET_IPV4_ROUTE" },
1731 { NET_IPV4_FIB_HASH, "NET_IPV4_FIB_HASH" },
1732 { NET_IPV4_TCP_TIMESTAMPS, "NET_IPV4_TCP_TIMESTAMPS" },
1733 { NET_IPV4_TCP_WINDOW_SCALING, "NET_IPV4_TCP_WINDOW_SCALING" },
1734 { NET_IPV4_TCP_SACK, "NET_IPV4_TCP_SACK" },
1735 { NET_IPV4_TCP_RETRANS_COLLAPSE, "NET_IPV4_TCP_RETRANS_COLLAPSE" },
1736 { NET_IPV4_DEFAULT_TTL, "NET_IPV4_DEFAULT_TTL" },
1737 { NET_IPV4_AUTOCONFIG, "NET_IPV4_AUTOCONFIG" },
1738 { NET_IPV4_NO_PMTU_DISC, "NET_IPV4_NO_PMTU_DISC" },
1739 { NET_IPV4_TCP_SYN_RETRIES, "NET_IPV4_TCP_SYN_RETRIES" },
1740 { NET_IPV4_IPFRAG_HIGH_THRESH, "NET_IPV4_IPFRAG_HIGH_THRESH" },
1741 { NET_IPV4_IPFRAG_LOW_THRESH, "NET_IPV4_IPFRAG_LOW_THRESH" },
1742 { NET_IPV4_IPFRAG_TIME, "NET_IPV4_IPFRAG_TIME" },
1743 { NET_IPV4_TCP_MAX_KA_PROBES, "NET_IPV4_TCP_MAX_KA_PROBES" },
1744 { NET_IPV4_TCP_KEEPALIVE_TIME, "NET_IPV4_TCP_KEEPALIVE_TIME" },
1745 { NET_IPV4_TCP_KEEPALIVE_PROBES, "NET_IPV4_TCP_KEEPALIVE_PROBES" },
1746 { NET_IPV4_TCP_RETRIES1, "NET_IPV4_TCP_RETRIES1" },
1747 { NET_IPV4_TCP_RETRIES2, "NET_IPV4_TCP_RETRIES2" },
1748 { NET_IPV4_TCP_FIN_TIMEOUT, "NET_IPV4_TCP_FIN_TIMEOUT" },
1749 { NET_IPV4_IP_MASQ_DEBUG, "NET_IPV4_IP_MASQ_DEBUG" },
1750 { NET_TCP_SYNCOOKIES, "NET_TCP_SYNCOOKIES" },
1751 { NET_TCP_STDURG, "NET_TCP_STDURG" },
1752 { NET_TCP_RFC1337, "NET_TCP_RFC1337" },
1753 { NET_TCP_SYN_TAILDROP, "NET_TCP_SYN_TAILDROP" },
1754 { NET_TCP_MAX_SYN_BACKLOG, "NET_TCP_MAX_SYN_BACKLOG" },
1755 { NET_IPV4_LOCAL_PORT_RANGE, "NET_IPV4_LOCAL_PORT_RANGE" },
1756 { NET_IPV4_ICMP_ECHO_IGNORE_ALL, "NET_IPV4_ICMP_ECHO_IGNORE_ALL" },
1757 { NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS, "NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS" },
1758 { NET_IPV4_ICMP_SOURCEQUENCH_RATE, "NET_IPV4_ICMP_SOURCEQUENCH_RATE" },
1759 { NET_IPV4_ICMP_DESTUNREACH_RATE, "NET_IPV4_ICMP_DESTUNREACH_RATE" },
1760 { NET_IPV4_ICMP_TIMEEXCEED_RATE, "NET_IPV4_ICMP_TIMEEXCEED_RATE" },
1761 { NET_IPV4_ICMP_PARAMPROB_RATE, "NET_IPV4_ICMP_PARAMPROB_RATE" },
1762 { NET_IPV4_ICMP_ECHOREPLY_RATE, "NET_IPV4_ICMP_ECHOREPLY_RATE" },
1763 { NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES, "NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES" },
1764 { NET_IPV4_IGMP_MAX_MEMBERSHIPS, "NET_IPV4_IGMP_MAX_MEMBERSHIPS" },
1768 static const struct xlat sysctl_net_ipv4_route[] = {
1769 { NET_IPV4_ROUTE_FLUSH, "NET_IPV4_ROUTE_FLUSH" },
1770 { NET_IPV4_ROUTE_MIN_DELAY, "NET_IPV4_ROUTE_MIN_DELAY" },
1771 { NET_IPV4_ROUTE_MAX_DELAY, "NET_IPV4_ROUTE_MAX_DELAY" },
1772 { NET_IPV4_ROUTE_GC_THRESH, "NET_IPV4_ROUTE_GC_THRESH" },
1773 { NET_IPV4_ROUTE_MAX_SIZE, "NET_IPV4_ROUTE_MAX_SIZE" },
1774 { NET_IPV4_ROUTE_GC_MIN_INTERVAL, "NET_IPV4_ROUTE_GC_MIN_INTERVAL" },
1775 { NET_IPV4_ROUTE_GC_TIMEOUT, "NET_IPV4_ROUTE_GC_TIMEOUT" },
1776 { NET_IPV4_ROUTE_GC_INTERVAL, "NET_IPV4_ROUTE_GC_INTERVAL" },
1777 { NET_IPV4_ROUTE_REDIRECT_LOAD, "NET_IPV4_ROUTE_REDIRECT_LOAD" },
1778 { NET_IPV4_ROUTE_REDIRECT_NUMBER, "NET_IPV4_ROUTE_REDIRECT_NUMBER" },
1779 { NET_IPV4_ROUTE_REDIRECT_SILENCE, "NET_IPV4_ROUTE_REDIRECT_SILENCE" },
1780 { NET_IPV4_ROUTE_ERROR_COST, "NET_IPV4_ROUTE_ERROR_COST" },
1781 { NET_IPV4_ROUTE_ERROR_BURST, "NET_IPV4_ROUTE_ERROR_BURST" },
1782 { NET_IPV4_ROUTE_GC_ELASTICITY, "NET_IPV4_ROUTE_GC_ELASTICITY" },
1786 static const struct xlat sysctl_net_ipv4_conf[] = {
1787 { NET_IPV4_CONF_FORWARDING, "NET_IPV4_CONF_FORWARDING" },
1788 { NET_IPV4_CONF_MC_FORWARDING, "NET_IPV4_CONF_MC_FORWARDING" },
1789 { NET_IPV4_CONF_PROXY_ARP, "NET_IPV4_CONF_PROXY_ARP" },
1790 { NET_IPV4_CONF_ACCEPT_REDIRECTS, "NET_IPV4_CONF_ACCEPT_REDIRECTS" },
1791 { NET_IPV4_CONF_SECURE_REDIRECTS, "NET_IPV4_CONF_SECURE_REDIRECTS" },
1792 { NET_IPV4_CONF_SEND_REDIRECTS, "NET_IPV4_CONF_SEND_REDIRECTS" },
1793 { NET_IPV4_CONF_SHARED_MEDIA, "NET_IPV4_CONF_SHARED_MEDIA" },
1794 { NET_IPV4_CONF_RP_FILTER, "NET_IPV4_CONF_RP_FILTER" },
1795 { NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE, "NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE" },
1796 { NET_IPV4_CONF_BOOTP_RELAY, "NET_IPV4_CONF_BOOTP_RELAY" },
1797 { NET_IPV4_CONF_LOG_MARTIANS, "NET_IPV4_CONF_LOG_MARTIANS" },
1801 static const struct xlat sysctl_net_ipv6[] = {
1802 { NET_IPV6_CONF, "NET_IPV6_CONF" },
1803 { NET_IPV6_NEIGH, "NET_IPV6_NEIGH" },
1804 { NET_IPV6_ROUTE, "NET_IPV6_ROUTE" },
1808 static const struct xlat sysctl_net_ipv6_route[] = {
1809 { NET_IPV6_ROUTE_FLUSH, "NET_IPV6_ROUTE_FLUSH" },
1810 { NET_IPV6_ROUTE_GC_THRESH, "NET_IPV6_ROUTE_GC_THRESH" },
1811 { NET_IPV6_ROUTE_MAX_SIZE, "NET_IPV6_ROUTE_MAX_SIZE" },
1812 { NET_IPV6_ROUTE_GC_MIN_INTERVAL, "NET_IPV6_ROUTE_GC_MIN_INTERVAL" },
1813 { NET_IPV6_ROUTE_GC_TIMEOUT, "NET_IPV6_ROUTE_GC_TIMEOUT" },
1814 { NET_IPV6_ROUTE_GC_INTERVAL, "NET_IPV6_ROUTE_GC_INTERVAL" },
1815 { NET_IPV6_ROUTE_GC_ELASTICITY, "NET_IPV6_ROUTE_GC_ELASTICITY" },
1823 struct __sysctl_args info;
1825 umove (tcp, tcp->u_arg[0], &info);
1827 name = alloca (sizeof (int) * info.nlen);
1828 umoven(tcp, (size_t) info.name, sizeof (int) * info.nlen, (char *) name);
1830 if (entering(tcp)) {
1837 printxval(sysctl_root, name[0], "CTL_???");
1845 printxval(sysctl_kern, name[1], "KERN_???");
1850 printxval(sysctl_vm, name[1], "VM_???");
1855 printxval(sysctl_net, name[1], "NET_???");
1863 printxval(sysctl_net_core, name[2],
1868 printxval(sysctl_net_unix, name[2],
1873 printxval(sysctl_net_ipv4, name[2],
1879 case NET_IPV4_ROUTE:
1881 printxval(sysctl_net_ipv4_route,
1883 "NET_IPV4_ROUTE_???");
1887 printxval(sysctl_net_ipv4_conf,
1889 "NET_IPV4_CONF_???");
1897 printxval(sysctl_net_ipv6, name[2],
1903 case NET_IPV6_ROUTE:
1905 printxval(sysctl_net_ipv6_route,
1907 "NET_IPV6_ROUTE_???");
1921 while (cnt < info.nlen)
1922 tprintf(", %x", name[cnt++]);
1923 tprintf("}, %d, ", info.nlen);
1926 umove(tcp, (size_t)info.oldlenp, &oldlen);
1928 && ((name[0] == CTL_KERN
1929 && (name[1] == KERN_OSRELEASE
1930 || name[1] == KERN_OSTYPE
1931 #ifdef KERN_JAVA_INTERPRETER
1932 || name[1] == KERN_JAVA_INTERPRETER
1934 #ifdef KERN_JAVA_APPLETVIEWER
1935 || name[1] == KERN_JAVA_APPLETVIEWER
1938 printpath(tcp, (size_t)info.oldval);
1939 tprintf(", %Zu, ", oldlen);
1940 if (info.newval == 0)
1942 else if (syserror(tcp))
1943 tprintf("%p", info.newval);
1945 printpath(tcp, (size_t)info.newval);
1946 tprintf(", %Zd", info.newlen);
1948 tprintf("%p, %Zd, %p, %Zd", info.oldval, oldlen,
1949 info.newval, info.newlen);
1959 return printargs(tcp);
1964 #include <sys/sysctl.h>
1966 int sys___sysctl(tcp)
1969 int qoid[CTL_MAXNAME+2];
1974 if (entering(tcp)) {
1975 if (tcp->u_arg[1] < 0 || tcp->u_arg[1] > CTL_MAXNAME ||
1976 (umoven(tcp, tcp->u_arg[0], tcp->u_arg[1] * sizeof(int),
1977 (char *) (qoid + 2)) < 0))
1980 /* Use sysctl to ask the name of the current MIB
1981 This uses the undocumented "Staff-functions" used
1982 by the sysctl program. See kern_sysctl.c for
1984 qoid[0] = 0; /* sysctl */
1985 qoid[1] = 1; /* name */
1988 if (sysctl(qoid, tcp->u_arg[1] + 2, ctl, &i, 0, 0) >= 0) {
1989 numeric = !abbrev(tcp);
1990 tprintf("%s%s", ctl, numeric ? ", " : "");
1994 for (i = 0; i < tcp->u_arg[1]; i++)
1995 tprintf("%s%d", i ? "." : "", qoid[i + 2]);
1998 tprintf("%lu, ", tcp->u_arg[1]);
2001 if (!syserror(tcp) && (umove(tcp, tcp->u_arg[3], &len) >= 0)) {
2002 printstr(tcp, tcp->u_arg[2], len);
2003 tprintf(", [%u], ", len);
2005 tprintf("%#lx, %#lx, ", tcp->u_arg[2], tcp->u_arg[3]);
2006 printstr(tcp, tcp->u_arg[4], tcp->u_arg[5]);
2007 tprintf(", %lu", tcp->u_arg[5]);
2015 #include <sys/ksym.h>
2016 #include <sys/elf.h>
2018 static const struct xlat ksym_flags[] = {
2019 { STT_NOTYPE, "STT_NOTYPE" },
2020 { STT_FUNC, "STT_FUNC" },
2021 { STT_OBJECT, "STT_OBJECT" },
2029 if (entering (tcp)) {
2030 printstr(tcp, tcp->u_arg[0], -1);
2034 if (syserror(tcp)) {
2035 tprintf("%#lx, %#lx",
2036 tcp->u_arg[1], tcp->u_arg[2]);
2040 printnum (tcp, tcp->u_arg[1], "%#lx");
2042 if (umove(tcp, tcp->u_arg[2], &val) < 0) {
2043 tprintf("%#lx", tcp->u_arg[2]);
2047 printxval (ksym_flags, val, "STT_???");
2056 #ifdef HAVE_SYS_NSCSYS_H
2059 #include <sys/nscsys.h>
2061 static const struct xlat ssi_cmd [] = {
2062 { SSISYS_BADOP, "SSISYS_BADOP" },
2063 { SSISYS_LDLVL_INIT,"SSISYS_LDLVL_INIT"},
2064 { SSISYS_LDLVL_GETVEC,"SSISYS_LDLVL_GETVEC"},
2065 { SSISYS_LDLVL_PUTVEC,"SSISYS_LDLVL_PUTVEC"},
2066 { SSISYS_LDLVL_PUTRCMDS,"SSISYS_LDLVL_PUTRCMDS"},
2067 { SSISYS_LDLVL_SETREXEC,"SSISYS_LDLVL_SETREXEC"},
2068 { SSISYS_CMS_CLUSTERID,"SSISYS_CMS_CLUSTERID"},
2069 { SSISYS_CFS_STATVFS,"SSISYS_CFS_STATVFS"},
2070 { SSISYS_NODE_GETNUM,"SSISYS_NODE_GETNUM"},
2071 { SSISYS_NODE_TABLE,"SSISYS_NODE_TABLE"},
2072 { SSISYS_NODE_DOWN,"SSISYS_NODE_DOWN"},
2073 { SSISYS_RECLAIM_CHILD,"SSISYS_RECLAIM_CHILD"},
2074 { SSISYS_IPC_GETINFO,"SSISYS_IPC_GETINFO"},
2075 { SSISYS_ICS_TEST,"SSISYS_ICS_TEST"},
2076 { SSISYS_NODE_PID,"SSISYS_NODE_PID"},
2077 { SSISYS_ISLOCAL,"SSISYS_ISLOCAL"},
2078 { SSISYS_CFS_ISSTACKED,"SSISYS_CFS_ISSTACKED"},
2079 { SSISYS_DNET_SYNC,"SSISYS_DNET_SYNC"},
2080 { SSISYS_CFS_WAIT_MODE,"SSISYS_CFS_WAIT_MODE"},
2081 { SSISYS_CFS_UMOUNT,"SSISYS_CFS_UMOUNT"},
2082 { SSISYS_LLSTAT,"SSISYS_LLSTAT" },
2083 { SSISYS_LTS_PERFTEST,"SSISYS_LTS_PERFTEST"},
2084 { SSISYS_LTS_CONFIG,"SSISYS_LTS_CONFIG"},
2085 { SSISYS_SNET_PERFTEST,"SSISYS_SNET_PERFTEST"},
2086 { SSISYS_IGNORE_HALFUP,"SSISYS_IGNORE_HALFUP"},
2087 { SSISYS_NODE_ROOTDEV,"SSISYS_NODE_ROOTDEV"},
2088 { SSISYS_GET_PRIMARY,"SSISYS_GET_PRIMARY"},
2089 { SSISYS_GET_SECONDARY,"SSISYS_GET_SECONDARY"},
2090 { SSISYS_GET_ROOTDISK,"SSISYS_GET_ROOTDISK"},
2091 { SSISYS_CLUSTERNODE_NUM,"SSISYS_CLUSTERNODE_NUM"},
2092 { SSISYS_CLUSTER_MEMBERSHIP,"SSISYS_CLUSTER_MEMBERSHIP"},
2093 { SSISYS_CLUSTER_DETAILEDTRANS,"SSISYS_CLUSTER_DETAILEDTRANS"},
2094 { SSISYS_CLUSTERNODE_INFO,"SSISYS_CLUSTERNODE_INFO"},
2095 { SSISYS_CLUSTERNODE_SETINFO,"SSISYS_CLUSTERNODE_SETINFO"},
2096 { SSISYS_CLUSTERNODE_AVAIL,"SSISYS_CLUSTERNODE_AVAIL"},
2097 { SSISYS_CLUSTER_MAXNODES,"SSISYS_CLUSTER_MAXNODES"},
2098 { SSISYS_SET_MEMPRIO,"SSISYS_SET_MEMPRIO"},
2099 { SSISYS_GET_USERS,"SSISYS_GET_USERS"},
2100 { SSISYS_FORCE_ROOT_NODE,"SSISYS_FORCE_ROOT_NODE"},
2101 { SSISYS_CVIP_SET,"SSISYS_CVIP_SET"},
2102 { SSISYS_CVIP_GET,"SSISYS_CVIP_GET"},
2103 { SSISYS_GET_NODE_COUNTS,"SSISYS_GET_NODE_COUNTS"},
2104 { SSISYS_GET_TRANSPORT,"SSISYS_GET_TRANSPORT"},
2108 int sys_ssisys (tcp)
2111 struct ssisys_iovec iov;
2112 cls_nodeinfo_args_t cni;
2113 clusternode_info_t info;
2115 if (entering (tcp)) {
2116 ts_reclaim_child_inargs_t trc;
2117 if (tcp->u_arg[1] != sizeof iov ||
2118 umove (tcp, tcp->u_arg[0], &iov) < 0)
2120 tprintf ("%#lx, %ld", tcp->u_arg[0], tcp->u_arg[1]);
2124 printxval(ssi_cmd, iov.tio_id.id_cmd, "SSISYS_???");
2125 tprintf (":%d", iov.tio_id.id_ver);
2126 switch (iov.tio_id.id_cmd) {
2127 case SSISYS_RECLAIM_CHILD:
2128 if (iov.tio_udatainlen != sizeof trc ||
2129 umove (tcp, (long) iov.tio_udatain, &trc) < 0)
2131 tprintf (", in={pid=%ld, start=%ld}",
2132 trc.trc_pid, trc.trc_start);
2134 case SSISYS_CLUSTERNODE_INFO:
2135 if (iov.tio_udatainlen != sizeof cni ||
2136 umove (tcp, (long) iov.tio_udatain, &cni) < 0)
2138 tprintf (", in={node=%ld, len=%d}",
2139 cni.nodenum, cni.info_len);
2143 if (iov.tio_udatainlen) {
2144 tprintf (", in=[/* %d bytes */]",
2145 iov.tio_udatainlen);
2150 if (tcp->u_arg[1] != sizeof iov ||
2151 umove (tcp, tcp->u_arg[0], &iov) < 0)
2153 switch (iov.tio_id.id_cmd) {
2154 case SSISYS_CLUSTERNODE_INFO:
2155 if (iov.tio_udatainlen != sizeof cni ||
2156 umove (tcp, (long) iov.tio_udatain, &cni) < 0)
2158 if (cni.info_len != sizeof info ||
2159 iov.tio_udataoutlen != sizeof &info ||
2160 umove (tcp, (long) iov.tio_udataout, &info) < 0)
2162 tprintf (", out={node=%ld, cpus=%d, online=%d}",
2163 info.node_num, info.node_totalcpus,
2164 info.node_onlinecpus);
2169 if (iov.tio_udataoutlen) {
2170 tprintf (", out=[/* %d bytes */]",
2171 iov.tio_udataoutlen);
2175 tprintf ("}, %ld", tcp->u_arg[1]);
2182 #endif /* UNIXWARE > 2 */
2186 #ifndef __NEW_UTS_LEN
2187 #define __NEW_UTS_LEN 64
2190 static const struct xlat sysmips_operations[] = {
2191 { SETNAME, "SETNAME" },
2192 { FLUSH_CACHE, "FLUSH_CACHE" },
2193 { MIPS_FIXADE, "MIPS_FIXADE" },
2194 { MIPS_RDNVRAM, "MIPS_RDNVRAM" },
2195 { MIPS_ATOMIC_SET, "MIPS_ATOMIC_SET" },
2199 int sys_sysmips(tcp)
2202 if (entering(tcp)) {
2203 printxval(sysmips_operations, tcp->u_arg[0], "???");
2204 if (!verbose(tcp)) {
2205 tprintf("%ld, %ld, %ld", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
2206 } else if (tcp->u_arg[0]==SETNAME) {
2207 char nodename[__NEW_UTS_LEN + 1];
2208 if (umovestr(tcp, tcp->u_arg[1], (__NEW_UTS_LEN + 1), nodename) < 0)
2209 tprintf(", %#lx", tcp->u_arg[1]);
2211 tprintf(", \"%s\"", nodename);
2212 } else if (tcp->u_arg[0] == MIPS_ATOMIC_SET) {
2213 tprintf(", %#lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]);
2214 } else if (tcp->u_arg[0] == MIPS_FIXADE) {
2215 tprintf(", 0x%lx", tcp->u_arg[1]);
2217 tprintf("%ld, %ld, %ld", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);