sunos.h revision 1.2 1 1.2 cgd /* $NetBSD: sunos.h,v 1.2 1994/10/26 02:57:08 cgd 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.1 deraadt
29 1.1 deraadt
30 1.1 deraadt /*
31 1.1 deraadt * Here is the sun layout. (Compare the BSD layout in <sys/dirent.h>.)
32 1.1 deraadt * We can assume big-endian, so the BSD d_type field is just the high
33 1.1 deraadt * byte of the SunOS d_namlen field, after adjusting for the extra "long".
34 1.1 deraadt */
35 1.1 deraadt struct sunos_dirent {
36 1.1 deraadt long d_off;
37 1.1 deraadt u_long d_fileno;
38 1.1 deraadt u_short d_reclen;
39 1.1 deraadt u_short d_namlen;
40 1.1 deraadt char d_name[256];
41 1.1 deraadt };
42 1.1 deraadt
43 1.1 deraadt
44 1.1 deraadt struct sunos_ustat {
45 1.1 deraadt daddr_t f_tfree; /* total free */
46 1.1 deraadt ino_t f_tinode; /* total inodes free */
47 1.1 deraadt char f_path[6]; /* filsys name */
48 1.1 deraadt char f_fpack[6]; /* filsys pack name */
49 1.1 deraadt };
50 1.1 deraadt
51 1.1 deraadt struct sunos_statfs {
52 1.1 deraadt long f_type; /* type of info, zero for now */
53 1.1 deraadt long f_bsize; /* fundamental file system block size */
54 1.1 deraadt long f_blocks; /* total blocks in file system */
55 1.1 deraadt long f_bfree; /* free blocks */
56 1.1 deraadt long f_bavail; /* free blocks available to non-super-user */
57 1.1 deraadt long f_files; /* total file nodes in file system */
58 1.1 deraadt long f_ffree; /* free file nodes in fs */
59 1.1 deraadt fsid_t f_fsid; /* file system id */
60 1.1 deraadt long f_spare[7]; /* spare for later */
61 1.1 deraadt };
62 1.1 deraadt
63 1.1 deraadt
64 1.1 deraadt struct sunos_utsname {
65 1.1 deraadt char sysname[9];
66 1.1 deraadt char nodename[9];
67 1.1 deraadt char nodeext[65-9];
68 1.1 deraadt char release[9];
69 1.1 deraadt char version[9];
70 1.1 deraadt char machine[9];
71 1.1 deraadt };
72 1.1 deraadt
73 1.1 deraadt
74 1.1 deraadt struct sunos_ttysize {
75 1.1 deraadt int ts_row;
76 1.1 deraadt int ts_col;
77 1.1 deraadt };
78 1.1 deraadt
79 1.1 deraadt struct sunos_termio {
80 1.1 deraadt u_short c_iflag;
81 1.1 deraadt u_short c_oflag;
82 1.1 deraadt u_short c_cflag;
83 1.1 deraadt u_short c_lflag;
84 1.1 deraadt char c_line;
85 1.1 deraadt unsigned char c_cc[8];
86 1.1 deraadt };
87 1.1 deraadt #define SUNOS_TCGETA _IOR('T', 1, struct sunos_termio)
88 1.1 deraadt #define SUNOS_TCSETA _IOW('T', 2, struct sunos_termio)
89 1.1 deraadt #define SUNOS_TCSETAW _IOW('T', 3, struct sunos_termio)
90 1.1 deraadt #define SUNOS_TCSETAF _IOW('T', 4, struct sunos_termio)
91 1.1 deraadt #define SUNOS_TCSBRK _IO('T', 5)
92 1.1 deraadt
93 1.1 deraadt struct sunos_termios {
94 1.1 deraadt u_long c_iflag;
95 1.1 deraadt u_long c_oflag;
96 1.1 deraadt u_long c_cflag;
97 1.1 deraadt u_long c_lflag;
98 1.1 deraadt char c_line;
99 1.1 deraadt u_char c_cc[17];
100 1.1 deraadt };
101 1.1 deraadt #define SUNOS_TCXONC _IO('T', 6)
102 1.1 deraadt #define SUNOS_TCFLSH _IO('T', 7)
103 1.1 deraadt #define SUNOS_TCGETS _IOR('T', 8, struct sunos_termios)
104 1.1 deraadt #define SUNOS_TCSETS _IOW('T', 9, struct sunos_termios)
105 1.1 deraadt #define SUNOS_TCSETSW _IOW('T', 10, struct sunos_termios)
106 1.1 deraadt #define SUNOS_TCSETSF _IOW('T', 11, struct sunos_termios)
107 1.1 deraadt #define SUNOS_TCSNDBRK _IO('T', 12)
108 1.1 deraadt #define SUNOS_TCDRAIN _IO('T', 13)
109 1.1 deraadt
110