Blackbanded Sunfish, Enneacanthus chaetodon
A 30-60mm long fish with a very compressed, deep body, a thin pointed pectoral fin and round tail fin. Habitat: swamps, ponds and river pools.
Sunfish
An NFS client, implemented as an image filing system. Habitat: RISC OS.
Contents |
License |
Sunfish is copyright © 2003 Alex Waugh
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Requirements |
Sunfish requires a working network connection and an NFS server to connect to. The server should be running version 2 of the NFS protocol, version 1 of the Mount protocol, version 2 of the portmapper protocol, and optionally version 2 of the pcnfsd protocol. It has currently only been tested with the Linux kernel server present in Debian Woody, but it should work with other servers. Only UDP connections are supported at present.
Sunfish should run on RISC OS 3.11 or later, but has only been tested on RISC OS 5 at present. It is 26/32bit neutral.
Setting up a mount |
Sunfish is implemented as an image filing system. Currently you have to setup a mount file by hand, but in future versions a frontend may be supplied.
Ensure the Sunfish module is loaded by double clicking on !Sunfish. Then, using your favorite text editor create a file with the appropriate options as described below. Save this, then set it's filetype to Sunfish (&1b6). The double click on the mount file you have just created and the server will be mounted and you can navigate the filesystem as normal.
This is a very simple mount file. It will use pcnfsd to map the username and password onto a uid and gid.
Protocol: NFS2 Server: mint.cp15.org Export: /home/ajw498 Username: ajw498 Password: fiddlesticks
The same as above, but specifying the uid and gid explicitly. pcnfsd is not required in this case, and there is no need for the password to be stored in the file either.
Protocol: NFS2 Server: mint.cp15.org Export: /home/ajw498 UID: 1001 GID: 50
A more complex example.
Protocol: NFS2 Server: mint.cp15.org Export: /tmp UID: 1002 GID: 51 GIDs: 52 53 105 umask: 066 MachineName: caramel ShowHidden: 0 Timeout: 5 Retries: 0 DefaultFiletype: FFF AddExt: 2
Options |
Any line beginning with a # is treated as a comment.
<Inet$Hostname> which should be sufficient in most cases.
Reporting Bugs |
If you discover a bug, please report it to me, or better still fix it yourself and send me a patch. When reporting a bug, first load syslog, then set the logging option before doing the operation that triggers the bug. If you have access to a machine that can run ethereal then it would be very useful to use that to save a dump of the network traffic along with the syslog file, a description of the problem and exactly what operation you were doing to trigger the bug. Also details of what OS and NFS version the server is running would be helpful, and the version of the Sunfish module and RISC OS version.
Known Bugs |
The leafname returned from an OS_File 0 call will be in Unix format and may still have a ,xyz extension. This is only used for printing *opt 1 info so is not crucial. The PRMs state that *opt 1 may not work correctly on RISC OS 3 onwards anyway.
Wildcards in filenames are not supported. This would be a lot of hassle to implement for little benefit, and in any case I believe that it really should be fileswitch's job to sort out wildcards, not each and every filing system.
Some operations are not as fast as they could be. For the first release I have concentrated on getting a functional and stable program, and there are some places where performance could be improved in the future. In particular, file attributes and mappings between filenames and NFS file handles should be cached, as this would reduce network traffic and delay for directory listings and many other operations. Also read and write requests should be pipelined to remove the latency between blocks, which should speed up reading and writing large files.
Recompiling |
Full source code is provided. To recompile the module, you will need Norcroft v5.53 or later, cmhg 5.42 or later, TCPIPLibs, and Perl. Earlier 26bit versions of Norcroft will not work because the code makes use of 64bit integers and some C99 functions.
For some unknown reason, if you use amu then it will give an error AMU: Don't know how to make 'o.pcnfsd-calls' after generating pcnfsd-calls.c, but if you rerun amu then it will work. GNU make does not give this problem.