10.20 File Server Interface ========================================================================== On Entry -------- A=&14 The NFS must be the current filing system. YX point to the address of the transmit control block, which is shown below: 0 +-----------------------------+ | 0 | 1 +-----------------------------+ | Size of whole of block (n) | 2 +-----------------------------+ | 0 | 3 +-----------------------------+ | FS Function code | 4 +-----------------------------+ | 0 | 7 +-----------------------------+ | Rest of FS transmit block | n +-----------------------------+ When the File Server call is made, the NFS ROM modifies the control block, as shown below, before sending it to the file server. This allows the user to communicate with the File Server without having to know his context handles, or which port he should communicate with the File Server on. Bytes 0 to 7 are referenced throughout this section as the transmit block. Bytes 2 to n are the bytes that are actually sent through the network, to the File Server. 0 +-----------------------------+ | 0 | 1 +-----------------------------+ | Size of whole of block (n) | 2 +-----------------------------+ | Reply port | 3 +-----------------------------+ | FS Function code | 4 +-----------------------------+ |User's Root Directory context| |handle in File Server format | 5 +-----------------------------+ |Currently Selected Directory | |context handle in File Server| | format | 6 +-----------------------------+ | Currently Selected Library | |context handle in File Server| | format | 7 +-----------------------------+ | Rest of FS transmit block | n +-----------------------------+ On Exit ------- A,X,Y undefined The transmit control block is replaced by the receive control block shown below: 0 +-----------------------------+ | Unchanged: 0 | 1 +-----------------------------+ | Unchanged: | | Size of transmitted block | 2 +-----------------------------+ | Command Code | 3 +-----------------------------+ | Return Code | 4 +-----------------------------+ | Rest of FS receive block | n +-----------------------------+ Bytes 0 to 3 are referenced throughout this section as the receive block. Bytes 2 onwards are the bytes that are actually returned by the file server. The command code indicates to the client what action (if any) the client should take upon receiving this response. The return code is an indication to the client of any error status which has arisen, as a result of attempting to execute the command. A return code of zero indicates that the command step completed successfully; otherwise the return code is the error number indicating what error has occurred. If the return code is non-zero, then the remainder of the message contains an ASCII string terminated by a carriage return, which describes the error. Unsupported File Server codes return... Unsupported ARGs return.... Issue 29 Apr 1987 10-48 SJresearch Summary of File Server Calls ---------------------------- Function code Description 0 Command line decoding 1 Save 2 Load 3 Examine 4 Catalogue header (Acorn only) 5 Load as command 6 Open file 7 Close file 8 Get byte 9 Put byte 10 Get bytes 11 Put bytes 12 Read random access information 13 Set random access information 14 Read disc name information 15 Read logged on users 16 Read date/time 17 Read EOF (end of file) information 18 Read object information 19 Set object information 20 Delete object 21 Read user environment 22 Set user's boot option 23 Logoff 24 Read user information 25 Read file server version string 26 Read file server free space 27 Create directory, specifying size 28 Set time/date 29 Create file of specified size 30 Read user free Space (Acorn only) 31 Set user free Space (Acorn only) 32 Read client user identifier 33 Read Users Extended 34 User Info Extended 35 Copy Data 36 Server Management (Acorn only) 37 38 Save file 32-bit 39 Create file 32-bit 40 Load file 32-bit 41 Get 32-bit random access information 42 Set 32-bit random access information 43 Get Bytes 32-bit 44 Put Bytes 32-bit 45 Examine 32-bit 46 Open Object 32-bit 64 Read account information (SJ Research only) 65 Read/write system information (SJ Research only) 66 Read encryption key (SJ Research only) 67 Write Backup (SJ Research only) Command Line Decoding Function code=0 ========================================================================== General description ------------------- A number of the operations performed by the file server are initiated by the sending of a command line. The function code of zero indicates to the file server that such a command line has been received. All command line type exchanges have the same format: Client (command port): 0 +-----------------------------+ | Transmit block (shown on | | summary page) | 7 +-----------------------------+ | Command line terminated by | | a CR | n +-----------------------------+ File Server (reply port): 0 +-----------------------------+ | Receive block (shown on | | summary page) | 4 +-----------------------------+ | Command dependant results | n +-----------------------------+ If the command requires more action by the client, then the command code indicates what command line the file server has decoded. The file server will also return any decoded parameters or data which the client will need to complete the command. The possible command codes that the file server may return are: 0 No Action, command complete 1 *Save 2 *Load 3 *Cat 4 *Info, *Printer, *Printout 5 *I AM 6 *SDisc (Acorn only) 7 *Dir, *SDisc (SJ Research only) 8 Unrecognised command 9 *Lib Issue 29 Apr 1987 10-49 SJresearch Description of returned command codes ------------------------------------- The following receive blocks are the result of command line decoding done by the file server. Any context handles returned by the file server are in file server internal format. *SAVE Command code 1 0 +-------------------------------+ | Receive block (shown on | | summary page) | 2 +-------------------------------+ | &01 = SAVE | 3 +-------------------------------+ | &00 = Ok | 4 +-------------------------------+ | 32-bit file load address | 8 +-------------------------------+ | 32-bit file execute address | 12 +-------------------------------+ | 24-bit file size | 15 +-------------------------------+ | File name terminated by CR | n +-------------------------------+ The protocol then continues with function code 1. *LOAD Command code 2 0 +-------------------------------+ | Receive block (shown on | | summary page) | 2 +-------------------------------+ | &02 = LOAD | 3 +-------------------------------+ | &00 = Ok | 4 +-------------------------------+ | 32-bit File load address | 8 +-------------------------------+ | Flag: if &FF then load | | address is defined | 9 +-------------------------------+ | File name terminated by CR | n +-------------------------------+ The protocol then continues with function code 2. *CAT Command code 3 0 +-------------------------------+ | Receive block (shown on | | summary page) | 2 +-------------------------------+ | &03 = CAT | 3 +-------------------------------+ | &00 = Ok | 4 +-------------------------------+ | Decoded directory leafname | | terminated by CR | n +-------------------------------+ *INFO Command code 4 0 +-------------------------------+ | Receive block (shown on | | summary page) | 2 +-------------------------------+ | &04 = INFO | 3 +-------------------------------+ | &00 = Ok | 4 +-------------------------------+ |Character string of information| | terminated by &80 | n +-------------------------------+ This reply can be used for anything that wants the client to display a simple string, such as *INFO, *PRINTER, *PRINTOUT. *I AM Command code 5 0 +-------------------------------+ | Receive block (shown on | | summary page) | 2 +-------------------------------+ | &05 = I AM | 3 +-------------------------------+ | &00 = Ok | 4 +-------------------------------+ | URD handle | 5 +-------------------------------+ | CSD handle | 6 +-------------------------------+ | LIB handle | 7 +-------------------------------+ | Boot option in 4 least | | significant bits | 8 +-------------------------------+ *SDISC Command code 6 0 +-------------------------------+ | Receive block (shown on | | summary page) | 2 +-------------------------------+ | &06 = SDISC | 3 +-------------------------------+ | &00 = Ok | 4 +-------------------------------+ | URD handle | 5 +-------------------------------+ | CSD handle | 6 +-------------------------------+ | LIB handle | 7 +-------------------------------+ *DIR Command code 7 0 +-------------------------------+ | Receive block (shown on | | summary page) | 2 +-------------------------------+ | &07 = DIR | 3 +-------------------------------+ | &00 = Ok | 4 +-------------------------------+ | CSD handle | 5 +-------------------------------+ Issue 29 Apr 1987 10-50 SJresearch Unrecognised command Command code 8 0 +-------------------------------+ | Receive block (shown on | | summary page) | 2 +-------------------------------+ | &08 = COMMAND | 3 +-------------------------------+ |Command string terminated by CR| n +-------------------------------+ *LIB Command code 9 0 +-------------------------------+ | Receive block (shown on | | summary page) | 2 +-------------------------------+ | &09 = LIB | 3 +-------------------------------+ | &00 = Ok | 4 +-------------------------------+ | LIB handle | 5 +-------------------------------+ Note that CSD, URD and LIB handles returned by the File Server are not suitable for selecting with OSWORD A=&13 as the NFS maps these onto a set of internal handles. Hence these commands should usually be issued via the operating system. SAVE Function code=1 ========================================================================== General description ------------------- This call makes a request to save a file. This call will be made following a *SAVE command line sent to the file server (used by the Acorn SYSTEMs and Atoms). The BBC and later computers interpret the parameters to a *SAVE command internally and will enter the protocol by issuing a save with function code 1. Client (command port): 0 +-------------------------------+ | Standard Transmit block | 4 +-------------------------------+ | Data acknowledge port | 5 +-------------------------------+ | &00 - will be replaced with | | CSD handle | 6 +-------------------------------+ | &00 - will be replaced with | | LIB handle | 7 +-------------------------------+ | 32-bit file load address | 11 +-------------------------------+ | 32-bit file execute address | 15 +-------------------------------+ | 24-bit file size | 18 +-------------------------------+ | File name terminated by CR | n +-------------------------------+ File server (reply port): 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Data port | 5 +-------------------------------+ | Maximum data block size | 6 +-------------------------------+ |File leafname terminated by CR | n +-------------------------------+ Issue 29 Apr 1987 10-51 SJresearch The client and file server now enter the 'data exchange phase' of the protocol, where the file server acknowledges the receipt of each data packet. If there is no data to be sent (eg a zero length file) then this phase is omitted. If the file server detects an error during the data transfer phase (eg a disc error), then the 'data exchange phase' is allowed to complete but the SAVE operation is aborted. The error status is returned in the return code of the 'final acknowledge'. Because the data is not transferred on the command port the following data must be sent by direct transmissions to the file server. Client (data port): 0 +-------------------------------+ | A block of data, up to the | | maximum data block size | n +-------------------------------+ File server (data acknowledge port): 0 +-------------------------------+ | Undefined | 1 +-------------------------------+ When the final data block has been received by the file server, the 'data acknowledge' is replaced by the 'final acknowledge', which is the terminating packet of the protocol. File server (reply port): 0 +-------------------------------+ | Command code | 1 +-------------------------------+ | Return code | 2 +-------------------------------+ |Access byte in standard format | 3 +-------------------------------+ | File creation date | 5 +-------------------------------+ LOAD Function code=2 ========================================================================== General description ------------------- This call makes a request to load a file. This call will be made following a *LOAD command line sent to the file server (used by the Acorn SYSTEMS and Atoms). The BBC and later computers interpret the paramters to a *LOAD command internally and will enter the protocol by issuing a load with function code 2. This call will not work via OSWORD A=&14. Client (command port): 0 +-------------------------------+ | Standard Transmit block | 4 +-------------------------------+ | Data port | 5 +-------------------------------+ | &00 - will be replaced with | | CSD handle | 6 +-------------------------------+ | &00 - will be replaced with | | LIB handle | 7 +-------------------------------+ | File name terminated by CR | n +-------------------------------+ File server (reply port): 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 32-bit file load address | 8 +-------------------------------+ | 32-bit file execute address | 12 +-------------------------------+ | 24-bit file size | 15 +-------------------------------+ | File access, as for SAVE | 16 +-------------------------------+ |File creation date, as for SAVE| 18 +-------------------------------+ | File name terminated by CR | n +-------------------------------+ Issue 29 Apr 1987 10-52 SJresearch If the file is of zero length then the 'data transfer' phase is omitted. If the file server detects an error (eg disc error), then the required amount of data will be sent but its data content is undefined. Because the data is not transferred on the command port the following data must be sent and received by direct transmission and reception. Data is transmitted until 'file size' data has been sent. File server (data acknowledge port): 0 +-------------------------------+ | Data block | n +-------------------------------+ Client (reply port): 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Examine Function code=3 ========================================================================== General description ------------------- This call returns information about files in a particular directory. The detail of the information is dependent on the value of ARG. This call is used to generate the *CAT listing. 0 - All information, machine readable format 1 - All information, character string 2 - File title only 3 - File title and access, character string 4 - All information, machine readable format, with 32-bit file sizes On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG | 8 +-------------------------------+ | Entry pointer to directory | 9 +-------------------------------+ | Number of entries to examine | 10 +-------------------------------+ | Directory pathname, | | terminated by CR | n +-------------------------------+ The directory entry pointer gives the entry number within the directory from which to examine. Conventionally the first entry in a directory is entry number zero. The number of entries to examine specifies how many entries are to be examined, so is usually determined by the buffer space available to the client. A parameter of zero in this case conventionally demands that all entries in the directory from the entry point to the end of the directory be examined. On an SJ Research File Server if 0 entries are requested then no entries are returned. Where information is returned in character string format, individual entries are delimited by zero bytes (&00), the final entry being terminated by a negative byte (&80). Carriage returns may occur within such strings. Where data is returned in machine readable format, the entries consist of a defined number of bytes; and so there are no delimiters between entries although the final entry is terminated by a negative byte. Issue 14 June 1989 10-53 SJresearch On exit ------- If ARG=0 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Number of entries returned | 5 +-------------------------------+ | Cycle number | 6 +===============================+ | Object's title, | | padded with spaces | 16 +-------------------------------+ | 32-bit load address | 20 +-------------------------------+ | 32-bit execution address | 24 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 25 +-------------------------------+ | Date object created | 27 +-------------------------------+ | System Internal Name (SIN) or | | 27: Main Account Number | | 28: b0-b3: main account b8-b11| | 28: b4-b7: aux account b8-b11 | | 29: Auxiliary account number | 30 +-------------------------------+ | 24-bit object length | 33 +===============================+ |Next object as above bytes 6-32| +===============================+ | &80 terminator | +-------------------------------+ Note that the Acorn file server will return its system name in bytes 27 to 30. If an entry in the print queue has been examined then the access D/r is a /spl file and an access D/wr is a /prt file. If ARG=1 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Number of entries returned | 5 +-------------------------------+ | Cycle number | 6 +===============================+ | Character string of all | | information | n +===============================+ |Next object as above bytes 6...| +===============================+ | &80 terminator | +-------------------------------+ This call returns the data used in the *EX listing. If ARG=2 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Number of entries returned | 5 +-------------------------------+ | Cycle number | 6 +===============================+ |10 (object name length for BBC)| 7 +-------------------------------+ |Object name padded with spaces | 17 +===============================+ |Next object as above bytes 6-16| +===============================+ | &80 terminator | +-------------------------------+ This call returns the data returned by OSGBPB 8. If ARG=3 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Number of entries returned | 5 +-------------------------------+ | Cycle number | 6 +===============================+ | Object name end padded with | | spaces, followed by formatted | | access string, terminated with| | &00. The text is formatted to | | fit in a 19-character column | | followed by a space character.| n +===============================+ |Next object as above bytes 6...| +===============================+ | &80 terminator | +-------------------------------+ This call returns the data used in the *CAT listing. If ARG=4 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Number of entries returned | 5 +-------------------------------+ | Cycle number | 6 +===============================+ | 32-bit load address | 10 +-------------------------------+ | 32-bit execution address | 14 +-------------------------------+ | 32-bit object length | 18 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 19 +-------------------------------+ | Returns &00 | 20 +-------------------------------+ | Date object created | 22 +-------------------------------+ | Returns &00000000 | | Probably | | System Internal Name (SIN) | 26 +-------------------------------+ | Returns &00000000 | 30 +-------------------------------+ | File name padded with spaces | 40 +===============================+ |Next object as above bytes 6-39| +===============================+ | &80 terminator | +-------------------------------+ Issue 14 June 1989 10-54 SJresearch Catalogue Header Function code=4 ========================================================================== General description ------------------- This call returns the data used in the header of the *CAT command on Atom and SYSTEMs. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | Directory pathname, | | terminated by CR. | | CR returns information for CSD| n +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Leafname of directory, padded | | with spaces | 14 +-------------------------------+ | Ownership string, usually | | PUB or OWN | 17 +-------------------------------+ | Space character | 18 +-------------------------------+ | Disk name padded with spaces | 31 +-------------------------------+ | CR | 32 +-------------------------------+ | &80 terminator | 33 +-------------------------------+ The string from byte 4 to the terminator is displayed as the *CAT header on the Atom and SYSTEMs. This call is only fully supported by File Servers that support the Systems 3/4/5 and Atoms. Load as Command Function Code=5 ========================================================================== General description ------------------- The remainder of this protocol is exactly as for function code 2 (LOAD), except the file name is looked up first in the CSD, and if not found then, also in LIB. It is used for loaded '*' commands. The error returned if the file name is not found in either directory is 'Bad command'. On an SJ Research File Server function code=1 is equivalent to function code=5 except for run-only users. On entry -------- Client (command port): 0 +-------------------------------+ | Standard Transmit block | 4 +-------------------------------+ | Data port | 5 +-------------------------------+ | &00 - will be replaced with | | CSD handle | 6 +-------------------------------+ | &00 - will be replaced with | | LIB handle | 7 +-------------------------------+ | File name terminated by CR | n +-------------------------------+ File server (reply port): 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 32-bit file load address | 8 +-------------------------------+ | 32-bit file execute address | 12 +-------------------------------+ | 24-bit file size | 15 +-------------------------------+ | File access, as for SAVE | 16 +-------------------------------+ |File creation date, as for SAVE| 18 +-------------------------------+ | File name terminated by CR | n +-------------------------------+ Issue 14 June 1989 10-55 SJresearch Find (OPEN) Function Code=6 ========================================================================== General description ------------------- This function code creates a handle for the object specified, with the access type requested. Such handles are used for performing random access operations and also for manipulating the user's environment. An object will be opened only if the client has the necessary access rights to the object. A file can be opened several times for reading only, but only once for update. A file will be created if: 1: The file does not exist 2: The file is opened for update On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | 0 : create a new file, delete| | data in any existing file| | <>0: object must already exist| 8 +-------------------------------+ | 0 : open object for update | | <>0: open object for read only| 9 +-------------------------------+ | Object name, terminated by CR | n +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Handle | 5 +-------------------------------+ CLOSE Function Code=7 ========================================================================== General description ------------------- This function indicates to the file server that the handle passed as argument is no longer needed, and that all of the updated data in the file should be written out to the disc. A handle of zero indicates to the file server that all handles to open FILES are to be closed. This call does not close handles to directories. Note that the handle is a File Server format handle. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | Handle | 8 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Issue 14 June 1989 10-55 SJresearch RANDOM ACCESS ============= The next four function codes deal with the facilities that the file server provides to enable the user to perform random access operations on open files. These operations have an additional protocol to ensure the integrity of the data exchanged, provided by a SEQUENCE NUMBER. The sequence number is a single bit, held in both client station and file server, which differentiates between successive reads of a file using the pointer held in the file server, and repeated reads of the same byte because the operation failed at the first attempt. The sequence number is sent in the least significant bit of the flag byte of the Econet control block. The file server will return its copy of the sequence number with the data to allow the client to detect data sequencing errors. The client should invert the local copy of the sequence number after every successful transaction with the file server. If the client detects a data packet with the incorrect sequence number then the client should be prepared to repeat the request BGET Function Code=8 ========================================================================== General description ------------------- This function code reads a byte from the file at the position specified by the file server's internal file pointer. Note that the handle is a File Server format handle. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | File handle | 8 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | byte read, &FE if reading | | first byte after file end | 5 +-------------------------------+ | flag byte | | &00: normal read operation | | &80: last byte in the file | | &C0: first byte after file end| 6 +-------------------------------+ BPUT Function Code=9 ========================================================================== General description ------------------- This function code writes a single byte to the file at the position indicated by the file server's internal file pointer. Note that the handle is a File Server format handle. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | File handle | 8 +-------------------------------+ | Byte to be written | 9 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Issue 14 June 1989 10-57 SJresearch GetBytes and PutBytes Function Code=10 and 11 ========================================================================== General description ------------------- These operations allow the client to access blocks of data. The client may supply an offset within the file at which to start the operation, or may use the sequential file pointer maintained by the file server. The protocol includes a sequence number as described for BGET and BPUT. On entry -------- 0 +-------------------------------+ | 0 | 1 +-------------------------------+ | Size of whole of block (n) | 2 +-------------------------------+ | Reply port | 3 +-------------------------------+ | FS Function code | 4 +-------------------------------+ | Data acknowledge port | 5 +-------------------------------+ | &00 - will be replaced with | | CSD handle | 6 +-------------------------------+ | &00 - will be replaced with | | LIB handle | 7 +-------------------------------+ | File handle | 8 +-------------------------------+ | 0 : use supplied offset | |<>0: use FS sequential pointer | 9 +-------------------------------+ | 24-bit number of bytes | 12 +-------------------------------+ | 24-bit file offset | | (if supplied) | 15 +-------------------------------+ Reply to the first call is: 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Data port | | (function code 11 only) | 5 +-------------------------------+ | Maximum data block size | | (function code 11 only) | 7 +-------------------------------+ The data transfer phase is exactly as described for LOAD and SAVE. For transfers of zero data these steps are not executed. If a read extends over the end of the file then the requested amount of data will be returned, but the number of valid data bytes will be less than the amount of data requested. The remaining data is undefined. On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | &00 = all ok | | &80 = read includes last byte | | in file | | (Value undefined for PutBytes)| 5 +-------------------------------+ | 24-bit number of valid data | | bytes transferred | 8 +-------------------------------+ Issue 14 June 1989 10-58 SJresearch Read Random Access Information Function Code=12 ========================================================================== General description ------------------- This function call allows the client to discover information about files that are currently open. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | File handle | 8 +-------------------------------+ | Action | | 0: sequential file pointer | | (PTR#, OSARGS 0) | | 1: file extent | | (EXT#, OSARGS 2) | | 2: file size (space allocated | | for the file, OSARGS 4) | 9 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 24-bit information requested | | (low byte first) | 7 +-------------------------------+ Set Random Access Information Function Code=13 ========================================================================== General description ------------------- This function call allows the client to set information about files for that are currently open. Setting the extent and the space allocated to a file is not supported on some File Servers. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | File handle | 8 +-------------------------------+ | Action | | 0: sequential file pointer | | (PTR#, OSARGS 1) | | 1: file extent | | (EXT#, OSARGS 3) | | 2: file size (space allocated | | for the file, OSARGS 6) | 9 +-------------------------------+ | 24-bit information to set | | (low byte first) | 12 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Issue 14 June 1989 10-59 SJresearch Read Disc Information Function Code=14 ========================================================================== General description ------------------- This function returns the disc configuration of the file server. Conventionally the first drive in the file server has drive number zero. If the number of drives to interrogate is zero then the file server will return information on all drives in the system. It is not necessary to be logged on to read this information. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | First drive number | 8 +-------------------------------+ |Number of drives to interrogate| 9 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Number of drives found | 5 +-------------------------------+ | Drive number of first drive | 6 +-------------------------------+ | Disk name padded with spaces | 22 +-------------------------------+ | Drive number of second drive | 23 +-------------------------------+ etc. Read Current Users Function Code=15 ========================================================================== General description ------------------- This function returns the currently logged-on users of the file server, their station numbers and associated privileges. Conventionally the logged-on user entries start at zero. A request for zero entries will return information for all users, commencing at the start entry. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | First user number | 8 +-------------------------------+ | Number of users to return | 9 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Number of entries returned | 5 +-------------------------------+ | Machine number of first user | | (low byte, high byte) | 7 +-------------------------------+ | User name terminated by CR | n +-------------------------------+ | User privilege | | 0 : User not privileged | | <>0: User privileged | n+1 +-------------------------------+ etc. Issue 29 Apr 1987 10-60 SJresearch Read Date and Time Function Code=16 ========================================================================== General description ------------------- It is not necessary to be logged on to the file server to use this function code. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Date in standard format | | 1st byte (low 5 bits): days | | 1st byte (top 3 bits): | | (year-1981) DIV 16 | | 2nd byte (top 4 bits): | | (year-1981) MOD 16 | | 2nd byte (low 4 bits): month | 6 +-------------------------------+ | Time in standard format | | 1st byte: hours | | 2nd byte: minutes | | 3rd byte: seconds | 9 +-------------------------------+ If the File Server has no date capability, both date bytes will be returned as zero. If the hours byte is greater than 23 or the minutes or seconds byte are greater than 60 the File Server has no time capability. Conventionally in this case the three time bytes will be returned as &FF. A simple test from BASIC is to use noclock=(time% AND &C0C0E0)<>0. The Acorn Level 2 File Server without a time board returns the three time bytes set to 0. Beware that software can misinterpret this result by reading the time at midnight and deducing that no time board is attached. Read End-of-file Status Function Code=17 ========================================================================== General description ------------------- This function is valid for file handles only. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | File handle | 8 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | &00: file pointer within file | | &FF: file pointer outside file| 5 +-------------------------------+ Issue 1st August 1991 10-61 SJresearch Read Object Information Function Code=18 ========================================================================== General description ------------------- This call returns detailed information about a file or directory. The File Server calls with ARG=7 and ARG=8 are only supported on some servers. ARG=64 and ARG=65 are only supported on the SJ Research file server. RISC OS 32-bit capable NetFS tests for 32-bit support by making a call with ARG=&BC, filename="",&00 or or with ARG=&BC, filename="$$",. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG | | 1: Object creation date | | 2: Load and execute address | | 3: Object 24-bit extent | |(For Acorn, file size when file| | open=extent when file closed) | | 4: Access byte as for EXAMINE| | (and ownership byte if | | vers>=1.01) | | 5: All object attributes | | 6: Access and cycle number of| | directory | | 7: Read UID | | 8: Read 32-bit information | | 64: Creation and update date | | 65: Account numbers | 8 +-------------------------------+ | Object pathname, | | terminated by CR | n +-------------------------------+ On exit ------- If ARG=1 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 0 = object not found | | 1 = object is a file | | 2 = object is a directory | 5 +-------------------------------+ | File creation date | 6 +-------------------------------+ If ARG=2 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 0 = object not found | | 1 = object is a file | | 2 = object is a directory | 5 +-------------------------------+ | 32-bit file load address | 9 +-------------------------------+ | 32-bit file execute address | 13 +-------------------------------+ If ARG=3 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 0 = object not found | | 1 = object is a file | | 2 = object is a directory | 5 +-------------------------------+ | 24-bit file size | 8 +-------------------------------+ If ARG=4 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 0 = object not found | | 1 = object is a file | | 2 = object is a directory | 5 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 6 +-------------------------------+ | &00:Owner, &FF:Public | 7 +-------------------------------+ If ARG=5 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 0 = object not found | | 1 = object is a file | | 2 = object is a directory | 5 +-------------------------------+ | 32-bit file load address | 9 +-------------------------------+ | 32-bit file execute address | 13 +-------------------------------+ | 24-bit file size | 16 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 17 +-------------------------------+ | File creation date | 19 +-------------------------------+ | &00:Owner, &FF:Public | 20 +-------------------------------+ If ARG=6 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Undefined | 5 +-------------------------------+ | Length of disk name=0 | 6 +-------------------------------+ | Length of directory name=10 | 7 +-------------------------------+ | Directory name padded with | | spaces | 17 +-------------------------------+ | &00:Owner, &FF:Public | 18 +-------------------------------+ | Cycle number | 19 +-------------------------------+ If ARG=7 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 0 = object not found | | 1 = object is a file | | 2 = object is a directory | 5 +-------------------------------+ | System Internal Name (SIN) | 8 +-------------------------------+ | Server disc number | 10 +-------------------------------+ | Server filing system number | 11 +-------------------------------+ If ARG=8 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 0 = object not found | | 1 = object is a file | | 2 = object is a directory | 5 +-------------------------------+ | 32-bit file load address | 9 +-------------------------------+ | 32-bit file execute address | 13 +-------------------------------+ | 32-bit file size | 17 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 18 +-------------------------------+ | File creation date | 20 +-------------------------------+ | &00:Owner, <>&00:Public | 21 +-------------------------------+ If ARG=64 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 0 = object not found | | 1 = object is a file | | 2 = object is a directory | 5 +-------------------------------+ | Creation date in standard | | format | | 1st byte (low 5 bits): days | | 1st byte (top 3 bits): | | (year-1981) DIV 16 | | 2nd byte (top 4 bits): | | (year-1981) MOD 16 | | 2nd byte (low 4 bits): month | 7 +-------------------------------+ | Creation time in standard | | format | | 1st byte: hours | | 2nd byte: minutes | | 3rd byte: seconds | 10 +-------------------------------+ | Modification date in standard | | format | | 1st byte (low 5 bits): days | | 1st byte (top 3 bits): | | (year-1981) DIV 16 | | 2nd byte (top 4 bits): | | (year-1981) MOD 16 | | 2nd byte (low 4 bits): month | 12 +-------------------------------+ | Modification time in standard | | format | | 1st byte: hours | | 2nd byte: minutes | | 3rd byte: seconds | 15 +-------------------------------+ If ARG=65 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 0 = object not found | | 1 = object is a file | | 2 = object is a directory | 5 +-------------------------------+ | Main account number | 7 +-------------------------------+ | Auxilary account number | 9 +-------------------------------+ Write Object Information Function Code=19 ========================================================================== General description ------------------- This call is used to set the attributes for a file or directory. This call is used by OSFILE. Note that ARG=64 is only supported by the SJ Research file server. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG | | 1: Set load/exec/access | | (OSFILE 1) | | 2: Set load address | | (OSFILE 2) | | 3: Set exec address | | (OSFILE 3) | | 4: Set access | | (OSFILE 4) | | 5: Set creation date | | 64: Set creation and update | | time and date | 8 +-------------------------------+ *** DATA TO WRITE *** +-------------------------------+ | Object pathname, | | terminated by CR | n +-------------------------------+ On exit ------- If ARG=1 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Issue 1st August 1991 10-63 SJresearch Delete Object Function Code=20 ========================================================================== General description ------------------- This call is used to delete an object and is used by OSFILE. It is not possible to use wildcards with this call. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | Object pathname, | | terminated by CR | n +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 32-bit file load address | 8 +-------------------------------+ | 32-bit file execute address | 12 +-------------------------------+ | 24-bit file size | 15 +-------------------------------+ Read User Environment Function Code=21 ========================================================================== General description ------------------- This call returns your current position on the file server, On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Length of disk name (16) | 5 +-------------------------------+ | Disc name padded with spaces | 21 +-------------------------------+ | Name of CSD padded with spaces| 31 +-------------------------------+ | Name of LIB padded with spaces| 41 +-------------------------------+ Set User Boot Option Function Code=22 ========================================================================== General description ------------------- This call writes your boot option to the password file. This call is used by *OPT 4. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | Boot option | 8 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Issue 1st August 1991 10-64 SJresearch User log-off Function Code=23 ========================================================================== General description ------------------- This call is equivalent to a *BYE packet to the fileserver, except that it closes open print files as well. The File Server, on receiving the command, removes the station number from its internal table, closes all file handles and context handles open for that station number. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Read User Information Function Code=24 ========================================================================== General description ------------------- This call returns the first station number in its user table that matches the user identifier provided. Note that on an SJ Research file server the station number returned will always be the machine which the user most recently used, this is not the case with the Acorn file server. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | User name, terminated by CR | n +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 0 : unprivileged | | <>0: privileged | 7 +-------------------------------+ | Station number | | (low byte, high byte) | n +-------------------------------+ Issue 29 Apr 1987 10-64 SJresearch Read FS Version String Function Code=25 ========================================================================== General description ------------------- This call returns a version number string. It is not necessary to be logged onto the file server to do this call. This function is used in the SJ Research library utility FSLIST. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Character string describing | | file server version number, | | terminated with . | n +-------------------------------+ There may be extra data returned after the . You should make allowance for up to 80 bytes to be returned. The returned string is normally in the format: "SJ Research File Server ver 2.00/MDFS" "Acorn File Server Level 3 Version 0.90" etc start of string: "SJ", "Acorn", etc end of string: "MDFS", "HDFS", "FDFS", etc. INSTR(string,".") will find the version number. Read FS Free Space Function Code=26 ========================================================================== General description ------------------- This call returns the size and current amount of free space on a file server disc. This call is used by the library utility *FREE. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ disk name,cr On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 24-bit free space on disk | | in 256-byte blocks | | (low byte first) | 7 +-------------------------------+ | 24-bit disk size | | in 256-byte blocks | | (low byte first) | 10 +-------------------------------+ Returns X%?2=0 if only free space returned X%?2=1 if free space and disk size returned Issue 29 Apr 1987 10-66 SJresearch Create Directory Function code=27 ========================================================================== General description ------------------- This call creates a directory specifying the number of blocks, for the file server, to allocate to that directory. One block is 256 bytes. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | Number of 256-byte blocks to | | allocate | 8 +-------------------------------+ | Directory name, | | terminated by CR | n +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Set Real time clock Function code=28 ========================================================================== General description ------------------- This System privileged command allows the Date and Time to be set, and is used in the Library utility program 'settime'. This command is normally privileged on SJ Research File Servers, but this may be changed, by using function code 65. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | Date in standard format | | 1st byte (low 5 bits): days | | 1st byte (top 3 bits): | | (year-1981) DIV 16 | | 2nd byte (top 4 bits): | | (year-1981) MOD 16 | | 2nd byte (low 4 bits): month | 9 +-------------------------------+ | Time in standard format | | 1st byte: hours | | 2nd byte: minutes | | 3rd byte: seconds | 12 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Issue 29 Apr 1987 10-67 SJresearch Create file Function code=29 ========================================================================== General description ------------------- This follows the same protocol as Command code 1, 'SAVE'. However the data transfer phase is omitted. The result is that a requested amount of space is reserved for a file, the data therein being undefined. This call is not supported on early versions of File Server software. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | 32-bit file load address | 11 +-------------------------------+ | 32-bit file execute address | 15 +-------------------------------+ | 24-bit file size | 18 +-------------------------------+ | File name terminated by CR | n +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ |Access byte in standard format | 5 +-------------------------------+ | File creation date | 6 +-------------------------------+ Read User Free Space Function code=30 ========================================================================== General description ------------------- This call is the Acorn file server call to read a users free space, the call is the equivalent of the SJ Research accounting system (detailed in function code 64). On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | User identifier for free | | space interrogation, | | terminated by . A null | | user identifier means return | | information about this client | n +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 24-bit free space for user | | in 256-byte blocks | | (low byte first) | 7 +-------------------------------+ Issue 29 Apr 1987 10-68 SJresearch Set User Free Space Function code=31 ========================================================================== General description ------------------- The function sets the amount of space available for a user identifier. The function is only legal for system privileged users. The user identifier is that of the client whose space allocation is to be ammended. This call is only implemented on Acorn File Servers. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | 24-bit new amount of free | | space for user in 256-byte | | blocks | | (low byte first) | 10 +-------------------------------+ | User identifier for free | | space interrogation, | | terminated by . | n +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Read Client User ID Function code=32 ========================================================================== General description ------------------- Reads the username which you used to log on to the File Server with. This call is not supported on early version of File Server software. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | User identifier, terminated | | by . | n +-------------------------------+ Issue 29 Apr 1987 10-69 SJresearch Read Users Extended Function code=33 ========================================================================== General description ------------------- This function returns the currently logged-on users of the file server, their station numbers, associated privileges, and task number. This is the same as FSOp 15, other than the additional task number. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | First user number | 8 +-------------------------------+ | Number of users to return | 9 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Number of entries returned | 5 +===============================+ | Machine number of first user | | (low byte, high byte) | 7 +-------------------------------+ | Task number | 8 +-------------------------------+ | User name terminated by CR | n +-------------------------------+ | User privilege | | 0 : User not privileged | | <>0: User privileged | n+1 +===============================+ |More entries as bytes 5 to n+1 | +===============================+ User Info Extended Function code=34 ========================================================================== General description ------------------- This call returns information on the logged-on details of the specified user that matches the user identifier provided. This call is the same as FSOp 24 with the addition of the task number. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | User name, terminated by CR | n +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 0 : unprivileged | | <>0: privileged | 5 +-------------------------------+ | Station number | | (low byte, high byte) | 7 +-------------------------------+ | Task number | 8 +-------------------------------+ Copy Data Function code=35 ========================================================================== Acorn Server Management Function code=36 ========================================================================== FSOp 37 Function code=37 ========================================================================== Save Object 32-bit Function Code=38 ========================================================================== This function is the 32-bit extended version of Save Object. Client (command port): 0 +-------------------------------+ | 0 | 1 +-------------------------------+ | Size of whole of block (n) | 2 +-------------------------------+ | &00 - will be replaced with | | reply port | 3 +-------------------------------+ | 38 = FS Function code | 4 +-------------------------------+ | &00,&00,&00 | | Will be replaced with | | URD,CSD,LIB | 7 +-------------------------------+ | Data acknowledge port | 8 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 9 +-------------------------------+ | 32-bit file load address | 13 +-------------------------------+ | 32-bit file execute address | 17 +-------------------------------+ | 32-bit file size | 21 +-------------------------------+ | File name terminated by CR | n +-------------------------------+ File server (reply port): 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Data port | 5 +-------------------------------+ | Maximum data block size | 7 +-------------------------------+ File server (reply port): 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 5 +-------------------------------+ | File creation date | 7 +-------------------------------+ | Leaf name terminated by CR | n +-------------------------------+ Create Object 32-bit Function Code=39 ========================================================================== This function is the 32-bit extended version of Create Object. Client (command port): 0 +-------------------------------+ | 0 | 1 +-------------------------------+ | Size of whole of block (n) | 2 +-------------------------------+ | &00 - will be replaced with | | reply port | 3 +-------------------------------+ | 39 = FS Function code | 4 +-------------------------------+ | &00,&00,&00 | | Will be replaced with | | URD,CSD,LIB | 7 +-------------------------------+ | Data acknowledge port | 8 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 9 +-------------------------------+ | 32-bit file load address | 13 +-------------------------------+ | 32-bit file execute address | 17 +-------------------------------+ | 32-bit file size | 21 +-------------------------------+ | File name terminated by CR | n +-------------------------------+ File server (reply port): 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 5 +-------------------------------+ | File creation date | 7 +-------------------------------+ | Leaf name terminated by CR | n +-------------------------------+ Load Object 32-bit Function Code=40 ========================================================================== This function is the 32-bit extended version of Load Object. Client (command port): 0 +-------------------------------+ | Standard Transmit block | 7 +-------------------------------+ | Reply port | 8 +-------------------------------+ | File name terminated by CR | n +-------------------------------+ File server (reply port): 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 32-bit file load address | 8 +-------------------------------+ | 32-bit file execute address | 12 +-------------------------------+ | 32-bit file size | 16 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 17 +-------------------------------+ | File creation date | 19 +-------------------------------+ | Leaf name terminated by CR | n +-------------------------------+ Read 32-bit random access information Function Code=41 ========================================================================== This function is the 32-bit version of Read Random Access Information. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | File handle in FS format | 8 +-------------------------------+ | ARG n | | 0: read pointer, extent, size | | (PTR#, EXT#, size | | (OSARGS 0, 2, 4) | 9 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | 32-bit PTR: sequential pointer| 8 +-------------------------------+ | 32-bit EXT: file extent | 12 +-------------------------------+ | 32-bit SIZE: space allocation | 16 +-------------------------------+ load,exec Set 32-bit random access information Function Code=42 ========================================================================== This function is the 32-bit version of Set Random Access Information. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | File handle in FS format | 8 +-------------------------------+ | Action | | 0: sequential file pointer | | (PTR#, OSARGS 1) | | 1: file extent | | (EXT#, OSARGS 3) | | 2: file size (space allocated | | for the file, OSARGS 6) | 9 +-------------------------------+ | 32-bit information to set | 13 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ GetBytes32 Function Code=43 ========================================================================== This function is the 32-bit extended version of GetBytes. awServer implements Function 43 as both GetBytes32 and PutBytes32. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ???? | 8 +-------------------------------+ | 0 : use supplied offset | |<>0: use FS sequential pointer | 9 +-------------------------------+ | Reply port | 10 +-------------------------------+ | File handle in FS format | 11 +-------------------------------+ | 32-bit number of bytes | 15 +-------------------------------+ | 32-bit file offset | | (if supplied) | 19 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | &00=all ok | | &80=includes last byte of file| 5 +-------------------------------+ | 32-bit number of bytes read | 9 +-------------------------------+ awServer implementation likely to be wrong ------------------------------------------ Client (command port): 0 +-------------------------------+ | 0 | 1 +-------------------------------+ | Size of whole of block (n) | 2 +-------------------------------+ | &00 - will be replaced with | | reply port | 3 +-------------------------------+ | 38 = FS Function code | 4 +-------------------------------+ | &00,&00,&00 | | Will be replaced with | | URD,CSD,LIB | | URD replaced by data port | 7 +-------------------------------+ | ARG=OSGBPB action | | 1,2: PutBytes32 | | 3,4: GetBytes32 | | also: | | File handle in FS format | | Can't be both! | 8 +-------------------------------+ | 0 : use supplied offset | |<>0: use FS sequential pointer | 9 +-------------------------------+ | 32-bit number of bytes | 13 +-------------------------------+ | 32-bit file offset | | (if supplied) | 17 +-------------------------------+ or maybe... 8 +-------------------------------+ | 0 : use supplied offset | |<>0: use FS sequential pointer | 9 +-------------------------------+ | Data acknowledge port | 10 +-------------------------------+ | File handle in FS format | 11 +-------------------------------+ | 32-bit number of bytes | 15 +-------------------------------+ | 32-bit file offset | | (if supplied) | 17 +-------------------------------+ File server (reply port): 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | &00=all ok | | &80=includes last byte of file| 5 +-------------------------------+ | 32-bit number of bytes read | 9 +-------------------------------+ PutBytes32 Function Code=44 ========================================================================== This function is the 32-bit extended version of PutBytes. awServer implements Function 43 as both GetBytes32 and PutBytes32. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ???? | 8 +-------------------------------+ | 0 : use supplied offset | |<>0: use FS sequential pointer | 9 +-------------------------------+ | Reply port | 10 +-------------------------------+ | File handle in FS format | 11 +-------------------------------+ | 32-bit number of bytes | 15 +-------------------------------+ | 32-bit file offset | | (if supplied) | 19 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | &00=all ok | | &80=includes last byte of file| 5 +-------------------------------+ | 32-bit number of bytes read | 9 +-------------------------------+ Examine32 Function code=45 ========================================================================== This function is the 32-bit extended version of Examine. awServer implements Function 44 as Examine32. On entry -------- Incomplete NetFS code: 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | Entry pointer to directory | | NetFS uses a 16-bit value | 9 +-------------------------------+ | Number of entries to examine | 10 +-------------------------------+ | ARG | | 1: All information, machine | | readable format | 11 +-------------------------------+ | Directory pathname, | | terminated by CR | n +-------------------------------+ awServer, implemented as FSOp 44: 7 +-------------------------------+ | ARG | | 1: All information, machine | | readable format | 8 +-------------------------------+ | 16-bit directory pointer | 10 +-------------------------------+ | Number of entries to examine | 11 +-------------------------------+ | Directory pathname, | | terminated by CR | n +-------------------------------+ Possibly this: 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | Entry pointer to directory | 8 +-------------------------------+ | ARG | | 1: All information, machine | | readable format | 9 +-------------------------------+ | Number of entries to examine | 10 +-------------------------------+ | Directory pathname, | | terminated by CR | n +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Number of entries returned | 5 +-------------------------------+ | Cycle number | 6 +-------------------------------+ | ???? | 7 +-------------------------------+ | 1 = object is a file | | 2 = object is a directory | 8 +-------------------------------+ | 32-bit load address | 12 +-------------------------------+ | 32-bit execution address | 16 +-------------------------------+ | 32-bit object length | 20 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 21 +-------------------------------+ | 11 bytes of information | | Probably contains: | | Date object created | | System Internal Name (SIN) | 32 +-------------------------------+ | File name padded with spaces | 42 +-------------------------------+ |Next object as above bytes 5-41| +-------------------------------+ Possibly this: 0 +-------------------------------+ | Receive block (shown on | | summary page) | 3 +-------------------------------+ | Owner/Public flag | 4 +-------------------------------+ | 10 = length of filename | 5 +-------------------------------+ | &00 | 6 +-------------------------------+ | 32-bit load address | 10 +-------------------------------+ | 32-bit execution address | 14 +-------------------------------+ | 32-bit object length | 18 +-------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 19 +-------------------------------+ | Returns &00 | 20 +-------------------------------+ | Date object created | 22 +-------------------------------+ | Returns &00000000 | | Probably | | System Internal Name (SIN) | 26 +-------------------------------+ | Returns &00000000 | 30 +-------------------------------+ | File name padded with spaces | 40 +-------------------------------+ |Next object as above bytes 5-39| +-------------------------------+ OpenObject32 Function code=46 ========================================================================== This function is the 32 bit extended version of Open Object. awServer does not implement this call. On entry -------- 0 +--------------------------------+ | Transmit block (shown on | | summary page) | 7 +--------------------------------+ | 0 : create a new file, delete | | data in any existing file | | <>0: object must already exist | 8 +--------------------------------+ | 0 : open object for update | | <>0: open object for read only | 9 +--------------------------------+ | Object name, terminated by CR | n +--------------------------------+ On exit ------- 0 +--------------------------------+ | Receive block (shown on | | summary page) | 4 +--------------------------------+ | File handle in FS format | 5 +--------------------------------+ | 0 = object not found | | 1 = object is a file | | 2 = object is a directory | 6 +--------------------------------+ | Access byte, | | bits 7-0: M P D L W R w r | 7 +--------------------------------+ | &00:Owner, &FF:Public | 8 +--------------------------------+ | 32-bit object size | 12 +--------------------------------+ | 32-bit disk allocation | 16 +--------------------------------+ ========================================================================== Notes: Ownership is &00 vs <>&00, but lots of code explicitly tests for &00 vs &FF, so servers should return &00 and &FF. Read Account Information Function code=64 ========================================================================== General description ------------------- This call reads the amount of space left in an account. This call is only supported on the SJ Research file server. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG | | Bit 0: Personal account only | | Bit 1: Accounts on current | | disc only | 8 +-------------------------------+ | First account to try | 10 +-------------------------------+ | Maximum number of accounts to | | read information on | 12 +-------------------------------+ | Logical disc number | 13 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 2 +-------------------------------+ | Command Code | | &00 : Stop | | &40 : More on this disc | | &80 : Move to next disc | 3 +-------------------------------+ | Return Code &00 = Ok | 4 +-------------------------------+ | Next account to try | 6 +-------------------------------+ | Number of accounts returned | 8 +-------------------------------+ | 1st account number | 10 +-------------------------------+ | 1st account space | 12 +-------------------------------+ | 2nd account number | 14 +-------------------------------+ | 2nd account space | 16 +-------------------------------+ etc. The amount of information sent by the File Server may exceed the amount of data which can be transferred in a single exchange. The Command Code byte is used to indicate what further action the client machine should take. Read/Write System Information Function code=65 ========================================================================== General description ------------------- This call provides an interface to read and write the printer information and change the privilege needed to write the file server's time. All of these read calls are unprivileged commands. All the write operations are privileged. Reset print server information ------------------------------ This call is used to reset the printer information and must be issued for any of the other change printer information calls to take effect. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG=0 | 8 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Read current state of printer ----------------------------- This call returns the detailed information about a logical printer. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG=1 | 8 +-------------------------------+ | Printer number 1-8 | 9 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Name of printer | | (padded with spaces) | 10 +-------------------------------+ | Bit 3 : Spool to disc | | Bit 2 : Account ownership | | required | | Bit 1 : Anonymous users | | allowed | | Bit 0 : Printing enabled | 11 +-------------------------------+ | Account number (only relevant | | if bit 2 of byte 10 is set) | 13 +-------------------------------+ | Banner file name, terminated | | by a CR if fewer than 23 | | characters | n +-------------------------------+ Write current state of printer ------------------------------ This call writes the detailed information about a printer, system privilege is required to do this. This call is not supported on SJ Preservers version 1.00 or greater, see ARG=16 for call to write printer information. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG=2 | 8 +-------------------------------+ | Printer number 1-8 | 9 +-------------------------------+ | Name of printer | | (padded with spaces) | 15 +-------------------------------+ | Bit 3 : Spool to disc | | Bit 2 : Account ownership | | required | | Bit 1 : Anonymous users | | allowed | | Bit 0 : Printing enabled | 16 +-------------------------------+ | Account number (only relevant | | if bit 2 of byte 10 is set) | 18 +-------------------------------+ | Banner file name, terminated | | by a CR if fewer than 23 | | characters | n +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Issue 29 Apr 1987 10-71 SJresearch Read the AUTO printer priority ------------------------------ This call reads the order in which printers are selected for users who have not requested a particular printer. This call is not supported on SJ File Servers version 1.00 or greater. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG=3 | 8 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Number of printer entries | | available | | (current implementation = 2) | 8 +-------------------------------+ | 1st choice of printer | 8 +-------------------------------+ | 2nd choice of printer | 8 +-------------------------------+ etc. Write the AUTO printer priority ------------------------------- This call allows a privileged user to write the order in which printer are selected for users who have requested the AUTO printer. This call is not supported on SJ Fileservers version 1.00 or greater. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG=4 | 8 +-------------------------------+ | Default printer 1 | 9 +-------------------------------+ | Default printer 2 | 10 +-------------------------------+ etc. On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Read system message channel --------------------------- This call returns the physical printer that all system messages are sent to. Note that the printer is a physical printer, so the parameter should be either 1 (parallel) or 2 (serial). On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG=5 | 8 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Current system message printer| 5 +-------------------------------+ Issue 29 Apr 1987 10-72 SJresearch Write system message channel ---------------------------- This call allows a privileged user to set the physical printer that system messages come out of. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG=6 | 8 +-------------------------------+ | New system message printer | 9 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Read message level ------------------ This call reads the current level of system messages. The value returned is in the range of 0 to 255. The amount of output is the level of output selected plus all the levels below that level. Therefore, in the list of levels shown to set the message level to 7 would make the file server print all logons and logoffs as well as errors. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG=7 | 8 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ | Current message level | 5 +-------------------------------+ Message Description level 0 Off 5 Logon/logoff 7 Errors (i.e. 'Wrong password', 'bad name' etc.) 10 Maximum users and all star commands 11 Load/save 15 *Cat and opens 128 Aborted loads 130 Function codes 150 Network errors 170 Map building names 200 Disc read/write 250 All successful network transactions to and from the fileserver 255 All Activity to the JPROC processor Set message level ----------------- This call sets the message level, as described above. It should never be neccessary to set the message level to greater than 127 and that setting the message level to a value greater than 150 produces excessive output and will probably reduce the performance of the file server. On entry -------- 0 +-------------------------------+ | Transmit block (shown on | | summary page) | 7 +-------------------------------+ | ARG=8 | 8 +-------------------------------+ | New message level | 9 +-------------------------------+ On exit ------- 0 +-------------------------------+ | Receive block (shown on | | summary page) | 4 +-------------------------------+ Issue 29 Apr 1987 10-73 SJresearch