]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/include/exportfs.h
mountd: fix exporting of "/" with sec= setting.
[nfs-utils.git] / support / include / exportfs.h
index 97bb68ef203cdb9992e522b5ad79ac551941e333..1fbf7542e9b875b25e062ffb00e7731314e11f79 100644 (file)
@@ -32,6 +32,10 @@ enum {
        FSLOC_STUB
 };
 
+#ifndef EXP_LOCKFILE
+#define EXP_LOCKFILE "/var/lib/nfs/export-lock"
+#endif
+
 typedef struct mclient {
        struct mclient *        m_next;
        char *                  m_hostname;
@@ -100,6 +104,7 @@ typedef struct mexport {
 } nfs_export;
 
 #define HASH_TABLE_SIZE 1021
+#define DEFAULT_TTL    (30 * 60)
 
 typedef struct _exp_hash_entry {
        nfs_export * p_first;
@@ -116,24 +121,27 @@ extern exp_hash_table exportlist[MCL_MAXTYPES];
 extern nfs_client *            clientlist[MCL_MAXTYPES];
 
 nfs_client *                   client_lookup(char *hname, int canonical);
-nfs_client *                   client_dup(nfs_client *, struct hostent *);
+nfs_client *                   client_dup(const nfs_client *clp,
+                                               const struct addrinfo *ai);
 int                            client_gettype(char *hname);
-int                            client_check(nfs_client *, struct hostent *);
+int                            client_check(const nfs_client *clp,
+                                               const struct addrinfo *ai);
 void                           client_release(nfs_client *);
 void                           client_freeall(void);
-char *                         client_compose(struct hostent *he);
-struct hostent *               client_resolve(struct in_addr addr);
+char *                         client_compose(const struct addrinfo *ai);
+struct addrinfo *              client_resolve(const struct sockaddr *sap);
 int                            client_member(const char *client,
                                                const char *name);
 
-int                            export_read(char *fname);
-void                   export_add(nfs_export *);
+void                           export_read(char *fname);
 void                           export_reset(nfs_export *);
 nfs_export *                   export_lookup(char *hname, char *path, int caconical);
-nfs_export *                   export_find(struct hostent *, char *path);
-nfs_export *                   export_allowed(struct hostent *, char *path);
+nfs_export *                   export_find(const struct addrinfo *ai,
+                                               const char *path);
+nfs_export *                   export_allowed(const struct addrinfo *ai,
+                                               const char *path);
 nfs_export *                   export_create(struct exportent *, int canonical);
-nfs_export *                   export_dup(nfs_export *, struct hostent *);
+void                           exportent_release(struct exportent *);
 void                           export_freeall(void);
 int                            export_export(nfs_export *);
 int                            export_unexport(nfs_export *);
@@ -169,6 +177,7 @@ struct export_features {
 };
 
 struct export_features *get_export_features(void);
+void fix_pseudoflavor_flags(struct exportent *ep);
 
 /* Record export error.  */
 extern int export_errno;