xref: /freebsd/sys/compat/freebsd32/freebsd32_proto.h (revision 74bf4e164ba5851606a27d4feff27717452583e5)
1 /*
2  * System call prototypes.
3  *
4  * DO NOT EDIT-- this file is automatically generated.
5  * $FreeBSD$
6  * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.40 2004/07/14 00:03:30 peter Exp
7  */
8 
9 #ifndef _FREEBSD32_SYSPROTO_H_
10 #define	_FREEBSD32_SYSPROTO_H_
11 
12 #include <sys/signal.h>
13 #include <sys/acl.h>
14 #include <sys/thr.h>
15 #include <sys/umtx.h>
16 #include <posix4/_semaphore.h>
17 
18 #include <sys/ucontext.h>
19 
20 struct proc;
21 
22 struct thread;
23 
24 #define	PAD_(t)	(sizeof(register_t) <= sizeof(t) ? \
25 		0 : sizeof(register_t) - sizeof(t))
26 
27 #if BYTE_ORDER == LITTLE_ENDIAN
28 #define	PADL_(t)	0
29 #define	PADR_(t)	PAD_(t)
30 #else
31 #define	PADL_(t)	PAD_(t)
32 #define	PADR_(t)	0
33 #endif
34 
35 struct freebsd32_wait4_args {
36 	char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
37 	char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)];
38 	char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)];
39 	char rusage_l_[PADL_(struct rusage32 *)]; struct rusage32 * rusage; char rusage_r_[PADR_(struct rusage32 *)];
40 };
41 struct freebsd32_sigaltstack_args {
42 	char ss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * ss; char ss_r_[PADR_(struct sigaltstack32 *)];
43 	char oss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * oss; char oss_r_[PADR_(struct sigaltstack32 *)];
44 };
45 struct freebsd32_execve_args {
46 	char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)];
47 	char argv_l_[PADL_(u_int32_t *)]; u_int32_t * argv; char argv_r_[PADR_(u_int32_t *)];
48 	char envv_l_[PADL_(u_int32_t *)]; u_int32_t * envv; char envv_r_[PADR_(u_int32_t *)];
49 };
50 struct freebsd32_setitimer_args {
51 	char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)];
52 	char itv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * itv; char itv_r_[PADR_(struct itimerval32 *)];
53 	char oitv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * oitv; char oitv_r_[PADR_(struct itimerval32 *)];
54 };
55 struct freebsd32_getitimer_args {
56 	char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)];
57 	char itv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * itv; char itv_r_[PADR_(struct itimerval32 *)];
58 };
59 struct freebsd32_select_args {
60 	char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)];
61 	char in_l_[PADL_(fd_set *)]; fd_set * in; char in_r_[PADR_(fd_set *)];
62 	char ou_l_[PADL_(fd_set *)]; fd_set * ou; char ou_r_[PADR_(fd_set *)];
63 	char ex_l_[PADL_(fd_set *)]; fd_set * ex; char ex_r_[PADR_(fd_set *)];
64 	char tv_l_[PADL_(struct timeval32 *)]; struct timeval32 * tv; char tv_r_[PADR_(struct timeval32 *)];
65 };
66 struct freebsd32_gettimeofday_args {
67 	char tp_l_[PADL_(struct timeval32 *)]; struct timeval32 * tp; char tp_r_[PADR_(struct timeval32 *)];
68 	char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)];
69 };
70 struct freebsd32_getrusage_args {
71 	char who_l_[PADL_(int)]; int who; char who_r_[PADR_(int)];
72 	char rusage_l_[PADL_(struct rusage32 *)]; struct rusage32 * rusage; char rusage_r_[PADR_(struct rusage32 *)];
73 };
74 struct freebsd32_readv_args {
75 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
76 	char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
77 	char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
78 };
79 struct freebsd32_writev_args {
80 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
81 	char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
82 	char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
83 };
84 struct freebsd32_settimeofday_args {
85 	char tv_l_[PADL_(struct timeval32 *)]; struct timeval32 * tv; char tv_r_[PADR_(struct timeval32 *)];
86 	char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)];
87 };
88 struct freebsd32_utimes_args {
89 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
90 	char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)];
91 };
92 struct freebsd32_adjtime_args {
93 	char delta_l_[PADL_(struct timeval32 *)]; struct timeval32 * delta; char delta_r_[PADR_(struct timeval32 *)];
94 	char olddelta_l_[PADL_(struct timeval32 *)]; struct timeval32 * olddelta; char olddelta_r_[PADR_(struct timeval32 *)];
95 };
96 struct freebsd32_semsys_args {
97 	char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)];
98 	char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)];
99 	char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)];
100 	char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)];
101 	char a5_l_[PADL_(int)]; int a5; char a5_r_[PADR_(int)];
102 };
103 struct freebsd32_msgsys_args {
104 	char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)];
105 	char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)];
106 	char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)];
107 	char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)];
108 	char a5_l_[PADL_(int)]; int a5; char a5_r_[PADR_(int)];
109 	char a6_l_[PADL_(int)]; int a6; char a6_r_[PADR_(int)];
110 };
111 struct freebsd32_shmsys_args {
112 	char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)];
113 	char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)];
114 	char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)];
115 	char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)];
116 };
117 struct freebsd32_pread_args {
118 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
119 	char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
120 	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
121 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
122 	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
123 	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
124 };
125 struct freebsd32_pwrite_args {
126 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
127 	char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)];
128 	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
129 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
130 	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
131 	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
132 };
133 struct freebsd32_stat_args {
134 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
135 	char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)];
136 };
137 struct freebsd32_fstat_args {
138 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
139 	char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)];
140 };
141 struct freebsd32_lstat_args {
142 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
143 	char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)];
144 };
145 struct freebsd32_mmap_args {
146 	char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
147 	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
148 	char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)];
149 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
150 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
151 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
152 	char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)];
153 	char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)];
154 };
155 struct freebsd32_lseek_args {
156 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
157 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
158 	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
159 	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
160 	char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)];
161 };
162 struct freebsd32_truncate_args {
163 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
164 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
165 	char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
166 	char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
167 };
168 struct freebsd32_ftruncate_args {
169 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
170 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
171 	char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
172 	char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
173 };
174 struct freebsd32_sysctl_args {
175 	char name_l_[PADL_(int *)]; int * name; char name_r_[PADR_(int *)];
176 	char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)];
177 	char old_l_[PADL_(void *)]; void * old; char old_r_[PADR_(void *)];
178 	char oldlenp_l_[PADL_(u_int32_t *)]; u_int32_t * oldlenp; char oldlenp_r_[PADR_(u_int32_t *)];
179 	char new_l_[PADL_(void *)]; void * new; char new_r_[PADR_(void *)];
180 	char newlen_l_[PADL_(u_int32_t)]; u_int32_t newlen; char newlen_r_[PADR_(u_int32_t)];
181 };
182 struct freebsd32_kevent_args {
183 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
184 	char changelist_l_[PADL_(const struct kevent *)]; const struct kevent * changelist; char changelist_r_[PADR_(const struct kevent *)];
185 	char nchanges_l_[PADL_(int)]; int nchanges; char nchanges_r_[PADR_(int)];
186 	char eventlist_l_[PADL_(struct kevent *)]; struct kevent * eventlist; char eventlist_r_[PADR_(struct kevent *)];
187 	char nevents_l_[PADL_(int)]; int nevents; char nevents_r_[PADR_(int)];
188 	char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)];
189 };
190 struct freebsd32_sendfile_args {
191 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
192 	char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
193 	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
194 	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
195 	char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)];
196 	char hdtr_l_[PADL_(struct sf_hdtr *)]; struct sf_hdtr * hdtr; char hdtr_r_[PADR_(struct sf_hdtr *)];
197 	char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)];
198 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
199 };
200 struct freebsd32_sigaction_args {
201 	char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)];
202 	char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)];
203 	char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)];
204 };
205 struct freebsd32_sigreturn_args {
206 	char sigcntxp_l_[PADL_(const struct freebsd32_ucontext *)]; const struct freebsd32_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd32_ucontext *)];
207 };
208 int	freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *);
209 int	freebsd32_sigaltstack(struct thread *, struct freebsd32_sigaltstack_args *);
210 int	freebsd32_execve(struct thread *, struct freebsd32_execve_args *);
211 int	freebsd32_setitimer(struct thread *, struct freebsd32_setitimer_args *);
212 int	freebsd32_getitimer(struct thread *, struct freebsd32_getitimer_args *);
213 int	freebsd32_select(struct thread *, struct freebsd32_select_args *);
214 int	freebsd32_gettimeofday(struct thread *, struct freebsd32_gettimeofday_args *);
215 int	freebsd32_getrusage(struct thread *, struct freebsd32_getrusage_args *);
216 int	freebsd32_readv(struct thread *, struct freebsd32_readv_args *);
217 int	freebsd32_writev(struct thread *, struct freebsd32_writev_args *);
218 int	freebsd32_settimeofday(struct thread *, struct freebsd32_settimeofday_args *);
219 int	freebsd32_utimes(struct thread *, struct freebsd32_utimes_args *);
220 int	freebsd32_adjtime(struct thread *, struct freebsd32_adjtime_args *);
221 int	freebsd32_semsys(struct thread *, struct freebsd32_semsys_args *);
222 int	freebsd32_msgsys(struct thread *, struct freebsd32_msgsys_args *);
223 int	freebsd32_shmsys(struct thread *, struct freebsd32_shmsys_args *);
224 int	freebsd32_pread(struct thread *, struct freebsd32_pread_args *);
225 int	freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *);
226 int	freebsd32_stat(struct thread *, struct freebsd32_stat_args *);
227 int	freebsd32_fstat(struct thread *, struct freebsd32_fstat_args *);
228 int	freebsd32_lstat(struct thread *, struct freebsd32_lstat_args *);
229 int	freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *);
230 int	freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *);
231 int	freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *);
232 int	freebsd32_ftruncate(struct thread *, struct freebsd32_ftruncate_args *);
233 int	freebsd32_sysctl(struct thread *, struct freebsd32_sysctl_args *);
234 int	freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *);
235 int	freebsd32_sendfile(struct thread *, struct freebsd32_sendfile_args *);
236 int	freebsd32_sigaction(struct thread *, struct freebsd32_sigaction_args *);
237 int	freebsd32_sigreturn(struct thread *, struct freebsd32_sigreturn_args *);
238 
239 #ifdef COMPAT_43
240 
241 
242 #endif /* COMPAT_43 */
243 
244 
245 #ifdef COMPAT_FREEBSD4
246 
247 struct freebsd4_freebsd32_getfsstat_args {
248 	char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
249 	char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)];
250 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
251 };
252 struct freebsd4_freebsd32_statfs_args {
253 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
254 	char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
255 };
256 struct freebsd4_freebsd32_fstatfs_args {
257 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
258 	char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
259 };
260 struct freebsd4_freebsd32_fhstatfs_args {
261 	char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)];
262 	char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
263 };
264 struct freebsd4_freebsd32_sendfile_args {
265 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
266 	char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
267 	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
268 	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
269 	char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)];
270 	char hdtr_l_[PADL_(struct sf_hdtr *)]; struct sf_hdtr * hdtr; char hdtr_r_[PADR_(struct sf_hdtr *)];
271 	char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)];
272 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
273 };
274 struct freebsd4_freebsd32_sigaction_args {
275 	char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)];
276 	char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)];
277 	char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)];
278 };
279 struct freebsd4_freebsd32_sigreturn_args {
280 	char sigcntxp_l_[PADL_(const struct freebsd4_freebsd32_ucontext *)]; const struct freebsd4_freebsd32_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd4_freebsd32_ucontext *)];
281 };
282 int	freebsd4_freebsd32_getfsstat(struct thread *, struct freebsd4_freebsd32_getfsstat_args *);
283 int	freebsd4_freebsd32_statfs(struct thread *, struct freebsd4_freebsd32_statfs_args *);
284 int	freebsd4_freebsd32_fstatfs(struct thread *, struct freebsd4_freebsd32_fstatfs_args *);
285 int	freebsd4_freebsd32_fhstatfs(struct thread *, struct freebsd4_freebsd32_fhstatfs_args *);
286 int	freebsd4_freebsd32_sendfile(struct thread *, struct freebsd4_freebsd32_sendfile_args *);
287 int	freebsd4_freebsd32_sigaction(struct thread *, struct freebsd4_freebsd32_sigaction_args *);
288 int	freebsd4_freebsd32_sigreturn(struct thread *, struct freebsd4_freebsd32_sigreturn_args *);
289 
290 #endif /* COMPAT_FREEBSD4 */
291 
292 #undef PAD_
293 #undef PADL_
294 #undef PADR_
295 
296 #endif /* !_FREEBSD32_SYSPROTO_H_ */
297