1 Copyright (c) 1999 Massachusetts Institute of Technology
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2 of the License, or (at
6 your option) any later version.
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 ------------------------------
20 The MLDEV protocol is a binary file transfer protocol used between ITS
21 systems for the transfer of files. It depends heavily upon the ITS job
22 device feature and the ITS system calls and error codes. For a more
23 detailed description of the ITS system calls, read the ITS UUO and
24 symbolic system call manuals.
26 The name MLDEV is historical, dating back to the days when this protocol
27 was used mostly to reference ML's file system from AI (and vice versa).
28 The MLDEV server is called MLSLV, for "ML slave".
30 ICP is to socket 305 if doing mostly input, 307 if mostly output.
33 Command format: to slave
34 AOBJN pointer (RH = command code)
38 COPENI==1 OPEN for input
45 COPENO==2 OPEN for output
52 CDATA==3 Write data (Word count includes data words and byte count word)
53 arg1: # of bytes of data
54 args: Data, packed ILDB-style into at most 200 words
56 CALLOC==4 Read allocate
62 COCLOS==6 Output CLOSE
65 CFDELE==7 DELETE or RENAME
73 CRNMWO==10 RENAME while open
78 arg: Echoed by the no-op reply
81 arg1: Transaction number
85 CSYSCL==13 Random system call. 11 (decimal) arguments
86 arg1: System call name in sixbit
87 arg2: Flags (control-bit argument)
88 arg3: Number of following arguments that have significance
89 arg4: 1st argument to system call
91 arg11: 8th argument to system call
93 CREUSE==14 Reinitialize yourself, because we are about to be reused
94 by a new creator for a new file
97 Reply format: from slave
98 AOBJN pointer (RH = reply code)
103 RDATA==1 Input data (word count includes data words and byte count word)
104 arg1: # of bytes of data
105 args: Data, packed ILDB-style into words.
106 Note: Slave must always send fully populated words except when
109 ROPENI==2 Input OPEN status; 1 or 11 arguments
110 arg1: -1
\19 succeeded >0
\19 OPEN loss number
111 arg2
\19arg11 are present only if arg1 is -1
112 arg2: Real device name (usually SIXBIT/DSK/)
117 arg7: Byte size open in
118 arg8: File length in byte size written in
119 arg9: Byte size written in
120 arg10: FILDTP - -1 if RFDATE wins on this file
121 arg11: Creation data (if RFDATE wins)
123 ROPENO==3 Output OPEN status. 1 or 11 arguments
124 arg1: -1
\19 succeeded >0
\19 OPEN loss number
125 arg2-arg11 present only if arg1 is -1
126 arg2: Real device name
130 arg6: File length (-1
\19 FILLEN fails on this device)
131 arg7: Byte size open in
132 arg8: File length in byte size written in
133 arg9: Byte size written in
134 arg10: FILDTP - -1 if RFDATE wins on this file
135 arg11: Creation data (if RFDATE wins)
140 RFDELE==5 DELETE/RENAME status. 1st argument:
142 \1d0
\19 failure code
143 LH: -1
\19 DELETE or RENAME
144 0
\19 RENAME while open
145 If RENAME while open call succeeded, there are 4 more arguments:
146 arg2: Real device name
147 arg3: Real FN1 (as renamed)
152 arg: Echo argument send by no-op command
154 RACCES==7 Acknowledge access
155 arg: Transaction number from CACCES
157 RSYSCL==10 Respond to system call. 9 arguments
158 arg1: <error code or 0>,,<# of times call skipped>
159 arg2: 1st value from system call
161 arg9: 8th value from system call
163 RICLOS==11 Respond to input CLOSE
165 ROCLOS==12 Respond to output CLOSE
167 RIOC==13 Reflect an IOC error
168 arg: IOC error code, right-justified in word
170 RREUSE==14 Acknowledge a CREUSE