Home | History | Annotate | Line # | Download | only in sunos
sunos.h revision 1.23
      1  1.23  christos /*	$NetBSD: sunos.h,v 1.23 2009/01/11 02:45:49 christos Exp $	*/
      2  1.12       mrg 
      3  1.12       mrg #ifndef _COMPAT_SUNOS_SUNOS_H_
      4  1.12       mrg #define _COMPAT_SUNOS_SUNOS_H_
      5  1.12       mrg 
      6  1.12       mrg /* used to ensure `struct sunos' types rename constantly sized. */
      7  1.12       mrg #ifdef __arch64__
      8  1.12       mrg typedef u_int32_t	sunos_charp;
      9  1.12       mrg #else
     10  1.12       mrg typedef char *		sunos_charp;
     11  1.12       mrg #endif
     12   1.2       cgd 
     13  1.23  christos typedef long	sunos_time_t;
     14  1.23  christos 
     15   1.1   deraadt #define	SUNM_RDONLY	0x01	/* mount fs read-only */
     16   1.1   deraadt #define	SUNM_NOSUID	0x02	/* mount fs with setuid disallowed */
     17   1.1   deraadt #define	SUNM_NEWTYPE	0x04	/* type is string (char *), not int */
     18   1.1   deraadt #define	SUNM_GRPID	0x08	/* (bsd semantics; ignored) */
     19   1.1   deraadt #define	SUNM_REMOUNT	0x10	/* update existing mount */
     20   1.1   deraadt #define	SUNM_NOSUB	0x20	/* prevent submounts (rejected) */
     21   1.1   deraadt #define	SUNM_MULTI	0x40	/* (ignored) */
     22   1.1   deraadt #define	SUNM_SYS5	0x80	/* Sys 5-specific semantics (rejected) */
     23   1.1   deraadt 
     24   1.1   deraadt struct sunos_nfs_args {
     25   1.1   deraadt 	struct	sockaddr_in *addr;	/* file server address */
     26  1.21  christos 	void *	fh;			/* file handle to be mounted */
     27   1.1   deraadt 	int	flags;			/* flags */
     28   1.1   deraadt 	int	wsize;			/* write size in bytes */
     29   1.1   deraadt 	int	rsize;			/* read size in bytes */
     30   1.1   deraadt 	int	timeo;			/* initial timeout in .1 secs */
     31   1.1   deraadt 	int	retrans;		/* times to retry send */
     32  1.12       mrg 	sunos_charp hostname;		/* server's hostname */
     33   1.1   deraadt 	int	acregmin;		/* attr cache file min secs */
     34   1.1   deraadt 	int	acregmax;		/* attr cache file max secs */
     35   1.1   deraadt 	int	acdirmin;		/* attr cache dir min secs */
     36   1.1   deraadt 	int	acdirmax;		/* attr cache dir max secs */
     37  1.12       mrg 	sunos_charp netname;		/* server's netname */
     38   1.1   deraadt 	struct	pathcnf *pathconf;	/* static pathconf kludge */
     39   1.1   deraadt };
     40   1.6        pk /* SunOS nfs flag values: */
     41   1.6        pk #define SUNNFS_SOFT	0x1
     42   1.6        pk #define SUNNFS_WSIZE	0x2
     43   1.6        pk #define SUNNFS_RSIZE	0x4
     44   1.6        pk #define SUNNFS_TIMEO	0x8
     45   1.6        pk #define SUNNFS_RETRANS	0x10
     46   1.6        pk #define SUNNFS_HOSTNAME	0x20
     47   1.6        pk #define SUNNFS_INT	0x40
     48   1.6        pk #define SUNNFS_NOAC	0x80
     49   1.6        pk #define SUNNFS_ACREGMIN	0x100
     50   1.6        pk #define SUNNFS_ACREGMAX	0x200
     51   1.6        pk #define SUNNFS_ACDIRMIN	0x400
     52   1.6        pk #define SUNNFS_ACDIRMAX	0x800
     53   1.6        pk #define SUNNFS_SECURE	0x1000
     54   1.6        pk #define SUNNFS_NOCTO	0x2000
     55   1.6        pk #define SUNNFS_POSIX	0x4000
     56   1.1   deraadt 
     57   1.1   deraadt 
     58   1.1   deraadt struct sunos_ustat {
     59  1.14      fvdl 	int32_t	f_tfree;	/* total free */
     60  1.19  christos 	uint32_t f_tinode;	/* total inodes free */
     61   1.1   deraadt 	char	f_path[6];	/* filsys name */
     62   1.1   deraadt 	char	f_fpack[6];	/* filsys pack name */
     63   1.1   deraadt };
     64   1.1   deraadt 
     65   1.1   deraadt struct sunos_statfs {
     66  1.10       mrg 	int	f_type;		/* type of info, zero for now */
     67  1.10       mrg 	int	f_bsize;	/* fundamental file system block size */
     68  1.10       mrg 	int	f_blocks;	/* total blocks in file system */
     69  1.10       mrg 	int	f_bfree;	/* free blocks */
     70  1.10       mrg 	int	f_bavail;	/* free blocks available to non-super-user */
     71  1.10       mrg 	int	f_files;	/* total file nodes in file system */
     72  1.10       mrg 	int	f_ffree;	/* free file nodes in fs */
     73   1.1   deraadt 	fsid_t	f_fsid;		/* file system id */
     74  1.10       mrg 	int	f_spare[7];	/* spare for later */
     75   1.1   deraadt };
     76   1.1   deraadt 
     77   1.1   deraadt 
     78   1.1   deraadt struct sunos_utsname {
     79   1.1   deraadt 	char    sysname[9];
     80   1.1   deraadt 	char    nodename[9];
     81   1.1   deraadt 	char    nodeext[65-9];
     82   1.1   deraadt 	char    release[9];
     83   1.1   deraadt 	char    version[9];
     84   1.1   deraadt 	char    machine[9];
     85   1.1   deraadt };
     86   1.1   deraadt 
     87   1.1   deraadt 
     88   1.1   deraadt struct sunos_ttysize {
     89   1.1   deraadt 	int	ts_row;
     90   1.1   deraadt 	int	ts_col;
     91   1.1   deraadt };
     92   1.1   deraadt 
     93   1.1   deraadt struct sunos_termio {
     94   1.1   deraadt 	u_short	c_iflag;
     95   1.1   deraadt 	u_short	c_oflag;
     96   1.1   deraadt 	u_short	c_cflag;
     97   1.1   deraadt 	u_short	c_lflag;
     98   1.1   deraadt 	char	c_line;
     99   1.1   deraadt 	unsigned char c_cc[8];
    100   1.1   deraadt };
    101   1.1   deraadt #define SUNOS_TCGETA	_IOR('T', 1, struct sunos_termio)
    102   1.1   deraadt #define SUNOS_TCSETA	_IOW('T', 2, struct sunos_termio)
    103   1.1   deraadt #define SUNOS_TCSETAW	_IOW('T', 3, struct sunos_termio)
    104   1.1   deraadt #define SUNOS_TCSETAF	_IOW('T', 4, struct sunos_termio)
    105   1.1   deraadt #define SUNOS_TCSBRK	_IO('T', 5)
    106   1.1   deraadt 
    107   1.1   deraadt struct sunos_termios {
    108  1.10       mrg 	u_int	c_iflag;
    109  1.10       mrg 	u_int	c_oflag;
    110  1.10       mrg 	u_int	c_cflag;
    111  1.10       mrg 	u_int	c_lflag;
    112   1.1   deraadt 	char	c_line;
    113   1.1   deraadt 	u_char	c_cc[17];
    114   1.1   deraadt };
    115   1.1   deraadt #define SUNOS_TCXONC	_IO('T', 6)
    116   1.1   deraadt #define SUNOS_TCFLSH	_IO('T', 7)
    117   1.1   deraadt #define SUNOS_TCGETS	_IOR('T', 8, struct sunos_termios)
    118   1.1   deraadt #define SUNOS_TCSETS	_IOW('T', 9, struct sunos_termios)
    119   1.1   deraadt #define SUNOS_TCSETSW	_IOW('T', 10, struct sunos_termios)
    120   1.1   deraadt #define SUNOS_TCSETSF	_IOW('T', 11, struct sunos_termios)
    121   1.1   deraadt #define SUNOS_TCSNDBRK	_IO('T', 12)
    122   1.1   deraadt #define SUNOS_TCDRAIN	_IO('T', 13)
    123   1.4        pk 
    124   1.4        pk /* Sun audio compatibility */
    125   1.4        pk struct sunos_audio_prinfo {
    126   1.4        pk 	u_int	sample_rate;
    127   1.4        pk 	u_int	channels;
    128   1.4        pk 	u_int	precision;
    129   1.4        pk 	u_int	encoding;
    130   1.4        pk 	u_int	gain;
    131   1.4        pk 	u_int	port;
    132   1.4        pk 	u_int	avail_ports;
    133   1.4        pk 	u_int	reserved0[3];
    134   1.4        pk 	u_int	samples;
    135   1.4        pk 	u_int	eof;
    136   1.4        pk 	u_char	pause;
    137   1.4        pk 	u_char	error;
    138   1.4        pk 	u_char	waiting;
    139   1.4        pk 	u_char	balance;
    140   1.4        pk 	u_short	minordev;
    141   1.4        pk 	u_char	open;
    142   1.4        pk 	u_char	active;
    143   1.4        pk };
    144   1.4        pk struct sunos_audio_info {
    145   1.4        pk 	struct sunos_audio_prinfo play;
    146   1.4        pk 	struct sunos_audio_prinfo record;
    147   1.4        pk 	u_int monitor_gain;
    148   1.4        pk 	u_int reserved[4];
    149   1.4        pk };
    150   1.4        pk 
    151   1.4        pk /* Values for AUDIO_GETDEV ioctl: */
    152   1.4        pk #define SUNOS_AUDIO_DEV_UNKNOWN			0
    153   1.4        pk #define SUNOS_AUDIO_DEV_AMD			1
    154   1.4        pk #define SUNOS_AUDIO_DEV_SPEAKERBOX		2
    155   1.4        pk #define SUNOS_AUDIO_DEV_CODEC			3
    156   1.4        pk 
    157   1.7    briggs __BEGIN_DECLS
    158  1.11        pk /* Defined in arch/<arch>/sunos_machdep.c */
    159  1.22       dsl void	sunos_sendsig(const ksiginfo_t *, const sigset_t *);
    160   1.7    briggs __END_DECLS
    161  1.12       mrg 
    162  1.12       mrg #endif /* _COMPAT_SUNOS_SUNOS_H_ */
    163