3 * By John Hodge (thePowersGang)
4 * This file is published under the terms of the Acess licence. See the
5 * file COPYING for details.
15 int NFS_Install(char **Arguments);
16 tVFS_Node *NFS_InitDevice(char *Devices, char **Options);
17 void NFS_Unmount(tVFS_Node *Node);
20 MODULE_DEFINE(0, 0x32 /*v0.5*/, FS_NFS, NFS_Install, NULL);
21 tVFS_Driver gNFS_FSInfo = {"nfs", 0, NFS_InitDevice, NFS_Unmount, NULL};
23 tNFS_Connection *gpNFS_Connections;
27 * \brief Installs the NFS driver
29 int NFS_Install(char **Arguments)
31 VFS_AddDriver( &gNFS_FSInfo );
36 * \brief Mount a NFS share
38 tVFS_Node *NFS_InitDevice(char *Device, char **Options)
41 tNFS_Connection *conn;
43 path = strchr( Device, ':' ) + 1;
44 host = strndup( Device, (int)(path-Device)-1 );
46 conn = malloc( sizeof(tNFS_Connection) );
48 if( !IPTools_GetAddress(host, &conn->IP) ) {
54 conn->FD = IPTools_OpenUdpClient( &conn->Host );
60 conn->Base = strdup( path );
61 conn->RootNode.ImplPtr = conn;
62 conn->RootNode.Flags = VFS_FFLAG_DIRECTORY;
64 conn->RootNode.ReadDir = NFS_ReadDir;
65 conn->RootNode.FindDir = NFS_FindDir;
66 conn->RootNode.Close = NULL;
68 return &conn->RootNode;
71 void NFS_Unmount(tVFS_Node *Node)