1 /* $OpenBSD: mount.h,v 1.2 1996/03/25 15:54:56 niklas 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. All advertising materials mentioning features or use of this software 21 * must display the following acknowledgement: 22 * This product includes software developed by the University of 23 * California, Berkeley and its contributors. 24 * 4. Neither the name of the University nor the names of its contributors 25 * may be used to endorse or promote products derived from this software 26 * without specific prior written permission. 27 * 28 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 29 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 30 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 31 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 32 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 38 * SUCH DAMAGE. 39 * 40 * from: @(#)mount.h 8.1 (Berkeley) 6/6/93 41 */ 42 43 #define MNTPATHLEN 1024 44 #define MNTNAMLEN 255 45 46 #if NFS_PROTOCOL_VERSION < 3 47 #define FHSIZE 32 48 typedef char fhandle[FHSIZE]; 49 typedef struct fhstatus { 50 u_int fhs_stat; 51 fhandle fhs_fhandle; 52 } fhstatus; 53 #else 54 #define FHSIZE NFSX_V3FHMAX 55 typedef char fhandle[NFSX_V3FHMAX]; 56 typedef struct fhstatus { 57 u_long fhs_stat; 58 long fhs_vers; 59 long fhs_auth; 60 long fhs_size; 61 fhandle fhs_fhandle; 62 } fhstatus; 63 #endif 64 65 bool_t xdr_fhandle(); 66 67 68 bool_t xdr_fhstatus(); 69 70 71 typedef char *dirpath; 72 bool_t xdr_dirpath(); 73 74 75 typedef char *name; 76 bool_t xdr_name(); 77 78 79 typedef struct mountbody *mountlist; 80 bool_t xdr_mountlist(); 81 82 83 struct mountbody { 84 name ml_hostname; 85 dirpath ml_directory; 86 mountlist ml_next; 87 }; 88 typedef struct mountbody mountbody; 89 bool_t xdr_mountbody(); 90 91 92 typedef struct groupnode *groups; 93 bool_t xdr_groups(); 94 95 96 struct groupnode { 97 name gr_name; 98 groups gr_next; 99 }; 100 typedef struct groupnode groupnode; 101 bool_t xdr_groupnode(); 102 103 104 typedef struct exportnode *exports; 105 bool_t xdr_exports(); 106 107 108 struct exportnode { 109 dirpath ex_dir; 110 groups ex_groups; 111 exports ex_next; 112 }; 113 typedef struct exportnode exportnode; 114 bool_t xdr_exportnode(); 115 116 117 #define MOUNTPROG ((u_long)100005) 118 #define MOUNTVERS ((u_long)1) 119 #define MOUNTPROC_NULL ((u_long)0) 120 extern voidp mountproc_null_1(); 121 #define MOUNTPROC_MNT ((u_long)1) 122 extern fhstatus *mountproc_mnt_1(); 123 #define MOUNTPROC_DUMP ((u_long)2) 124 extern mountlist *mountproc_dump_1(); 125 #define MOUNTPROC_UMNT ((u_long)3) 126 extern voidp mountproc_umnt_1(); 127 #define MOUNTPROC_UMNTALL ((u_long)4) 128 extern voidp mountproc_umntall_1(); 129 #define MOUNTPROC_EXPORT ((u_long)5) 130 extern exports *mountproc_export_1(); 131 #define MOUNTPROC_EXPORTALL ((u_long)6) 132 extern exports *mountproc_exportall_1(); 133 134