2 * support/include/exportfs.h
4 * Declarations for exportfs and mountd
6 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
18 MCL_IPADDR = MCL_SUBNETWORK,
33 typedef struct mclient {
34 struct mclient * m_next;
38 struct in_addr m_addrlist[NFSCLNT_ADDRMAX];
39 int m_exported; /* exported to nfsd */
43 typedef struct mexport {
44 struct mexport * m_next;
45 struct mclient * m_client;
46 struct exportent m_export;
47 int m_exported; /* known to knfsd. -1 means not sure */
48 int m_xtabent : 1, /* xtab entry exists */
49 m_mayexport: 1, /* derived from xtabbed */
50 m_changed : 1, /* options (may) have changed */
51 m_warned : 1; /* warned about multiple exports
52 * matching one client */
55 #define HASH_TABLE_SIZE 1021
57 typedef struct _exp_hash_entry {
62 typedef struct _exp_hash_table {
64 exp_hash_entry entries[HASH_TABLE_SIZE];
67 extern exp_hash_table exportlist[MCL_MAXTYPES];
69 extern nfs_client * clientlist[MCL_MAXTYPES];
71 nfs_client * client_lookup(char *hname, int canonical);
72 nfs_client * client_find(struct hostent *);
73 void client_add(nfs_client *);
74 nfs_client * client_dup(nfs_client *, struct hostent *);
75 int client_gettype(char *hname);
76 int client_check(nfs_client *, struct hostent *);
77 int client_match(nfs_client *, char *hname);
78 void client_release(nfs_client *);
79 void client_freeall(void);
80 char * client_compose(struct hostent *he);
81 struct hostent * client_resolve(struct in_addr addr);
82 int client_member(char *client, char *name);
84 int export_read(char *fname);
85 void export_add(nfs_export *);
86 void export_reset(nfs_export *);
87 nfs_export * export_lookup(char *hname, char *path, int caconical);
88 nfs_export * export_find(struct hostent *, char *path);
89 nfs_export * export_allowed(struct hostent *, char *path);
90 nfs_export * export_create(struct exportent *, int canonical);
91 nfs_export * export_dup(nfs_export *, struct hostent *);
92 void export_freeall(void);
93 int export_export(nfs_export *);
94 int export_unexport(nfs_export *);
96 int xtab_mount_read(void);
97 int xtab_export_read(void);
98 int xtab_mount_write(void);
99 int xtab_export_write(void);
100 void xtab_append(nfs_export *);
102 int rmtab_read(void);
104 struct nfskey * key_lookup(char *hname);
106 struct export_features {
108 unsigned int secinfo_flags;
111 struct export_features *get_export_features(void);
113 /* Record export error. */
114 extern int export_errno;
116 #endif /* EXPORTFS_H */