1 /* $NetBSD: sunos.h,v 1.13 2002/07/04 23:32:12 thorpej Exp $ */ 2 3 #ifndef _COMPAT_SUNOS_SUNOS_H_ 4 #define _COMPAT_SUNOS_SUNOS_H_ 5 6 /* used to ensure `struct sunos' types rename constantly sized. */ 7 #ifdef __arch64__ 8 typedef u_int32_t sunos_charp; 9 #else 10 typedef char * sunos_charp; 11 #endif 12 13 #define SUNM_RDONLY 0x01 /* mount fs read-only */ 14 #define SUNM_NOSUID 0x02 /* mount fs with setuid disallowed */ 15 #define SUNM_NEWTYPE 0x04 /* type is string (char *), not int */ 16 #define SUNM_GRPID 0x08 /* (bsd semantics; ignored) */ 17 #define SUNM_REMOUNT 0x10 /* update existing mount */ 18 #define SUNM_NOSUB 0x20 /* prevent submounts (rejected) */ 19 #define SUNM_MULTI 0x40 /* (ignored) */ 20 #define SUNM_SYS5 0x80 /* Sys 5-specific semantics (rejected) */ 21 22 struct sunos_nfs_args { 23 struct sockaddr_in *addr; /* file server address */ 24 caddr_t fh; /* file handle to be mounted */ 25 int flags; /* flags */ 26 int wsize; /* write size in bytes */ 27 int rsize; /* read size in bytes */ 28 int timeo; /* initial timeout in .1 secs */ 29 int retrans; /* times to retry send */ 30 sunos_charp hostname; /* server's hostname */ 31 int acregmin; /* attr cache file min secs */ 32 int acregmax; /* attr cache file max secs */ 33 int acdirmin; /* attr cache dir min secs */ 34 int acdirmax; /* attr cache dir max secs */ 35 sunos_charp netname; /* server's netname */ 36 struct pathcnf *pathconf; /* static pathconf kludge */ 37 }; 38 /* SunOS nfs flag values: */ 39 #define SUNNFS_SOFT 0x1 40 #define SUNNFS_WSIZE 0x2 41 #define SUNNFS_RSIZE 0x4 42 #define SUNNFS_TIMEO 0x8 43 #define SUNNFS_RETRANS 0x10 44 #define SUNNFS_HOSTNAME 0x20 45 #define SUNNFS_INT 0x40 46 #define SUNNFS_NOAC 0x80 47 #define SUNNFS_ACREGMIN 0x100 48 #define SUNNFS_ACREGMAX 0x200 49 #define SUNNFS_ACDIRMIN 0x400 50 #define SUNNFS_ACDIRMAX 0x800 51 #define SUNNFS_SECURE 0x1000 52 #define SUNNFS_NOCTO 0x2000 53 #define SUNNFS_POSIX 0x4000 54 55 56 struct sunos_ustat { 57 daddr_t f_tfree; /* total free */ 58 ino_t f_tinode; /* total inodes free */ 59 char f_path[6]; /* filsys name */ 60 char f_fpack[6]; /* filsys pack name */ 61 }; 62 63 struct sunos_statfs { 64 int f_type; /* type of info, zero for now */ 65 int f_bsize; /* fundamental file system block size */ 66 int f_blocks; /* total blocks in file system */ 67 int f_bfree; /* free blocks */ 68 int f_bavail; /* free blocks available to non-super-user */ 69 int f_files; /* total file nodes in file system */ 70 int f_ffree; /* free file nodes in fs */ 71 fsid_t f_fsid; /* file system id */ 72 int f_spare[7]; /* spare for later */ 73 }; 74 75 76 struct sunos_utsname { 77 char sysname[9]; 78 char nodename[9]; 79 char nodeext[65-9]; 80 char release[9]; 81 char version[9]; 82 char machine[9]; 83 }; 84 85 86 struct sunos_ttysize { 87 int ts_row; 88 int ts_col; 89 }; 90 91 struct sunos_termio { 92 u_short c_iflag; 93 u_short c_oflag; 94 u_short c_cflag; 95 u_short c_lflag; 96 char c_line; 97 unsigned char c_cc[8]; 98 }; 99 #define SUNOS_TCGETA _IOR('T', 1, struct sunos_termio) 100 #define SUNOS_TCSETA _IOW('T', 2, struct sunos_termio) 101 #define SUNOS_TCSETAW _IOW('T', 3, struct sunos_termio) 102 #define SUNOS_TCSETAF _IOW('T', 4, struct sunos_termio) 103 #define SUNOS_TCSBRK _IO('T', 5) 104 105 struct sunos_termios { 106 u_int c_iflag; 107 u_int c_oflag; 108 u_int c_cflag; 109 u_int c_lflag; 110 char c_line; 111 u_char c_cc[17]; 112 }; 113 #define SUNOS_TCXONC _IO('T', 6) 114 #define SUNOS_TCFLSH _IO('T', 7) 115 #define SUNOS_TCGETS _IOR('T', 8, struct sunos_termios) 116 #define SUNOS_TCSETS _IOW('T', 9, struct sunos_termios) 117 #define SUNOS_TCSETSW _IOW('T', 10, struct sunos_termios) 118 #define SUNOS_TCSETSF _IOW('T', 11, struct sunos_termios) 119 #define SUNOS_TCSNDBRK _IO('T', 12) 120 #define SUNOS_TCDRAIN _IO('T', 13) 121 122 /* Sun audio compatibility */ 123 struct sunos_audio_prinfo { 124 u_int sample_rate; 125 u_int channels; 126 u_int precision; 127 u_int encoding; 128 u_int gain; 129 u_int port; 130 u_int avail_ports; 131 u_int reserved0[3]; 132 u_int samples; 133 u_int eof; 134 u_char pause; 135 u_char error; 136 u_char waiting; 137 u_char balance; 138 u_short minordev; 139 u_char open; 140 u_char active; 141 }; 142 struct sunos_audio_info { 143 struct sunos_audio_prinfo play; 144 struct sunos_audio_prinfo record; 145 u_int monitor_gain; 146 u_int reserved[4]; 147 }; 148 149 /* Values for AUDIO_GETDEV ioctl: */ 150 #define SUNOS_AUDIO_DEV_UNKNOWN 0 151 #define SUNOS_AUDIO_DEV_AMD 1 152 #define SUNOS_AUDIO_DEV_SPEAKERBOX 2 153 #define SUNOS_AUDIO_DEV_CODEC 3 154 155 __BEGIN_DECLS 156 /* Defined in arch/<arch>/sunos_machdep.c */ 157 void sunos_sendsig __P((int, sigset_t *, u_long)); 158 __END_DECLS 159 160 #endif /* _COMPAT_SUNOS_SUNOS_H_ */ 161