[Select]

Networking


Index

 

ShareFS

ShareFS provides a simple mechanism for accessing files on locally networked RISC OS systems. The system uses Freeway to distribute details of the shared discs. This allows any Freeway reachable system (usually those on the local network, but may include any NetI accessible networks), to access the shared files. Although the objects are known as 'shared discs' they may refer to parts of a filing system. Under Select 1 and later the Filer menu offers the option to share sub-directories.

In the past the SWI calls for ShareFS have been undocumented. They are presented here to fill in this gap, but may be extended and modified without notice. The flags on the SWIs are inconsistent for legacy reasons.

From ShareFS 3.97 onward, the ShareFS Filer can be disabled by setting the ShareFS$Filer variable to 'no'. The filer can be re-enabled by setting it to any other value.

SWIs

ShareFS_CreateShare (&47AC0)
On entry
   R0 = flags :
         bit 0 = share is protected
         bit 1 = share is read only
         bit 2 = share is hidden
         bit 3 = share is a 'sub directory'
         bit 4 = share is a CD ROM
         bit 5 = share is authenticated (use R3 as key)
   R1 = pointer to share name
   R2 = pointer to directory name
   R3 = authentication key number
On exit
   All registers preserved

This SWI is used to share a directory.

ShareFS_StopShare (&47AC1)
On entry
   R0 = flags (reserved, must be 0)
   R1 = pointer to share name or directory name
On exit
   All registers preserved

This SWI is used to stop sharing a directory.

ShareFS_EnumerateShares (&47AC2)
On entry
   R0 = flags to check :
         bit 0 = share is protected
         bit 1 = share is read only
         bit 2 = share is hidden
         bit 3 = share is a 'sub directory'
         bit 4 = share is a CD ROM
         bit 31 = share is authenticated (use R5 as key) R4 = opaque value for enumeration, starting from 0
   R5 = authentication key to find
On exit
   R1 = pointer to disc name
   R2 = pointer to path name
   R3 = flags for share
   R4 = new opaque value, or -1 if no more details

This SWI is used to enumerate the shared discs.

ShareFS_IdentifyShare (&47AC2)
On entry
   R0 = flags :
         bit 0 = share name given in R1, otherwise directory name in R1
   R1 = pointer to share or directory name
   R2 = pointer to buffer to write to
   R3 = length of buffer
On exit
   R0 = flags for share
   R3 = length of data written to buffer, or -ve length if the name would not fit

This SWI is used to identify a share given its name or directory name.

Messages

Message_FileShareDir (&408)
   +0 = size of message
   +4 = task handle
   +8/+12 = references
   +16 = message number (&408)
   +20 = flags :
         bit 0 = share is protected
         bit 1 = share is read only
         bit 2 = share is hidden
         bit 3 = share is authenticated
         bit 4 = share is a CD ROM
         bit 30 = open window at position given
   +24 = x position (if bit 30 set)
   +28 = y position (if bit 30 set)
   +32... = directory to share

This message will cause ShareFS to open a dialogue box showing the share details requests, or the live share details if the directory is already shared.

Services

Service_Sharing (&801C8)
On entry
   R0 = pointer to filing system name ('ShareFS' in our case)
   R1 = &801C8 (service call number)
   R2 = 0 if object is unshared, 1 if object is shared
   R3 = pointer to path name being shared
   R4 = pointer to name of shared object
   R5 = private data (filesystem specific)

This service is issued when a path is shared by a filing system.


This documentation is copyright 3QD Developments Ltd 2013 and may not be reproduced or published in any form without the copyright holders permission. RISC OS is subject to continuous development and improvement as such all information is reproduced by 3QD Developments Ltd in good faith and is believed to be correct at the time of publication E&OE. 3QD Developments Ltd cannot accept any liability for any loss or damage arising from the use of any information provided as part of the RISC OS Documentation.

HTML document version 1.03 3rd November 2015