1 /* $NetBSD: sunos.h,v 1.4 1995/03/04 09:50:00 pk Exp $ */ 2 3 #define SUNM_RDONLY 0x01 /* mount fs read-only */ 4 #define SUNM_NOSUID 0x02 /* mount fs with setuid disallowed */ 5 #define SUNM_NEWTYPE 0x04 /* type is string (char *), not int */ 6 #define SUNM_GRPID 0x08 /* (bsd semantics; ignored) */ 7 #define SUNM_REMOUNT 0x10 /* update existing mount */ 8 #define SUNM_NOSUB 0x20 /* prevent submounts (rejected) */ 9 #define SUNM_MULTI 0x40 /* (ignored) */ 10 #define SUNM_SYS5 0x80 /* Sys 5-specific semantics (rejected) */ 11 12 struct sunos_nfs_args { 13 struct sockaddr_in *addr; /* file server address */ 14 caddr_t fh; /* file handle to be mounted */ 15 int flags; /* flags */ 16 int wsize; /* write size in bytes */ 17 int rsize; /* read size in bytes */ 18 int timeo; /* initial timeout in .1 secs */ 19 int retrans; /* times to retry send */ 20 char *hostname; /* server's hostname */ 21 int acregmin; /* attr cache file min secs */ 22 int acregmax; /* attr cache file max secs */ 23 int acdirmin; /* attr cache dir min secs */ 24 int acdirmax; /* attr cache dir max secs */ 25 char *netname; /* server's netname */ 26 struct pathcnf *pathconf; /* static pathconf kludge */ 27 }; 28 29 30 /* 31 * Here is the sun layout. (Compare the BSD layout in <sys/dirent.h>.) 32 * We can assume big-endian, so the BSD d_type field is just the high 33 * byte of the SunOS d_namlen field, after adjusting for the extra "long". 34 */ 35 struct sunos_dirent { 36 long d_off; 37 u_long d_fileno; 38 u_short d_reclen; 39 u_short d_namlen; 40 char d_name[256]; 41 }; 42 43 44 struct sunos_ustat { 45 daddr_t f_tfree; /* total free */ 46 ino_t f_tinode; /* total inodes free */ 47 char f_path[6]; /* filsys name */ 48 char f_fpack[6]; /* filsys pack name */ 49 }; 50 51 struct sunos_statfs { 52 long f_type; /* type of info, zero for now */ 53 long f_bsize; /* fundamental file system block size */ 54 long f_blocks; /* total blocks in file system */ 55 long f_bfree; /* free blocks */ 56 long f_bavail; /* free blocks available to non-super-user */ 57 long f_files; /* total file nodes in file system */ 58 long f_ffree; /* free file nodes in fs */ 59 fsid_t f_fsid; /* file system id */ 60 long f_spare[7]; /* spare for later */ 61 }; 62 63 64 struct sunos_utsname { 65 char sysname[9]; 66 char nodename[9]; 67 char nodeext[65-9]; 68 char release[9]; 69 char version[9]; 70 char machine[9]; 71 }; 72 73 74 struct sunos_ttysize { 75 int ts_row; 76 int ts_col; 77 }; 78 79 struct sunos_termio { 80 u_short c_iflag; 81 u_short c_oflag; 82 u_short c_cflag; 83 u_short c_lflag; 84 char c_line; 85 unsigned char c_cc[8]; 86 }; 87 #define SUNOS_TCGETA _IOR('T', 1, struct sunos_termio) 88 #define SUNOS_TCSETA _IOW('T', 2, struct sunos_termio) 89 #define SUNOS_TCSETAW _IOW('T', 3, struct sunos_termio) 90 #define SUNOS_TCSETAF _IOW('T', 4, struct sunos_termio) 91 #define SUNOS_TCSBRK _IO('T', 5) 92 93 struct sunos_termios { 94 u_long c_iflag; 95 u_long c_oflag; 96 u_long c_cflag; 97 u_long c_lflag; 98 char c_line; 99 u_char c_cc[17]; 100 }; 101 #define SUNOS_TCXONC _IO('T', 6) 102 #define SUNOS_TCFLSH _IO('T', 7) 103 #define SUNOS_TCGETS _IOR('T', 8, struct sunos_termios) 104 #define SUNOS_TCSETS _IOW('T', 9, struct sunos_termios) 105 #define SUNOS_TCSETSW _IOW('T', 10, struct sunos_termios) 106 #define SUNOS_TCSETSF _IOW('T', 11, struct sunos_termios) 107 #define SUNOS_TCSNDBRK _IO('T', 12) 108 #define SUNOS_TCDRAIN _IO('T', 13) 109 110 struct sunos_pollfd { 111 int fd; 112 short events; 113 short revents; 114 }; 115 #define SUNOS_POLLIN 0x0001 116 #define SUNOS_POLLPRI 0x0002 117 #define SUNOS_POLLOUT 0x0004 118 #define SUNOS_POLLERR 0x0008 119 #define SUNOS_POLLHUP 0x0010 120 #define SUNOS_POLLNVAL 0x0020 121 #define SUNOS_POLLRDNORM 0x0040 122 #define SUNOS_POLLRDBAND 0x0080 123 #define SUNOS_POLLWRBAND 0x0100 124 125 /* Sun audio compatibility */ 126 struct sunos_audio_prinfo { 127 u_int sample_rate; 128 u_int channels; 129 u_int precision; 130 u_int encoding; 131 u_int gain; 132 u_int port; 133 u_int avail_ports; 134 u_int reserved0[3]; 135 u_int samples; 136 u_int eof; 137 u_char pause; 138 u_char error; 139 u_char waiting; 140 u_char balance; 141 u_short minordev; 142 u_char open; 143 u_char active; 144 }; 145 struct sunos_audio_info { 146 struct sunos_audio_prinfo play; 147 struct sunos_audio_prinfo record; 148 u_int monitor_gain; 149 u_int reserved[4]; 150 }; 151 152 /* Values for AUDIO_GETDEV ioctl: */ 153 #define SUNOS_AUDIO_DEV_UNKNOWN 0 154 #define SUNOS_AUDIO_DEV_AMD 1 155 #define SUNOS_AUDIO_DEV_SPEAKERBOX 2 156 #define SUNOS_AUDIO_DEV_CODEC 3 157 158