Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!comp.vuw.ac.nz!massey!GEustace From: GEustace@massey.ac.nz (Glen Eustace) Newsgroups: comp.protocols.nfs Subject: PCNFS, The Toolkit and NFSDRIVE Message-ID: <410@massey.ac.nz> Date: 27 Nov 89 03:53:02 GMT Organization: Massey University, Palmerston North, New Zealand Lines: 27 X-Reader: NETNEWS/PC Version 2.1 After many months I have again started writing code using the PC-NFS Programmers Toolkit and have been reminded of a problem I struck way back but had conveniently forgotten about. On our PCs we have a very small host file which serves only to perform a network connection and mount the default drives, we then set NFSDRIVE to 'P' which is a read-only, shared drive with lots of software on. There is an NFS directory on that drive which has our real hosts file on it. I have a small UDP program which attempts to look up a host using 'gethostbyname', the annoying thing is that it doesn't seem to take any notice of the NFSDRIVE variable. The program is compiled with NO_YP because we don't use YP. I want it to use the hosts file on the P: drive but it seems to insist on using the one on my C: drive?? I have tried setting the active drive to P: inside the program before calling 'gethost' but that still doesn't work. Has anybody experienced this and if so what do you do to fix it. I recall that my solution last time was to hard-code the IP number into the program but I don't really like doing that. -- Glen Eustace, Software Manager, Computer Centre, Massey University, Palmerston North, New Zealand. Phone: +64 63 69099 x7440 GMT+12 E-Mail via Internet: G.Eustace@massey.ac.nz <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Brought to you by Super Global Mega Corp .com