1 /* $OpenBSD: mount.h,v 1.6 2003/06/02 23:36:52 millert 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 #if NFS_PROTOCOL_VERSION < 3 43 #define FHSIZE 32 44 typedef char fhandle[FHSIZE]; 45 typedef struct fhstatus { 46 u_int fhs_stat; 47 fhandle fhs_fhandle; 48 } fhstatus; 49 #else 50 #define FHSIZE NFSX_V3FHMAX 51 typedef char fhandle[NFSX_V3FHMAX]; 52 typedef struct fhstatus { 53 u_long fhs_stat; 54 long fhs_vers; 55 long fhs_auth; 56 long fhs_size; 57 fhandle fhs_fhandle; 58 } fhstatus; 59 #endif 60 61 bool_t xdr_fhandle(); 62 63 64 bool_t xdr_fhstatus(); 65 66 67 typedef char *dirpath; 68 bool_t xdr_dirpath(); 69 70 71 typedef char *name; 72 bool_t xdr_name(); 73 74 75 typedef struct mountbody *mountlist; 76 bool_t xdr_mountlist(); 77 78 79 struct mountbody { 80 name ml_hostname; 81 dirpath ml_directory; 82 mountlist ml_next; 83 }; 84 typedef struct mountbody mountbody; 85 bool_t xdr_mountbody(); 86 87 88 typedef struct groupnode *groups; 89 bool_t xdr_groups(); 90 91 92 struct groupnode { 93 name gr_name; 94 groups gr_next; 95 }; 96 typedef struct groupnode groupnode; 97 bool_t xdr_groupnode(); 98 99 100 typedef struct exportnode *exports; 101 bool_t xdr_exports(); 102 103 104 struct exportnode { 105 dirpath ex_dir; 106 groups ex_groups; 107 exports ex_next; 108 }; 109 typedef struct exportnode exportnode; 110 bool_t xdr_exportnode(); 111 112 113 #define MOUNTPROG ((u_long)100005) 114 #define MOUNTVERS ((u_long)1) 115 #define MOUNTPROC_NULL ((u_long)0) 116 extern void *mountproc_null_1(); 117 #define MOUNTPROC_MNT ((u_long)1) 118 extern fhstatus *mountproc_mnt_1(); 119 #define MOUNTPROC_DUMP ((u_long)2) 120 extern mountlist *mountproc_dump_1(); 121 #define MOUNTPROC_UMNT ((u_long)3) 122 extern void *mountproc_umnt_1(); 123 #define MOUNTPROC_UMNTALL ((u_long)4) 124 extern void *mountproc_umntall_1(); 125 #define MOUNTPROC_EXPORT ((u_long)5) 126 extern exports *mountproc_export_1(); 127 #define MOUNTPROC_EXPORTALL ((u_long)6) 128 extern exports *mountproc_exportall_1(); 129