RTEMS  5.0.0
mount_prot.h
Go to the documentation of this file.
1 
9 #ifndef _MOUNT_PROT_H_RPCGEN
10 #define _MOUNT_PROT_H_RPCGEN
11 
12 #include <rpc/rpc.h>
13 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #define MNTPATHLEN 1024
25 #define MNTNAMLEN 255
26 #define FHSIZE 32
27 
28 typedef char fhandle[FHSIZE];
29 
30 struct fhstatus {
31  u_int fhs_status;
32  union {
33  fhandle fhs_fhandle;
34  } fhstatus_u;
35 };
36 typedef struct fhstatus fhstatus;
37 
38 typedef char *dirpath;
39 
40 typedef char *name;
41 
42 typedef struct mountbody *mountlist;
43 
44 struct mountbody {
45  name ml_hostname;
46  dirpath ml_directory;
47  mountlist ml_next;
48 };
49 typedef struct mountbody mountbody;
50 
51 typedef struct groupnode *groups;
52 
53 struct groupnode {
54  name gr_name;
55  groups gr_next;
56 };
57 typedef struct groupnode groupnode;
58 
59 typedef struct exportnode *exports;
60 
61 struct exportnode {
62  dirpath ex_dir;
63  groups ex_groups;
64  exports ex_next;
65 };
66 typedef struct exportnode exportnode;
67 
68 #define MOUNTPROG 100005
69 #define MOUNTVERS 1
70 
71 #if defined(__STDC__) || defined(__cplusplus)
72 #define MOUNTPROC_NULL 0
73 extern void * mountproc_null_1(void *, CLIENT *);
74 extern void * mountproc_null_1_svc(void *, struct svc_req *);
75 #define MOUNTPROC_MNT 1
76 extern fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);
77 extern fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);
78 #define MOUNTPROC_DUMP 2
79 extern mountlist * mountproc_dump_1(void *, CLIENT *);
80 extern mountlist * mountproc_dump_1_svc(void *, struct svc_req *);
81 #define MOUNTPROC_UMNT 3
82 extern void * mountproc_umnt_1(dirpath *, CLIENT *);
83 extern void * mountproc_umnt_1_svc(dirpath *, struct svc_req *);
84 #define MOUNTPROC_UMNTALL 4
85 extern void * mountproc_umntall_1(void *, CLIENT *);
86 extern void * mountproc_umntall_1_svc(void *, struct svc_req *);
87 #define MOUNTPROC_EXPORT 5
88 extern exports * mountproc_export_1(void *, CLIENT *);
89 extern exports * mountproc_export_1_svc(void *, struct svc_req *);
90 #define MOUNTPROC_EXPORTALL 6
91 extern exports * mountproc_exportall_1(void *, CLIENT *);
92 extern exports * mountproc_exportall_1_svc(void *, struct svc_req *);
93 extern int mountprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
94 
95 #else /* K&R C */
96 #define MOUNTPROC_NULL 0
97 extern void * mountproc_null_1();
98 extern void * mountproc_null_1_svc();
99 #define MOUNTPROC_MNT 1
100 extern fhstatus * mountproc_mnt_1();
101 extern fhstatus * mountproc_mnt_1_svc();
102 #define MOUNTPROC_DUMP 2
103 extern mountlist * mountproc_dump_1();
104 extern mountlist * mountproc_dump_1_svc();
105 #define MOUNTPROC_UMNT 3
106 extern void * mountproc_umnt_1();
107 extern void * mountproc_umnt_1_svc();
108 #define MOUNTPROC_UMNTALL 4
109 extern void * mountproc_umntall_1();
110 extern void * mountproc_umntall_1_svc();
111 #define MOUNTPROC_EXPORT 5
112 extern exports * mountproc_export_1();
113 extern exports * mountproc_export_1_svc();
114 #define MOUNTPROC_EXPORTALL 6
115 extern exports * mountproc_exportall_1();
116 extern exports * mountproc_exportall_1_svc();
117 extern int mountprog_1_freeresult ();
118 #endif /* K&R C */
119 
120 /* the xdr functions */
121 
122 #if defined(__STDC__) || defined(__cplusplus)
123 extern bool_t xdr_fhandle (XDR *, fhandle);
124 extern bool_t xdr_fhstatus (XDR *, fhstatus*);
125 extern bool_t xdr_dirpath (XDR *, dirpath*);
126 extern bool_t xdr_name (XDR *, name*);
127 extern bool_t xdr_mountlist (XDR *, mountlist*);
128 extern bool_t xdr_mountbody (XDR *, mountbody*);
129 extern bool_t xdr_groups (XDR *, groups*);
130 extern bool_t xdr_groupnode (XDR *, groupnode*);
131 extern bool_t xdr_exports (XDR *, exports*);
132 extern bool_t xdr_exportnode (XDR *, exportnode*);
133 
134 #else /* K&R C */
135 extern bool_t xdr_fhandle ();
136 extern bool_t xdr_fhstatus ();
137 extern bool_t xdr_dirpath ();
138 extern bool_t xdr_name ();
139 extern bool_t xdr_mountlist ();
140 extern bool_t xdr_mountbody ();
141 extern bool_t xdr_groups ();
142 extern bool_t xdr_groupnode ();
143 extern bool_t xdr_exports ();
144 extern bool_t xdr_exportnode ();
145 
146 #endif /* K&R C */
147 
148 #ifdef __cplusplus
149 }
150 #endif
151 
152 #endif /* !_MOUNT_PROT_H_RPCGEN */
Definition: mount_prot.h:61
Definition: mount_prot.h:53
Definition: mount_prot.h:44
Definition: mount_prot.h:30