xref: /original-bsd/sys/miscfs/portal/portal.h (revision 68d9582f)
1 /*
2  * Copyright (c) 1992 The Regents of the University of California
3  * Copyright (c) 1990, 1992 Jan-Simon Pendry
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	1.1 (Berkeley) 06/03/92
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 	uid_t		pcr_uid;	/* From ucred */
23 	gid_t		pcr_gid;	/* From ucred */
24 };
25 
26 
27 #ifdef KERNEL
28 struct portalmount {
29 	struct vnode	*pm_root;	/* Root node */
30 	struct file	*pm_server;	/* Held reference to server socket */
31 };
32 
33 struct portalnode {
34 	int		pt_size;	/* Length of Arg */
35 	char		*pt_arg;	/* Arg to send to server */
36 	int		pt_fileid;	/* cookie */
37 };
38 
39 #define VFSTOPORTAL(mp)	((struct portalmount *)((mp)->mnt_data))
40 #define	VTOPORTAL(vp) ((struct portalnode *)(vp)->v_data)
41 
42 #define PORTAL_ROOTFILEID	2
43 
44 extern int (**portal_vnodeop_p)();
45 extern struct vfsops portal_vfsops;
46 #endif /* KERNEL */
47