xref: /original-bsd/sys/miscfs/portal/portal.h (revision 7a38d872)
1 /*
2  * Copyright (c) 1992, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  * All rights reserved.
5  *
6  * This code is derived from software donated to Berkeley by
7  * Jan-Simon Pendry.
8  *
9  * %sccs.include.redist.c%
10  *
11  *	@(#)portal.h	8.3 (Berkeley) 01/04/94
12  *
13  * $Id: portal.h,v 1.3 1992/05/30 10:05:24 jsp Exp jsp $
14  */
15 
16 struct portal_args {
17 	char		*pa_config;	/* Config file */
18 	int		pa_socket;	/* Socket to server */
19 };
20 
21 struct portal_cred {
22 	int		pcr_flag;		/* File open mode */
23 	uid_t		pcr_uid;		/* From ucred */
24 	short		pcr_ngroups;		/* From ucred */
25 	gid_t		pcr_groups[NGROUPS];	/* From ucred */
26 };
27 
28 #ifdef KERNEL
29 struct portalmount {
30 	struct vnode	*pm_root;	/* Root node */
31 	struct file	*pm_server;	/* Held reference to server socket */
32 };
33 
34 struct portalnode {
35 	int		pt_size;	/* Length of Arg */
36 	char		*pt_arg;	/* Arg to send to server */
37 	int		pt_fileid;	/* cookie */
38 };
39 
40 #define VFSTOPORTAL(mp)	((struct portalmount *)((mp)->mnt_data))
41 #define	VTOPORTAL(vp) ((struct portalnode *)(vp)->v_data)
42 
43 #define PORTAL_ROOTFILEID	2
44 
45 extern int (**portal_vnodeop_p)();
46 extern struct vfsops portal_vfsops;
47 #endif /* KERNEL */
48