sunos.h revision 1.1 1 1.1 deraadt #define SUNM_RDONLY 0x01 /* mount fs read-only */
2 1.1 deraadt #define SUNM_NOSUID 0x02 /* mount fs with setuid disallowed */
3 1.1 deraadt #define SUNM_NEWTYPE 0x04 /* type is string (char *), not int */
4 1.1 deraadt #define SUNM_GRPID 0x08 /* (bsd semantics; ignored) */
5 1.1 deraadt #define SUNM_REMOUNT 0x10 /* update existing mount */
6 1.1 deraadt #define SUNM_NOSUB 0x20 /* prevent submounts (rejected) */
7 1.1 deraadt #define SUNM_MULTI 0x40 /* (ignored) */
8 1.1 deraadt #define SUNM_SYS5 0x80 /* Sys 5-specific semantics (rejected) */
9 1.1 deraadt
10 1.1 deraadt struct sunos_nfs_args {
11 1.1 deraadt struct sockaddr_in *addr; /* file server address */
12 1.1 deraadt caddr_t fh; /* file handle to be mounted */
13 1.1 deraadt int flags; /* flags */
14 1.1 deraadt int wsize; /* write size in bytes */
15 1.1 deraadt int rsize; /* read size in bytes */
16 1.1 deraadt int timeo; /* initial timeout in .1 secs */
17 1.1 deraadt int retrans; /* times to retry send */
18 1.1 deraadt char *hostname; /* server's hostname */
19 1.1 deraadt int acregmin; /* attr cache file min secs */
20 1.1 deraadt int acregmax; /* attr cache file max secs */
21 1.1 deraadt int acdirmin; /* attr cache dir min secs */
22 1.1 deraadt int acdirmax; /* attr cache dir max secs */
23 1.1 deraadt char *netname; /* server's netname */
24 1.1 deraadt struct pathcnf *pathconf; /* static pathconf kludge */
25 1.1 deraadt };
26 1.1 deraadt
27 1.1 deraadt
28 1.1 deraadt /*
29 1.1 deraadt * Here is the sun layout. (Compare the BSD layout in <sys/dirent.h>.)
30 1.1 deraadt * We can assume big-endian, so the BSD d_type field is just the high
31 1.1 deraadt * byte of the SunOS d_namlen field, after adjusting for the extra "long".
32 1.1 deraadt */
33 1.1 deraadt struct sunos_dirent {
34 1.1 deraadt long d_off;
35 1.1 deraadt u_long d_fileno;
36 1.1 deraadt u_short d_reclen;
37 1.1 deraadt u_short d_namlen;
38 1.1 deraadt char d_name[256];
39 1.1 deraadt };
40 1.1 deraadt
41 1.1 deraadt
42 1.1 deraadt struct sunos_ustat {
43 1.1 deraadt daddr_t f_tfree; /* total free */
44 1.1 deraadt ino_t f_tinode; /* total inodes free */
45 1.1 deraadt char f_path[6]; /* filsys name */
46 1.1 deraadt char f_fpack[6]; /* filsys pack name */
47 1.1 deraadt };
48 1.1 deraadt
49 1.1 deraadt struct sunos_statfs {
50 1.1 deraadt long f_type; /* type of info, zero for now */
51 1.1 deraadt long f_bsize; /* fundamental file system block size */
52 1.1 deraadt long f_blocks; /* total blocks in file system */
53 1.1 deraadt long f_bfree; /* free blocks */
54 1.1 deraadt long f_bavail; /* free blocks available to non-super-user */
55 1.1 deraadt long f_files; /* total file nodes in file system */
56 1.1 deraadt long f_ffree; /* free file nodes in fs */
57 1.1 deraadt fsid_t f_fsid; /* file system id */
58 1.1 deraadt long f_spare[7]; /* spare for later */
59 1.1 deraadt };
60 1.1 deraadt
61 1.1 deraadt
62 1.1 deraadt struct sunos_utsname {
63 1.1 deraadt char sysname[9];
64 1.1 deraadt char nodename[9];
65 1.1 deraadt char nodeext[65-9];
66 1.1 deraadt char release[9];
67 1.1 deraadt char version[9];
68 1.1 deraadt char machine[9];
69 1.1 deraadt };
70 1.1 deraadt
71 1.1 deraadt
72 1.1 deraadt struct sunos_ttysize {
73 1.1 deraadt int ts_row;
74 1.1 deraadt int ts_col;
75 1.1 deraadt };
76 1.1 deraadt
77 1.1 deraadt struct sunos_termio {
78 1.1 deraadt u_short c_iflag;
79 1.1 deraadt u_short c_oflag;
80 1.1 deraadt u_short c_cflag;
81 1.1 deraadt u_short c_lflag;
82 1.1 deraadt char c_line;
83 1.1 deraadt unsigned char c_cc[8];
84 1.1 deraadt };
85 1.1 deraadt #define SUNOS_TCGETA _IOR('T', 1, struct sunos_termio)
86 1.1 deraadt #define SUNOS_TCSETA _IOW('T', 2, struct sunos_termio)
87 1.1 deraadt #define SUNOS_TCSETAW _IOW('T', 3, struct sunos_termio)
88 1.1 deraadt #define SUNOS_TCSETAF _IOW('T', 4, struct sunos_termio)
89 1.1 deraadt #define SUNOS_TCSBRK _IO('T', 5)
90 1.1 deraadt
91 1.1 deraadt struct sunos_termios {
92 1.1 deraadt u_long c_iflag;
93 1.1 deraadt u_long c_oflag;
94 1.1 deraadt u_long c_cflag;
95 1.1 deraadt u_long c_lflag;
96 1.1 deraadt char c_line;
97 1.1 deraadt u_char c_cc[17];
98 1.1 deraadt };
99 1.1 deraadt #define SUNOS_TCXONC _IO('T', 6)
100 1.1 deraadt #define SUNOS_TCFLSH _IO('T', 7)
101 1.1 deraadt #define SUNOS_TCGETS _IOR('T', 8, struct sunos_termios)
102 1.1 deraadt #define SUNOS_TCSETS _IOW('T', 9, struct sunos_termios)
103 1.1 deraadt #define SUNOS_TCSETSW _IOW('T', 10, struct sunos_termios)
104 1.1 deraadt #define SUNOS_TCSETSF _IOW('T', 11, struct sunos_termios)
105 1.1 deraadt #define SUNOS_TCSNDBRK _IO('T', 12)
106 1.1 deraadt #define SUNOS_TCDRAIN _IO('T', 13)
107 1.1 deraadt
108