xref: /csrg-svn/sys/miscfs/portal/portal.h (revision 63246)
153845Spendry /*
2*63246Sbostic  * Copyright (c) 1992, 1993
3*63246Sbostic  *	The Regents of the University of California.  All rights reserved.
453845Spendry  * All rights reserved.
553845Spendry  *
653845Spendry  * This code is derived from software donated to Berkeley by
753845Spendry  * Jan-Simon Pendry.
853845Spendry  *
953845Spendry  * %sccs.include.redist.c%
1053845Spendry  *
11*63246Sbostic  *	@(#)portal.h	8.1 (Berkeley) 06/10/93
1253845Spendry  *
1353845Spendry  * $Id: portal.h,v 1.3 1992/05/30 10:05:24 jsp Exp jsp $
1453845Spendry  */
1553845Spendry 
1653845Spendry struct portal_args {
1753845Spendry 	char		*pa_config;	/* Config file */
1853845Spendry 	int		pa_socket;	/* Socket to server */
1953845Spendry };
2053845Spendry 
2153845Spendry struct portal_cred {
2254976Spendry 	int		pcr_flag;		/* File open mode */
2354976Spendry 	uid_t		pcr_uid;		/* From ucred */
2454976Spendry 	short		pcr_ngroups;		/* From ucred */
2554976Spendry 	gid_t		pcr_groups[NGROUPS];	/* From ucred */
2653845Spendry };
2753845Spendry 
2853845Spendry #ifdef KERNEL
2953845Spendry struct portalmount {
3053845Spendry 	struct vnode	*pm_root;	/* Root node */
3153845Spendry 	struct file	*pm_server;	/* Held reference to server socket */
3253845Spendry };
3353845Spendry 
3453845Spendry struct portalnode {
3553845Spendry 	int		pt_size;	/* Length of Arg */
3653845Spendry 	char		*pt_arg;	/* Arg to send to server */
3753845Spendry 	int		pt_fileid;	/* cookie */
3853845Spendry };
3953845Spendry 
4053845Spendry #define VFSTOPORTAL(mp)	((struct portalmount *)((mp)->mnt_data))
4153845Spendry #define	VTOPORTAL(vp) ((struct portalnode *)(vp)->v_data)
4253845Spendry 
4353845Spendry #define PORTAL_ROOTFILEID	2
4453845Spendry 
4553845Spendry extern int (**portal_vnodeop_p)();
4653845Spendry extern struct vfsops portal_vfsops;
4753845Spendry #endif /* KERNEL */
48