1/* $NetBSD: syscallargs.h,v 1.257 2014/07/25 08:27:36 dholland Exp $ */
2
3/*
4 * System call argument lists.
5 *
6 * DO NOT EDIT-- this file is automatically generated.
7 * created from	NetBSD: syscalls.master,v 1.270 2014/07/25 08:25:47 dholland Exp
8 */
9
10#ifndef _SYS_SYSCALLARGS_H_
11#define	_SYS_SYSCALLARGS_H_
12
13#include <sys/mount.h>
14#ifndef RUMP_CLIENT
15#include <sys/sched.h>
16#endif
17#include <sys/socket.h>
18
19#define	SYS_MAXSYSARGS	8
20
21#undef	syscallarg
22#define	syscallarg(x)							\
23	union {								\
24		register_t pad;						\
25		struct { x datum; } le;					\
26		struct { /* LINTED zero array dimension */		\
27			int8_t pad[  /* CONSTCOND */			\
28				(sizeof (register_t) < sizeof (x))	\
29				? 0					\
30				: sizeof (register_t) - sizeof (x)];	\
31			x datum;					\
32		} be;							\
33	}
34
35#undef check_syscall_args
36#define check_syscall_args(call) /*LINTED*/ \
37	typedef char call##_check_args[sizeof (struct call##_args) \
38		<= SYS_MAXSYSARGS * sizeof (register_t) ? 1 : -1];
39
40#ifndef RUMP_CLIENT
41struct sys_syscall_args {
42	syscallarg(int) code;
43	syscallarg(register_t) args[SYS_MAXSYSARGS];
44};
45#endif /* !RUMP_CLIENT */
46
47#ifndef RUMP_CLIENT
48struct sys_exit_args {
49	syscallarg(int) rval;
50};
51check_syscall_args(sys_exit)
52#endif /* !RUMP_CLIENT */
53
54struct sys_read_args {
55	syscallarg(int) fd;
56	syscallarg(void *) buf;
57	syscallarg(size_t) nbyte;
58};
59check_syscall_args(sys_read)
60
61struct sys_write_args {
62	syscallarg(int) fd;
63	syscallarg(const void *) buf;
64	syscallarg(size_t) nbyte;
65};
66check_syscall_args(sys_write)
67
68struct sys_open_args {
69	syscallarg(const char *) path;
70	syscallarg(int) flags;
71	syscallarg(mode_t) mode;
72};
73check_syscall_args(sys_open)
74
75struct sys_close_args {
76	syscallarg(int) fd;
77};
78check_syscall_args(sys_close)
79
80#ifndef RUMP_CLIENT
81struct compat_50_sys_wait4_args {
82	syscallarg(pid_t) pid;
83	syscallarg(int *) status;
84	syscallarg(int) options;
85	syscallarg(struct rusage50 *) rusage;
86};
87check_syscall_args(compat_50_sys_wait4)
88#endif /* !RUMP_CLIENT */
89
90#ifndef RUMP_CLIENT
91struct compat_43_sys_creat_args {
92	syscallarg(const char *) path;
93	syscallarg(mode_t) mode;
94};
95check_syscall_args(compat_43_sys_creat)
96#endif /* !RUMP_CLIENT */
97
98struct sys_link_args {
99	syscallarg(const char *) path;
100	syscallarg(const char *) link;
101};
102check_syscall_args(sys_link)
103
104struct sys_unlink_args {
105	syscallarg(const char *) path;
106};
107check_syscall_args(sys_unlink)
108
109struct sys_chdir_args {
110	syscallarg(const char *) path;
111};
112check_syscall_args(sys_chdir)
113
114struct sys_fchdir_args {
115	syscallarg(int) fd;
116};
117check_syscall_args(sys_fchdir)
118
119struct compat_50_sys_mknod_args {
120	syscallarg(const char *) path;
121	syscallarg(mode_t) mode;
122	syscallarg(uint32_t) dev;
123};
124check_syscall_args(compat_50_sys_mknod)
125
126struct sys_chmod_args {
127	syscallarg(const char *) path;
128	syscallarg(mode_t) mode;
129};
130check_syscall_args(sys_chmod)
131
132struct sys_chown_args {
133	syscallarg(const char *) path;
134	syscallarg(uid_t) uid;
135	syscallarg(gid_t) gid;
136};
137check_syscall_args(sys_chown)
138
139#ifndef RUMP_CLIENT
140struct sys_obreak_args {
141	syscallarg(char *) nsize;
142};
143check_syscall_args(sys_obreak)
144#endif /* !RUMP_CLIENT */
145
146#ifndef RUMP_CLIENT
147struct compat_20_sys_getfsstat_args {
148	syscallarg(struct statfs12 *) buf;
149	syscallarg(long) bufsize;
150	syscallarg(int) flags;
151};
152check_syscall_args(compat_20_sys_getfsstat)
153#endif /* !RUMP_CLIENT */
154
155#ifndef RUMP_CLIENT
156struct compat_43_sys_lseek_args {
157	syscallarg(int) fd;
158	syscallarg(long) offset;
159	syscallarg(int) whence;
160};
161check_syscall_args(compat_43_sys_lseek)
162#endif /* !RUMP_CLIENT */
163
164#ifndef RUMP_CLIENT
165struct compat_40_sys_mount_args {
166	syscallarg(const char *) type;
167	syscallarg(const char *) path;
168	syscallarg(int) flags;
169	syscallarg(void *) data;
170};
171check_syscall_args(compat_40_sys_mount)
172#endif /* !RUMP_CLIENT */
173
174struct sys_unmount_args {
175	syscallarg(const char *) path;
176	syscallarg(int) flags;
177};
178check_syscall_args(sys_unmount)
179
180struct sys_setuid_args {
181	syscallarg(uid_t) uid;
182};
183check_syscall_args(sys_setuid)
184
185#ifndef RUMP_CLIENT
186struct sys_ptrace_args {
187	syscallarg(int) req;
188	syscallarg(pid_t) pid;
189	syscallarg(void *) addr;
190	syscallarg(int) data;
191};
192check_syscall_args(sys_ptrace)
193#endif /* !RUMP_CLIENT */
194
195struct sys_recvmsg_args {
196	syscallarg(int) s;
197	syscallarg(struct msghdr *) msg;
198	syscallarg(int) flags;
199};
200check_syscall_args(sys_recvmsg)
201
202struct sys_sendmsg_args {
203	syscallarg(int) s;
204	syscallarg(const struct msghdr *) msg;
205	syscallarg(int) flags;
206};
207check_syscall_args(sys_sendmsg)
208
209struct sys_recvfrom_args {
210	syscallarg(int) s;
211	syscallarg(void *) buf;
212	syscallarg(size_t) len;
213	syscallarg(int) flags;
214	syscallarg(struct sockaddr *) from;
215	syscallarg(socklen_t *) fromlenaddr;
216};
217check_syscall_args(sys_recvfrom)
218
219struct sys_accept_args {
220	syscallarg(int) s;
221	syscallarg(struct sockaddr *) name;
222	syscallarg(socklen_t *) anamelen;
223};
224check_syscall_args(sys_accept)
225
226struct sys_getpeername_args {
227	syscallarg(int) fdes;
228	syscallarg(struct sockaddr *) asa;
229	syscallarg(socklen_t *) alen;
230};
231check_syscall_args(sys_getpeername)
232
233struct sys_getsockname_args {
234	syscallarg(int) fdes;
235	syscallarg(struct sockaddr *) asa;
236	syscallarg(socklen_t *) alen;
237};
238check_syscall_args(sys_getsockname)
239
240struct sys_access_args {
241	syscallarg(const char *) path;
242	syscallarg(int) flags;
243};
244check_syscall_args(sys_access)
245
246struct sys_chflags_args {
247	syscallarg(const char *) path;
248	syscallarg(u_long) flags;
249};
250check_syscall_args(sys_chflags)
251
252struct sys_fchflags_args {
253	syscallarg(int) fd;
254	syscallarg(u_long) flags;
255};
256check_syscall_args(sys_fchflags)
257
258#ifndef RUMP_CLIENT
259struct sys_kill_args {