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