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