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