summaryrefslogtreecommitdiffstats
path: root/support/include/exportfs.h
diff options
context:
space:
mode:
authorhjl <hjl>1999-10-18 23:21:12 +0000
committerhjl <hjl>1999-10-18 23:21:12 +0000
commit8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9 (patch)
tree0904ef8554ed680fe3244fa618685e1fb7ea148b /support/include/exportfs.h
downloadnfs-utils-8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9.tar.gz
nfs-utils-8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9.tar.xz
nfs-utils-8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9.zip
Initial revision
Diffstat (limited to 'support/include/exportfs.h')
-rw-r--r--support/include/exportfs.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/support/include/exportfs.h b/support/include/exportfs.h
new file mode 100644
index 0000000..d440dc1
--- /dev/null
+++ b/support/include/exportfs.h
@@ -0,0 +1,80 @@
+/*
+ * support/include/exportfs.h
+ *
+ * Declarations for exportfs and mountd
+ *
+ * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
+ */
+
+#ifndef EXPORTFS_H
+#define EXPORTFS_H
+
+#include <netdb.h>
+#include "nfslib.h"
+
+enum {
+ MCL_FQDN = 0,
+ MCL_SUBNETWORK,
+ MCL_IPADDR = MCL_SUBNETWORK,
+ MCL_WILDCARD,
+ MCL_NETGROUP,
+ MCL_ANONYMOUS,
+ MCL_MAXTYPES
+};
+
+typedef struct mclient {
+ struct mclient * m_next;
+ char m_hostname[NFSCLNT_IDMAX+1];
+ int m_type;
+ int m_naddr;
+ struct in_addr m_addrlist[NFSCLNT_ADDRMAX];
+ int m_exported; /* exported to nfsd */
+ int m_count;
+} nfs_client;
+
+typedef struct mexport {
+ struct mexport * m_next;
+ struct mclient * m_client;
+ struct exportent m_export;
+ int m_exported : 1, /* known to knfsd */
+ m_xtabent : 1, /* xtab entry exists */
+ m_mayexport: 1, /* derived from xtabbed */
+ m_changed : 1; /* options (may) have changed */
+} nfs_export;
+
+extern nfs_client * clientlist[MCL_MAXTYPES];
+extern nfs_export * exportlist[MCL_MAXTYPES];
+
+nfs_client * client_lookup(char *hname);
+nfs_client * client_find(struct hostent *);
+void client_add(nfs_client *);
+nfs_client * client_dup(nfs_client *, struct hostent *);
+int client_gettype(char *hname);
+int client_check(nfs_client *, struct hostent *);
+int client_match(nfs_client *, char *hname);
+void client_release(nfs_client *);
+void client_freeall(void);
+
+int export_read(char *fname);
+void export_add(nfs_export *);
+void export_reset(nfs_export *);
+nfs_export * export_lookup(char *hname, char *path);
+nfs_export * export_find(struct hostent *, char *path);
+struct exportent * export_allowed(struct hostent *, char *path);
+nfs_export * export_create(struct exportent *);
+nfs_export * export_dup(nfs_export *, struct hostent *);
+void export_freeall(void);
+int export_export(nfs_export *);
+int export_unexport(nfs_export *);
+
+int xtab_mount_read(void);
+int xtab_export_read(void);
+int xtab_mount_write(void);
+int xtab_export_write(void);
+void xtab_append(nfs_export *);
+
+int rmtab_read(void);
+
+struct nfskey * key_lookup(char *hname);
+
+#endif /* EXPORTFS_H */