Print this page
4142 truss should expand connect() arguments
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/truss/systable.c
+++ new/usr/src/cmd/truss/systable.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 */
25 25
26 26 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
27 27 /* All Rights Reserved */
28 28
29 29 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
30 30
31 31 #include <stdio.h>
32 32 #include <stdlib.h>
33 33 #include <fcntl.h>
34 34 #include <unistd.h>
35 35 #include <string.h>
36 36 #include <signal.h>
37 37 #include <sys/types.h>
38 38 #include <libproc.h>
39 39 #include <sys/aio.h>
40 40 #include <sys/port_impl.h>
41 41 #include "ramdata.h"
42 42 #include "systable.h"
43 43 #include "print.h"
44 44 #include "proto.h"
45 45
46 46 /*
47 47 * Tables of information about system calls - read-only data.
48 48 */
49 49
50 50 const char *const errcode[] = { /* error code names */
51 51 NULL, /* 0 */
52 52 "EPERM", /* 1 */
53 53 "ENOENT", /* 2 */
54 54 "ESRCH", /* 3 */
55 55 "EINTR", /* 4 */
56 56 "EIO", /* 5 */
57 57 "ENXIO", /* 6 */
58 58 "E2BIG", /* 7 */
59 59 "ENOEXEC", /* 8 */
60 60 "EBADF", /* 9 */
61 61 "ECHILD", /* 10 */
62 62 "EAGAIN", /* 11 */
63 63 "ENOMEM", /* 12 */
64 64 "EACCES", /* 13 */
65 65 "EFAULT", /* 14 */
66 66 "ENOTBLK", /* 15 */
67 67 "EBUSY", /* 16 */
68 68 "EEXIST", /* 17 */
69 69 "EXDEV", /* 18 */
70 70 "ENODEV", /* 19 */
71 71 "ENOTDIR", /* 20 */
72 72 "EISDIR", /* 21 */
73 73 "EINVAL", /* 22 */
74 74 "ENFILE", /* 23 */
75 75 "EMFILE", /* 24 */
76 76 "ENOTTY", /* 25 */
77 77 "ETXTBSY", /* 26 */
78 78 "EFBIG", /* 27 */
79 79 "ENOSPC", /* 28 */
80 80 "ESPIPE", /* 29 */
81 81 "EROFS", /* 30 */
82 82 "EMLINK", /* 31 */
83 83 "EPIPE", /* 32 */
84 84 "EDOM", /* 33 */
85 85 "ERANGE", /* 34 */
86 86 "ENOMSG", /* 35 */
87 87 "EIDRM", /* 36 */
88 88 "ECHRNG", /* 37 */
89 89 "EL2NSYNC", /* 38 */
90 90 "EL3HLT", /* 39 */
91 91 "EL3RST", /* 40 */
92 92 "ELNRNG", /* 41 */
93 93 "EUNATCH", /* 42 */
94 94 "ENOCSI", /* 43 */
95 95 "EL2HLT", /* 44 */
96 96 "EDEADLK", /* 45 */
97 97 "ENOLCK", /* 46 */
98 98 "ECANCELED", /* 47 */
99 99 "ENOTSUP", /* 48 */
100 100 "EDQUOT", /* 49 */
101 101 "EBADE", /* 50 */
102 102 "EBADR", /* 51 */
103 103 "EXFULL", /* 52 */
104 104 "ENOANO", /* 53 */
105 105 "EBADRQC", /* 54 */
106 106 "EBADSLT", /* 55 */
107 107 "EDEADLOCK", /* 56 */
108 108 "EBFONT", /* 57 */
109 109 "EOWNERDEAD", /* 58 */
110 110 "ENOTRECOVERABLE", /* 59 */
111 111 "ENOSTR", /* 60 */
112 112 "ENODATA", /* 61 */
113 113 "ETIME", /* 62 */
114 114 "ENOSR", /* 63 */
115 115 "ENONET", /* 64 */
116 116 "ENOPKG", /* 65 */
117 117 "EREMOTE", /* 66 */
118 118 "ENOLINK", /* 67 */
119 119 "EADV", /* 68 */
120 120 "ESRMNT", /* 69 */
121 121 "ECOMM", /* 70 */
122 122 "EPROTO", /* 71 */
123 123 "ELOCKUNMAPPED", /* 72 */
124 124 "ENOTACTIVE", /* 73 */
125 125 "EMULTIHOP", /* 74 */
126 126 NULL, /* 75 */
127 127 NULL, /* 76 */
128 128 "EBADMSG", /* 77 */
129 129 "ENAMETOOLONG", /* 78 */
130 130 "EOVERFLOW", /* 79 */
131 131 "ENOTUNIQ", /* 80 */
132 132 "EBADFD", /* 81 */
133 133 "EREMCHG", /* 82 */
134 134 "ELIBACC", /* 83 */
135 135 "ELIBBAD", /* 84 */
136 136 "ELIBSCN", /* 85 */
137 137 "ELIBMAX", /* 86 */
138 138 "ELIBEXEC", /* 87 */
139 139 "EILSEQ", /* 88 */
140 140 "ENOSYS", /* 89 */
141 141 "ELOOP", /* 90 */
142 142 "ERESTART", /* 91 */
143 143 "ESTRPIPE", /* 92 */
144 144 "ENOTEMPTY", /* 93 */
145 145 "EUSERS", /* 94 */
146 146 "ENOTSOCK", /* 95 */
147 147 "EDESTADDRREQ", /* 96 */
148 148 "EMSGSIZE", /* 97 */
149 149 "EPROTOTYPE", /* 98 */
150 150 "ENOPROTOOPT", /* 99 */
151 151 NULL, /* 100 */
152 152 NULL, /* 101 */
153 153 NULL, /* 102 */
154 154 NULL, /* 103 */
155 155 NULL, /* 104 */
156 156 NULL, /* 105 */
157 157 NULL, /* 106 */
158 158 NULL, /* 107 */
159 159 NULL, /* 108 */
160 160 NULL, /* 109 */
161 161 NULL, /* 110 */
162 162 NULL, /* 111 */
163 163 NULL, /* 112 */
164 164 NULL, /* 113 */
165 165 NULL, /* 114 */
166 166 NULL, /* 115 */
167 167 NULL, /* 116 */
168 168 NULL, /* 117 */
169 169 NULL, /* 118 */
170 170 NULL, /* 119 */
171 171 "EPROTONOSUPPORT", /* 120 */
172 172 "ESOCKTNOSUPPORT", /* 121 */
173 173 "EOPNOTSUPP", /* 122 */
174 174 "EPFNOSUPPORT", /* 123 */
175 175 "EAFNOSUPPORT", /* 124 */
176 176 "EADDRINUSE", /* 125 */
177 177 "EADDRNOTAVAIL", /* 126 */
178 178 "ENETDOWN", /* 127 */
179 179 "ENETUNREACH", /* 128 */
180 180 "ENETRESET", /* 129 */
181 181 "ECONNABORTED", /* 130 */
182 182 "ECONNRESET", /* 131 */
183 183 "ENOBUFS", /* 132 */
184 184 "EISCONN", /* 133 */
185 185 "ENOTCONN", /* 134 */
186 186 NULL, /* 135 */
187 187 NULL, /* 136 */
188 188 NULL, /* 137 */
189 189 NULL, /* 138 */
190 190 NULL, /* 139 */
191 191 NULL, /* 140 */
192 192 NULL, /* 141 */
193 193 NULL, /* 142 */
194 194 "ESHUTDOWN", /* 143 */
195 195 "ETOOMANYREFS", /* 144 */
196 196 "ETIMEDOUT", /* 145 */
197 197 "ECONNREFUSED", /* 146 */
198 198 "EHOSTDOWN", /* 147 */
199 199 "EHOSTUNREACH", /* 148 */
200 200 "EALREADY", /* 149 */
201 201 "EINPROGRESS", /* 150 */
202 202 "ESTALE" /* 151 */
203 203 };
204 204
205 205 #define NERRCODE (sizeof (errcode) / sizeof (char *))
206 206
207 207
208 208 const char *
209 209 errname(int err) /* return the error code name (NULL if none) */
210 210 {
211 211 const char *ename = NULL;
212 212
213 213 if (err >= 0 && err < NERRCODE)
214 214 ename = errcode[err];
215 215
216 216 return (ename);
217 217 }
218 218
219 219
220 220 const struct systable systable[] = {
221 221 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
222 222 {"_exit", 1, DEC, NOV, DEC}, /* 1 */
223 223 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
224 224 {"read", 3, DEC, NOV, DEC, IOB, UNS}, /* 3 */
225 225 {"write", 3, DEC, NOV, DEC, IOB, UNS}, /* 4 */
226 226 {"open", 3, DEC, NOV, STG, OPN, OCT}, /* 5 */
227 227 {"close", 1, DEC, NOV, DEC}, /* 6 */
228 228 {"linkat", 5, DEC, NOV, ATC, STG, ATC, STG, SNF}, /* 7 */
229 229 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
230 230 {"link", 2, DEC, NOV, STG, STG}, /* 9 */
231 231 {"unlink", 1, DEC, NOV, STG}, /* 10 */
232 232 {"symlinkat", 3, DEC, NOV, STG, ATC, STG}, /* 11 */
233 233 {"chdir", 1, DEC, NOV, STG}, /* 12 */
234 234 {"time", 0, DEC, NOV}, /* 13 */
235 235 {"mknod", 3, DEC, NOV, STG, OCT, HEX}, /* 14 */
236 236 {"chmod", 2, DEC, NOV, STG, OCT}, /* 15 */
237 237 {"chown", 3, DEC, NOV, STG, DEC, DEC}, /* 16 */
238 238 {"brk", 1, DEC, NOV, HEX}, /* 17 */
239 239 {"stat", 2, DEC, NOV, STG, HEX}, /* 18 */
240 240 {"lseek", 3, DEC, NOV, DEC, DEX, WHN}, /* 19 */
241 241 {"getpid", 0, DEC, DEC}, /* 20 */
242 242 {"mount", 8, DEC, NOV, STG, STG, MTF, MFT, HEX, DEC, HEX, DEC}, /* 21 */
243 243 {"readlinkat", 4, DEC, NOV, ATC, STG, RLK, UNS}, /* 22 */
244 244 {"setuid", 1, DEC, NOV, UNS}, /* 23 */
245 245 {"getuid", 0, UNS, UNS}, /* 24 */
246 246 {"stime", 1, DEC, NOV, DEC}, /* 25 */
247 247 {"pcsample", 2, DEC, NOV, HEX, DEC}, /* 26 */
248 248 {"alarm", 1, DEC, NOV, UNS}, /* 27 */
249 249 {"fstat", 2, DEC, NOV, DEC, HEX}, /* 28 */
250 250 {"pause", 0, DEC, NOV}, /* 29 */
251 251 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
252 252 {"stty", 2, DEC, NOV, DEC, DEC}, /* 31 */
253 253 {"gtty", 2, DEC, NOV, DEC, DEC}, /* 32 */
254 254 {"access", 2, DEC, NOV, STG, ACC}, /* 33 */
255 255 {"nice", 1, DEC, NOV, DEC}, /* 34 */
256 256 {"statfs", 4, DEC, NOV, STG, HEX, DEC, DEC}, /* 35 */
257 257 {"sync", 0, DEC, NOV}, /* 36 */
258 258 {"kill", 2, DEC, NOV, DEC, SIG}, /* 37 */
259 259 {"fstatfs", 4, DEC, NOV, DEC, HEX, DEC, DEC}, /* 38 */
260 260 {"pgrpsys", 3, DEC, NOV, DEC, DEC, DEC}, /* 39 */
261 261 {"uucopystr", 3, DEC, NOV, STG, RST, UNS}, /* 40 */
262 262 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
263 263 {"pipe", 2, DEC, NOV, PFD, PIP}, /* 42 */
264 264 {"times", 1, DEC, NOV, HEX}, /* 43 */
265 265 {"profil", 4, DEC, NOV, HEX, UNS, HEX, OCT}, /* 44 */
266 266 {"faccessat", 4, DEC, NOV, ATC, STG, ACC, FAT}, /* 45 */
267 267 {"setgid", 1, DEC, NOV, UNS}, /* 46 */
268 268 {"getgid", 0, UNS, UNS}, /* 47 */
269 269 {"mknodat", 4, DEC, NOV, ATC, STG, OCT, HEX}, /* 48 */
270 270 {"msgsys", 6, DEC, NOV, DEC, DEC, DEC, DEC, DEC, DEC}, /* 49 */
271 271 {"sysi86", 4, HEX, NOV, S86, HEX, HEX, HEX, DEC, DEC}, /* 50 */
272 272 {"acct", 1, DEC, NOV, STG}, /* 51 */
273 273 {"shmsys", 4, DEC, NOV, DEC, HEX, HEX, HEX}, /* 52 */
274 274 {"semsys", 5, DEC, NOV, DEC, HEX, HEX, HEX, HEX}, /* 53 */
275 275 {"ioctl", 3, DEC, NOV, DEC, IOC, IOA}, /* 54 */
276 276 {"uadmin", 3, DEC, NOV, DEC, DEC, DEC}, /* 55 */
277 277 {"fchownat", 5, DEC, NOV, ATC, STG, DEC, DEC, SNF}, /* 56 */
278 278 {"utssys", 4, DEC, NOV, HEX, DEC, UTS, HEX}, /* 57 */
279 279 {"fdsync", 2, DEC, NOV, DEC, FFG}, /* 58 */
280 280 {"execve", 3, DEC, NOV, STG, HEX, HEX}, /* 59 */
281 281 {"umask", 1, OCT, NOV, OCT}, /* 60 */
282 282 {"chroot", 1, DEC, NOV, STG}, /* 61 */
283 283 {"fcntl", 3, DEC, NOV, DEC, FCN, HEX}, /* 62 */
284 284 {"ulimit", 2, DEX, NOV, ULM, DEC}, /* 63 */
285 285 {"renameat", 4, DEC, NOV, ATC, STG, ATC, STG}, /* 64 */
286 286 {"unlinkat", 3, DEC, NOV, ATC, STG, UAT}, /* 65 */
287 287 {"fstatat", 4, DEC, NOV, ATC, STG, HEX, SNF}, /* 66 */
288 288 {"fstatat64", 4, DEC, NOV, ATC, STG, HEX, SNF}, /* 67 */
289 289 {"openat", 4, DEC, NOV, ATC, STG, OPN, OCT}, /* 68 */
290 290 {"openat64", 4, DEC, NOV, ATC, STG, OPN, OCT}, /* 69 */
291 291 {"tasksys", 5, DEC, NOV, DEC, DEC, DEC, HEX, DEC}, /* 70 */
292 292 {"acctctl", 3, DEC, NOV, HEX, HEX, UNS}, /* 71 */
293 293 {"exacctsys", 6, DEC, NOV, DEC, IDT, DEC, HEX, DEC, HEX}, /* 72 */
294 294 {"getpagesizes", 2, DEC, NOV, HEX, DEC}, /* 73 */
295 295 {"rctlsys", 6, DEC, NOV, RSC, STG, HEX, HEX, DEC, DEC}, /* 74 */
296 296 {"sidsys", 4, UNS, UNS, DEC, DEC, DEC, DEC}, /* 75 */
297 297 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
298 298 {"lwp_park", 3, DEC, NOV, DEC, HEX, DEC}, /* 77 */
299 299 {"sendfilev", 5, DEC, NOV, DEC, DEC, HEX, DEC, HEX}, /* 78 */
300 300 {"rmdir", 1, DEC, NOV, STG}, /* 79 */
301 301 {"mkdir", 2, DEC, NOV, STG, OCT}, /* 80 */
302 302 {"getdents", 3, DEC, NOV, DEC, HEX, UNS}, /* 81 */
303 303 {"privsys", 5, HEX, NOV, DEC, DEC, DEC, HEX, DEC}, /* 82 */
304 304 {"ucredsys", 3, DEC, NOV, DEC, DEC, HEX}, /* 83 */
305 305 {"sysfs", 3, DEC, NOV, SFS, DEX, DEX}, /* 84 */
306 306 {"getmsg", 4, DEC, NOV, DEC, HEX, HEX, HEX}, /* 85 */
307 307 {"putmsg", 4, DEC, NOV, DEC, HEX, HEX, SMF}, /* 86 */
308 308 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
309 309 {"lstat", 2, DEC, NOV, STG, HEX}, /* 88 */
310 310 {"symlink", 2, DEC, NOV, STG, STG}, /* 89 */
311 311 {"readlink", 3, DEC, NOV, STG, RLK, UNS}, /* 90 */
312 312 {"setgroups", 2, DEC, NOV, DEC, HEX}, /* 91 */
313 313 {"getgroups", 2, DEC, NOV, DEC, HEX}, /* 92 */
314 314 {"fchmod", 2, DEC, NOV, DEC, OCT}, /* 93 */
315 315 {"fchown", 3, DEC, NOV, DEC, DEC, DEC}, /* 94 */
316 316 {"sigprocmask", 3, DEC, NOV, SPM, HEX, HEX}, /* 95 */
317 317 {"sigsuspend", 1, DEC, NOV, HEX}, /* 96 */
318 318 {"sigaltstack", 2, DEC, NOV, HEX, HEX}, /* 97 */
319 319 {"sigaction", 3, DEC, NOV, SIG, HEX, HEX}, /* 98 */
320 320 {"sigpendsys", 2, DEC, NOV, DEC, HEX}, /* 99 */
321 321 {"context", 2, DEC, NOV, DEC, HEX}, /* 100 */
322 322 {"fchmodat", 4, DEC, NOV, ATC, STG, OCT, SNF}, /* 101 */
323 323 {"mkdirat", 3, DEC, NOV, ATC, STG, OCT}, /* 102 */
324 324 {"statvfs", 2, DEC, NOV, STG, HEX}, /* 103 */
325 325 {"fstatvfs", 2, DEC, NOV, DEC, HEX}, /* 104 */
326 326 {"getloadavg", 2, DEC, NOV, HEX, DEC}, /* 105 */
327 327 {"nfssys", 2, DEC, NOV, DEC, HEX}, /* 106 */
328 328 {"waitid", 4, DEC, NOV, IDT, DEC, HEX, WOP}, /* 107 */
329 329 {"sigsendsys", 2, DEC, NOV, HEX, SIG}, /* 108 */
330 330 {"hrtsys", 5, DEC, NOV, DEC, HEX, HEX, HEX, HEX}, /* 109 */
331 331 {"utimesys", 5, DEC, NOV, DEC, HEX, HEX, HEX, HEX}, /* 110 */
332 332 {"sigresend", 3, DEC, NOV, SIG, HEX, HEX}, /* 111 */
333 333 {"priocntlsys", 5, DEC, NOV, DEC, HEX, DEC, PC4, PC5}, /* 112 */
334 334 {"pathconf", 2, DEC, NOV, STG, PTC}, /* 113 */
335 335 {"mincore", 3, DEC, NOV, HEX, UNS, HEX}, /* 114 */
336 336 {"mmap", 6, HEX, NOV, HEX, UNS, MPR, MTY, DEC, DEC}, /* 115 */
337 337 {"mprotect", 3, DEC, NOV, HEX, UNS, MPR}, /* 116 */
338 338 {"munmap", 2, DEC, NOV, HEX, UNS}, /* 117 */
339 339 {"fpathconf", 2, DEC, NOV, DEC, PTC}, /* 118 */
340 340 {"vfork", 0, DEC, NOV}, /* 119 */
341 341 {"fchdir", 1, DEC, NOV, DEC}, /* 120 */
342 342 {"readv", 3, DEC, NOV, DEC, HEX, DEC}, /* 121 */
343 343 {"writev", 3, DEC, NOV, DEC, HEX, DEC}, /* 122 */
344 344 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
345 345 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
346 346 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
347 347 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
348 348 {"mmapobj", 5, DEC, NOV, DEC, MOB, HEX, HEX, HEX}, /* 127 */
349 349 {"setrlimit", 2, DEC, NOV, RLM, HEX}, /* 128 */
350 350 {"getrlimit", 2, DEC, NOV, RLM, HEX}, /* 129 */
351 351 {"lchown", 3, DEC, NOV, STG, DEC, DEC}, /* 130 */
352 352 {"memcntl", 6, DEC, NOV, HEX, UNS, MCF, MC4, MC5, DEC}, /* 131 */
353 353 {"getpmsg", 5, DEC, NOV, DEC, HEX, HEX, HEX, HEX}, /* 132 */
354 354 {"putpmsg", 5, DEC, NOV, DEC, HEX, HEX, DEC, HHX}, /* 133 */
355 355 {"rename", 2, DEC, NOV, STG, STG}, /* 134 */
356 356 {"uname", 1, DEC, NOV, HEX}, /* 135 */
357 357 {"setegid", 1, DEC, NOV, UNS}, /* 136 */
358 358 {"sysconfig", 1, DEC, NOV, CNF}, /* 137 */
359 359 {"adjtime", 2, DEC, NOV, HEX, HEX}, /* 138 */
360 360 {"sysinfo", 3, DEC, NOV, INF, RST, DEC}, /* 139 */
361 361 {"sharefs", 3, DEC, NOV, DEC, HEX, DEC}, /* 140 */
362 362 {"seteuid", 1, DEC, NOV, UNS}, /* 141 */
363 363 {"forksys", 2, DEC, NOV, DEC, HHX}, /* 142 */
364 364 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
365 365 {"sigtimedwait", 3, DEC, NOV, HEX, HEX, HEX}, /* 144 */
366 366 {"lwp_info", 1, DEC, NOV, HEX}, /* 145 */
367 367 {"yield", 0, DEC, NOV}, /* 146 */
368 368 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
369 369 {"lwp_sema_post", 1, DEC, NOV, HEX}, /* 148 */
370 370 {"lwp_sema_trywait", 1, DEC, NOV, HEX}, /* 149 */
371 371 {"lwp_detach", 1, DEC, NOV, DEC}, /* 150 */
372 372 {"corectl", 4, DEC, NOV, DEC, HEX, HEX, HEX}, /* 151 */
373 373 {"modctl", 5, DEC, NOV, MOD, HEX, HEX, HEX, HEX}, /* 152 */
374 374 {"fchroot", 1, DEC, NOV, DEC}, /* 153 */
375 375 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
376 376 {"vhangup", 0, DEC, NOV}, /* 155 */
377 377 {"gettimeofday", 1, DEC, NOV, HEX}, /* 156 */
378 378 {"getitimer", 2, DEC, NOV, ITM, HEX}, /* 157 */
379 379 {"setitimer", 3, DEC, NOV, ITM, HEX, HEX}, /* 158 */
380 380 {"lwp_create", 3, DEC, NOV, HEX, LWF, HEX}, /* 159 */
381 381 {"lwp_exit", 0, DEC, NOV}, /* 160 */
382 382 {"lwp_suspend", 1, DEC, NOV, DEC}, /* 161 */
383 383 {"lwp_continue", 1, DEC, NOV, DEC}, /* 162 */
384 384 {"lwp_kill", 2, DEC, NOV, DEC, SIG}, /* 163 */
385 385 {"lwp_self", 0, DEC, NOV}, /* 164 */
386 386 {"lwp_sigmask", 5, HEX, HEX, SPM, HEX, HEX, HEX, HEX}, /* 165 */
387 387 {"lwp_private", 3, HEX, NOV, DEC, DEC, HEX}, /* 166 */
388 388 {"lwp_wait", 2, DEC, NOV, DEC, HEX}, /* 167 */
389 389 {"lwp_mutex_wakeup", 2, DEC, NOV, HEX, DEC}, /* 168 */
390 390 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
391 391 {"lwp_cond_wait", 4, DEC, NOV, HEX, HEX, HEX, DEC}, /* 170 */
392 392 {"lwp_cond_signal", 1, DEC, NOV, HEX}, /* 171 */
393 393 {"lwp_cond_broadcast", 1, DEC, NOV, HEX}, /* 172 */
394 394 {"pread", 4, DEC, NOV, DEC, IOB, UNS, DEX}, /* 173 */
395 395 {"pwrite", 4, DEC, NOV, DEC, IOB, UNS, DEX}, /* 174 */
396 396 {"llseek", 4, LLO, NOV, DEC, LLO, HID, WHN}, /* 175 */
397 397 {"inst_sync", 2, DEC, NOV, STG, DEC}, /* 176 */
398 398 {"brand", 6, DEC, NOV, DEC, HEX, HEX, HEX, HEX, HEX}, /* 177 */
399 399 {"kaio", 7, DEC, NOV, AIO, HEX, HEX, HEX, HEX, HEX, HEX}, /* 178 */
400 400 {"cpc", 5, DEC, NOV, CPC, DEC, HEX, HEX, HEX}, /* 179 */
401 401 {"lgrpsys", 3, DEC, NOV, DEC, DEC, HEX}, /* 180 */
402 402 {"rusagesys", 5, DEC, NOV, DEC, HEX, DEC, HEX, HEX}, /* 181 */
403 403 {"portfs", 6, HEX, HEX, DEC, HEX, HEX, HEX, HEX, HEX}, /* 182 */
404 404 {"pollsys", 4, DEC, NOV, HEX, DEC, HEX, HEX}, /* 183 */
405 405 {"labelsys", 2, DEC, NOV, DEC, HEX}, /* 184 */
406 406 {"acl", 4, DEC, NOV, STG, ACL, DEC, HEX}, /* 185 */
407 407 {"auditsys", 4, DEC, NOV, AUD, HEX, HEX, HEX}, /* 186 */
408 408 {"processor_bind", 4, DEC, NOV, IDT, DEC, DEC, HEX}, /* 187 */
409 409 {"processor_info", 2, DEC, NOV, DEC, HEX}, /* 188 */
410 410 {"p_online", 2, DEC, NOV, DEC, DEC}, /* 189 */
411 411 {"sigqueue", 5, DEC, NOV, DEC, SIG, HEX, SQC, DEC}, /* 190 */
412 412 {"clock_gettime", 2, DEC, NOV, DEC, HEX}, /* 191 */
413 413 {"clock_settime", 2, DEC, NOV, DEC, HEX}, /* 192 */
414 414 {"clock_getres", 2, DEC, NOV, DEC, HEX}, /* 193 */
415 415 {"timer_create", 3, DEC, NOV, DEC, HEX, HEX}, /* 194 */
416 416 {"timer_delete", 1, DEC, NOV, DEC}, /* 195 */
417 417 {"timer_settime", 4, DEC, NOV, DEC, DEC, HEX, HEX}, /* 196 */
418 418 {"timer_gettime", 2, DEC, NOV, DEC, HEX}, /* 197 */
419 419 {"timer_getoverrun", 1, DEC, NOV, DEC}, /* 198 */
420 420 {"nanosleep", 2, DEC, NOV, HEX, HEX}, /* 199 */
421 421 {"facl", 4, DEC, NOV, DEC, ACL, DEC, HEX}, /* 200 */
422 422 {"door", 6, DEC, NOV, DEC, HEX, HEX, HEX, HEX, DEC}, /* 201 */
423 423 {"setreuid", 2, DEC, NOV, UN1, UN1}, /* 202 */
424 424 {"setregid", 2, DEC, NOV, UN1, UN1}, /* 203 */
425 425 {"install_utrap", 3, DEC, NOV, DEC, HEX, HEX}, /* 204 */
426 426 {"signotify", 3, DEC, NOV, DEC, HEX, HEX}, /* 205 */
427 427 {"schedctl", 0, HEX, NOV}, /* 206 */
428 428 {"pset", 5, DEC, NOV, DEC, HEX, HEX, HEX, HEX}, /* 207 */
429 429 {"sparc_utrap_install", 5, DEC, NOV, UTT, UTH, UTH, HEX, HEX}, /* 208 */
430 430 {"resolvepath", 3, DEC, NOV, STG, RLK, DEC}, /* 209 */
431 431 {"lwp_mutex_timedlock", 3, DEC, NOV, HEX, HEX, HEX}, /* 210 */
432 432 {"lwp_sema_timedwait", 3, DEC, NOV, HEX, HEX, DEC}, /* 211 */
433 433 {"lwp_rwlock_sys", 3, DEC, NOV, DEC, HEX, HEX}, /* 212 */
434 434 {"getdents64", 3, DEC, NOV, DEC, HEX, UNS}, /* 213 */
435 435 {"mmap64", 7, HEX, NOV, HEX, UNS, MPR, MTY, DEC, LLO, HID}, /* 214 */
436 436 {"stat64", 2, DEC, NOV, STG, HEX}, /* 215 */
437 437 {"lstat64", 2, DEC, NOV, STG, HEX}, /* 216 */
438 438 {"fstat64", 2, DEC, NOV, DEC, HEX}, /* 217 */
439 439 {"statvfs64", 2, DEC, NOV, STG, HEX}, /* 218 */
440 440 {"fstatvfs64", 2, DEC, NOV, DEC, HEX}, /* 219 */
441 441 {"setrlimit64", 2, DEC, NOV, RLM, HEX}, /* 220 */
442 442 {"getrlimit64", 2, DEC, NOV, RLM, HEX}, /* 221 */
443 443 {"pread64", 5, DEC, NOV, DEC, IOB, UNS, LLO, HID}, /* 222 */
444 444 {"pwrite64", 5, DEC, NOV, DEC, IOB, UNS, LLO, HID}, /* 223 */
445 445 { NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
↓ open down ↓ |
445 lines elided |
↑ open up ↑ |
446 446 {"open64", 3, DEC, NOV, STG, OPN, OCT}, /* 225 */
447 447 {"rpcmod", 3, DEC, NOV, DEC, HEX}, /* 226 */
448 448 {"zone", 5, DEC, NOV, DEC, HEX, HEX, HEX, HEX}, /* 227 */
449 449 {"autofssys", 2, DEC, NOV, DEC, HEX}, /* 228 */
450 450 {"getcwd", 3, DEC, NOV, RST, DEC}, /* 229 */
451 451 {"so_socket", 5, DEC, NOV, PFM, SKT, SKP, STG, SKV}, /* 230 */
452 452 {"so_socketpair", 1, DEC, NOV, HEX}, /* 231 */
453 453 {"bind", 4, DEC, NOV, DEC, HEX, DEC, SKV}, /* 232 */
454 454 {"listen", 3, DEC, NOV, DEC, DEC, SKV}, /* 233 */
455 455 {"accept", 5, DEC, NOV, DEC, HEX, HEX, SKV, ACF}, /* 234 */
456 -{"connect", 4, DEC, NOV, DEC, HEX, DEC, SKV}, /* 235 */
456 +{"connect", 4, DEC, NOV, DEC, SAD, DEC, SKV}, /* 235 */
457 457 {"shutdown", 3, DEC, NOV, DEC, SHT, SKV}, /* 236 */
458 458 {"recv", 4, DEC, NOV, DEC, IOB, DEC, DEC}, /* 237 */
459 459 {"recvfrom", 6, DEC, NOV, DEC, IOB, DEC, DEC, HEX, HEX}, /* 238 */
460 460 {"recvmsg", 3, DEC, NOV, DEC, HEX, DEC}, /* 239 */
461 461 {"send", 4, DEC, NOV, DEC, IOB, DEC, DEC}, /* 240 */
462 462 {"sendmsg", 3, DEC, NOV, DEC, HEX, DEC}, /* 241 */
463 463 {"sendto", 6, DEC, NOV, DEC, IOB, DEC, DEC, HEX, DEC}, /* 242 */
464 464 {"getpeername", 4, DEC, NOV, DEC, HEX, HEX, SKV}, /* 243 */
465 465 {"getsockname", 4, DEC, NOV, DEC, HEX, HEX, SKV}, /* 244 */
466 466 {"getsockopt", 6, DEC, NOV, DEC, SOL, SON, HEX, HEX, SKV}, /* 245 */
467 467 {"setsockopt", 6, DEC, NOV, DEC, SOL, SON, HEX, DEC, SKV}, /* 246 */
468 468 {"sockconfig", 5, DEC, NOV, DEC, HEX, HEX, HEX, HEX}, /* 247 */
469 469 {"ntp_gettime", 1, DEC, NOV, HEX}, /* 248 */
470 470 {"ntp_adjtime", 1, DEC, NOV, HEX}, /* 249 */
471 471 {"lwp_mutex_unlock", 1, DEC, NOV, HEX}, /* 250 */
472 472 {"lwp_mutex_trylock", 2, DEC, NOV, HEX, HEX}, /* 251 */
473 473 {"lwp_mutex_register", 2, DEC, NOV, HEX, HEX}, /* 252 */
474 474 {"cladm", 3, DEC, NOV, CLC, CLF, HEX}, /* 253 */
475 475 {"uucopy", 3, DEC, NOV, HEX, HEX, UNS}, /* 254 */
476 476 {"umount2", 2, DEC, NOV, STG, MTF}, /* 255 */
477 477 { NULL, -1, DEC, NOV},
478 478 };
479 479
480 480 /* SYSEND == max syscall number + 1 */
481 481 #define SYSEND ((sizeof (systable) / sizeof (struct systable))-1)
482 482
483 483
484 484 /*
485 485 * The following are for interpreting syscalls with sub-codes.
486 486 */
487 487
488 488 const struct systable faccessattable[] = {
489 489 {"faccessat", 4, DEC, NOV, ATC, STG, ACC, FAT}, /* 0 */
490 490 {"access", 3, DEC, NOV, HID, STG, ACC}, /* 1 */
491 491 };
492 492 #define NACCESSCODE (sizeof (faccessattable) / sizeof (struct systable))
493 493
494 494 const struct systable fchmodattable[] = {
495 495 {"fchmodat", 4, DEC, NOV, ATC, STG, OCT, SNF}, /* 0 */
496 496 {"chmod", 3, DEC, NOV, HID, STG, OCT}, /* 1 */
497 497 {"fchmodat", 4, DEC, NOV, ATC, STG, OCT, SNF}, /* 2 */
498 498 {"fchmod", 3, DEC, NOV, DEC, HID, OCT}, /* 3 */
499 499 };
500 500 #define NCHMODCODE (sizeof (fchmodattable) / sizeof (struct systable))
501 501
502 502 const struct systable fchownattable[] = {
503 503 {"fchownat", 5, DEC, NOV, ATC, STG, DEC, DEC, SNF}, /* 0 */
504 504 {"chown", 4, DEC, NOV, HID, STG, DEC, DEC}, /* 1 */
505 505 {"lchown", 4, DEC, NOV, HID, STG, DEC, DEC}, /* 2 */
506 506 {"fchown", 4, DEC, NOV, DEC, HID, DEC, DEC}, /* 3 */
507 507 };
508 508 #define NCHOWNCODE (sizeof (fchownattable) / sizeof (struct systable))
509 509
510 510 const struct systable mkdiratattable[] = {
511 511 {"mkdirat", 3, DEC, NOV, ATC, STG, OCT}, /* 0 */
512 512 {"mkdir", 3, DEC, NOV, HID, STG, OCT}, /* 1 */
513 513 };
514 514 #define NMKDIRCODE (sizeof (mkdiratattable) / sizeof (struct systable))
515 515
516 516 const struct systable mknodatattable[] = {
517 517 {"mknodat", 4, DEC, NOV, ATC, STG, OCT, HEX}, /* 0 */
518 518 {"mknod", 4, DEC, NOV, HID, STG, OCT, HEX}, /* 1 */
519 519 };
520 520 #define NMKMODCODE (sizeof (mknodatattable) / sizeof (struct systable))
521 521
522 522 const struct systable renameattable[] = {
523 523 {"renameat", 4, DEC, NOV, ATC, STG, ATC, STG}, /* 0 */
524 524 {"rename", 4, DEC, NOV, HID, STG, HID, STG}, /* 1 */
525 525 };
526 526 #define NRENAMECODE (sizeof (renameattable) / sizeof (struct systable))
527 527
528 528 const struct systable linkattable[] = {
529 529 {"linkat", 5, DEC, NOV, ATC, STG, ATC, STG, SNF}, /* 0 */
530 530 {"link", 4, DEC, NOV, HID, STG, HID, STG}, /* 1 */
531 531 };
532 532 #define NLINKATCODE (sizeof (linkattable) / sizeof (struct systable))
533 533
534 534 const struct systable unlinkattable[] = {
535 535 {"unlinkat", 3, DEC, NOV, ATC, STG, UAT}, /* 0 */
536 536 {"unlink", 2, DEC, NOV, HID, STG}, /* 1 */
537 537 {"rmdir", 2, DEC, NOV, HID, STG}, /* 2 */
538 538 };
539 539 #define NUNLINKCODE (sizeof (unlinkattable) / sizeof (struct systable))
540 540
541 541 const struct systable symlinkattable[] = {
542 542 {"symlinkat", 3, DEC, NOV, STG, ATC, STG}, /* 0 */
543 543 {"symlink", 3, DEC, NOV, STG, HID, STG}, /* 1 */
544 544 };
545 545 #define NSYMLINKCODE (sizeof (symlinkattable) / sizeof (struct systable))
546 546
547 547 const struct systable readlinkattable[] = {
548 548 {"readlinkat", 4, DEC, NOV, ATC, STG, RLK, UNS}, /* 0 */
549 549 {"readlink", 4, DEC, NOV, HID, STG, RLK, UNS}, /* 1 */
550 550 };
551 551 #define NREADLINKCODE (sizeof (readlinkattable) / sizeof (struct systable))
552 552
553 553 const struct systable fstatattable[] = {
554 554 {"fstatat", 4, DEC, NOV, ATC, STG, HEX, SNF}, /* 0 */
555 555 {"stat", 3, DEC, NOV, HID, STG, HEX}, /* 1 */
556 556 {"lstat", 3, DEC, NOV, HID, STG, HEX}, /* 2 */
557 557 {"fstat", 3, DEC, NOV, DEC, HID, HEX}, /* 3 */
558 558 };
559 559 #define NSTATCODE (sizeof (fstatattable) / sizeof (struct systable))
560 560
561 561 const struct systable fstatat64table[] = {
562 562 {"fstatat64", 4, DEC, NOV, ATC, STG, HEX, SNF}, /* 0 */
563 563 {"stat64", 3, DEC, NOV, HID, STG, HEX}, /* 1 */
564 564 {"lstat64", 3, DEC, NOV, HID, STG, HEX}, /* 2 */
565 565 {"fstat64", 3, DEC, NOV, DEC, HID, HEX}, /* 3 */
566 566 };
567 567 #define NSTAT64CODE (sizeof (fstatat64table) / sizeof (struct systable))
568 568
569 569 const struct systable openattable[] = {
570 570 {"openat", 3, DEC, NOV, ATC, STG, OPN}, /* 0 */
571 571 {"openat", 4, DEC, NOV, ATC, STG, OPN, OCT}, /* 1 */
572 572 {"open", 3, DEC, NOV, HID, STG, OPN}, /* 2 */
573 573 {"open", 4, DEC, NOV, HID, STG, OPN, OCT}, /* 3 */
574 574 };
575 575 #define NOPENATCODE (sizeof (openattable) / sizeof (struct systable))
576 576
577 577 const struct systable openat64table[] = {
578 578 {"openat64", 3, DEC, NOV, ATC, STG, OPN}, /* 0 */
579 579 {"openat64", 4, DEC, NOV, ATC, STG, OPN, OCT}, /* 1 */
580 580 {"open64", 3, DEC, NOV, HID, STG, OPN}, /* 2 */
581 581 {"open64", 4, DEC, NOV, HID, STG, OPN, OCT}, /* 3 */
582 582 };
583 583 #define NOPENAT64CODE (sizeof (openat64table) / sizeof (struct systable))
584 584
585 585 const struct systable opentable[] = {
586 586 {"open", 2, DEC, NOV, STG, OPN}, /* 0 */
587 587 {"open", 3, DEC, NOV, STG, OPN, OCT}, /* 1 */
588 588 };
589 589 #define NOPENCODE (sizeof (opentable) / sizeof (struct systable))
590 590
591 591 const struct systable open64table[] = {
592 592 {"open64", 2, DEC, NOV, STG, OPN}, /* 0 */
593 593 {"open64", 3, DEC, NOV, STG, OPN, OCT}, /* 1 */
594 594 };
595 595 #define NOPEN64CODE (sizeof (open64table) / sizeof (struct systable))
596 596
597 597 const struct systable fcntltable[] = {
598 598 {"fcntl", 3, DEC, NOV, DEC, FCN, HEX}, /* 0: default */
599 599 {"fcntl", 2, DEC, NOV, DEC, FCN}, /* 1: no arg */
600 600 {"fcntl", 3, DEC, NOV, DEC, FCN, FFG}, /* 2: F_SETFL */
601 601 };
602 602 #define NFCNTLCODE (sizeof (fcntltable) / sizeof (struct systable))
603 603
604 604 const struct systable msgtable[] = {
605 605 {"msgget", 3, DEC, NOV, HID, KEY, MSF}, /* 0 */
606 606 {"msgctl", 4, DEC, NOV, HID, DEC, MSC, HEX}, /* 1 */
607 607 {"msgrcv", 6, DEC, NOV, HID, DEC, HEX, UNS, DEC, MSF}, /* 2 */
608 608 {"msgsnd", 5, DEC, NOV, HID, DEC, HEX, UNS, MSF}, /* 3 */
609 609 {"msgids", 4, DEC, NOV, HID, HEX, UNS, HEX}, /* 4 */
610 610 {"msgsnap", 5, DEC, NOV, HID, DEC, HEX, UNS, DEC}, /* 5 */
611 611 };
612 612 #define NMSGCODE (sizeof (msgtable) / sizeof (struct systable))
613 613
614 614 const struct systable semtable[] = {
615 615 {"semctl", 5, DEC, NOV, HID, DEC, DEC, SMC, DEX}, /* 0 */
616 616 {"semget", 4, DEC, NOV, HID, KEY, DEC, SEF}, /* 1 */
617 617 {"semop", 4, DEC, NOV, HID, DEC, HEX, UNS}, /* 2 */
618 618 {"semids", 4, DEC, NOV, HID, HEX, UNS, HEX}, /* 3 */
619 619 {"semtimedop", 5, DEC, NOV, HID, DEC, HEX, UNS, HEX}, /* 4 */
620 620 };
621 621 #define NSEMCODE (sizeof (semtable) / sizeof (struct systable))
622 622
623 623 const struct systable shmtable[] = {
624 624 {"shmat", 4, HEX, NOV, HID, DEC, DEX, SHF}, /* 0 */
625 625 {"shmctl", 4, DEC, NOV, HID, DEC, SHC, DEX}, /* 1 */
626 626 {"shmdt", 2, DEC, NOV, HID, HEX}, /* 2 */
627 627 {"shmget", 4, DEC, NOV, HID, KEY, UNS, SHF}, /* 3 */
628 628 {"shmids", 4, DEC, NOV, HID, HEX, UNS, HEX}, /* 4 */
629 629 };
630 630 #define NSHMCODE (sizeof (shmtable) / sizeof (struct systable))
631 631
632 632 const struct systable pidtable[] = {
633 633 {"getpgrp", 1, DEC, NOV, HID}, /* 0 */
634 634 {"setpgrp", 1, DEC, NOV, HID}, /* 1 */
635 635 {"getsid", 2, DEC, NOV, HID, DEC}, /* 2 */
636 636 {"setsid", 1, DEC, NOV, HID}, /* 3 */
637 637 {"getpgid", 2, DEC, NOV, HID, DEC}, /* 4 */
638 638 {"setpgid", 3, DEC, NOV, HID, DEC, DEC}, /* 5 */
639 639 };
640 640 #define NPIDCODE (sizeof (pidtable) / sizeof (struct systable))
641 641
642 642 const struct systable sfstable[] = {
643 643 {"sysfs", 3, DEC, NOV, SFS, DEX, DEX}, /* 0 */
644 644 {"sysfs", 2, DEC, NOV, SFS, STG}, /* 1 */
645 645 {"sysfs", 3, DEC, NOV, SFS, DEC, RST}, /* 2 */
646 646 {"sysfs", 1, DEC, NOV, SFS}, /* 3 */
647 647 };
648 648 #define NSFSCODE (sizeof (sfstable) / sizeof (struct systable))
649 649
650 650 const struct systable utstable[] = {
651 651 {"utssys", 3, DEC, NOV, HEX, DEC, UTS}, /* 0 */
652 652 {"utssys", 4, DEC, NOV, HEX, HEX, HEX, HEX}, /* err */
653 653 {"utssys", 3, DEC, NOV, HEX, HHX, UTS}, /* 2 */
654 654 {"utssys", 4, DEC, NOV, STG, FUI, UTS, HEX} /* 3 */
655 655 };
656 656 #define NUTSCODE (sizeof (utstable) / sizeof (struct systable))
657 657
658 658 const struct systable rctltable[] = {
659 659 {"getrctl", 6, DEC, NOV, HID, STG, HEX, HEX, HID, RGF}, /* 0 */
660 660 {"setrctl", 6, DEC, NOV, HID, STG, HEX, HEX, HID, RSF}, /* 1 */
661 661 {"rctlsys_lst", 6, DEC, NOV, HID, HID, HEX, HID, HEX, HID}, /* 2 */
662 662 {"rctlsys_ctl", 6, DEC, NOV, HID, STG, HEX, HID, HID, RCF}, /* 3 */
663 663 {"setprojrctl", 6, DEC, NOV, HID, STG, HID, HEX, HEX, SPF}, /* 4 */
664 664 };
665 665 #define NRCTLCODE (sizeof (rctltable) / sizeof (struct systable))
666 666
667 667 const struct systable sgptable[] = {
668 668 {"sigpendsys", 2, DEC, NOV, DEC, HEX}, /* err */
669 669 {"sigpending", 2, DEC, NOV, HID, HEX}, /* 1 */
670 670 {"sigfillset", 2, DEC, NOV, HID, HEX}, /* 2 */
671 671 };
672 672 #define NSGPCODE (sizeof (sgptable) / sizeof (struct systable))
673 673
674 674 const struct systable ctxtable[] = {
675 675 {"getcontext", 2, DEC, NOV, HID, HEX}, /* 0 */
676 676 {"setcontext", 2, DEC, NOV, HID, HEX}, /* 1 */
677 677 {"getustack", 2, DEC, NOV, HID, HEX}, /* 2 */
678 678 {"setustack", 2, DEC, NOV, HID, HEX}, /* 3 */
679 679 };
680 680 #define NCTXCODE (sizeof (ctxtable) / sizeof (struct systable))
681 681
682 682 const struct systable hrttable[] = {
683 683 {"hrtcntl", 5, DEC, NOV, HID, DEC, DEC, HEX, HEX}, /* 0 */
684 684 {"hrtalarm", 3, DEC, NOV, HID, HEX, DEC}, /* 1 */
685 685 {"hrtsleep", 2, DEC, NOV, HID, HEX}, /* 2 */
686 686 {"hrtcancel", 3, DEC, NOV, HID, HEX, DEC}, /* 3 */
687 687 };
688 688 #define NHRTCODE (sizeof (hrttable) / sizeof (struct systable))
689 689
690 690 const struct systable cortable[] = {
691 691 {"corectl", 4, DEC, NOV, COR, HEX, HEX, HEX}, /* 0 */
692 692 {"corectl", 2, DEC, NOV, COR, CCO}, /* 1 */
693 693 {"corectl", 1, HHX, NOV, COR}, /* 2 */
694 694 {"corectl", 3, DEC, NOV, COR, STG, DEC}, /* 3 */
695 695 {"corectl", 3, DEC, NOV, COR, RST, DEC}, /* 4 */
696 696 {"corectl", 4, DEC, NOV, COR, STG, DEC, DEC}, /* 5 */
697 697 {"corectl", 4, DEC, NOV, COR, RST, DEC, DEC}, /* 6 */
698 698 {"corectl", 2, DEC, NOV, COR, CCC}, /* 7 */
699 699 {"corectl", 2, DEC, NOV, COR, RCC}, /* 8 */
700 700 {"corectl", 3, DEC, NOV, COR, CCC, DEC}, /* 9 */
701 701 {"corectl", 3, DEC, NOV, COR, RCC, DEC}, /* 10 */
702 702 {"corectl", 3, DEC, NOV, COR, STG, DEC}, /* 11 */
703 703 {"corectl", 3, DEC, NOV, COR, RST, DEC}, /* 12 */
704 704 {"corectl", 2, DEC, NOV, COR, CCC}, /* 13 */
705 705 {"corectl", 2, DEC, NOV, COR, RCC}, /* 14 */
706 706 };
707 707 #define NCORCODE (sizeof (cortable) / sizeof (struct systable))
708 708
709 709 const struct systable aiotable[] = {
710 710 {"kaio", 7, DEC, NOV, AIO, DEC, HEX, DEC, LLO, HID, HEX}, /* 0 */
711 711 {"kaio", 7, DEC, NOV, AIO, DEC, HEX, DEC, LLO, HID, HEX}, /* 1 */
712 712 {"kaio", 3, DEC, NOV, AIO, HEX, DEC}, /* 2 */
713 713 {"kaio", 3, DEC, NOV, AIO, DEC, HEX}, /* 3 */
714 714 {"kaio", 1, DEC, NOV, AIO}, /* 4 */
715 715 {"kaio", 1, DEC, NOV, AIO}, /* 5 */
716 716 {"kaio", 1, DEC, NOV, AIO}, /* 6 */
717 717 {"kaio", 5, DEC, NOV, AIO, LIO, HEX, DEC, HEX}, /* 7 */
718 718 {"kaio", 5, DEC, NOV, AIO, HEX, DEC, HEX, DEC}, /* 8 */
719 719 {"kaio", 2, DEC, NOV, AIO, HEX}, /* 9 */
720 720 {"kaio", 5, DEC, NOV, AIO, LIO, HEX, DEC, HEX}, /* 10 */
721 721 {"kaio", 2, DEC, NOV, AIO, HEX}, /* 11 */
722 722 {"kaio", 2, DEC, NOV, AIO, HEX}, /* 12 */
723 723 {"kaio", 5, DEC, NOV, AIO, LIO, HEX, DEC, HEX}, /* 13 */
724 724 {"kaio", 5, DEC, NOV, AIO, HEX, DEC, HEX, DEC}, /* 14 */
725 725 {"kaio", 2, DEC, NOV, AIO, HEX}, /* 15 */
726 726 {"kaio", 5, DEC, NOV, AIO, LIO, HEX, DEC, HEX}, /* 16 */
727 727 {"kaio", 2, DEC, NOV, AIO, HEX}, /* 17 */
728 728 {"kaio", 2, DEC, NOV, AIO, HEX}, /* 18 */
729 729 {"kaio", 3, DEC, NOV, AIO, DEC, HEX}, /* 19 */
730 730 {"kaio", 1, DEC, NOV, AIO}, /* 20 */
731 731 {"kaio", 5, DEC, NOV, AIO, HEX, DEC, HEX, HEX}, /* 21 */
732 732 };
733 733 #define NAIOCODE (sizeof (aiotable) / sizeof (struct systable))
734 734
735 735 const struct systable doortable[] = {
736 736 {"door_create", 3, DEC, NOV, HEX, HEX, DFL}, /* 0 */
737 737 {"door_revoke", 1, DEC, NOV, DEC}, /* 1 */
738 738 {"door_info", 2, DEC, NOV, DEC, HEX}, /* 2 */
739 739 {"door_call", 2, DEC, NOV, DEC, HEX}, /* 3 */
740 740 {"door_return", 4, DEC, NOV, HEX, DEC, HEX, DEC}, /* 4 (old) */
741 741 {"door_cred", 1, DEC, NOV, HEX}, /* 5 (old) */
742 742 {"door_bind", 1, DEC, NOV, DEC}, /* 6 */
743 743 {"door_unbind", 0, DEC, NOV}, /* 7 */
744 744 {"door_unref", 0, DEC, NOV}, /* 8 */
745 745 {"door_ucred", 1, DEC, NOV, HEX}, /* 9 */
746 746 {"door_return", 5, DEC, NOV, HEX, DEC, HEX, HEX, DEC}, /* 10 */
747 747 {"door_getparam", 3, DEC, NOV, DEC, DPM, HEX}, /* 11 */
748 748 {"door_setparam", 3, DEC, NOV, DEC, DPM, DEC}, /* 12 */
749 749 };
750 750 #define NDOORCODE (sizeof (doortable) / sizeof (struct systable))
751 751
752 752 const struct systable psettable[] = {
753 753 {"pset_create", 2, DEC, NOV, HID, HEX}, /* 0 */
754 754 {"pset_destroy", 2, DEC, NOV, HID, PST}, /* 1 */
755 755 {"pset_assign", 4, DEC, NOV, HID, PST, DEC, HEX}, /* 2 */
756 756 {"pset_info", 5, DEC, NOV, HID, PST, HEX, HEX, HEX}, /* 3 */
757 757 {"pset_bind", 5, DEC, NOV, HID, PST, IDT, DEC, HEX}, /* 4 */
758 758 {"pset_getloadavg", 4, DEC, NOV, HID, PST, HEX, DEC}, /* 5 */
759 759 {"pset_list", 3, DEC, NOV, HID, HEX, HEX}, /* 6 */
760 760 {"pset_setattr", 3, DEC, NOV, HID, PST, HEX}, /* 7 */
761 761 {"pset_getattr", 3, DEC, NOV, HID, PST, HEX}, /* 8 */
762 762 {"pset_assign_forced", 4, DEC, NOV, HID, PST, DEC, HEX}, /* 9 */
763 763 };
764 764 #define NPSETCODE (sizeof (psettable) / sizeof (struct systable))
765 765
766 766 const struct systable lwpcreatetable[] = {
767 767 {"lwp_create", 3, DEC, NOV, HEX, LWF, HEX}, /* 0 */
768 768 {"lwp_create", 0, DEC, NOV}, /* 1 */
769 769 };
770 770 #define NLWPCREATECODE (sizeof (lwpcreatetable) / sizeof (struct systable))
771 771
772 772 static const struct systable tasksystable[] = {
773 773 {"settaskid", 3, DEC, NOV, HID, DEC, HEX}, /* 0 */
774 774 {"gettaskid", 1, DEC, NOV, HID}, /* 1 */
775 775 {"getprojid", 1, DEC, NOV, HID}, /* 2 */
776 776 };
777 777 #define NTASKSYSCODE (sizeof (tasksystable) / sizeof (struct systable))
778 778
779 779 static const struct systable privsystable[] = {
780 780 {"setppriv", 4, DEC, NOV, HID, PRO, PRN, PRS}, /* 0 */
781 781 {"getppriv", 4, DEC, NOV, HID, HID, PRN, PRS}, /* 1 */
782 782 {"getprivimplinfo", 5, DEC, NOV, HID, HID, HID, HEX, DEC}, /* 2 */
783 783 {"setpflags", 3, DEC, NOV, HID, PFL, DEC}, /* 3 */
784 784 {"getpflags", 2, DEC, NOV, HID, PFL}, /* 4 */
785 785 {"issetugid", 0, DEC, NOV, HID}, /* 5 */
786 786 };
787 787 #define NPRIVSYSCODE (sizeof (privsystable) / sizeof (struct systable))
788 788
789 789 static const struct systable exacctsystable[] = {
790 790 {"getacct", 5, DEC, NOV, HID, IDT, DEC, HEX, UNS}, /* 0 */
791 791 {"putacct", 6, DEC, NOV, HID, IDT, DEC, HEX, UNS, HEX}, /* 1 */
792 792 {"wracct", 4, DEC, NOV, HID, IDT, DEC, HEX}, /* 2 */
793 793 };
794 794 #define NEXACCTSYSCODE (sizeof (exacctsystable) / sizeof (struct systable))
795 795
796 796 static const struct systable lwpparktable[] = {
797 797 {"lwp_park", 3, DEC, NOV, HID, HEX, DEC}, /* 0 */
798 798 {"lwp_unpark", 2, DEC, NOV, HID, DEC}, /* 1 */
799 799 {"lwp_unpark_all", 3, DEC, NOV, HID, HEX, DEC}, /* 2 */
800 800 {"lwp_unpark_cancel", 2, DEC, NOV, HID, DEC}, /* 3 */
801 801 {"lwp_set_park", 3, DEC, NOV, HID, HEX, DEC}, /* 4 */
802 802 };
803 803 #define NLWPPARKCODE (sizeof (lwpparktable) / sizeof (struct systable))
804 804
805 805 static const struct systable lwprwlocktable[] = {
806 806 {"lwp_rwlock_rdlock", 3, DEC, NOV, HID, HEX, HEX}, /* 0 */
807 807 {"lwp_rwlock_wrlock", 3, DEC, NOV, HID, HEX, HEX}, /* 1 */
808 808 {"lwp_rwlock_tryrdlock", 2, DEC, NOV, HID, HEX}, /* 2 */
809 809 {"lwp_rwlock_trywrlock", 2, DEC, NOV, HID, HEX}, /* 3 */
810 810 {"lwp_rwlock_unlock", 2, DEC, NOV, HID, HEX}, /* 4 */
811 811 };
812 812 #define NLWPRWLOCKCODE (sizeof (lwprwlocktable) / sizeof (struct systable))
813 813
814 814 static const struct systable sendfilevsystable[] = {
815 815 {"sendfilev", 5, DEC, NOV, DEC, DEC, HEX, DEC, HEX}, /* 0 */
816 816 {"sendfilev64", 5, DEC, NOV, DEC, DEC, HEX, DEC, HEX}, /* 1 */
817 817 };
818 818 #define NSENDFILESYSCODE \
819 819 (sizeof (sendfilevsystable) / sizeof (struct systable))
820 820
821 821 static const struct systable lgrpsystable[] = {
822 822 {"meminfo", 3, DEC, NOV, HID, NOV, MIF}, /* 0 */
823 823 {"_lgrpsys", 3, DEC, NOV, DEC, DEC, NOV}, /* 1 */
824 824 {"lgrp_version", 3, DEC, NOV, HID, DEC, NOV}, /* 2 */
825 825 {"_lgrpsys", 3, DEC, NOV, DEC, HEX, HEX}, /* 3 */
826 826 {"lgrp_affinity_get", 3, DEC, NOV, HID, NOV, LAF}, /* 4 */
827 827 {"lgrp_affinity_set", 3, DEC, NOV, HID, NOV, LAF}, /* 5 */
828 828 {"lgrp_latency", 3, DEC, NOV, HID, DEC, DEC}, /* 6 */
829 829 };
830 830 #define NLGRPSYSCODE (sizeof (lgrpsystable) / sizeof (struct systable))
831 831
832 832 static const struct systable rusagesystable[] = {
833 833 {"getrusage", 2, DEC, NOV, HID, HEX}, /* 0 */
834 834 {"getrusage_chld", 2, DEC, NOV, HID, HEX}, /* 1 */
835 835 {"getrusage_lwp", 2, DEC, NOV, HID, HEX}, /* 2 */
836 836 {"getvmusage", 5, DEC, NOV, HID, HEX, DEC, HEX, HEX}, /* 3 */
837 837 };
838 838 #define NRUSAGESYSCODE \
839 839 (sizeof (rusagesystable) / sizeof (struct systable))
840 840
841 841 static const struct systable ucredsystable[] = {
842 842 {"ucred_get", 3, DEC, NOV, HID, DEC, HEX},
843 843 {"getpeerucred", 3, DEC, NOV, HID, DEC, HEX},
844 844 };
845 845 #define NUCREDSYSCODE \
846 846 (sizeof (ucredsystable) / sizeof (struct systable))
847 847
848 848 const struct systable portfstable[] = {
849 849 {"port_create", 2, DEC, NOV, HID, DEC}, /* 0 */
850 850 {"port_associate", 6, DEC, NOV, HID, DEC, DEC, HEX, HEX, HEX}, /* 1 */
851 851 {"port_dissociate", 4, DEC, NOV, HID, DEC, DEC, HEX}, /* 2 */
852 852 {"port_send", 4, DEC, NOV, HID, DEC, HEX, HEX}, /* 3 */
853 853 {"port_sendn", 6, DEC, DEC, HID, HEX, HEX, DEC, HEX, HEX}, /* 4 */
854 854 {"port_get", 4, DEC, NOV, HID, DEC, HEX, HEX}, /* 5 */
855 855 {"port_getn", 6, DEC, DEC, HID, DEC, HEX, DEC, DEC, HEX}, /* 6 */
856 856 {"port_alert", 5, DEC, NOV, HID, DEC, HEX, HEX, HEX}, /* 7 */
857 857 {"port_dispatch", 6, DEC, NOV, HID, DEC, DEC, HEX, HEX, HEX}, /* 8 */
858 858 };
859 859 #define NPORTCODE (sizeof (portfstable) / sizeof (struct systable))
860 860
861 861 static const struct systable zonetable[] = {
862 862 {"zone_create", 2, DEC, NOV, HID, HEX}, /* 0 */
863 863 {"zone_destroy", 2, DEC, NOV, HID, DEC}, /* 1 */
864 864 {"zone_getattr", 5, DEC, NOV, HID, DEC, ZGA, HEX, DEC}, /* 2 */
865 865 {"zone_enter", 2, DEC, NOV, HID, DEC}, /* 3 */
866 866 {"zone_list", 3, DEC, NOV, HID, HEX, HEX}, /* 4 */
867 867 {"zone_shutdown", 2, DEC, NOV, HID, DEC}, /* 5 */
868 868 {"zone_lookup", 2, DEC, NOV, HID, STG}, /* 6 */
869 869 {"zone_boot", 2, DEC, NOV, HID, DEC}, /* 7 */
870 870 {"zone_version", 2, HEX, NOV, HID, DEC}, /* 8 */
871 871 {"zone_setattr", 5, DEC, NOV, HID, DEC, ZGA, HEX, DEC}, /* 9 */
872 872 {"zone_add_datalink", 3, DEC, NOV, HID, DEC, STG}, /* 10 */
873 873 {"zone_remove_datalink", 3, DEC, NOV, HID, DEC, STG}, /* 11 */
874 874 {"zone_check_datalink", 3, DEC, NOV, HID, HEX, STG}, /* 12 */
875 875 {"zone_list_datalink", 4, DEC, NOV, HID, DEC, HEX, HEX}, /* 13 */
876 876 };
877 877 #define NZONECODE (sizeof (zonetable) / sizeof (struct systable))
878 878
879 879 static const struct systable labeltable[] = {
880 880 {"labelsys", 3, DEC, NOV, HID, HEX, HEX}, /* 0 */
881 881 {"is_system_labeled", 1, DEC, NOV, HID}, /* 1 */
882 882 {"tnrh", 3, DEC, NOV, HID, TND, HEX}, /* 2 */
883 883 {"tnrhtp", 3, DEC, NOV, HID, TND, HEX}, /* 3 */
884 884 {"tnmlp", 3, DEC, NOV, HID, TND, HEX}, /* 4 */
885 885 {"getlabel", 3, DEC, NOV, HID, STG, HEX}, /* 5 */
886 886 {"fgetlabel", 3, DEC, NOV, HID, DEC, HEX}, /* 6 */
887 887 };
888 888 #define NLABELCODE (sizeof (labeltable) / sizeof (struct systable))
889 889
890 890 const struct systable forktable[] = {
891 891 /* parent codes */
892 892 {"forkx", 2, DEC, NOV, HID, FXF}, /* 0 */
893 893 {"forkallx", 2, DEC, NOV, HID, FXF}, /* 1 */
894 894 {"vforkx", 2, DEC, NOV, HID, FXF}, /* 2 */
895 895 /* child codes */
896 896 {"forkx", 0, DEC, NOV}, /* 3 */
897 897 {"forkallx", 0, DEC, NOV}, /* 4 */
898 898 {"vforkx", 0, DEC, NOV}, /* 5 */
899 899 };
900 900 #define NFORKCODE (sizeof (forktable) / sizeof (struct systable))
901 901
902 902 const struct systable sidsystable[] = {
903 903 {"allocids", 4, UNS, UNS, HID, DEC, DEC, DEC}, /* 0 */
904 904 {"idmap_reg", 2, DEC, NOV, HID, DEC}, /* 1 */
905 905 {"idmap_unreg", 2, DEC, NOV, HID, DEC}, /* 2 */
906 906 };
907 907 #define NSIDSYSCODE (sizeof (sidsystable) / sizeof (struct systable))
908 908
909 909 const struct systable utimesystable[] = {
910 910 {"futimens", 3, DEC, NOV, HID, DEC, HEX}, /* 0 */
911 911 {"utimensat", 5, DEC, NOV, HID, ATC, STG, HEX, SNF}, /* 1 */
912 912 };
913 913 #define NUTIMESYSCODE (sizeof (utimesystable) / sizeof (struct systable))
914 914
915 915 const struct systable sockconfigtable[] = {
916 916 {"sockconfig", 5, DEC, NOV, SKC, DEC, DEC, DEC, STG}, /* 0 */
917 917 {"sockconfig", 4, DEC, NOV, SKC, DEC, DEC, DEC}, /* 1 */
918 918 {"sockconfig", 3, DEC, NOV, SKC, STG, HEX }, /* 2 */
919 919 {"sockconfig", 2, DEC, NOV, SKC, STG }, /* 3 */
920 920 };
921 921 #define NSOCKCONFIGCODE (sizeof (sockconfigtable) / sizeof (struct systable))
922 922
923 923 const struct sysalias sysalias[] = {
924 924 { "exit", SYS_exit },
925 925 { "fork", SYS_forksys },
926 926 { "fork1", SYS_forksys },
927 927 { "forkall", SYS_forksys },
928 928 { "forkx", SYS_forksys },
929 929 { "forkallx", SYS_forksys },
930 930 { "vforkx", SYS_forksys },
931 931 { "sbrk", SYS_brk },
932 932 { "getppid", SYS_getpid },
933 933 { "geteuid", SYS_getuid },
934 934 { "getpgrp", SYS_pgrpsys },
935 935 { "setpgrp", SYS_pgrpsys },
936 936 { "getsid", SYS_pgrpsys },
937 937 { "setsid", SYS_pgrpsys },
938 938 { "getpgid", SYS_pgrpsys },
939 939 { "setpgid", SYS_pgrpsys },
940 940 { "getegid", SYS_getgid },
941 941 { "msgget", SYS_msgsys },
942 942 { "msgctl", SYS_msgsys },
943 943 { "msgctl64", SYS_msgsys },
944 944 { "msgrcv", SYS_msgsys },
945 945 { "msgsnd", SYS_msgsys },
946 946 { "msgids", SYS_msgsys },
947 947 { "msgsnap", SYS_msgsys },
948 948 { "msgop", SYS_msgsys },
949 949 { "shmat", SYS_shmsys },
950 950 { "shmctl", SYS_shmsys },
951 951 { "shmctl64", SYS_shmsys },
952 952 { "shmdt", SYS_shmsys },
953 953 { "shmget", SYS_shmsys },
954 954 { "shmids", SYS_shmsys },
955 955 { "shmop", SYS_shmsys },
956 956 { "semctl", SYS_semsys },
957 957 { "semctl64", SYS_semsys },
958 958 { "semget", SYS_semsys },
959 959 { "semids", SYS_semsys },
960 960 { "semop", SYS_semsys },
961 961 { "semtimedop", SYS_semsys },
962 962 { "uname", SYS_utssys },
963 963 { "ustat", SYS_utssys },
964 964 { "fusers", SYS_utssys },
965 965 { "exec", SYS_execve },
966 966 { "execl", SYS_execve },
967 967 { "execv", SYS_execve },
968 968 { "execle", SYS_execve },
969 969 { "execlp", SYS_execve },
970 970 { "execvp", SYS_execve },
971 971 { "sigfillset", SYS_sigpending },
972 972 { "getcontext", SYS_context },
973 973 { "setcontext", SYS_context },
974 974 { "getustack", SYS_context },
975 975 { "setustack", SYS_context },
976 976 { "hrtcntl", SYS_hrtsys },
977 977 { "hrtalarm", SYS_hrtsys },
978 978 { "hrtsleep", SYS_hrtsys },
979 979 { "hrtcancel", SYS_hrtsys },
980 980 { "aioread", SYS_kaio },
981 981 { "aiowrite", SYS_kaio },
982 982 { "aiowait", SYS_kaio },
983 983 { "aiocancel", SYS_kaio },
984 984 { "aionotify", SYS_kaio },
985 985 { "audit", SYS_auditsys },
986 986 { "door_create", SYS_door },
987 987 { "door_revoke", SYS_door },
988 988 { "door_info", SYS_door },
989 989 { "door_call", SYS_door },
990 990 { "door_return", SYS_door },
991 991 { "door_bind", SYS_door },
992 992 { "door_unbind", SYS_door },
993 993 { "door_unref", SYS_door },
994 994 { "door_ucred", SYS_door },
995 995 { "door_getparam", SYS_door },
996 996 { "door_setparam", SYS_door },
997 997 { "pset_create", SYS_pset },
998 998 { "pset_destroy", SYS_pset },
999 999 { "pset_assign", SYS_pset },
1000 1000 { "pset_info", SYS_pset },
1001 1001 { "pset_bind", SYS_pset },
1002 1002 { "pset_getloadavg", SYS_pset },
1003 1003 { "pset_list", SYS_pset },
1004 1004 { "pset_setattr", SYS_pset },
1005 1005 { "pset_getattr", SYS_pset },
1006 1006 { "pset_assign_forced", SYS_pset },
1007 1007 { "settaskid", SYS_tasksys },
1008 1008 { "gettaskid", SYS_tasksys },
1009 1009 { "getprojid", SYS_tasksys },
1010 1010 { "setppriv", SYS_privsys },
1011 1011 { "getppriv", SYS_privsys },
1012 1012 { "getprivimplinfo", SYS_privsys },
1013 1013 { "setpflags", SYS_privsys },
1014 1014 { "getpflags", SYS_privsys },
1015 1015 { "getacct", SYS_exacctsys },
1016 1016 { "putacct", SYS_exacctsys },
1017 1017 { "wracct", SYS_exacctsys },
1018 1018 { "lwp_cond_timedwait", SYS_lwp_cond_wait },
1019 1019 { "lwp_sema_wait", SYS_lwp_sema_timedwait },
1020 1020 { "lwp_park", SYS_lwp_park },
1021 1021 { "lwp_unpark", SYS_lwp_park },
1022 1022 { "lwp_unpark_all", SYS_lwp_park },
1023 1023 { "lwp_rwlock_rdlock", SYS_lwp_rwlock_sys },
1024 1024 { "lwp_rwlock_wrlock", SYS_lwp_rwlock_sys },
1025 1025 { "lwp_rwlock_tryrdlock", SYS_lwp_rwlock_sys },
1026 1026 { "lwp_rwlock_trywrlock", SYS_lwp_rwlock_sys },
1027 1027 { "lwp_rwlock_unlock", SYS_lwp_rwlock_sys },
1028 1028 { "lwp_mutex_lock", SYS_lwp_mutex_timedlock },
1029 1029 { "sendfilev64", SYS_sendfilev },
1030 1030 { "creat", SYS_open },
1031 1031 { "creat64", SYS_open64 },
1032 1032 { "openattrdirat", SYS_openat },
1033 1033 { "lgrpsys", SYS_lgrpsys },
1034 1034 { "getrusage", SYS_rusagesys },
1035 1035 { "getrusage_chld", SYS_rusagesys },
1036 1036 { "getrusage_lwp", SYS_rusagesys },
1037 1037 { "getvmusage", SYS_rusagesys },
1038 1038 { "getpeerucred", SYS_ucredsys },
1039 1039 { "ucred_get", SYS_ucredsys },
1040 1040 { "port_create", SYS_port },
1041 1041 { "port_associate", SYS_port },
1042 1042 { "port_dissociate", SYS_port },
1043 1043 { "port_send", SYS_port },
1044 1044 { "port_sendn", SYS_port },
1045 1045 { "port_get", SYS_port },
1046 1046 { "port_getn", SYS_port },
1047 1047 { "port_alert", SYS_port },
1048 1048 { "port_dispatch", SYS_port },
1049 1049 { "zone_create", SYS_zone },
1050 1050 { "zone_destroy", SYS_zone },
1051 1051 { "zone_getattr", SYS_zone },
1052 1052 { "zone_setattr", SYS_zone },
1053 1053 { "zone_enter", SYS_zone },
1054 1054 { "getzoneid", SYS_zone },
1055 1055 { "zone_list", SYS_zone },
1056 1056 { "zone_shutdown", SYS_zone },
1057 1057 { "zone_add_datalink", SYS_zone },
1058 1058 { "zone_remove_datalink", SYS_zone },
1059 1059 { "zone_check_datalink", SYS_zone },
1060 1060 { "zone_list_datalink", SYS_zone },
1061 1061 { "is_system_labeled", SYS_labelsys },
1062 1062 { "tnrh", SYS_labelsys },
1063 1063 { "tnrhtp", SYS_labelsys },
1064 1064 { "tnmlp", SYS_labelsys },
1065 1065 { "getlabel", SYS_labelsys },
1066 1066 { "fgetlabel", SYS_labelsys },
1067 1067 { "getrctl", SYS_rctlsys },
1068 1068 { "setrctl", SYS_rctlsys },
1069 1069 { "rctlsys_lst", SYS_rctlsys },
1070 1070 { "rctlsys_ctl", SYS_rctlsys },
1071 1071 { "allocids", SYS_sidsys },
1072 1072 { "futimens", SYS_utimesys },
1073 1073 { "utimensat", SYS_utimesys },
1074 1074 { "poll", SYS_pollsys },
1075 1075 { "umount", SYS_umount2 },
1076 1076 { "wait", SYS_waitid },
1077 1077 { NULL, 0 } /* end-of-list */
1078 1078 };
1079 1079
1080 1080 /*
1081 1081 * Return structure to interpret system call with sub-codes.
1082 1082 */
1083 1083 const struct systable *
1084 1084 subsys(int syscall, int subcode)
1085 1085 {
1086 1086 const struct systable *stp = NULL;
1087 1087
1088 1088 if (subcode != -1) {
1089 1089 switch (syscall) {
1090 1090 case SYS_faccessat:
1091 1091 if ((unsigned)subcode < NACCESSCODE)
1092 1092 stp = &faccessattable[subcode];
1093 1093 break;
1094 1094 case SYS_fchmodat:
1095 1095 if ((unsigned)subcode < NCHMODCODE)
1096 1096 stp = &fchmodattable[subcode];
1097 1097 break;
1098 1098 case SYS_fchownat:
1099 1099 if ((unsigned)subcode < NCHOWNCODE)
1100 1100 stp = &fchownattable[subcode];
1101 1101 break;
1102 1102 case SYS_mkdirat:
1103 1103 if ((unsigned)subcode < NMKDIRCODE)
1104 1104 stp = &mkdiratattable[subcode];
1105 1105 break;
1106 1106 case SYS_mknodat:
1107 1107 if ((unsigned)subcode < NMKMODCODE)
1108 1108 stp = &mknodatattable[subcode];
1109 1109 break;
1110 1110 case SYS_renameat:
1111 1111 if ((unsigned)subcode < NRENAMECODE)
1112 1112 stp = &renameattable[subcode];
1113 1113 break;
1114 1114 case SYS_linkat:
1115 1115 if ((unsigned)subcode < NLINKATCODE)
1116 1116 stp = &linkattable[subcode];
1117 1117 break;
1118 1118 case SYS_unlinkat:
1119 1119 if ((unsigned)subcode < NUNLINKCODE)
1120 1120 stp = &unlinkattable[subcode];
1121 1121 break;
1122 1122 case SYS_symlinkat:
1123 1123 if ((unsigned)subcode < NSYMLINKCODE)
1124 1124 stp = &symlinkattable[subcode];
1125 1125 break;
1126 1126 case SYS_readlinkat:
1127 1127 if ((unsigned)subcode < NREADLINKCODE)
1128 1128 stp = &readlinkattable[subcode];
1129 1129 break;
1130 1130 case SYS_fstatat:
1131 1131 if ((unsigned)subcode < NSTATCODE)
1132 1132 stp = &fstatattable[subcode];
1133 1133 break;
1134 1134 case SYS_fstatat64:
1135 1135 if ((unsigned)subcode < NSTAT64CODE)
1136 1136 stp = &fstatat64table[subcode];
1137 1137 break;
1138 1138 case SYS_openat:
1139 1139 if ((unsigned)subcode < NOPENATCODE)
1140 1140 stp = &openattable[subcode];
1141 1141 break;
1142 1142 case SYS_openat64:
1143 1143 if ((unsigned)subcode < NOPENAT64CODE)
1144 1144 stp = &openat64table[subcode];
1145 1145 break;
1146 1146 case SYS_open:
1147 1147 if ((unsigned)subcode < NOPENCODE)
1148 1148 stp = &opentable[subcode];
1149 1149 break;
1150 1150 case SYS_open64:
1151 1151 if ((unsigned)subcode < NOPEN64CODE)
1152 1152 stp = &open64table[subcode];
1153 1153 break;
1154 1154 case SYS_msgsys: /* msgsys() */
1155 1155 if ((unsigned)subcode < NMSGCODE)
1156 1156 stp = &msgtable[subcode];
1157 1157 break;
1158 1158 case SYS_semsys: /* semsys() */
1159 1159 if ((unsigned)subcode < NSEMCODE)
1160 1160 stp = &semtable[subcode];
1161 1161 break;
1162 1162 case SYS_shmsys: /* shmsys() */
1163 1163 if ((unsigned)subcode < NSHMCODE)
1164 1164 stp = &shmtable[subcode];
1165 1165 break;
1166 1166 case SYS_pgrpsys: /* pgrpsys() */
1167 1167 if ((unsigned)subcode < NPIDCODE)
1168 1168 stp = &pidtable[subcode];
1169 1169 break;
1170 1170 case SYS_utssys: /* utssys() */
1171 1171 if ((unsigned)subcode < NUTSCODE)
1172 1172 stp = &utstable[subcode];
1173 1173 break;
1174 1174 case SYS_sysfs: /* sysfs() */
1175 1175 if ((unsigned)subcode < NSFSCODE)
1176 1176 stp = &sfstable[subcode];
1177 1177 break;
1178 1178 case SYS_sigpending: /* sigpending()/sigfillset() */
1179 1179 if ((unsigned)subcode < NSGPCODE)
1180 1180 stp = &sgptable[subcode];
1181 1181 break;
1182 1182 case SYS_context: /* [get|set]context() */
1183 1183 if ((unsigned)subcode < NCTXCODE)
1184 1184 stp = &ctxtable[subcode];
1185 1185 break;
1186 1186 case SYS_hrtsys: /* hrtsys() */
1187 1187 if ((unsigned)subcode < NHRTCODE)
1188 1188 stp = &hrttable[subcode];
1189 1189 break;
1190 1190 case SYS_corectl: /* corectl() */
1191 1191 if ((unsigned)subcode < NCORCODE)
1192 1192 stp = &cortable[subcode];
1193 1193 break;
1194 1194 case SYS_kaio: /* kaio() */
1195 1195 if ((unsigned)subcode < NAIOCODE)
1196 1196 stp = &aiotable[subcode];
1197 1197 break;
1198 1198 case SYS_door: /* doors */
1199 1199 if ((unsigned)subcode < NDOORCODE)
1200 1200 stp = &doortable[subcode];
1201 1201 break;
1202 1202 case SYS_pset: /* pset() */
1203 1203 if ((unsigned)subcode < NPSETCODE)
1204 1204 stp = &psettable[subcode];
1205 1205 break;
1206 1206 case SYS_lwp_create: /* lwp_create() */
1207 1207 if ((unsigned)subcode < NLWPCREATECODE)
1208 1208 stp = &lwpcreatetable[subcode];
1209 1209 break;
1210 1210 case SYS_tasksys: /* tasks */
1211 1211 if ((unsigned)subcode < NTASKSYSCODE)
1212 1212 stp = &tasksystable[subcode];
1213 1213 break;
1214 1214 case SYS_exacctsys: /* exacct */
1215 1215 if ((unsigned)subcode < NEXACCTSYSCODE)
1216 1216 stp = &exacctsystable[subcode];
1217 1217 break;
1218 1218 case SYS_privsys: /* privileges */
1219 1219 if ((unsigned)subcode < NPRIVSYSCODE)
1220 1220 stp = &privsystable[subcode];
1221 1221 break;
1222 1222 case SYS_lwp_park: /* lwp_park */
1223 1223 if ((unsigned)subcode < NLWPPARKCODE)
1224 1224 stp = &lwpparktable[subcode];
1225 1225 break;
1226 1226 case SYS_lwp_rwlock_sys:
1227 1227 if ((unsigned)subcode < NLWPRWLOCKCODE)
1228 1228 stp = &lwprwlocktable[subcode];
1229 1229 break;
1230 1230 case SYS_sendfilev: /* sendfilev */
1231 1231 if ((unsigned)subcode < NSENDFILESYSCODE)
1232 1232 stp = &sendfilevsystable[subcode];
1233 1233 break;
1234 1234 case SYS_lgrpsys: /* lgrpsys */
1235 1235 if ((unsigned)subcode < NLGRPSYSCODE)
1236 1236 stp = &lgrpsystable[subcode];
1237 1237 break;
1238 1238 case SYS_rusagesys: /* rusagesys */
1239 1239 if ((unsigned)subcode < NRUSAGESYSCODE)
1240 1240 stp = &rusagesystable[subcode];
1241 1241 break;
1242 1242 case SYS_fcntl: /* fcntl */
1243 1243 if ((unsigned)subcode < NFCNTLCODE)
1244 1244 stp = &fcntltable[subcode];
1245 1245 break;
1246 1246 case SYS_ucredsys:
1247 1247 if ((unsigned)subcode < NUCREDSYSCODE)
1248 1248 stp = &ucredsystable[subcode];
1249 1249 break;
1250 1250 case SYS_port: /* portfs */
1251 1251 if ((unsigned)subcode < NPORTCODE)
1252 1252 stp = &portfstable[subcode];
1253 1253 break;
1254 1254 case SYS_zone: /* zone family */
1255 1255 if ((unsigned)subcode < NZONECODE)
1256 1256 stp = &zonetable[subcode];
1257 1257 break;
1258 1258 case SYS_labelsys: /* label family */
1259 1259 if ((unsigned)subcode < NLABELCODE)
1260 1260 stp = &labeltable[subcode];
1261 1261 break;
1262 1262 case SYS_rctlsys: /* rctl family */
1263 1263 if ((unsigned)subcode < NRCTLCODE)
1264 1264 stp = &rctltable[subcode];
1265 1265 break;
1266 1266 case SYS_forksys: /* fork family */
1267 1267 if ((unsigned)subcode < NFORKCODE)
1268 1268 stp = &forktable[subcode];
1269 1269 break;
1270 1270 case SYS_sidsys: /* SID family */
1271 1271 if ((unsigned)subcode < NSIDSYSCODE)
1272 1272 stp = &sidsystable[subcode];
1273 1273 break;
1274 1274 case SYS_utimesys: /* utime family */
1275 1275 if ((unsigned)subcode < NUTIMESYSCODE)
1276 1276 stp = &utimesystable[subcode];
1277 1277 break;
1278 1278 case SYS_sockconfig: /* sockconfig family */
1279 1279 if ((unsigned)subcode < NSOCKCONFIGCODE)
1280 1280 stp = &sockconfigtable[subcode];
1281 1281 break;
1282 1282 }
1283 1283 }
1284 1284
1285 1285 if (stp == NULL)
1286 1286 stp = &systable[((unsigned)syscall < SYSEND)? syscall : 0];
1287 1287
1288 1288 return (stp);
1289 1289 }
1290 1290
1291 1291 /*
1292 1292 * Return the name of the system call.
1293 1293 */
1294 1294 const char *
1295 1295 sysname(private_t *pri, int syscall, int subcode)
1296 1296 {
1297 1297 const struct systable *stp = subsys(syscall, subcode);
1298 1298 const char *name = stp->name; /* may be NULL */
1299 1299
1300 1300 if (name == NULL) { /* manufacture a name */
1301 1301 (void) sprintf(pri->sys_name, "sys#%d", syscall);
1302 1302 name = pri->sys_name;
1303 1303 }
1304 1304
1305 1305 return (name);
1306 1306 }
1307 1307
1308 1308 /*
1309 1309 * Return the name of the signal.
1310 1310 * Return NULL if unknown signal.
1311 1311 */
1312 1312 const char *
1313 1313 rawsigname(private_t *pri, int sig)
1314 1314 {
1315 1315 /*
1316 1316 * The C library function sig2str() omits the leading "SIG".
1317 1317 */
1318 1318 (void) strcpy(pri->raw_sig_name, "SIG");
1319 1319
1320 1320 if (sig > 0 && sig2str(sig, pri->raw_sig_name+3) == 0)
1321 1321 return (pri->raw_sig_name);
1322 1322 return (NULL);
1323 1323 }
1324 1324
1325 1325 /*
1326 1326 * Return the name of the signal.
1327 1327 * Manufacture a name for unknown signal.
1328 1328 */
1329 1329 const char *
1330 1330 signame(private_t *pri, int sig)
1331 1331 {
1332 1332 const char *name = rawsigname(pri, sig);
1333 1333
1334 1334 if (name == NULL) { /* manufacture a name */
1335 1335 (void) sprintf(pri->sig_name, "SIG#%d", sig);
1336 1336 name = pri->sig_name;
1337 1337 }
1338 1338
1339 1339 return (name);
1340 1340 }
1341 1341
1342 1342 /*
1343 1343 * Determine the subcode for this syscall, if any.
1344 1344 */
1345 1345 int
1346 1346 getsubcode(private_t *pri)
1347 1347 {
1348 1348 const lwpstatus_t *Lsp = pri->lwpstat;
1349 1349 int syscall = Lsp->pr_syscall;
1350 1350 int nsysarg = Lsp->pr_nsysarg;
1351 1351 int subcode = -1;
1352 1352 int arg0;
1353 1353
1354 1354 if (syscall > 0 && nsysarg > 0 && !prismember(&rawout, syscall)) {
1355 1355 arg0 = Lsp->pr_sysarg[0];
1356 1356 switch (syscall) {
1357 1357 case SYS_utssys: /* utssys() */
1358 1358 if (nsysarg > 2)
1359 1359 subcode = Lsp->pr_sysarg[2];
1360 1360 break;
1361 1361 case SYS_faccessat:
1362 1362 if (nsysarg > 3)
1363 1363 subcode = ((int)Lsp->pr_sysarg[0] == AT_FDCWD &&
1364 1364 Lsp->pr_sysarg[3] == 0)? 1 : 0;
1365 1365 break;
1366 1366 case SYS_fchmodat:
1367 1367 if (nsysarg > 1 && Lsp->pr_sysarg[1] == NULL) {
1368 1368 subcode = 3;
1369 1369 break;
1370 1370 }
1371 1371 if (nsysarg > 0 && (int)Lsp->pr_sysarg[0] != AT_FDCWD) {
1372 1372 subcode = 0;
1373 1373 break;
1374 1374 }
1375 1375 if (nsysarg > 3)
1376 1376 subcode = (Lsp->pr_sysarg[3] == 0)? 1 :
1377 1377 (Lsp->pr_sysarg[3] == AT_SYMLINK_NOFOLLOW)?
1378 1378 2 : 0;
1379 1379 break;
1380 1380 case SYS_fchownat:
1381 1381 if (nsysarg > 1 && Lsp->pr_sysarg[1] == NULL) {
1382 1382 subcode = 3;
1383 1383 break;
1384 1384 }
1385 1385 if (nsysarg > 0 && (int)Lsp->pr_sysarg[0] != AT_FDCWD) {
1386 1386 subcode = 0;
1387 1387 break;
1388 1388 }
1389 1389 if (nsysarg > 4)
1390 1390 subcode = (Lsp->pr_sysarg[4] == 0)? 1 :
1391 1391 (Lsp->pr_sysarg[4] == AT_SYMLINK_NOFOLLOW)?
1392 1392 2 : 0;
1393 1393 break;
1394 1394 case SYS_mkdirat:
1395 1395 case SYS_mknodat:
1396 1396 case SYS_readlinkat:
1397 1397 if (nsysarg > 0)
1398 1398 subcode = ((int)Lsp->pr_sysarg[0] == AT_FDCWD)?
1399 1399 1 : 0;
1400 1400 break;
1401 1401 case SYS_renameat:
1402 1402 if (nsysarg > 2)
1403 1403 subcode = ((int)Lsp->pr_sysarg[0] == AT_FDCWD &&
1404 1404 (int)Lsp->pr_sysarg[2] == AT_FDCWD)? 1 : 0;
1405 1405 break;
1406 1406 case SYS_linkat:
1407 1407 if (nsysarg > 4)
1408 1408 subcode = ((int)Lsp->pr_sysarg[0] == AT_FDCWD &&
1409 1409 (int)Lsp->pr_sysarg[2] == AT_FDCWD &&
1410 1410 Lsp->pr_sysarg[4] == 0)? 1 : 0;
1411 1411 break;
1412 1412 case SYS_unlinkat:
1413 1413 if (nsysarg > 2)
1414 1414 subcode =
1415 1415 ((int)Lsp->pr_sysarg[0] != AT_FDCWD)? 0 :
1416 1416 (Lsp->pr_sysarg[2] == AT_REMOVEDIR)? 2 :
1417 1417 (Lsp->pr_sysarg[2] == 0)? 1 : 0;
1418 1418 break;
1419 1419 case SYS_symlinkat:
1420 1420 if (nsysarg > 1)
1421 1421 subcode = ((int)Lsp->pr_sysarg[1] == AT_FDCWD)?
1422 1422 1 : 0;
1423 1423 break;
1424 1424 case SYS_fstatat:
1425 1425 case SYS_fstatat64:
1426 1426 if (nsysarg > 1 && Lsp->pr_sysarg[1] == NULL) {
1427 1427 subcode = 3;
1428 1428 break;
1429 1429 }
1430 1430 if (nsysarg > 0 && (int)Lsp->pr_sysarg[0] != AT_FDCWD) {
1431 1431 subcode = 0;
1432 1432 break;
1433 1433 }
1434 1434 if (nsysarg > 3)
1435 1435 subcode = (Lsp->pr_sysarg[3] == 0)? 1 :
1436 1436 (Lsp->pr_sysarg[3] == AT_SYMLINK_NOFOLLOW)?
1437 1437 2 : 0;
1438 1438 break;
1439 1439 case SYS_openat: /* openat() w/ and w/o AT_FDCWD */
1440 1440 case SYS_openat64: /* and with and w/o O_CREAT */
1441 1441 if (nsysarg > 2)
1442 1442 subcode = ((int)Lsp->pr_sysarg[0] == AT_FDCWD)?
1443 1443 ((Lsp->pr_sysarg[2] & O_CREAT)? 3 : 2) :
1444 1444 ((Lsp->pr_sysarg[2] & O_CREAT)? 1 : 0);
1445 1445 break;
1446 1446 case SYS_open: /* open() w/ and w/o O_CREAT */
1447 1447 case SYS_open64:
1448 1448 if (nsysarg > 1)
1449 1449 subcode = (Lsp->pr_sysarg[1] & O_CREAT)? 1 : 0;
1450 1450 break;
1451 1451 case SYS_kaio: /* kaio() */
1452 1452 subcode = arg0 & ~AIO_POLL_BIT;
1453 1453 break;
1454 1454 case SYS_door: /* doors */
1455 1455 if (nsysarg > 5)
1456 1456 subcode = Lsp->pr_sysarg[5];
1457 1457 break;
1458 1458 case SYS_lwp_create: /* lwp_create() */
1459 1459 subcode = /* 0 for parent, 1 for child */
1460 1460 (Lsp->pr_why == PR_SYSEXIT && Lsp->pr_errno == 0 &&
1461 1461 Lsp->pr_rval1 == 0);
1462 1462 break;
1463 1463 case SYS_forksys: /* forksys */
1464 1464 subcode = arg0;
1465 1465 if (Lsp->pr_why == PR_SYSEXIT && Lsp->pr_errno == 0 &&
1466 1466 pri->Rval2 != 0) /* this is the child */
1467 1467 subcode += 3;
1468 1468 break;
1469 1469 case SYS_msgsys: /* msgsys() */
1470 1470 case SYS_semsys: /* semsys() */
1471 1471 case SYS_shmsys: /* shmsys() */
1472 1472 case SYS_pgrpsys: /* pgrpsys() */
1473 1473 case SYS_sysfs: /* sysfs() */
1474 1474 case SYS_sigpending: /* sigpending()/sigfillset() */
1475 1475 case SYS_context: /* [get|set]context() */
1476 1476 case SYS_hrtsys: /* hrtsys() */
1477 1477 case SYS_corectl: /* corectl() */
1478 1478 case SYS_pset: /* pset() */
1479 1479 case SYS_tasksys: /* tasks */
1480 1480 case SYS_privsys: /* privileges */
1481 1481 case SYS_exacctsys: /* exacct */
1482 1482 case SYS_lwp_park: /* lwp_park */
1483 1483 case SYS_lwp_rwlock_sys: /* lwp_rwlock_*() */
1484 1484 case SYS_sendfilev: /* sendfilev */
1485 1485 case SYS_lgrpsys: /* lgrpsys */
1486 1486 case SYS_rusagesys: /* rusagesys */
1487 1487 case SYS_ucredsys: /* ucredsys */
1488 1488 case SYS_zone: /* zone */
1489 1489 case SYS_labelsys: /* labelsys */
1490 1490 case SYS_rctlsys: /* rctlsys */
1491 1491 case SYS_sidsys: /* sidsys */
1492 1492 case SYS_utimesys: /* utimesys */
1493 1493 case SYS_sockconfig: /* sockconfig */
1494 1494 subcode = arg0;
1495 1495 break;
1496 1496 case SYS_fcntl: /* fcntl() */
1497 1497 if (nsysarg > 2) {
1498 1498 switch (Lsp->pr_sysarg[1]) {
1499 1499 default: subcode = 0; break;
1500 1500 case F_GETFL:
1501 1501 case F_GETOWN:
1502 1502 case F_GETXFL: subcode = 1; break;
1503 1503 case F_SETFL: subcode = 2; break;
1504 1504 }
1505 1505 }
1506 1506 break;
1507 1507 case SYS_port: /* portfs */
1508 1508 subcode = arg0 & PORT_CODE_MASK;
1509 1509 break;
1510 1510 }
1511 1511 }
1512 1512
1513 1513 return (subcode);
1514 1514 }
1515 1515
1516 1516 /*
1517 1517 * Return the maximum number of system calls, counting
1518 1518 * all system calls with subcodes as separate calls.
1519 1519 */
1520 1520 int
1521 1521 maxsyscalls()
1522 1522 {
1523 1523 return (PRMAXSYS + 1
1524 1524 + NACCESSCODE - 1
1525 1525 + NCHMODCODE - 1
1526 1526 + NCHOWNCODE - 1
1527 1527 + NMKDIRCODE - 1
1528 1528 + NMKMODCODE - 1
1529 1529 + NRENAMECODE - 1
1530 1530 + NLINKATCODE - 1
1531 1531 + NUNLINKCODE - 1
1532 1532 + NSYMLINKCODE - 1
1533 1533 + NREADLINKCODE - 1
1534 1534 + NSTATCODE - 1
1535 1535 + NSTAT64CODE - 1
1536 1536 + NOPENATCODE - 1
1537 1537 + NOPENAT64CODE - 1
1538 1538 + NOPENCODE - 1
1539 1539 + NOPEN64CODE - 1
1540 1540 + NMSGCODE - 1
1541 1541 + NSEMCODE - 1
1542 1542 + NSHMCODE - 1
1543 1543 + NPIDCODE - 1
1544 1544 + NSFSCODE - 1
1545 1545 + NUTSCODE - 1
1546 1546 + NSGPCODE - 1
1547 1547 + NCTXCODE - 1
1548 1548 + NHRTCODE - 1
1549 1549 + NCORCODE - 1
1550 1550 + NAIOCODE - 1
1551 1551 + NDOORCODE - 1
1552 1552 + NPSETCODE - 1
1553 1553 + NLWPCREATECODE - 1
1554 1554 + NTASKSYSCODE - 1
1555 1555 + NEXACCTSYSCODE - 1
1556 1556 + NLWPPARKCODE - 1
1557 1557 + NLWPRWLOCKCODE - 1
1558 1558 + NSENDFILESYSCODE - 1
1559 1559 + NLGRPSYSCODE - 1
1560 1560 + NRUSAGESYSCODE - 1
1561 1561 + NFCNTLCODE - 1
1562 1562 + NPRIVSYSCODE - 1
1563 1563 + NUCREDSYSCODE - 1
1564 1564 + NPORTCODE - 1
1565 1565 + NZONECODE - 1
1566 1566 + NLABELCODE - 1
1567 1567 + NRCTLCODE - 1
1568 1568 + NFORKCODE - 1
1569 1569 + NSIDSYSCODE - 1
1570 1570 + NUTIMESYSCODE - 1
1571 1571 + NSOCKCONFIGCODE - 1);
1572 1572 }
1573 1573
1574 1574 /*
1575 1575 * Return the number of subcodes for the specified system call number.
1576 1576 */
1577 1577 int
1578 1578 nsubcodes(int syscall)
1579 1579 {
1580 1580 switch (syscall) {
1581 1581 case SYS_faccessat:
1582 1582 return (NACCESSCODE);
1583 1583 case SYS_fchmodat:
1584 1584 return (NCHMODCODE);
1585 1585 case SYS_fchownat:
1586 1586 return (NCHOWNCODE);
1587 1587 case SYS_mkdirat:
1588 1588 return (NMKDIRCODE);
1589 1589 case SYS_mknodat:
1590 1590 return (NMKMODCODE);
1591 1591 case SYS_renameat:
1592 1592 return (NRENAMECODE);
1593 1593 case SYS_linkat:
1594 1594 return (NLINKATCODE);
1595 1595 case SYS_unlinkat:
1596 1596 return (NUNLINKCODE);
1597 1597 case SYS_symlinkat:
1598 1598 return (NSYMLINKCODE);
1599 1599 case SYS_readlinkat:
1600 1600 return (NREADLINKCODE);
1601 1601 case SYS_fstatat:
1602 1602 return (NSTATCODE);
1603 1603 case SYS_fstatat64:
1604 1604 return (NSTAT64CODE);
1605 1605 case SYS_openat:
1606 1606 return (NOPENATCODE);
1607 1607 case SYS_openat64:
1608 1608 return (NOPENAT64CODE);
1609 1609 case SYS_open:
1610 1610 return (NOPENCODE);
1611 1611 case SYS_open64:
1612 1612 return (NOPEN64CODE);
1613 1613 case SYS_msgsys:
1614 1614 return (NMSGCODE);
1615 1615 case SYS_semsys:
1616 1616 return (NSEMCODE);
1617 1617 case SYS_shmsys:
1618 1618 return (NSHMCODE);
1619 1619 case SYS_pgrpsys:
1620 1620 return (NPIDCODE);
1621 1621 case SYS_utssys:
1622 1622 return (NUTSCODE);
1623 1623 case SYS_sysfs:
1624 1624 return (NSFSCODE);
1625 1625 case SYS_sigpending:
1626 1626 return (NSGPCODE);
1627 1627 case SYS_context:
1628 1628 return (NCTXCODE);
1629 1629 case SYS_hrtsys:
1630 1630 return (NHRTCODE);
1631 1631 case SYS_corectl:
1632 1632 return (NCORCODE);
1633 1633 case SYS_kaio:
1634 1634 return (NAIOCODE);
1635 1635 case SYS_door:
1636 1636 return (NDOORCODE);
1637 1637 case SYS_pset:
1638 1638 return (NPSETCODE);
1639 1639 case SYS_lwp_create:
1640 1640 return (NLWPCREATECODE);
1641 1641 case SYS_tasksys:
1642 1642 return (NTASKSYSCODE);
1643 1643 case SYS_exacctsys:
1644 1644 return (NEXACCTSYSCODE);
1645 1645 case SYS_privsys:
1646 1646 return (NPRIVSYSCODE);
1647 1647 case SYS_lwp_park:
1648 1648 return (NLWPPARKCODE);
1649 1649 case SYS_lwp_rwlock_sys:
1650 1650 return (NLWPRWLOCKCODE);
1651 1651 case SYS_sendfilev:
1652 1652 return (NSENDFILESYSCODE);
1653 1653 case SYS_lgrpsys:
1654 1654 return (NLGRPSYSCODE);
1655 1655 case SYS_rusagesys:
1656 1656 return (NRUSAGESYSCODE);
1657 1657 case SYS_fcntl:
1658 1658 return (NFCNTLCODE);
1659 1659 case SYS_ucredsys:
1660 1660 return (NUCREDSYSCODE);
1661 1661 case SYS_port:
1662 1662 return (NPORTCODE);
1663 1663 case SYS_zone:
1664 1664 return (NZONECODE);
1665 1665 case SYS_labelsys:
1666 1666 return (NLABELCODE);
1667 1667 case SYS_rctlsys:
1668 1668 return (NRCTLCODE);
1669 1669 case SYS_forksys:
1670 1670 return (NFORKCODE);
1671 1671 case SYS_sidsys:
1672 1672 return (NSIDSYSCODE);
1673 1673 case SYS_utimesys:
1674 1674 return (NUTIMESYSCODE);
1675 1675 case SYS_sockconfig:
1676 1676 return (NSOCKCONFIGCODE);
1677 1677 default:
1678 1678 return (1);
1679 1679 }
1680 1680 }
1681 1681
1682 1682
1683 1683
1684 1684 /* Socket address families (and protocol families) */
1685 1685 const char * const afcodes[] = {
1686 1686 "UNSPEC", /* 0 */
1687 1687 "UNIX", /* 1 */
1688 1688 "INET", /* 2 */
1689 1689 "IMPLINK", /* 3 */
1690 1690 "PUP", /* 4 */
1691 1691 "CHAOS", /* 5 */
1692 1692 "NS", /* 6 */
1693 1693 "NBS", /* 7 */
1694 1694 "ECMA", /* 8 */
1695 1695 "DATAKIT", /* 9 */
1696 1696 "CCITT", /* 10 */
1697 1697 "SNA", /* 11 */
1698 1698 "DECnet", /* 12 */
1699 1699 "DLI", /* 13 */
1700 1700 "LAT", /* 14 */
1701 1701 "HYLINK", /* 15 */
1702 1702 "APPLETALK", /* 16 */
1703 1703 "NIT", /* 17 */
1704 1704 "802", /* 18 */
1705 1705 "OSI", /* 19 */
1706 1706 "X25", /* 20 */
1707 1707 "OSINET", /* 21 */
1708 1708 "GOSIP", /* 22 */
1709 1709 "IPX", /* 23 */
1710 1710 "ROUTE", /* 24 */
1711 1711 "LINK", /* 25 */
1712 1712 "INET6", /* 26 */
1713 1713 "KEY", /* 27 */
1714 1714 "NCA", /* 28 */
1715 1715 "POLICY", /* 29 */
1716 1716 "RDS", /* 30 */
1717 1717 "TRILL", /* 31 */
1718 1718 "PACKET" /* 32 */
1719 1719 };
1720 1720 #if MAX_AFCODES != 33
1721 1721 #error Need to update address-family table
1722 1722 #endif
1723 1723
1724 1724
1725 1725 const char * const socktype_codes[] = { /* cf socket.h */
1726 1726 NULL,
1727 1727 "SOCK_DGRAM", /* 1 */
1728 1728 "SOCK_STREAM", /* 2 */
1729 1729 NULL,
1730 1730 "SOCK_RAW", /* 4 */
1731 1731 "SOCK_RDM", /* 5 */
1732 1732 "SOCK_SEQPACKET" /* 6 */
1733 1733 };
1734 1734 #if MAX_SOCKTYPES != 7
1735 1735 #error Need to update socket-type table
1736 1736 #endif
↓ open down ↓ |
1270 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX