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