Home | History | Annotate | Line # | Download | only in sunos
sunos.h revision 1.10
      1 /*	$NetBSD: sunos.h,v 1.10 1998/08/22 17:41:43 mrg 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 /* SunOS nfs flag values: */
     29 #define SUNNFS_SOFT	0x1
     30 #define SUNNFS_WSIZE	0x2
     31 #define SUNNFS_RSIZE	0x4
     32 #define SUNNFS_TIMEO	0x8
     33 #define SUNNFS_RETRANS	0x10
     34 #define SUNNFS_HOSTNAME	0x20
     35 #define SUNNFS_INT	0x40
     36 #define SUNNFS_NOAC	0x80
     37 #define SUNNFS_ACREGMIN	0x100
     38 #define SUNNFS_ACREGMAX	0x200
     39 #define SUNNFS_ACDIRMIN	0x400
     40 #define SUNNFS_ACDIRMAX	0x800
     41 #define SUNNFS_SECURE	0x1000
     42 #define SUNNFS_NOCTO	0x2000
     43 #define SUNNFS_POSIX	0x4000
     44 
     45 
     46 struct sunos_ustat {
     47 	daddr_t	f_tfree;	/* total free */
     48 	ino_t	f_tinode;	/* total inodes free */
     49 	char	f_path[6];	/* filsys name */
     50 	char	f_fpack[6];	/* filsys pack name */
     51 };
     52 
     53 struct sunos_statfs {
     54 	int	f_type;		/* type of info, zero for now */
     55 	int	f_bsize;	/* fundamental file system block size */
     56 	int	f_blocks;	/* total blocks in file system */
     57 	int	f_bfree;	/* free blocks */
     58 	int	f_bavail;	/* free blocks available to non-super-user */
     59 	int	f_files;	/* total file nodes in file system */
     60 	int	f_ffree;	/* free file nodes in fs */
     61 	fsid_t	f_fsid;		/* file system id */
     62 	int	f_spare[7];	/* spare for later */
     63 };
     64 
     65 
     66 struct sunos_utsname {
     67 	char    sysname[9];
     68 	char    nodename[9];
     69 	char    nodeext[65-9];
     70 	char    release[9];
     71 	char    version[9];
     72 	char    machine[9];
     73 };
     74 
     75 
     76 struct sunos_ttysize {
     77 	int	ts_row;
     78 	int	ts_col;
     79 };
     80 
     81 struct sunos_termio {
     82 	u_short	c_iflag;
     83 	u_short	c_oflag;
     84 	u_short	c_cflag;
     85 	u_short	c_lflag;
     86 	char	c_line;
     87 	unsigned char c_cc[8];
     88 };
     89 #define SUNOS_TCGETA	_IOR('T', 1, struct sunos_termio)
     90 #define SUNOS_TCSETA	_IOW('T', 2, struct sunos_termio)
     91 #define SUNOS_TCSETAW	_IOW('T', 3, struct sunos_termio)
     92 #define SUNOS_TCSETAF	_IOW('T', 4, struct sunos_termio)
     93 #define SUNOS_TCSBRK	_IO('T', 5)
     94 
     95 struct sunos_termios {
     96 	u_int	c_iflag;
     97 	u_int	c_oflag;
     98 	u_int	c_cflag;
     99 	u_int	c_lflag;
    100 	char	c_line;
    101 	u_char	c_cc[17];
    102 };
    103 #define SUNOS_TCXONC	_IO('T', 6)
    104 #define SUNOS_TCFLSH	_IO('T', 7)
    105 #define SUNOS_TCGETS	_IOR('T', 8, struct sunos_termios)
    106 #define SUNOS_TCSETS	_IOW('T', 9, struct sunos_termios)
    107 #define SUNOS_TCSETSW	_IOW('T', 10, struct sunos_termios)
    108 #define SUNOS_TCSETSF	_IOW('T', 11, struct sunos_termios)
    109 #define SUNOS_TCSNDBRK	_IO('T', 12)
    110 #define SUNOS_TCDRAIN	_IO('T', 13)
    111 
    112 /* Sun audio compatibility */
    113 struct sunos_audio_prinfo {
    114 	u_int	sample_rate;
    115 	u_int	channels;
    116 	u_int	precision;
    117 	u_int	encoding;
    118 	u_int	gain;
    119 	u_int	port;
    120 	u_int	avail_ports;
    121 	u_int	reserved0[3];
    122 	u_int	samples;
    123 	u_int	eof;
    124 	u_char	pause;
    125 	u_char	error;
    126 	u_char	waiting;
    127 	u_char	balance;
    128 	u_short	minordev;
    129 	u_char	open;
    130 	u_char	active;
    131 };
    132 struct sunos_audio_info {
    133 	struct sunos_audio_prinfo play;
    134 	struct sunos_audio_prinfo record;
    135 	u_int monitor_gain;
    136 	u_int reserved[4];
    137 };
    138 
    139 /* Values for AUDIO_GETDEV ioctl: */
    140 #define SUNOS_AUDIO_DEV_UNKNOWN			0
    141 #define SUNOS_AUDIO_DEV_AMD			1
    142 #define SUNOS_AUDIO_DEV_SPEAKERBOX		2
    143 #define SUNOS_AUDIO_DEV_CODEC			3
    144 
    145 __BEGIN_DECLS
    146 /* Defined in arch/m68k/m68k/sunos_machdep.c -- sparc uses regular sendsig() */
    147 #ifndef __sparc__
    148 void	sunos_sendsig __P((sig_t, int, int, u_long));
    149 #endif
    150 __END_DECLS
    151