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;
35 char m_hostname[NFSCLNT_IDMAX+1];
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 */
53 extern nfs_client * clientlist[MCL_MAXTYPES];
54 extern nfs_export * exportlist[MCL_MAXTYPES];
56 nfs_client * client_lookup(char *hname, int canonical);
57 nfs_client * client_find(struct hostent *);
58 void client_add(nfs_client *);
59 nfs_client * client_dup(nfs_client *, struct hostent *);
60 int client_gettype(char *hname);
61 int client_check(nfs_client *, struct hostent *);
62 int client_match(nfs_client *, char *hname);
63 void client_release(nfs_client *);
64 void client_freeall(void);
65 char * client_compose(struct in_addr addr);
66 int client_member(char *client, char *name);
68 int export_read(char *fname);
69 void export_add(nfs_export *);
70 void export_reset(nfs_export *);
71 nfs_export * export_lookup(char *hname, char *path, int caconical);
72 nfs_export * export_find(struct hostent *, char *path);
73 nfs_export * export_allowed(struct hostent *, char *path);
74 nfs_export * export_create(struct exportent *, int canonical);
75 nfs_export * export_dup(nfs_export *, struct hostent *);
76 void export_freeall(void);
77 int export_export(nfs_export *);
78 int export_unexport(nfs_export *);
80 int xtab_mount_read(void);
81 int xtab_export_read(void);
82 int xtab_mount_write(void);
83 int xtab_export_write(void);
84 void xtab_append(nfs_export *);
88 struct nfskey * key_lookup(char *hname);
90 /* Record export error. */
91 extern int export_errno;
93 #endif /* EXPORTFS_H */