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,
25 typedef struct mclient {
26 struct mclient * m_next;
27 char m_hostname[NFSCLNT_IDMAX+1];
30 struct in_addr m_addrlist[NFSCLNT_ADDRMAX];
31 int m_exported; /* exported to nfsd */
35 typedef struct mexport {
36 struct mexport * m_next;
37 struct mclient * m_client;
38 struct exportent m_export;
39 int m_exported; /* known to knfsd. -1 means not sure */
40 int m_xtabent : 1, /* xtab entry exists */
41 m_mayexport: 1, /* derived from xtabbed */
42 m_changed : 1; /* options (may) have changed */
45 extern nfs_client * clientlist[MCL_MAXTYPES];
46 extern nfs_export * exportlist[MCL_MAXTYPES];
48 nfs_client * client_lookup(char *hname);
49 nfs_client * client_find(struct hostent *);
50 void client_add(nfs_client *);
51 nfs_client * client_dup(nfs_client *, struct hostent *);
52 int client_gettype(char *hname);
53 int client_check(nfs_client *, struct hostent *);
54 int client_match(nfs_client *, char *hname);
55 void client_release(nfs_client *);
56 void client_freeall(void);
58 int export_read(char *fname);
59 void export_add(nfs_export *);
60 void export_reset(nfs_export *);
61 nfs_export * export_lookup(char *hname, char *path);
62 nfs_export * export_find(struct hostent *, char *path);
63 struct exportent * export_allowed(struct hostent *, char *path);
64 nfs_export * export_create(struct exportent *);
65 nfs_export * export_dup(nfs_export *, struct hostent *);
66 void export_freeall(void);
67 int export_export(nfs_export *);
68 int export_unexport(nfs_export *);
70 int xtab_mount_read(void);
71 int xtab_export_read(void);
72 int xtab_mount_write(void);
73 int xtab_export_write(void);
74 void xtab_append(nfs_export *);
78 struct nfskey * key_lookup(char *hname);
80 #endif /* EXPORTFS_H */