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