1 /* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software donated to Berkeley by 6 * Jan-Simon Pendry. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)portal.h 8.4 (Berkeley) 01/21/94 11 * 12 * $Id: portal.h,v 1.3 1992/05/30 10:05:24 jsp Exp jsp $ 13 */ 14 15 struct portal_args { 16 char *pa_config; /* Config file */ 17 int pa_socket; /* Socket to server */ 18 }; 19 20 struct portal_cred { 21 int pcr_flag; /* File open mode */ 22 uid_t pcr_uid; /* From ucred */ 23 short pcr_ngroups; /* From ucred */ 24 gid_t pcr_groups[NGROUPS]; /* From ucred */ 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