1
2
3
4
5
6
7
8
9
10 #ifdef syscallarg
11 #undef syscallarg
12 #endif
13
14 #define syscallarg(x) \
15 union { \
16 register_t pad; \
17 struct { x datum; } le; \
18 struct { \
19 int8_t pad[ (sizeof (register_t) < sizeof (x)) \
20 ? 0 \
21 : sizeof (register_t) - sizeof (x)]; \
22 x datum; \
23 } be; \
24 }
25
26 struct svr4_sys_open_args {
27 syscallarg(char *) path;
28 syscallarg(int) flags;
29 syscallarg(int) mode;
30 };
31
32 struct svr4_sys_wait_args {
33 syscallarg(int *) status;
34 };
35
36 struct svr4_sys_creat_args {
37 syscallarg(char *) path;
38 syscallarg(int) mode;
39 };
40
41 struct svr4_sys_execv_args {
42 syscallarg(char *) path;
43 syscallarg(char **) argp;
44 };
45
46 struct svr4_sys_time_args {
47 syscallarg(svr4_time_t *) t;
48 };
49
50 struct svr4_sys_mknod_args {
51 syscallarg(char *) path;
52 syscallarg(int) mode;
53 syscallarg(int) dev;
54 };
55
56 struct svr4_sys_break_args {
57 syscallarg(caddr_t) nsize;
58 };
59
60 struct svr4_sys_stat_args {
61 syscallarg(char *) path;
62 syscallarg(struct svr4_stat *) ub;
63 };
64
65 struct svr4_sys_alarm_args {
66 syscallarg(unsigned) sec;
67 };
68
69 struct svr4_sys_fstat_args {
70 syscallarg(int) fd;
71 syscallarg(struct svr4_stat *) sb;
72 };
73
74 struct svr4_sys_utime_args {
75 syscallarg(char *) path;
76 syscallarg(struct svr4_utimbuf *) ubuf;
77 };
78
79 struct svr4_sys_access_args {
80 syscallarg(char *) path;
81 syscallarg(int) flags;
82 };
83
84 struct svr4_sys_nice_args {
85 syscallarg(int) prio;
86 };
87
88 struct svr4_sys_kill_args {
89 syscallarg(int) pid;
90 syscallarg(int) signum;
91 };
92
93 struct svr4_sys_pgrpsys_args {
94 syscallarg(int) cmd;
95 syscallarg(int) pid;
96 syscallarg(int) pgid;
97 };
98
99 struct svr4_sys_times_args {
100 syscallarg(struct tms *) tp;
101 };
102
103 struct svr4_sys_signal_args {
104 syscallarg(int) signum;
105 syscallarg(svr4_sig_t) handler;
106 };
107
108 struct svr4_sys_msgsys_args {
109 syscallarg(int) what;
110 syscallarg(int) a2;
111 syscallarg(int) a3;
112 syscallarg(int) a4;
113 syscallarg(int) a5;
114 };
115
116 struct svr4_sys_sysarch_args {
117 syscallarg(int) op;
118 syscallarg(void *) a1;
119 };
120
121 struct svr4_sys_shmsys_args {
122 syscallarg(int) what;
123 syscallarg(int) a2;
124 syscallarg(int) a3;
125 syscallarg(int) a4;
126 };
127
128 struct svr4_sys_semsys_args {
129 syscallarg(int) what;
130 syscallarg(int) a2;
131 syscallarg(int) a3;
132 syscallarg(int) a4;
133 syscallarg(int) a5;
134 };
135
136 struct svr4_sys_ioctl_args {
137 syscallarg(int) fd;
138 syscallarg(u_long) com;
139 syscallarg(caddr_t) data;
140 };
141
142 struct svr4_sys_utssys_args {
143 syscallarg(void *) a1;
144 syscallarg(void *) a2;
145 syscallarg(int) sel;
146 syscallarg(void *) a3;
147 };
148
149 struct svr4_sys_execve_args {
150 syscallarg(char *) path;
151 syscallarg(char **) argp;
152 syscallarg(char **) envp;
153 };
154
155 struct svr4_sys_fcntl_args {
156 syscallarg(int) fd;
157 syscallarg(int) cmd;
158 syscallarg(char *) arg;
159 };
160
161 struct svr4_sys_ulimit_args {
162 syscallarg(int) cmd;
163 syscallarg(long) newlimit;
164 };
165
166 struct svr4_sys_getdents_args {
167 syscallarg(int) fd;
168 syscallarg(char *) buf;
169 syscallarg(int) nbytes;
170 };
171
172 struct svr4_sys_getmsg_args {
173 syscallarg(int) fd;
174 syscallarg(struct svr4_strbuf *) ctl;
175 syscallarg(struct svr4_strbuf *) dat;
176 syscallarg(int *) flags;
177 };
178
179 struct svr4_sys_putmsg_args {
180 syscallarg(int) fd;
181 syscallarg(struct svr4_strbuf *) ctl;
182 syscallarg(struct svr4_strbuf *) dat;
183 syscallarg(int) flags;
184 };
185
186 struct svr4_sys_lstat_args {
187 syscallarg(char *) path;
188 syscallarg(struct svr4_stat *) ub;
189 };
190
191 struct svr4_sys_sigprocmask_args {
192 syscallarg(int) how;
193 syscallarg(svr4_sigset_t *) set;
194 syscallarg(svr4_sigset_t *) oset;
195 };
196
197 struct svr4_sys_sigsuspend_args {
198 syscallarg(svr4_sigset_t *) ss;
199 };
200
201 struct svr4_sys_sigaltstack_args {
202 syscallarg(struct svr4_sigaltstack *) nss;
203 syscallarg(struct svr4_sigaltstack *) oss;
204 };
205
206 struct svr4_sys_sigaction_args {
207 syscallarg(int) signum;
208 syscallarg(struct svr4_sigaction *) nsa;
209 syscallarg(struct svr4_sigaction *) osa;
210 };
211
212 struct svr4_sys_sigpending_args {
213 syscallarg(int) what;
214 syscallarg(svr4_sigset_t *) mask;
215 };
216
217 struct svr4_sys_context_args {
218 syscallarg(int) func;
219 syscallarg(struct svr4_ucontext *) uc;
220 };
221
222 struct svr4_sys_statvfs_args {
223 syscallarg(char *) path;
224 syscallarg(struct svr4_statvfs *) fs;
225 };
226
227 struct svr4_sys_fstatvfs_args {
228 syscallarg(int) fd;
229 syscallarg(struct svr4_statvfs *) fs;
230 };
231
232 struct svr4_sys_waitsys_args {
233 syscallarg(int) grp;
234 syscallarg(int) id;
235 syscallarg(union svr4_siginfo *) info;
236 syscallarg(int) options;
237 };
238
239 struct svr4_sys_hrtsys_args {
240 syscallarg(int) cmd;
241 syscallarg(int) fun;
242 syscallarg(int) sub;
243 syscallarg(void *) rv1;
244 syscallarg(void *) rv2;
245 };
246
247 struct svr4_sys_pathconf_args {
248 syscallarg(char *) path;
249 syscallarg(int) name;
250 };
251
252 struct svr4_sys_mmap_args {
253 syscallarg(svr4_caddr_t) addr;
254 syscallarg(svr4_size_t) len;
255 syscallarg(int) prot;
256 syscallarg(int) flags;
257 syscallarg(int) fd;
258 syscallarg(svr4_off_t) pos;
259 };
260
261 struct svr4_sys_fpathconf_args {
262 syscallarg(int) fd;
263 syscallarg(int) name;
264 };
265
266 struct svr4_sys_xstat_args {
267 syscallarg(int) two;
268 syscallarg(char *) path;
269 syscallarg(struct svr4_xstat *) ub;
270 };
271
272 struct svr4_sys_lxstat_args {
273 syscallarg(int) two;
274 syscallarg(char *) path;
275 syscallarg(struct svr4_xstat *) ub;
276 };
277
278 struct svr4_sys_fxstat_args {
279 syscallarg(int) two;
280 syscallarg(int) fd;
281 syscallarg(struct svr4_xstat *) sb;
282 };
283
284 struct svr4_sys_xmknod_args {
285 syscallarg(int) two;
286 syscallarg(char *) path;
287 syscallarg(svr4_mode_t) mode;
288 syscallarg(svr4_dev_t) dev;
289 };
290
291 struct svr4_sys_setrlimit_args {
292 syscallarg(int) which;
293 syscallarg(struct ogetrlimit *) rlp;
294 };
295
296 struct svr4_sys_getrlimit_args {
297 syscallarg(int) which;
298 syscallarg(struct ogetrlimit *) rlp;
299 };
300
301 struct svr4_sys_memcntl_args {
302 syscallarg(svr4_caddr_t) addr;
303 syscallarg(svr4_size_t) len;
304 syscallarg(int) cmd;
305 syscallarg(svr4_caddr_t) arg;
306 syscallarg(int) attr;
307 syscallarg(int) mask;
308 };
309
310 struct svr4_sys_uname_args {
311 syscallarg(struct svr4_utsname *) name;
312 syscallarg(int) dummy;
313 };
314
315 struct svr4_sys_setegid_args {
316 syscallarg(gid_t) egid;
317 };
318
319 struct svr4_sys_sysconfig_args {
320 syscallarg(int) name;
321 };
322
323 struct svr4_sys_systeminfo_args {
324 syscallarg(int) what;
325 syscallarg(char *) buf;
326 syscallarg(long) len;
327 };
328
329 struct svr4_sys_fchroot_args {
330 syscallarg(int) fd;
331 };
332
333 struct svr4_sys_utimes_args {
334 syscallarg(char *) path;
335 syscallarg(struct timeval *) tptr;
336 };
337
338 struct svr4_sys_gettimeofday_args {
339 syscallarg(struct timeval *) tp;
340 };
341
342 struct svr4_sys_pread_args {
343 syscallarg(int) fd;
344 syscallarg(void *) buf;
345 syscallarg(size_t) nbyte;
346 syscallarg(svr4_off_t) off;
347 };
348
349 struct svr4_sys_pwrite_args {
350 syscallarg(int) fd;
351 syscallarg(const void *) buf;
352 syscallarg(size_t) nbyte;
353 syscallarg(svr4_off_t) off;
354 };
355
356 struct svr4_sys_llseek_args {
357 syscallarg(int) fd;
358 syscallarg(long) offset1;
359 syscallarg(long) offset2;
360 syscallarg(int) whence;
361 };
362
363 struct svr4_sys_acl_args {
364 syscallarg(char *) path;
365 syscallarg(int) cmd;
366 syscallarg(int) num;
367 syscallarg(struct svr4_aclent *) buf;
368 };
369
370 struct svr4_sys_auditsys_args {
371 syscallarg(int) code;
372 syscallarg(int) a1;
373 syscallarg(int) a2;
374 syscallarg(int) a3;
375 syscallarg(int) a4;
376 syscallarg(int) a5;
377 };
378
379 struct svr4_sys_facl_args {
380 syscallarg(int) fd;
381 syscallarg(int) cmd;
382 syscallarg(int) num;
383 syscallarg(struct svr4_aclent *) buf;
384 };
385
386 struct svr4_sys_getdents64_args {
387 syscallarg(int) fd;
388 syscallarg(struct svr4_dirent64 *) dp;
389 syscallarg(int) nbytes;
390 };
391
392 struct svr4_sys_mmap64_args {
393 syscallarg(svr4_caddr_t) addr;
394 syscallarg(svr4_size_t) len;
395 syscallarg(int) prot;
396 syscallarg(int) flags;
397 syscallarg(int) fd;
398 syscallarg(svr4_off64_t) pos;
399 };
400
401 struct svr4_sys_stat64_args {
402 syscallarg(const char *) path;
403 syscallarg(struct svr4_stat64 *) sb;
404 };
405
406 struct svr4_sys_lstat64_args {
407 syscallarg(const char *) path;
408 syscallarg(struct svr4_stat64 *) sb;
409 };
410
411 struct svr4_sys_fstat64_args {
412 syscallarg(int) fd;
413 syscallarg(struct svr4_stat64 *) sb;
414 };
415
416 struct svr4_sys_fstatvfs64_args {
417 syscallarg(int) fd;
418 syscallarg(struct svr4_statvfs64 *) fs;
419 };
420
421 struct svr4_sys_pread64_args {
422 syscallarg(int) fd;
423 syscallarg(void *) buf;
424 syscallarg(size_t) nbyte;
425 syscallarg(svr4_off64_t) off;
426 };
427
428 struct svr4_sys_pwrite64_args {
429 syscallarg(int) fd;
430 syscallarg(const void *) buf;
431 syscallarg(size_t) nbyte;
432 syscallarg(svr4_off64_t) off;
433 };
434
435 struct svr4_sys_creat64_args {
436 syscallarg(char *) path;
437 syscallarg(int) mode;
438 };
439
440 struct svr4_sys_open64_args {
441 syscallarg(char *) path;
442 syscallarg(int) flags;
443 syscallarg(int) mode;
444 };
445
446 struct svr4_sys_socket_args {
447 syscallarg(int) domain;
448 syscallarg(int) type;
449 syscallarg(int) protocol;
450 };
451
452
453
454
455
456 int sys_nosys(struct proc *, void *, register_t *);
457 int sys_exit(struct proc *, void *, register_t *);
458 int sys_fork(struct proc *, void *, register_t *);
459 int sys_read(struct proc *, void *, register_t *);
460 int sys_write(struct proc *, void *, register_t *);
461 int svr4_sys_open(struct proc *, void *, register_t *);
462 int sys_close(struct proc *, void *, register_t *);
463 int svr4_sys_wait(struct proc *, void *, register_t *);
464 int svr4_sys_creat(struct proc *, void *, register_t *);
465 int sys_link(struct proc *, void *, register_t *);
466 int sys_unlink(struct proc *, void *, register_t *);
467 int svr4_sys_execv(struct proc *, void *, register_t *);
468 int sys_chdir(struct proc *, void *, register_t *);
469 int svr4_sys_time(struct proc *, void *, register_t *);
470 int svr4_sys_mknod(struct proc *, void *, register_t *);
471 int sys_chmod(struct proc *, void *, register_t *);
472 int sys_chown(struct proc *, void *, register_t *);
473 int svr4_sys_break(struct proc *, void *, register_t *);
474 int svr4_sys_stat(struct proc *, void *, register_t *);
475 int compat_43_sys_lseek(struct proc *, void *, register_t *);
476 int sys_getpid(struct proc *, void *, register_t *);
477 int sys_setuid(struct proc *, void *, register_t *);
478 int sys_getuid(struct proc *, void *, register_t *);
479 int svr4_sys_alarm(struct proc *, void *, register_t *);
480 int svr4_sys_fstat(struct proc *, void *, register_t *);
481 int svr4_sys_pause(struct proc *, void *, register_t *);
482 int svr4_sys_utime(struct proc *, void *, register_t *);
483 int svr4_sys_access(struct proc *, void *, register_t *);
484 int svr4_sys_nice(struct proc *, void *, register_t *);
485 int sys_sync(struct proc *, void *, register_t *);
486 int svr4_sys_kill(struct proc *, void *, register_t *);
487 int svr4_sys_pgrpsys(struct proc *, void *, register_t *);
488 int sys_dup(struct proc *, void *, register_t *);
489 int sys_opipe(struct proc *, void *, register_t *);
490 int svr4_sys_times(struct proc *, void *, register_t *);
491 int sys_setgid(struct proc *, void *, register_t *);
492 int sys_getgid(struct proc *, void *, register_t *);
493 int svr4_sys_signal(struct proc *, void *, register_t *);
494 #ifdef SYSVMSG
495 int svr4_sys_msgsys(struct proc *, void *, register_t *);
496 #else
497 #endif
498 int svr4_sys_sysarch(struct proc *, void *, register_t *);
499 #ifdef SYSVSHM
500 int svr4_sys_shmsys(struct proc *, void *, register_t *);
501 #else
502 #endif
503 #ifdef SYSVSEM
504 int svr4_sys_semsys(struct proc *, void *, register_t *);
505 #else
506 #endif
507 int svr4_sys_ioctl(struct proc *, void *, register_t *);
508 int svr4_sys_utssys(struct proc *, void *, register_t *);
509 int sys_fsync(struct proc *, void *, register_t *);
510 int svr4_sys_execve(struct proc *, void *, register_t *);
511 int sys_umask(struct proc *, void *, register_t *);
512 int sys_chroot(struct proc *, void *, register_t *);
513 int svr4_sys_fcntl(struct proc *, void *, register_t *);
514 int svr4_sys_ulimit(struct proc *, void *, register_t *);
515 int svr4_sys_rdebug(struct proc *, void *, register_t *);
516 int sys_rmdir(struct proc *, void *, register_t *);
517 int sys_mkdir(struct proc *, void *, register_t *);
518 int svr4_sys_getdents(struct proc *, void *, register_t *);
519 int svr4_sys_getmsg(struct proc *, void *, register_t *);
520 int svr4_sys_putmsg(struct proc *, void *, register_t *);
521 int sys_poll(struct proc *, void *, register_t *);
522 int svr4_sys_lstat(struct proc *, void *, register_t *);
523 int sys_symlink(struct proc *, void *, register_t *);
524 int sys_readlink(struct proc *, void *, register_t *);
525 int sys_getgroups(struct proc *, void *, register_t *);
526 int sys_setgroups(struct proc *, void *, register_t *);
527 int sys_fchmod(struct proc *, void *, register_t *);
528 int sys_fchown(struct proc *, void *, register_t *);
529 int svr4_sys_sigprocmask(struct proc *, void *, register_t *);
530 int svr4_sys_sigsuspend(struct proc *, void *, register_t *);
531 int svr4_sys_sigaltstack(struct proc *, void *, register_t *);
532 int svr4_sys_sigaction(struct proc *, void *, register_t *);
533 int svr4_sys_sigpending(struct proc *, void *, register_t *);
534 int svr4_sys_context(struct proc *, void *, register_t *);
535 int svr4_sys_statvfs(struct proc *, void *, register_t *);
536 int svr4_sys_fstatvfs(struct proc *, void *, register_t *);
537 int svr4_sys_waitsys(struct proc *, void *, register_t *);
538 int svr4_sys_hrtsys(struct proc *, void *, register_t *);
539 int svr4_sys_pathconf(struct proc *, void *, register_t *);
540 int sys_mincore(struct proc *, void *, register_t *);
541 int svr4_sys_mmap(struct proc *, void *, register_t *);
542 int sys_mprotect(struct proc *, void *, register_t *);
543 int sys_munmap(struct proc *, void *, register_t *);
544 int svr4_sys_fpathconf(struct proc *, void *, register_t *);
545 int sys_vfork(struct proc *, void *, register_t *);
546 int sys_fchdir(struct proc *, void *, register_t *);
547 int sys_readv(struct proc *, void *, register_t *);
548 int sys_writev(struct proc *, void *, register_t *);
549 int svr4_sys_xstat(struct proc *, void *, register_t *);
550 int svr4_sys_lxstat(struct proc *, void *, register_t *);
551 int svr4_sys_fxstat(struct proc *, void *, register_t *);
552 int svr4_sys_xmknod(struct proc *, void *, register_t *);
553 int svr4_sys_setrlimit(struct proc *, void *, register_t *);
554 int svr4_sys_getrlimit(struct proc *, void *, register_t *);
555 int sys_lchown(struct proc *, void *, register_t *);
556 int svr4_sys_memcntl(struct proc *, void *, register_t *);
557 int sys_rename(struct proc *, void *, register_t *);
558 int svr4_sys_uname(struct proc *, void *, register_t *);
559 int svr4_sys_setegid(struct proc *, void *, register_t *);
560 int svr4_sys_sysconfig(struct proc *, void *, register_t *);
561 int sys_adjtime(struct proc *, void *, register_t *);
562 int svr4_sys_systeminfo(struct proc *, void *, register_t *);
563 int sys_seteuid(struct proc *, void *, register_t *);
564 int svr4_sys_fchroot(struct proc *, void *, register_t *);
565 int svr4_sys_utimes(struct proc *, void *, register_t *);
566 int svr4_sys_vhangup(struct proc *, void *, register_t *);
567 int svr4_sys_gettimeofday(struct proc *, void *, register_t *);
568 int sys_getitimer(struct proc *, void *, register_t *);
569 int sys_setitimer(struct proc *, void *, register_t *);
570 int svr4_sys_pread(struct proc *, void *, register_t *);
571 int svr4_sys_pwrite(struct proc *, void *, register_t *);
572 int svr4_sys_llseek(struct proc *, void *, register_t *);
573 int svr4_sys_acl(struct proc *, void *, register_t *);
574 int svr4_sys_auditsys(struct proc *, void *, register_t *);
575 int sys_clock_gettime(struct proc *, void *, register_t *);
576 int sys_clock_settime(struct proc *, void *, register_t *);
577 int sys_clock_getres(struct proc *, void *, register_t *);
578 int sys_nanosleep(struct proc *, void *, register_t *);
579 int svr4_sys_facl(struct proc *, void *, register_t *);
580 int sys_setreuid(struct proc *, void *, register_t *);
581 int sys_setregid(struct proc *, void *, register_t *);
582 int svr4_sys_getdents64(struct proc *, void *, register_t *);
583 int svr4_sys_mmap64(struct proc *, void *, register_t *);
584 int svr4_sys_stat64(struct proc *, void *, register_t *);
585 int svr4_sys_lstat64(struct proc *, void *, register_t *);
586 int svr4_sys_fstat64(struct proc *, void *, register_t *);
587 int svr4_sys_fstatvfs64(struct proc *, void *, register_t *);
588 int svr4_sys_pread64(struct proc *, void *, register_t *);
589 int svr4_sys_pwrite64(struct proc *, void *, register_t *);
590 int svr4_sys_creat64(struct proc *, void *, register_t *);
591 int svr4_sys_open64(struct proc *, void *, register_t *);
592 int svr4_sys_socket(struct proc *, void *, register_t *);
593 int sys_socketpair(struct proc *, void *, register_t *);
594 int sys_bind(struct proc *, void *, register_t *);
595 int sys_listen(struct proc *, void *, register_t *);
596 int compat_43_sys_accept(struct proc *, void *, register_t *);
597 int sys_connect(struct proc *, void *, register_t *);
598 int sys_shutdown(struct proc *, void *, register_t *);
599 int compat_43_sys_recv(struct proc *, void *, register_t *);
600 int compat_43_sys_recvfrom(struct proc *, void *, register_t *);
601 int compat_43_sys_recvmsg(struct proc *, void *, register_t *);
602 int compat_43_sys_send(struct proc *, void *, register_t *);
603 int compat_43_sys_sendmsg(struct proc *, void *, register_t *);
604 int sys_sendto(struct proc *, void *, register_t *);
605 int compat_43_sys_getpeername(struct proc *, void *, register_t *);
606 int compat_43_sys_getsockname(struct proc *, void *, register_t *);
607 int sys_getsockopt(struct proc *, void *, register_t *);
608 int sys_setsockopt(struct proc *, void *, register_t *);