Added initial unfs3 sources for version 0.9.22+dfsg-1maemo2
[unfs3] / unfs3 / Config / exports.h
1 /*
2  * UNFS3 export controls
3  * (C) 2003, Pascal Schmidt
4  * see file LICENSE for license details
5  */
6
7 #ifndef UNFS3_EXPORTS_H
8 #define UNFS3_EXPORTS_H
9
10 #include "../mount.h" /* exports type */
11
12 #define OPT_NO_ROOT_SQUASH      1
13 #define OPT_ALL_SQUASH          2
14 #define OPT_RW                  4
15 #define OPT_REMOVABLE           8
16 #define OPT_INSECURE            16
17
18 #define PASSWORD_MAXLEN   64
19
20 #define ANON_NOTSPECIAL 0xffffffff
21
22 extern exports  exports_nfslist;
23 /* Options cache */
24 extern int      exports_opts;
25 const char      *export_path; 
26 extern uint32   export_fsid;
27 extern uint32   export_password_hash;
28
29 extern unsigned char password[PASSWORD_MAXLEN+1];
30
31 int             exports_parse(void);
32 int             exports_options(const char *path, struct svc_req *rqstp, char **password, uint32 *fsid);
33 int             export_point(const char *path);
34 char            *export_point_from_fsid(uint32 fsid, time_t **last_mtime, uint32 **dir_hash);
35 nfsstat3        exports_compat(const char *path, struct svc_req *rqstp);
36 nfsstat3        exports_rw(void);
37 uint32          exports_anonuid(void);
38 uint32          exports_anongid(void);
39 uint32          fnv1a_32(const char *str, uint32 hval);
40 #ifdef WIN32
41 uint32          wfnv1a_32(const wchar_t *str, uint32 hval);
42 #endif /* WIN32 */
43 char            *normpath(const char *path, char *normpath);
44
45 #endif