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