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. */
8 typedef u_int32_t sunos_charp
;
10 typedef char * sunos_charp
;
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
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 */
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
{
88 struct sunos_ttysize
{
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
{
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
{
144 struct sunos_audio_info
{
145 struct sunos_audio_prinfo play
;
146 struct sunos_audio_prinfo record
;
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
158 /* Defined in arch/<arch>/sunos_machdep.c */
159 void sunos_sendsig(const ksiginfo_t
*, const sigset_t
*);
162 #endif /* _COMPAT_SUNOS_SUNOS_H_ */