RISCOS.com

www.riscos.com Technical Support:
Programmer's Reference Manual

 

NetFS


Introduction

The NetFS is a filing system that allows you to access and use remote file server machines, using Acorn's Econet network. In common with other filing systems it uses the FileSwitch module, and so when you are using the NetFS you can use any of the commands that FileSwitch provides.

The NetFS module takes the commands that you give to it, either directly or via FileSwitch, and converts them to file server commands. These commands are then sent to the file server using the standard protocol of Econet. The file server then acts on the files or directories that it stores.

Much of the above is transparent to the user, and in general to use file servers you do not need to know file server protocols, or how data is sent over the Econet. For advanced work, you can communicate directly with file servers. If you do need to know more about Econet and file server protocols, you should see:

Overview

The NetFS software provides a filing system for RISC OS. To do this it communicates via the Econet with a file server; the file server stores the files and keeps track of them in its directories, as well as providing authenticated access. The NetFS software translates the user's requests that emerge from FileSwitch into one or more file server commands. These commands are then sent to the file server where they act on the files or directories stored there.

The NetFS software is designed to hold information about each file server that it is logged on to and to use this information when communicating with the file server. There are also some extra commands provided by the NetFS software that communicate directly with the file server.

All communication with the file server is done using the interfaces provided by Econet. Basic communication with a file server involves you transmitting a command to it, and then receiving a reply. Either or both of these may contain your data: for instance when you create a directory the name you supply is sent to the file server, where as when you read the name of the current disc that name is sent back to you. Most commands however send things in both directions. The NetFS software knows all the formats and requirements of the file server and presents these to the user, via FileSwitch.

The other commands (those that do not involve files or directories directly) are accessed via star commands. These commands are only available when NetFS is the current filing system.

There are three commands related to access control: *Logon, *Pass, and *Bye. Three commands are to do with selecting file servers: *AddFS, *FS, and *ListFS. The *Free command provides information about the amount of free space remaining on each of the discs of a file server. The two commands *Mount and *SDisc are identical; the former is provided for compatibility with ADFS, the latter for compatibility with existing network software (ANFS and NFS).

Technical Details

Naming

As well as supplying a filing system name as part of a file name (such as 'Net:&.Fred'), you can supply as part of the filing system name the name or number of a file server: for example 'Net#253:&.Fred' or 'Net#Maths:Program'. This will cause the file to be found (or saved, or whatever) on the given file server. If a name is quoted, you must currently be logged on to that file server. If a number is given then you must be logged on to the resulting file server; if only part of the number is given then it will be defaulted against the current file server number.

File server name binding

NetFS allows you to refer to file servers by name(s); these are the names of the discs on that particular file server. Inside NetFS a name is always reduced to a station and net number pair (since this is what the Econet interfaces require). To help NetFS make this translation (or binding) between names and numbers it keeps a list (or cache) of the names of the discs on various file servers.

NetFS uses this list when the file server argument for a *Logon command is a name rather than a number. It is also the list you see when you type *ListFS.

The list is generated by broadcasting a request to all file servers to send back the names of all their discs. When a name is looked up (or bound) the list is searched; if the name is present the number is returned, if not a broadcast is issued and the list is searched again. NetFS expects that every disc on every file server will have a different name; this is important, because NetFS needs a one-to-one mapping from names to station and net numbers.

Timeouts

The dynamics of communication are controlled by several timeouts.

The values used by NetFS for the TransmitCount, TransmitDelay, and ReceiveDelay are more fully explained in the chapter entitled Econet. These are the values used for all normal communication with the file server.

Before attempting to log on to a file server, NetFS tries the immediate operation MachinePeek to the file server. This operation uses a second set of values: the MachinePeekCount and the MachinePeekDelay. If this operation fails, the error

'Station not present' is generated. The reason for this is that stations must respond to MachinePeek. You can therefore determine quite quickly if the destination machine is actually present on the network, without having to wait the long time required for a normal transmission to timeout and report 'Station not listening'.

The last value used is called the BroadcastDelay; this is the amount of time for which NetFS will wait for a file server to respond to the broadcast for names of file servers. If the named file server has not responded within that time the error 'Station name not found' will be returned.

Direct access to file servers

To provide access to those functions not provided as part of the FileSwitch interface, or as one of the command interfaces provided directly by NetFS, there are a pair of SWI calls.

The first of these (SWI NetFS_DoFSOp) provides communication with the current file server, and the second (SWI NetFS_DoFSOpToGivenFS) to any file server to which the NetFS software is logged on.

  • The function (in R0) is an indication to the file server what it should do. You will find documentation of the file server functions in the File server protocol interface.
  • The buffer contains the data to be sent to the file server. Econet's five byte header (Reply port, Function, URD, CSD, CSL) is prepended to the buffer during transmission. When a reception occurs Econet's two byte header is stripped off before the returned data is placed in the buffer.

Differences from FileCore based filing systems

Because NetFS does not use FileCore, there are a number of subtle differences between it and FileCore based filing systems. For example, because of the file server protocols it uses (see the chapter entitled File server protocol interface) NetFS can only update a file's datestamp if it is passed a filename rather than a file handle.

You must not assume that the behaviour of all filing systems will be identical to ones that use FileCore.

File attributes

NetFS uses the top 24 bits of to store a file's creation/modification date in the following format:

Bits Meaning
8 - 12 Day of month (1 - 31)
13 - 15 High bits of year (offset from 1980, 0 - 127)
16 - 19 Month of year (1 - 12)
20 - 23 Low bits of year (offset from 1980, 0 - 127)

With the addition of three zero bytes, these are in the correct format to use as input to the SWI NetFS_ConvertDate.

Service Calls


Service_NetFS
(Service Call &55)

Either a *Logon, a *Bye or a *SDisc/*Mount has occurred

On entry

R1 = &55 (reason code)

On exit

R1 preserved to pass on (do not claim)

Use

This call is issued by NetFS to indicate to the NetFiler that things may have changed. For example, a user may have logged on to a server, while temporarily outside the Wimp.


Service_NetFSDying
(Service Call &5F)

NetFS is dying

On entry

R1= &5F (reason code)

On exit

R1 preserved

Use

Issued by NetFS before closedown to allow Broadcast Loader to unhook.

SWI calls


NetFS_ReadFSNumber
(SWI &40040)

Returns the full station number of your current file server

On entry

--

On exit

R0 = station number
R1 = net number

Interrupts

Interrupt status is unaltered
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is re-entrant

Use

This call returns the full station number of your current file server. If your current file server is not set then this call returns zero for both the net and station number.

Related SWIs

NetFS_SetFSNumber, NetFS_ReadFSName

Related vectors

None


NetFS_SetFSNumber
(SWI &40041)

Sets the full station number used as the current file server

On entry

R0 = station number
R1 = net number

On exit

R0, R1 corrupted

Interrupts

Interrupts may be enabled
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is not re-entrant

Use

This call sets the full station number used by NetFS as the current file server, restoring any context (for example its current directory).

This is the same as *FS net.station

Related SWIs

NetFS_ReadFSNumber, NetFS_SetFSName

Related vectors

None


NetFS_ReadFSName
(SWI &40042)

Reads the name of the your current file server

On entry

R1 = pointer to buffer
R2 = size of buffer in bytes

On exit

R0 = pointer to buffer
R1 = pointer to the terminating null of the string in the buffer
R2 = amount of buffer left, in bytes

Interrupts

Interrupt status is unaltered
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is re-entrant

Use

This call reads the name of your current file server if you are logged on, and otherwise returns a null string.

Related SWIs

NetFS_ReadFSNumber, NetFS_SetFSName

Related vectors

None


NetFS_SetFSName
(SWI &40043)

Sets by name the file server used as your current one

On entry

R0 = pointer to buffer

On exit

--

Interrupts

Interrupt status is unaltered
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is not re-entrant

Use

This call sets by name the file server used as your current one, restoring any context such as your current directory. You must be logged on to the file server; if you are not, an error is generated.

Related SWIs

NetFS_SetFSNumber, NetFS_ReadFSName

Related vectors

None


NetFS_ReadCurrentContext
(SWI &40044)

Unimplemented

On entry

--

On exit

R0 - R2 corrupted

Interrupts

Interrupt status is unaltered
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is re-entrant

Use

This call is unimplemented, and returns immediately to the caller. It will be removed from future versions of NetFS, and you must not use it.

Related SWIs

NetFS_SetCurrentContext

Related vectors

None


NetFS_SetCurrentContext
(SWI &40045)

Unimplemented

On entry

--

On exit

All registers preserved

Interrupts

Interrupt status is unaltered
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is re-entrant

Use

This call is unimplemented, and returns immediately to the caller, with all registers preserved. It will be removed from future versions of NetFS, and you must not use it.

Related SWIs

NetFS_ReadCurrentContext

Related vectors

None


NetFS_ReadFSTimeouts
(SWI &40046)

Reads the current values for timeouts used by NetFS

On entry

--

On exit

R0 = transmit count
R1 = transmit delay in centiseconds
R2 = machine peek count
R3 = machine peek delay in centiseconds
R4 = receive delay in centiseconds
R5 = broadcast delay in centiseconds

Interrupts

Interrupt status is unaltered
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is re-entrant

Use

This call reads the current values for timeouts used by NetFS when communicating with the file server.

Related SWIs

NetFS_SetFSTimeouts

Related vectors

None


NetFS_SetFSTimeouts
(SWI &40047)

Sets the current values for timeouts used by NetFS

On entry

R0 = transmit count
R1 = transmit delay in centiseconds
R2 = machine peek count
R3 = machine peek delay in centiseconds
R4 = receive delay in centiseconds
R5 = broadcast delay in centiseconds

On exit

All registers preserved

Interrupts

Interrupt status is unaltered
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is re-entrant

Use

This call sets the current values for timeouts used by NetFS when communicating with the file server.

Related SWIs

NetFS_ReadFSTimeouts

Related vectors

None


NetFS_DoFSOp
(SWI &40048)

Commands the current file server to perform an operation

On entry

R0 = file server function
R1 = pointer to buffer
R2 = number of bytes to send to file server from buffer
R3 = size of buffer in bytes

On exit

R0 = return condition given by file server
R3 = number of bytes placed in buffer by file server

Interrupts

Interrupts are enabled
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is not re-entrant

Use

This call commands the file server to perform an operation, as specified by the file server function passed in R0. For further details of these functions, the data they need to be passed in the buffer, and the data they return in the buffer, you should see the chapter entitled File server protocol interface, or the documentation for your file server.

The buffer must be large enough to hold the data that the file server returns.

Errors returned by the file server are copied into NetFS's workspace and adjusted to be like a normal RISC OS error - R0 points to the error, and the V bit is set. Any further use of NetFS may overwrite this error, so you should copy it into your own workspace before you call NetFS again, either directly or indirectly. (For example, character input or output may call NetFS, as you may be using an exec or spool file.)

Related SWIs

NetFS_DoFSOpToGivenFS

Related vectors

None


NetFS_EnumerateFSList
(SWI &40049)

Lists all file servers of which the NetFS software currently knows

On entry

R0 = offset of first item to read in file server list
R1 = pointer to buffer
R2 = size of buffer in bytes
R3 = number of file server names to read from list

On exit

R0 = offset of next item to read (-1 if finished)
R3 = number of file server names read

Interrupts

Interrupts are enabled
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is not re-entrant

Use

This call lists all the entries in a list of file servers which the NetFS software holds internally. This list is used by the NetFS software to resolve file server names, and is the same as the list you would get by using the *ListFS command.

The entries are returned as 20 byte blocks in the buffer:

Offset Contents
0 Station number
1 Net number
2 Drive number
3 Disc name, padded with spaces
19 Zero

They are returned in alphabetical order.

This call disables the event process that updates the list, so that it does not change during enumeration. After you have completed the enumeration you must restart the event process by calling NetFS_EnableCache.

Related SWIs

NetFS_EnumerateFS, NetFS_EnableCache

Related vectors

None


NetFS_EnumerateFS
(SWI &4004A)

Lists all file servers to which the NetFS software is currently logged on

On entry

R0 = offset of first item to read in file server list
R1 = pointer to buffer
R2 = size of buffer in bytes
R3 = number of file server names to read from list

On exit

R0 = offset of next item to read (-1 if finished)
R3 = number of file server names read

Interrupts

Interrupts are enabled
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is not re-entrant

Use

This call lists all the entries in the list of file servers to which the NetFS software is currently logged on. This is essentially the same as the list you would get by using the *FS command with no parameters, except that the user IDs are not returned.

The entries are returned as 20 byte blocks in the buffer:

Offset Contents
0 Station number
1 Net number
2 Zero
3 Disc name, padded with spaces
19 Zero

The order of the list is not significant, save that if you are logged on to your current file server it will be returned last.

Related SWIs

NetFS_EnumerateFSList, NetFS_EnumerateFSContexts

Related vectors

None


NetFS_ConvertDate
(SWI &4004B)

Converts a file server time and date to a RISC OS time and date

On entry

R0 = pointer to file server format time and date (5 bytes)
R1 = pointer to 5 byte buffer

On exit

R1 is preserved

Interrupts

Interrupt status is unaltered
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is re-entrant

Use

This call converts a file server format time and date to a time and date in the internal format used by RISC OS (centiseconds since 00:00:00 on 1/1/1900).

The file server format is:

Byte Bits Meaning
0 0 - 4 Day of month (1 - 31)
5 - 7 High bits of year (offset from 1980, 0 - 127)
1 0 - 3 Month of year (1 - 12)
4 - 7 Low bits of year (offset from 1980, 0 - 127)
2 0 - 4 Hours (0 - 23)
5 - 7 Unused
3 0 - 5 Minutes (0 - 59)
6, 7 Unused
4 0 - 5 Seconds (0 - 59)
6, 7 Unused
Related SWIs

OS_ConvertStandardDateAndTime, OS_ConvertDateAndTime

Related vectors

None


NetFS_DoFSOpToGivenFS
(SWI &4004C)

Commands a given file server to perform an operation

On entry

R0 = file server function
R1 = pointer to buffer
R2 = number of bytes to send to file server from buffer
R3 = size of buffer in bytes
R4 = station number
R5 = net number

On exit

R0 = return condition given by file server
R3 = number of bytes placed in buffer by file server

Interrupts

Interrupts are enabled
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is not re-entrant

Use

This call commands the given file server to perform an operation, as specified by the file server function passed in R0. For further details of these functions, the data they need to be passed in the buffer, and the data they return in the buffer, you should see the chapter entitled File server protocol interface, or the documentation for your file server.

The buffer must be large enough to hold the data that the file server returns.

Errors returned by the file server are copied into NetFS's workspace and adjusted to be like a normal RISC OS error - R0 points to the error, and the V bit is set. Any further use of NetFS may overwrite this error, so you should copy it into your own workspace before you call NetFS again, either directly or indirectly. (For example, character input or output may call NetFS, as you may be using an exec or spool file.)

Related SWIs

NetFS_DoFSOp

Related vectors

None


NetFS_UpdateFSList
(SWI &4004D)

Adds names of discs to the list of names held by NetFS

On entry

R0 = station number
R1 = net number

On exit

R0 is corrupted
R1 is corrupted

Interrupts

Interrupts are enabled
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is not re-entrant

Use

This call will fetch the names of the discs of the given file server, and add these names to the list of names held internally to NetFS. This call allows software that uses the NetFS_EnumerateFS call to be sure that information on a particular file server is up-to-date (as the NetFiler does when it offers a menu of disc names to choose when opening '$').

If both R0 and R1 are zero then the entire list will be updated.

This call is not available in RISC OS 2.

Related SWIs

NetFS_EnumerateFS, NetFS_EnableCache

Related vectors

None


NetFS_EnumerateFSContexts
(SWI &4004E)

Lists all the entries in the list of file servers to which NetFS is currently logged on

On entry

R0 = entry point to enumerate from
R1 = pointer to buffer
R2 = number of bytes in the buffer
R3 = number of entries to enumerate

On exit

R0 = entry point to use next time (-1 indicates no more left)
R2 = space remaining in buffer
R3 = number of entries enumerated

Interrupts

Interrupts are enabled
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is not re-entrant

Use

This call lists all the entries in the list of file servers to which NetFS is currently logged on, and includes the user ID that NetFS logged on with. This is the same as the list you would get by using the *FS command with no parameters.

Entries are returned as 44 byte blocks in the buffer:

Offset Contents
0 Station number
1 Net number
2 Reserved
3 Disc name padded to 16 characters with spaces
19 Zero
20 User name padded to 21 characters with spaces
41 Zero
42 Reserved
43 Reserved

This call is not available in RISC OS 2.

Related SWIs

NetFS_EnumerateFSList, NetFS_EnumerateFS

Related vectors

None


NetFS_ReadUserId
(SWI &4004F)

Returns the current user ID if logged on to the current file server

On entry

R1 = pointer to buffer
R2 = number of bytes in the buffer

On exit

R0 corrupted
R1 = pointer to terminating zero
R2 = space remaining in buffer (including terminating zero)

Interrupts

Interrupt status is unaltered
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is re-entrant

Use

This call returns the current user ID if logged on to the current file server. If not logged on, a null name is written to the buffer (ie a single zero).

This call is not available in RISC OS 2.

Related SWIs

NetFS_ReadFSNumber, NetFS_ReadFSName

Related vectors

None


NetFS_GetObjectUID
(SWI &40050)

Gets a unique identifier for an object

On entry

R1 = pointer to a canonical object name
R6 = pointer to a canonical special field

On exit

R0 = object type
R1 preserved
R2 = object's load address
R3 = object's exec address
R4 = object's length
R5 = object's attributes
R6 = least significant word of UID
R7 = most significant word of UID

Interrupts

Interrupts are enabled
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is not re-entrant

Use

This call is very similar to FSEntry_File 5 (Read catalogue information: see FSEntry_File 5 and ImageEntry_File 5) except that R6 and R7 form a 64 bit unique identifier (UID) for the object. This UID is guaranteed to be unique across all file servers on all networks. The UID is composed of information like the file server's network address, the file server's disc on which the object is held, and the location of the object on that disc. By using this call, stations on an Econet can compare UIDs to see if they are accessing the same object.

For information on canonical; file names, see FSEntry_Func 23.

This call is not available in RISC OS 2.

Related SWIs

OS_File

Related vectors

None


NetFS_EnableCache
(SWI &40051)

Enables a suspended event task

On entry

--

On exit

--

Interrupts

Interrupts are enabled
Fast interrupts are enabled

Processor mode

Processor is in SVC mode

Re-entrancy

SWI is not re-entrant

Use

The list of names and numbers of file servers that NetFS keeps internally to resolve file server names is added to by an event process. These events are caused by reception packets from file servers of the names of discs. During the enumeration of the list this event task is effectively suspended so that the list does not change during the enumeration. Any call to NetFS_EnumerateFS will cause this suspension to take place. To ensure that the list is being updated it is essential that after a complete enumeration this call is made to re-enable the suspended event task.

This call is not available in RISC OS 2.

Related SWIs

NetFS_EnumerateFS, NetFS_UpdateFSList

Related vectors

None

* Commands


*AddFS

Adds a remote file server's disc to the list of known file servers' discs

Syntax

*AddFS file_server_number [disc_number [:]disc_name]

Parameters

file_server_number - the file server number of the file server to add, which must be a full address including both a net number and a station number

disc_number - the disc number of the disc to add

disc_name - the disc name of the disc to add

Use

*AddFS adds a remote file server's disc to the list of file servers' discs that are known to NetFS. If only the file server is specified, then all its discs will be removed from the list.

NetFS updates the list as necessary for file servers to which it can broadcast. This command is useful for you to add file servers to which NetFS cannot normally broadcast: for example ones located over a wide area network link.

This command is not available in RISC OS 2, nor is it in RISC OS 3 (version 3.00).

Example

*AddFS 201.254 4 :Server  Add disc 'Server' on drive 4 of file server 201.254 to list

*AddFS 202.254  Remove all entries for file server 202.254 from list

Related commands

None


*Bye

Logs the user off a file server

Syntax

*Bye [[:]file_server]

Parameters

file_server - the file server name or number - defaults to the current file server

Use

*Bye terminates the use of a file server, closing all open files and directories. If no file server is given, you are logged off the current file server.

Example

*Bye 49.254

*Bye :fs

Related commands

*Logon, *Shut, *Shutdown


*Configure FS

Sets the configured default file server for NetFS

Syntax

*Configure FS file_server

Parameters

file_server - the file server name or number

Use

*Configure FS sets the configured default file server for NetFS, used where none is specified. It is preferable to use the station name, as this is less likely to change. The default value is 0.254.

Example

*Configure FS Server1

Related commands

*Configure FileSystem, *Configure PS, *I Am, *Logon


*Configure Lib

Sets the configured library selected by NetFS after logon

Syntax

*Configure Lib [0 | 1]

Parameters

0 or 1

Use

*Configure Lib sets the configured library selected by NetFS after logon.

When NetFS logs on to a file server, the file server searches for $.Library on drives 0 - maxdrive of the file server, in that order. It passes the first match back to NetFS as the library to be used. If it does not match this directory then it instead passes back $ on the lowest numbered physical disc.

  • If 0 is used as the parameter, then NetFS uses the library directory returned by the file server.
  • If 1 is used as the parameter, then NetFS searches for $.ArthurLib on drives 0 - maxdrive of the file server, in that order. The first match is used by NetFS as the library. If it does not find a match, then it uses the library directory returned by the file server.
Example

*Configure Lib 0

Related commands

None


*Free

Displays file server free space

Syntax

*Free [:file_server] [user_name]

Parameters

file_server - the file server name or number - defaults to the current file server

user_name - as issued by the network manager

Use

*Free displays a user's total free space, as well as the total free space for the disc.

If no file server is given, the current file server is used.

If a user name is given, the free space belonging to that user is displayed. If no user is given, then the current user's free space is displayed.

Example

*Free :Business William
Disc name      Drive  Bytes free
                      Bytes used

Business         0     3 438 592
                      30 967 808
--------------------------------
User free space          185 007

Related commands

None


*FS

Restores the file server's previous context

Syntax

*FS [[:]file_server]

Parameters

file_server - the file server name or number

Use

*FS selects the current file server, restoring that file server's context (for example, its current directory). If no argument is supplied, your current file server number, file server name and user name are printed out, followed by the same information for any non-current servers.

Example

*FS 49.254

*FS :myFS

*FS
 13.224 :Server1 guest
    254 :Server2 mhardy

Related commands

*ListFS


*I am

Selects NetFS and logs you on to a file server

Syntax

*I am [[:]file_server_number|:file_server_name] user_name [[:Return]password]

Parameters

file_server_number - the file server number to log on to

file_server_name - the file server name to log on to

user_name - as issued by the network manager

password - as set by the user

Use

*I am selects NetFS and logs you on to a file server. Your user name and password are checked by the file server against the password file before allowing you access. If you give neither a file server number nor name, then this command logs you on to the current file server.

The file server first searches drives 0 - maxdrive for a password file containing a password/user name pair that match those given; if none is found, access to the file server is denied.

The file server then searches for a directory matching the given user name. It starts with the drive where the password match was found, followed by drives 0 - maxdrive. It passes the first matching directory back to NetFS. If it does not match the user name then it instead passes back $ on the lowest numbered physical disc. NetFS sets the User Root Directory to the returned directory, and sets the current directory to the User Root Directory.

NetFS also sets the library directory, as described in *Configure Lib.

This command is implemented as an alias using the system variable Alias$I. It is identical to a *Net command (which selects NetFS as the current filing system) followed by *Logon (see below).

Example

*I am :fs guest

Related commands

*Logon, *Net


*ListFS

Lists available file servers

Syntax

*ListFS [-force]

Parameters

-force - force the list to be updated before it is displayed

Use

*ListFS displays a list of the file servers which NetFS is able to recognise. The optional argument forces the list to be updated before it is displayed.

Example

*ListFS
 1.254  :0  Finance1
 1.254  :1  Finance2
 6.246  :0  Production

Related commands

*FS


*Logon

Logs you on to a file server

Syntax

*Logon [[:]file_server_number|:file_server_name] user_name [[:Return]password]

Parameters

file_server_number - the file server number to log on to

file_server_name - the file server name to log on to

user_name - as issued by the network manager

password - as set by the user

Use

*Logon logs you on to a file server. Your user name and password are checked by the file server against the password file before allowing you access. If you give neither a file server number nor name, then this command logs you on to the current file server.

The file server first searches drives 0 - maxdrive for a password file containing a password/user name pair that match those given; if none is found, access to the file server is denied.

The file server then searches for a directory matching the given user name. It starts with the drive where the password match was found, followed by drives 0 - maxdrive. It passes the first matching directory back to NetFS. If it does not match the user name then it instead passes back $ on the lowest numbered physical disc. NetFS sets the User Root Directory to the returned directory, and sets the current directory to the User Root Directory.

NetFS also sets the library directory, as described in *Configure Lib.

You must select NetFS before typing *Logon (this is not necessary with the *I am command).

Example

*Logon :fs guest

Related commands

*I am


*Mount

Selects a disc from the file server

Syntax

*Mount [:]disc_spec

Parameters

disc_spec - the name of the disc to be mounted

Use

*Mount selects a disc from the file server by setting the current directory, the library directory and the User Root Directory.

The file server searches the drive for a directory matching the given user name. It passes the first matching directory back to NetFS. If it does not match the user name then it instead passes back $. NetFS then sets the User Root Directory to the returned directory of the selected disc, and sets the current directory to the User Root Directory.

NetFS also sets the library directory, as described in *Configure Lib.

You cannot dismount a file server's disc.

*SDisc is a synonym for *Mount.

Example

*Mount fs

Related commands

*SDisc


*Net

Selects the Network Filing System as the current filing system

Syntax

*Net

Parameters

None

Use

*Net selects the Network Filing System as the filing system for subsequent operations. Remember that it is not necessary to switch filing systems if you use the full pathnames of objects. For example, you can refer to ADFS objects when NetFS is the current filing system.

Example

*Net

Related commands

*ADFS, *RAM, *ResourceFS


*Pass

Changes your password on your current file server

Syntax

*Pass [old_password [new_password]]

Parameters

old_password - your existing password (if any)

new_password - the new password (if any) that you wish to assign

Use

*Pass changes your password on your current file server, knowledge of which allows unrestricted access to your network files on that server. If you enter the command without parameters, the computer will prompt you to enter your old and new passwords, reflecting each character you type as a hyphen. If you do not have one, or wish to remove the one you have without substituting a new one, press Return at the relevant prompt. The maximum password length is file server dependent: on Level 4 file servers it is 22 characters, whereas on earlier file servers it is only 6 characters.

Examples

*Pass

Old password: ----    User types pail

New password: ------  User types bucket

*Pass bucket          User enters command again, this time giving
                      existing password as parameter

New password:         User presses Return, leaving themself with no
                      password


*SDisc

Selects a disc from the file server

Syntax

*SDisc [:]disc_spec

Parameters

disc_spec - the name of the disc to be mounted

Use

*SDisc selects a disc from the current file server by setting the current directory, the library directory and the User Root Directory.

The file server searches the drive for a directory matching the given user name. It passes the first matching directory back to NetFS. If it does not match the user name then it instead passes back $. NetFS then sets the User Root Directory to the returned directory of the selected disc, and sets the current directory to the User Root Directory.

NetFS also sets the library directory, as described in *Configure Lib.

You cannot dismount a file server's disc.

*Mount is a synonym for *SDisc.

Example

*SDisc fs

Related commands

*Mount

Example program

The following program fragments are examples of how you might use file server operations by calling NetFS_DoFSOp:

ReadFileServerVersion
        MOV     r0, #25                 ; Command
        ADR     r1, Buffer
        MOV     r2, #0                  ; Nothing to send
        MOV     r3, #(?Buffer - 1)      ; Lots to receive
        SWI     XNetFS_DoFSOp
        BVS     Error
        MOV     r0, #0                  ; Terminate string returned
        STRB    r0, [r1, r3]            ; One byte past the return size
        MOV     r0, r1
        SWI     XOS_Write0                ; Print it
        BVS     Error

PrintStationNumberOfUser                ; User name pointed to by R0
        ADR     r1, Buffer
        MOV     r2, #0                  ; Initial value of index
Loop    LDRB    r3, [r0], #1
        CMP     r3, #" "                ; Check for termination
        MOVLT   r3, #13                 ; Translate to what the FS wants
        STRB    r3, [r1, r2]            ; Copy into transmit buffer
        ADD     r2, r2, #1              ; Update index, and size to send
        BGT     Loop
        MOV     r0, #24                 ; Command
        MOV     r3, #?Buffer
        SWI     XNetFS_DoFSOp
        BVS     Error
        LDRB    r3, [r1, #1]            ; Pickup station number
        LDRB    r4, [r1, #2]            ; Pickup net number
        STMFD   r13!, {r3, r4}          ; Deposit in stack frame
        MOV     r0, r13                 ; Pointer to value for conversion
        MOV     r2, #?Buffer            ; Destination size
        SWI     XOS_ConvertNetStation
        ADD     r13, r13, #8            ; Dispose stack frame
        SWIVC   XOS_Write0              ; Display output
        SWIVC   XOS_NewLine
        BVS     Error

This edition Copyright © 3QD Developments Ltd 2015
Last Edit: Tue,03 Nov 2015