1 /* $OpenBSD: mount.h,v 1.8 2014/10/26 03:03:34 guenther Exp $ */ 2 3 /* 4 * Copyright (c) 1990 Jan-Simon Pendry 5 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine 6 * Copyright (c) 1990, 1993 7 * The Regents of the University of California. All rights reserved. 8 * 9 * This code is derived from software contributed to Berkeley by 10 * Jan-Simon Pendry at Imperial College, London. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright 16 * notice, this list of conditions and the following disclaimer. 17 * 2. Redistributions in binary form must reproduce the above copyright 18 * notice, this list of conditions and the following disclaimer in the 19 * documentation and/or other materials provided with the distribution. 20 * 3. Neither the name of the University nor the names of its contributors 21 * may be used to endorse or promote products derived from this software 22 * without specific prior written permission. 23 * 24 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)mount.h 8.1 (Berkeley) 6/6/93 37 */ 38 39 #define MNTPATHLEN 1024 40 #define MNTNAMLEN 255 41 42 #define FHSIZE NFSX_V3FHMAX 43 typedef char fhandle[NFSX_V3FHMAX]; 44 typedef struct fhstatus { 45 u_long fhs_stat; 46 long fhs_vers; 47 long fhs_auth; 48 long fhs_size; 49 fhandle fhs_fhandle; 50 } fhstatus; 51 52 bool_t xdr_fhandle(XDR *, fhandle *); 53 54 55 bool_t xdr_fhstatus(XDR *, fhstatus *); 56 57 58 typedef char *dirpath; 59 bool_t xdr_dirpath(XDR *, dirpath *); 60 61 62 typedef char *name; 63 bool_t xdr_name(XDR *, name *); 64 65 66 typedef struct mountbody *mountlist; 67 bool_t xdr_mountlist(XDR *, mountlist *); 68 69 70 struct mountbody { 71 name ml_hostname; 72 dirpath ml_directory; 73 mountlist ml_next; 74 }; 75 typedef struct mountbody mountbody; 76 bool_t xdr_mountbody(XDR *, mountbody *); 77 78 79 typedef struct groupnode *groups; 80 bool_t xdr_groups(XDR *, groups *); 81 82 83 struct groupnode { 84 name gr_name; 85 groups gr_next; 86 }; 87 typedef struct groupnode groupnode; 88 bool_t xdr_groupnode(XDR *, groupnode *); 89 90 91 typedef struct exportnode *exports; 92 bool_t xdr_exports(XDR *, exports *); 93 94 95 struct exportnode { 96 dirpath ex_dir; 97 groups ex_groups; 98 exports ex_next; 99 }; 100 typedef struct exportnode exportnode; 101 bool_t xdr_exportnode(XDR *, exportnode *); 102 103 104 #define MOUNTPROG ((u_long)100005) 105 #define MOUNTVERS ((u_long)1) 106 #define MOUNTPROC_NULL ((u_long)0) 107 extern void *mountproc_null_1(void *, CLIENT *); 108 #define MOUNTPROC_MNT ((u_long)1) 109 extern fhstatus *mountproc_mnt_1(void *, CLIENT *); 110 #define MOUNTPROC_DUMP ((u_long)2) 111 extern mountlist *mountproc_dump_1(void *, CLIENT *); 112 #define MOUNTPROC_UMNT ((u_long)3) 113 extern void *mountproc_umnt_1(void *, CLIENT *); 114 #define MOUNTPROC_UMNTALL ((u_long)4) 115 extern void *mountproc_umntall_1(void *, CLIENT *); 116 #define MOUNTPROC_EXPORT ((u_long)5) 117 extern exports *mountproc_export_1(void *, CLIENT *); 118 #define MOUNTPROC_EXPORTALL ((u_long)6) 119 extern exports *mountproc_exportall_1(void *, CLIENT *); 120