/* $Header: /afs/transarc.com/project/fs/dev/afs/rcs/config/RCS/uvenus.h,v 2.17 1993/06/23 00:22:42 vasilis Exp $ */
/* $Source: /afs/transarc.com/project/fs/dev/afs/rcs/config/RCS/uvenus.h,v $ */

#if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS)
static char *rcsiduvenus = "$Header: /afs/transarc.com/project/fs/dev/afs/rcs/config/RCS/uvenus.h,v 2.17 1993/06/23 00:22:42 vasilis Exp $";
#endif

/*
 * P_R_P_Q_# (C) COPYRIGHT IBM CORPORATION 1987
 * LICENSED MATERIALS - PROPERTY OF IBM
 * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
 */
/* /usr/andrew/include/vice/ioctl.h

Definitions of Venus-specific ioctls for Venus 2.
 */
#ifndef _IOW
#include <sys/ioctl.h>
#endif

#ifndef _VICEIOCTL
#include <afs/vice.h>
#endif

/* some structures used with CM pioctls */

/* structs for Get/Set server preferences pioctl
 */
struct spref {
	struct in_addr server;
	unsigned short rank;
};

struct sprefrequest {
	unsigned short offset;
	unsigned short num_servers;
};

struct sprefinfo {
	unsigned short next_offset;
	unsigned short num_servers;
	struct spref servers[1];		/* we overrun this array intentionally...*/
};
/* struct for GAG pioctl
 */
struct gaginfo {
	unsigned long showflags, logflags, logwritethruflag, spare[3];
	unsigned char spare2[128];
};
#define GAGUSER    1
#define GAGCONSOLE 2
#define logwritethruON	1

struct rxparams {
	unsigned long maxsendsize, maxreceivesize;
	unsigned long spare[30];
};

/* struct for checkservers */

struct chservinfo
{
        int magic;
	char tbuffer[128];
	int tsize;
	long tinterval;
	long tflags;
}
;

/* IOCTLS to Venus.  Apply these to open file decriptors. */
#define	VIOCCLOSEWAIT		_VICEIOCTL(1)	/* Force close to wait for store */
#define	VIOCABORT		_VICEIOCTL(2)	/* Abort close on this fd */
#define	VIOCIGETCELL		_VICEIOCTL(3)	/* ioctl to get cell name */

/* PIOCTLS to Venus.  Apply these to path names with pioctl. */
#define	VIOCSETAL		_VICEIOCTL(1)	/* Get access control list */
#define	VIOCGETAL		_VICEIOCTL(2)	/* Set access control list */
#define	VIOCSETTOK		_VICEIOCTL(3)	/* Set authentication tokens */
#define	VIOCGETVOLSTAT		_VICEIOCTL(4)	/* Get volume status */
#define	VIOCSETVOLSTAT		_VICEIOCTL(5)	/* Set volume status */
#define	VIOCFLUSH		_VICEIOCTL(6)	/* Invalidate cache entry */
#define	VIOCSTAT		_VICEIOCTL(7)	/* Get file status */
#define	VIOCGETTOK		_VICEIOCTL(8)	/* Get authentication tokens */
#define	VIOCUNLOG		_VICEIOCTL(9)	/* Invalidate tokens */
#define	VIOCCKSERV		_VICEIOCTL(10)	/* Check that servers are up */
#define	VIOCCKBACK		_VICEIOCTL(11)	/* Check backup volume mappings */
#define	VIOCCKCONN		_VICEIOCTL(12)	/* Check connections for a user */
#define	VIOCGETTIME		_VICEIOCTL(13)	/* Do a vice gettime for performance testing */
#define	VIOCWHEREIS		_VICEIOCTL(14)	/* Find out where a volume is located */
#define	VIOCPREFETCH		_VICEIOCTL(15)	/* Prefetch a file */
#define	VIOCNOP			_VICEIOCTL(16)	/* Do nothing (more preformance) */
#define	VIOCENGROUP		_VICEIOCTL(17)	/* Enable group access for a group */
#define	VIOCDISGROUP		_VICEIOCTL(18)	/* Disable group access */
#define	VIOCLISTGROUPS		_VICEIOCTL(19)	/* List enabled and disabled groups */
#define	VIOCACCESS		_VICEIOCTL(20)	/* Access using PRS_FS bits */
#define	VIOCUNPAG		_VICEIOCTL(21)	/* Invalidate pag */
#define	VIOCGETFID		_VICEIOCTL(22)	/* Get file ID quickly */
#define	VIOCWAITFOREVER		_VICEIOCTL(23)	/* Wait for dead servers forever */
#define	VIOCSETCACHESIZE	_VICEIOCTL(24)	/* Set venus cache size in 1k units */
#define	VIOCFLUSHCB		_VICEIOCTL(25)	/* Flush callback only */
#define	VIOCNEWCELL		_VICEIOCTL(26)	/* Configure new cell */
#define VIOCGETCELL		_VICEIOCTL(27)	/* Get cell info */
#define	VIOC_AFS_DELETE_MT_PT	_VICEIOCTL(28)	/* [AFS] Delete mount point */
#define VIOC_AFS_STAT_MT_PT	_VICEIOCTL(29)	/* [AFS] Stat mount point */
#define	VIOC_FILE_CELL_NAME	_VICEIOCTL(30)	/* Get cell in which file lives */
#define	VIOC_GET_WS_CELL	_VICEIOCTL(31)	/* Get cell in which workstation lives */
#define VIOC_AFS_MARINER_HOST	_VICEIOCTL(32)	/* [AFS] Get/set mariner host */
#define VIOC_GET_PRIMARY_CELL	_VICEIOCTL(33)	/* Get primary cell for caller */
#define	VIOC_VENUSLOG		_VICEIOCTL(34)	/* Enable/Disable venus logging */
#define	VIOC_GETCELLSTATUS	_VICEIOCTL(35)	/* get cell status info */
#define	VIOC_SETCELLSTATUS	_VICEIOCTL(36)	/* set corresponding info */
#define	VIOC_FLUSHVOLUME	_VICEIOCTL(37)	/* flush whole volume's data */
#define	VIOC_AFS_SYSNAME	_VICEIOCTL(38)  /* Change @sys value */
#define	VIOC_EXPORTAFS		_VICEIOCTL(39)	/* Export afs to nfs clients */
#define VIOCGETCACHEPARMS	_VICEIOCTL(40)	/* Get cache stats */
#define VIOCGETVCXSTATUS	_VICEIOCTL(41)	
#define VIOC_SETSPREFS  	_VICEIOCTL(42)	/* Set server ranks */
#define VIOC_GETSPREFS  	_VICEIOCTL(43)	/* Get server ranks */
#define VIOC_GAG    	        _VICEIOCTL(44)	/* silence CM */
#define VIOC_TWIDDLE    	_VICEIOCTL(45)	/* adjust RX knobs */
