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