]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/include/exportfs.h
exports: let kernel decide which flags vary by flavor
[nfs-utils.git] / support / include / exportfs.h
index 431b5ce7701c0036668d8a61b31367f7b654c44f..ce7eac0b7507e7ddab4186b38c7d3dd13479218d 100644 (file)
@@ -32,7 +32,7 @@ enum {
 
 typedef struct mclient {
        struct mclient *        m_next;
-       char                    m_hostname[NFSCLNT_IDMAX+1];
+       char *                  m_hostname;
        int                     m_type;
        int                     m_naddr;
        struct in_addr          m_addrlist[NFSCLNT_ADDRMAX];
@@ -52,8 +52,21 @@ typedef struct mexport {
                                                 * matching one client */
 } nfs_export;
 
+#define HASH_TABLE_SIZE 1021
+
+typedef struct _exp_hash_entry {
+       nfs_export * p_first;
+       nfs_export * p_last;
+} exp_hash_entry;
+
+typedef struct _exp_hash_table {
+       nfs_export * p_head;
+       exp_hash_entry entries[HASH_TABLE_SIZE];
+} exp_hash_table;
+
+extern exp_hash_table exportlist[MCL_MAXTYPES];
+
 extern nfs_client *            clientlist[MCL_MAXTYPES];
-extern nfs_export *            exportlist[MCL_MAXTYPES];
 
 nfs_client *                   client_lookup(char *hname, int canonical);
 nfs_client *                   client_find(struct hostent *);
@@ -64,11 +77,12 @@ int                         client_check(nfs_client *, struct hostent *);
 int                            client_match(nfs_client *, char *hname);
 void                           client_release(nfs_client *);
 void                           client_freeall(void);
-char *                         client_compose(struct in_addr addr);
+char *                         client_compose(struct hostent *he);
+struct hostent *               client_resolve(struct in_addr addr);
 int                            client_member(char *client, char *name);
 
 int                            export_read(char *fname);
-void                           export_add(nfs_export *);
+void                   export_add(nfs_export *);
 void                           export_reset(nfs_export *);
 nfs_export *                   export_lookup(char *hname, char *path, int caconical);
 nfs_export *                   export_find(struct hostent *, char *path);
@@ -89,6 +103,13 @@ int                         rmtab_read(void);
 
 struct nfskey *                        key_lookup(char *hname);
 
+struct export_features {
+       unsigned int flags;
+       unsigned int secinfo_flags;
+};
+
+struct export_features *get_export_features(void);
+
 /* Record export error.  */
 extern int export_errno;