2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 * Copyright (c) 2001 Doug Rabson
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 #ifndef _COMPAT_FREEBSD32_FREEBSD32_H_
32 #define _COMPAT_FREEBSD32_FREEBSD32_H_
34 #include <sys/abi_compat.h>
35 #include <sys/procfs.h>
36 #include <sys/socket.h>
40 * i386 is the only arch with a 32-bit time_t
43 typedef int32_t time32_t;
45 typedef int64_t time32_t;
59 struct timespec32 it_interval;
60 struct timespec32 it_value;
69 struct timeval32 ru_utime;
70 struct timeval32 ru_stime;
88 struct rusage32 wru_self;
89 struct rusage32 wru_children;
93 struct timeval32 it_interval;
94 struct timeval32 it_value;
97 #define FREEBSD4_MFSNAMELEN 16
98 #define FREEBSD4_MNAMELEN (88 - 2 * sizeof(int32_t))
114 int32_t f_syncwrites;
115 int32_t f_asyncwrites;
116 char f_fstypename[FREEBSD4_MFSNAMELEN];
117 char f_mntonname[FREEBSD4_MNAMELEN];
119 int32_t f_asyncreads;
121 char f_mntfromname[FREEBSD4_MNAMELEN];
122 int16_t f_spares2 __packed;
133 socklen_t msg_namelen;
136 u_int32_t msg_control;
137 socklen_t msg_controllen;
141 #if defined(__amd64__)
142 #define __STAT32_TIME_T_EXT 1
150 u_int16_t st_padding0;
153 u_int32_t st_padding1;
155 #ifdef __STAT32_TIME_T_EXT
156 __int32_t st_atim_ext;
158 struct timespec32 st_atim;
159 #ifdef __STAT32_TIME_T_EXT
160 __int32_t st_mtim_ext;
162 struct timespec32 st_mtim;
163 #ifdef __STAT32_TIME_T_EXT
164 __int32_t st_ctim_ext;
166 struct timespec32 st_ctim;
167 #ifdef __STAT32_TIME_T_EXT
168 __int32_t st_btim_ext;
170 struct timespec32 st_birthtim;
173 u_int32_t st_blksize;
176 u_int64_t st_spare[10];
178 struct freebsd11_stat32 {
186 struct timespec32 st_atim;
187 struct timespec32 st_mtim;
188 struct timespec32 st_ctim;
191 u_int32_t st_blksize;
195 struct timespec32 st_birthtim;
196 unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec32));
197 unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec32));
209 struct timespec32 st_atim;
210 struct timespec32 st_mtim;
211 struct timespec32 st_ctim;
212 __int32_t st_blksize;
256 struct i386_ldt_args32 {
270 struct kinfo_proc32 {
288 short ki_spare_short1;
289 uint32_t ki_tdev_freebsd11;
292 sigset_t ki_sigignore;
293 sigset_t ki_sigcatch;
300 short ki_spare_short2;
301 gid_t ki_groups[KI_NGROUPS];
315 u_int64_t ki_runtime;
316 struct timeval32 ki_start;
317 struct timeval32 ki_childtime;
326 u_char ki_lastcpu_old;
327 char ki_tdname[TDNAMLEN+1];
328 char ki_wmesg[WMESGLEN+1];
329 char ki_login[LOGNAMELEN+1];
330 char ki_lockname[LOCKNAMELEN+1];
331 char ki_comm[COMMLEN+1];
332 char ki_emul[KI_EMULNAMELEN+1];
333 char ki_loginclass[LOGINCLASSLEN+1];
334 char ki_moretdname[MAXCOMLEN-TDNAMLEN+1];
335 char ki_sparestrings[46];
336 int ki_spareints[KI_NSPARE_INT];
347 struct priority ki_pri;
348 struct rusage32 ki_rusage;
349 struct rusage32 ki_rusage_ch;
354 uint32_t ki_spareptrs[KI_NSPARE_PTR]; /* spare room for growth */
355 int ki_sparelongs[KI_NSPARE_LONG];
360 struct kinfo_sigtramp32 {
361 uint32_t ksigtramp_start;
362 uint32_t ksigtramp_end;
363 uint32_t ksigtramp_spare[4];
366 struct kld32_file_stat_1 {
367 int version; /* set to sizeof(struct kld_file_stat_1) */
368 char name[MAXPATHLEN];
371 uint32_t address; /* load address */
372 uint32_t size; /* size in bytes */
375 struct kld32_file_stat {
376 int version; /* set to sizeof(struct kld_file_stat) */
377 char name[MAXPATHLEN];
380 uint32_t address; /* load address */
381 uint32_t size; /* size in bytes */
382 char pathname[MAXPATHLEN];
385 struct procctl_reaper_pids32 {
391 #endif /* !_COMPAT_FREEBSD32_FREEBSD32_H_ */