linux_osf1.h revision 1.1 1 1.1 maxv /* $NetBSD: linux_osf1.h,v 1.1 2019/03/24 16:24:19 maxv Exp $ */
2 1.1 maxv
3 1.1 maxv /*
4 1.1 maxv * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
5 1.1 maxv *
6 1.1 maxv * Redistribution and use in source and binary forms, with or without
7 1.1 maxv * modification, are permitted provided that the following conditions
8 1.1 maxv * are met:
9 1.1 maxv * 1. Redistributions of source code must retain the above copyright
10 1.1 maxv * notice, this list of conditions and the following disclaimer.
11 1.1 maxv * 2. Redistributions in binary form must reproduce the above copyright
12 1.1 maxv * notice, this list of conditions and the following disclaimer in the
13 1.1 maxv * documentation and/or other materials provided with the distribution.
14 1.1 maxv * 3. All advertising materials mentioning features or use of this software
15 1.1 maxv * must display the following acknowledgement:
16 1.1 maxv * This product includes software developed by Christopher G. Demetriou
17 1.1 maxv * for the NetBSD Project.
18 1.1 maxv * 4. The name of the author may not be used to endorse or promote products
19 1.1 maxv * derived from this software without specific prior written permission
20 1.1 maxv *
21 1.1 maxv * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 1.1 maxv * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 1.1 maxv * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 1.1 maxv * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 1.1 maxv * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 1.1 maxv * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 1.1 maxv * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 1.1 maxv * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 1.1 maxv * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 1.1 maxv * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 1.1 maxv */
32 1.1 maxv
33 1.1 maxv typedef int16_t osf1_short;
34 1.1 maxv typedef int32_t osf1_int;
35 1.1 maxv typedef int64_t osf1_long;
36 1.1 maxv typedef u_int32_t osf1_u_int;
37 1.1 maxv
38 1.1 maxv typedef int32_t osf1_dev_t;
39 1.1 maxv typedef u_int32_t osf1_ino_t;
40 1.1 maxv typedef u_int32_t osf1_mode_t;
41 1.1 maxv typedef u_int16_t osf1_nlink_t;
42 1.1 maxv typedef u_int32_t osf1_uid_t;
43 1.1 maxv typedef u_int32_t osf1_gid_t;
44 1.1 maxv
45 1.1 maxv typedef int32_t osf1_time_t;
46 1.1 maxv typedef u_int32_t osf1_uint_t;
47 1.1 maxv typedef u_int64_t osf1_sigset_t;
48 1.1 maxv typedef u_int64_t osf1_size_t;
49 1.1 maxv typedef u_int64_t osf1_fsid_t;
50 1.1 maxv typedef u_int64_t osf1_rlim_t;
51 1.1 maxv typedef void *osf1_data_ptr; /* XXX hard to fix size */
52 1.1 maxv typedef void *osf1_fcn_ptr; /* XXX hard to fix size, bogus */
53 1.1 maxv typedef osf1_int osf1_key_t;
54 1.1 maxv typedef osf1_int osf1_pid_t;
55 1.1 maxv typedef u_int64_t osf1_blksize_t;
56 1.1 maxv typedef u_int64_t osf1_blkcnt_t;
57 1.1 maxv
58 1.1 maxv #define OSF1_SI_SYSNAME 1
59 1.1 maxv #define OSF1_SI_HOSTNAME 2
60 1.1 maxv #define OSF1_SI_RELEASE 3
61 1.1 maxv #define OSF1_SI_VERSION 4
62 1.1 maxv #define OSF1_SI_MACHINE 5
63 1.1 maxv #define OSF1_SI_ARCHITECTURE 6
64 1.1 maxv #define OSF1_SI_HW_SERIAL 7
65 1.1 maxv #define OSF1_SI_HW_PROVIDER 8
66 1.1 maxv #define OSF1_SI_SRPC_DOMAIN 9
67 1.1 maxv #define OSF1_SI_SET_HOSTNAME 258
68 1.1 maxv #define OSF1_SI_SET_SYSNAME 259
69 1.1 maxv #define OSF1_SI_SET_SRPC_DOMAIN 265
70 1.1 maxv
71 1.1 maxv struct osf1_timeval { /* time.h */
72 1.1 maxv osf1_time_t tv_sec;
73 1.1 maxv osf1_int tv_usec;
74 1.1 maxv };
75 1.1 maxv
76 1.1 maxv #define OSF1_RUSAGE_THREAD 1
77 1.1 maxv #define OSF1_RUSAGE_SELF 0
78 1.1 maxv #define OSF1_RUSAGE_CHILDREN -1
79 1.1 maxv
80 1.1 maxv struct osf1_rusage {
81 1.1 maxv struct osf1_timeval ru_utime;
82 1.1 maxv struct osf1_timeval ru_stime;
83 1.1 maxv osf1_long ru_maxrss;
84 1.1 maxv osf1_long ru_ixrss;
85 1.1 maxv osf1_long ru_idrss;
86 1.1 maxv osf1_long ru_isrss;
87 1.1 maxv osf1_long ru_minflt;
88 1.1 maxv osf1_long ru_majflt;
89 1.1 maxv osf1_long ru_nswap;
90 1.1 maxv osf1_long ru_inblock;
91 1.1 maxv osf1_long ru_oublock;
92 1.1 maxv osf1_long ru_msgsnd;
93 1.1 maxv osf1_long ru_msgrcv;
94 1.1 maxv osf1_long ru_nsignals;
95 1.1 maxv osf1_long ru_nvcsw;
96 1.1 maxv osf1_long ru_nivcsw;
97 1.1 maxv };
98 1.1 maxv
99 1.1 maxv struct osf1_itimerval {
100 1.1 maxv struct osf1_timeval it_interval;
101 1.1 maxv struct osf1_timeval it_value;
102 1.1 maxv };
103 1.1 maxv
104 1.1 maxv #define OSF1_ITIMER_REAL 0
105 1.1 maxv #define OSF1_ITIMER_VIRTUAL 1
106 1.1 maxv #define OSF1_ITIMER_PROF 2
107 1.1 maxv
108 1.1 maxv struct osf1_timezone {
109 1.1 maxv osf1_int tz_minuteswest;
110 1.1 maxv osf1_int tz_dsttime;
111 1.1 maxv };
112 1.1 maxv
113 1.1 maxv #define OSF1_WNOHANG 0x01
114 1.1 maxv #define OSF1_WUNTRACED 0x02
115 1.1 maxv
116 1.1 maxv struct osf1_cpu_info {
117 1.1 maxv int current_cpu;
118 1.1 maxv int cpus_in_box;
119 1.1 maxv int cpu_type;
120 1.1 maxv int ncpus;
121 1.1 maxv u_int64_t cpus_present;
122 1.1 maxv u_int64_t cpus_running;
123 1.1 maxv u_int64_t cpu_binding;
124 1.1 maxv u_int64_t cpu_ex_binding;
125 1.1 maxv int mhz;
126 1.1 maxv int unused[3];
127 1.1 maxv };
128 1.1 maxv
129 1.1 maxv #define OSF_SET_IEEE_FP_CONTROL 14
130 1.1 maxv
131 1.1 maxv #define OSF_GET_MAX_UPROCS 2
132 1.1 maxv #define OSF_GET_PHYSMEM 19
133 1.1 maxv #define OSF_GET_MAX_CPU 30
134 1.1 maxv #define OSF_GET_IEEE_FP_CONTROL 45
135 1.1 maxv #define OSF_GET_CPUS_IN_BOX 55
136 1.1 maxv #define OSF_GET_CPU_INFO 59
137 1.1 maxv #define OSF_GET_PROC_TYPE 60
138 1.1 maxv #define OSF_GET_HWRPB 101
139 1.1 maxv #define OSF_GET_PLATFORM_NAME 103
140 1.1 maxv
141 1.1 maxv #define OSF1_MOUNT_NONE 0
142 1.1 maxv #define OSF1_MOUNT_UFS 1
143 1.1 maxv #define OSF1_MOUNT_NFS 2
144 1.1 maxv #define OSF1_MOUNT_MFS 3
145 1.1 maxv #define OSF1_MOUNT_PC 4
146 1.1 maxv #define OSF1_MOUNT_S5FS 5
147 1.1 maxv #define OSF1_MOUNT_CDFS 6
148 1.1 maxv #define OSF1_MOUNT_DFS 7
149 1.1 maxv #define OSF1_MOUNT_EFS 8
150 1.1 maxv #define OSF1_MOUNT_PROCFS 9
151 1.1 maxv #define OSF1_MOUNT_MSFS 10
152 1.1 maxv #define OSF1_MOUNT_FFM 11
153 1.1 maxv #define OSF1_MOUNT_FDFS 12
154 1.1 maxv #define OSF1_MOUNT_ADDON 13
155 1.1 maxv #define OSF1_MOUNT_NFS3 14
156 1.1 maxv #define OSF1_MNAMELEN 90
157 1.1 maxv
158 1.1 maxv struct osf1_mfs_args {
159 1.1 maxv osf1_data_ptr name;
160 1.1 maxv osf1_data_ptr base;
161 1.1 maxv osf1_u_int size;
162 1.1 maxv };
163 1.1 maxv
164 1.1 maxv struct osf1_nfs_args {
165 1.1 maxv osf1_data_ptr addr;
166 1.1 maxv osf1_data_ptr fh;
167 1.1 maxv osf1_int flags;
168 1.1 maxv osf1_int wsize;
169 1.1 maxv osf1_int rsize;
170 1.1 maxv osf1_int timeo;
171 1.1 maxv osf1_int retrans;
172 1.1 maxv osf1_data_ptr hostname;
173 1.1 maxv osf1_int acregmin;
174 1.1 maxv osf1_int acregmax;
175 1.1 maxv osf1_int acdirmin;
176 1.1 maxv osf1_int acdirmax;
177 1.1 maxv osf1_data_ptr netname;
178 1.1 maxv osf1_data_ptr pathconf;
179 1.1 maxv };
180 1.1 maxv
181 1.1 maxv union osf1_mount_info {
182 1.1 maxv struct osf1_mfs_args mfs_args;
183 1.1 maxv struct osf1_nfs_args nfs_args;
184 1.1 maxv char pad[80];
185 1.1 maxv };
186 1.1 maxv
187 1.1 maxv #define OSF1_NFSMNT_SOFT 0x00000001
188 1.1 maxv #define OSF1_NFSMNT_WSIZE 0x00000002
189 1.1 maxv #define OSF1_NFSMNT_RSIZE 0x00000004
190 1.1 maxv #define OSF1_NFSMNT_TIMEO 0x00000008
191 1.1 maxv #define OSF1_NFSMNT_RETRANS 0x00000010
192 1.1 maxv #define OSF1_NFSMNT_HOSTNAME 0x00000020
193 1.1 maxv #define OSF1_NFSMNT_INT 0x00000040
194 1.1 maxv #define OSF1_NFSMNT_NOCONN 0x00000080
195 1.1 maxv #define OSF1_NFSMNT_NOAC 0x00000100
196 1.1 maxv #define OSF1_NFSMNT_ACREGMIN 0x00000200
197 1.1 maxv #define OSF1_NFSMNT_ACREGMAX 0x00000400
198 1.1 maxv #define OSF1_NFSMNT_ACDIRMIN 0x00000800
199 1.1 maxv #define OSF1_NFSMNT_ACDIRMAX 0x00001000
200 1.1 maxv #define OSF1_NFSMNT_NOCTO 0x00002000
201 1.1 maxv #define OSF1_NFSMNT_POSIX 0x00004000
202 1.1 maxv #define OSF1_NFSMNT_AUTO 0x00008000
203 1.1 maxv #define OSF1_NFSMNT_SEC 0x00010000
204 1.1 maxv #define OSF1_NFSMNT_TCP 0x00020000
205 1.1 maxv #define OSF1_NFSMNT_PROPLIST 0x00040000
206 1.1 maxv
207 1.1 maxv struct osf1_statfs {
208 1.1 maxv osf1_short f_type;
209 1.1 maxv osf1_short f_flags;
210 1.1 maxv osf1_int f_fsize;
211 1.1 maxv osf1_int f_bsize;
212 1.1 maxv osf1_int f_blocks;
213 1.1 maxv osf1_int f_bfree;
214 1.1 maxv osf1_int f_bavail;
215 1.1 maxv osf1_int f_files;
216 1.1 maxv osf1_int f_ffree;
217 1.1 maxv osf1_fsid_t f_fsid;
218 1.1 maxv osf1_int f_spare[9];
219 1.1 maxv char f_mntonname[OSF1_MNAMELEN];
220 1.1 maxv char f_mntfromname[OSF1_MNAMELEN];
221 1.1 maxv union osf1_mount_info mount_info;
222 1.1 maxv };
223