Leaf and Sequin ProtocolsJeffrey Mogul [Stanford University/Computer Science Department]July 23, 1982Abstract: Leaf is a Pup-based protocol for remote random access to files. Leaf isimplemented on top of Sequin, a reliable packet protocol. This document describesSequin, Leaf, their interaction, the intended use of Leaf, and some implementationdetails.0. IntroductionLeaf is a protocol which allows clients to access files across networks via servers. It is distinct fromFTP in that, whereas FTP operations involve copying entire files from one place to another, Leafinvolves read and write access to selected parts of a file. Instead of copying the file, it is (possibly)modified in place. The Leaf protocol is intended to provide some amount of security and reliability,and to provide for some sharing of file access.The Leaf protocol uses, as a transport mechanism, the Pup-based Sequin protocol. Sequin is aconnection-based, full-duplex, sequenced, duplicate-free, reliable packet protocol. What this means isthe two parties (a client and a server) communicating via Sequin maintain some state informationnot explicitly contained in the packets to provide a system whereby every packet sent by a user ofSequin is guaranteed to arrive exactly once at its destination. Further, packets arrive in the orderthey are sent. [Note: Leaf requires a bidirectional packet stream, but not a full-duplex one.]Sequin includes a timeout mechanism that handles the problem of crashed hosts.1. SequinSequin is a packet-based protocol; that is, users of Sequin send and receive packets. A Sequinpacket is formatted as a Pup packet, except that the PupID field of the packet is redefined tocontain four bytes of Sequin-specific information [see fig. 1.] The Sequin header bytes are:Send Sequence-This byte starts at 0, and is incremented after every packet sent thatcontains data. Control packets do not increment the sequence number.Receive Sequence-This byte also starts at zero, and is the Send sequence number that youare awaiting. The Send Sequence number of a control packet must match thisnumber in order to be processed.Allocate-specifies the total buffering available at the reciever. This specifies how manyunacknowledged sequence numbers can be sent. To decrease the probability ofsequence errors going undetected because of wrap-around, Allocate should notbe greater than about 30. This may vary over the lifetime of a connection, soeach end should pay attention to its partner's Allocate byte. a'pqpq ]rX? \T Us ts* S ts6 QR P4 Ist FHurvr%vr DurT C@<. A'= @7/ = $ur ;v8r. :N 8'; 623 5x$; 3N -3t *r+4 (@ ']#u r6 "PE%urG @  ur vr' m#) 7 e/ = >PLEAF AND SEQUIN PROTOCOLS2Control-This byte can take on a number of values, indicating the packet's functonwithin the Sequin protocol:0 = SequinData-Indicates that this packet contains data for the next higher levelprotocol.1 = SequinAck-Acknowledges a data packet without returning more data, thusallowing the sender to release buffer space. Also acknowledges aSequinNop.2 = SequinNop-Used to maintain activity on a connection, to prevent a timeout.3 = SequinRestart-Means retransmit everything for which you have not received anacknowledgement.'' Used, e.g., if a packet is received out of order.4 = SequinCheck-A check is a request for acknowledgement, so that you can see whatyour partner's sequence numbers are. This is useful if you areexpecting a reply and either your request or your reply was dropped.If the request was dropped, resend it. If the reply was dropped, youmust do a restart. [This is obsolete, and SequinNop should be usedinstead.]5 = SequinOpen-Opens a connection. Both sequence numbers should be reset.This may carry data, thus it must advance the send sequence number.This is always sent from a client to a server, and the Pup Source Socketin the packet is the one on which the client will listen for all furtherpackets (i.e., the Client's Port identifies the connection.) Unlike theRTP protocol (which is not used with Sequin), the server does notreturn a unique socket to the client. All packets from the client to theserver are directed to the server's Well-known Socket.''6 = SequinBreak-Shuts down a connection immediately; intended to indicate that aclient is exiting now. This elicits a SequinBroken in response.7 = SequinClose-Used to put a full-duplex connection into a closed'' state, inpreparation for a SequinDestroy. [Note: obsolete].8 = SequinClosed-Acknowledges a SequinClose.9 = SequinDestroy-Sent to close a connection. The receiver of this should then send aSequinDallying, and wait for a SequinQuit from the sender, or timeoutafter a while.10 = SequinDallying-Response to SequinDestroy.11 = SequinQuit-Response to SequinDallying. Both parties go away after receiving orsending one of these.12 = SequinBroken-Sent to indicate that all is lost.'' This is a courtesy, sent before theworld comes to an end.Since Sequin packets contain the Allocate and Receive Sequence numbers piggybacked'' on theoutgoing data, users need not send special acknowledgement packets if there is data going in theother direction.eturXtursrGtbur!( `]nu r0 [Xur  W;A U Rur@O`u r= MEJu r1 I-- G, F$' D: C?u r% >m) <2 ;e8 96 8]vr' 60 5U:2)u r- 0vr*-zu r 5 +3(u r%u r1 $- " ku r@u r7  u rJ   ] ]B  =XykLEAF AND SEQUIN PROTOCOLS3Since the Send and Receive Sequence numbers are stored in bytes, they will wrap around fairlyoften. For this reason, a heuristic of some sort is needed to determine the meaning of thedifference between sequence numbers. For an example, see Appendix A.To avoid dire consequences related to crashed hosts, Sequin includes the notion of a timeout.Unfortunately, this interacts somewhat with the Leaf protocol, because the Leaf protocol usesSequin timeouts to implement file locks. (See section 2 for more details.) If there is no activity ona connection for a period (10 minutes for the IFS implementation), it enters the timed out'' state.In timeout out state, file locks can be broken, and, if the system is halting, connections can beclosed. (Note that Sequin locks are broken only on demand, i.e. if another user wants to use a filewhile the connection is timed out.) After a further period (12 hours for the IFS), the connection isbroken and the locks are released. If the client resumes activity during the grace period'',unbroken locks are still secure.For simple implementations of clients, the following rules help:(1) if the Allocate byte is zero, it should be interpreted as if it were one (i.e., only oneunacknowledged packet at a time.)(2)the receipt of the latest duplicate'' is taken to be an implicit restart, thus allowing a simpleimplementation to merely resend after a timeout.2. LeafLeaf is based on a packet format known as a LeafOp. There may be one or many LeafOps sent inone Sequin packet, but a LeafOp must be totally contained within one Sequin packet, and istherefore limited by the conventional bounds on the size of the data portion of a Pup [532 bytes.]The Well-Known Pup socket for Leaf servers is 43B. Leaf/Sequin packets are always of Pup Type260B.Each LeafOp begins with one word that contains a LeafOpCode, a flag indicating whether it is arequest or an answer, and the length (in bytes) of the LeafOp, inclusive of the header word. Theformat is shown in figure 2. The Answer flag is set if the LeafOp is an answer, and clear if it is arequest. File addresses within LeafOps are represented by LeafAddresses, whose format is shown in figure 3.The fields are:Mode-This field places some restrictions on the allowable addresses for a write operation.It can take the values:0 = Anywhere-No restrictions; any Leaf address is legal.1 = NoHoles-Forbids any address such that after the completion of the write, therewill be a hole'' in the resulting file, i.e., a section which has never been written.2 = DontExtend-On a write operation which would necessitate the extension of the file,write only as much as will fit into the unextended file. An error indication will notbe returned; however, the byte count returned in response to the write will reflectthe actual number of bytes written.eturXtursrGt brK `$7 _E [H vr ZfO Xg W^U U$= TV V Rb QNG O L@IsVG!DNC@0 <t 9Tr,vr# 7W 6Kb 3 0wr+ 1wr .q1v r! ,H +i"vr. ) &v r$ %5" (B Z +/ 2W 0Vw5# . >W_7LEAF AND SEQUIN PROTOCOLS4When this mode is used for a read operation which attempts to read past the endof a file, an error is not returned. For all other modes, an error is returned whenreading past the end of a file.3 = CheckExtend-If a write operation would necessitate the extension of the file, do notstart it, and report an error.EOF-If present in a write operation, indicates that this write establishes a new end-of-fileposition. In other words, the last byte of this write is the last byte of the file. Thisis useful for truncation of files.Address-The byte offset from the front of the file; the low 16 bits are in the secondword, and the high 13 bits are right-justified in the first word. The interpretationof this 29-bit field is somewhat host-specific, for historical reasons:Normal Host: treat the 29-bit field as an unsigned integer. This supports files up to 512Mbytes long.IFS: The IFS implementation of Leaf allows negative byte addresses in files, used foraccessing the Leader Page'' of a file. [This is a kludge, and should be replaced byLeafOps that manipulates file properties.] The IFS ignores the two high orderaddress bits (bits <3:4> of the first word). If the address is greater than 2**26, thenit is treated as a negative address. Note that write access is only permitted torestricted fields of the leader page (CREATE-DATE and FILE-TYPE).Strings within LeafOps are in IfsString format; an IfsString starts with one word containing thestring length in bytes, followed by characters representing the string. Odd length strings arefollowed by a garbage byte to fill out the final word. (See figure 5.)Open files are referred to by Filehandles, which are 16-bit objects.The LeafOps are depicted in figures 6  n:1 = LeafOpenThis is used to open a file for further access. Note that one may have any number of open filesunder one Leaf connection. The filehandle should be 0. The LeafOpenMode (shown in figure 4)has a lot of subfields:Read-Indicates that the file will be read from.Write-Indicates that the file will be written to. It is legal for both Read and Write to beset.Extend-Indicates that the file will be extended. In general, Extend should be equivalent toWrite.Multiple-If set, allows wild card'' filename specifications. This should be zero, since itis currently unimplemented.Create-Indicates that the file should be created. Operations on non-existent files willgive appropriate errors, and it is not reasonable to try to Create and Read a filewithout Writing it.eturXtursrGtbrK`vr:_[; ZfW;(CU<T3"Q%(OFMGJv rKIP F$vr(vrD*uC*rA%3@D >A ;evr% 9_ 8]G 51v r 2(vr .u -VrR +] *N'#(*#(F"sH(>5*'e8 =Uq:LEAF AND SEQUIN PROTOCOLS5Explicit Version Number-This is used with the filename part of the LeafOpen. It cantake on the values: [In general, use None or Any.]0 = None-Consider it an error if there is a version number in the filename.1 = Old-The version number must refer to an existing version; the usual case for aread. [Not implemented in IFS/Leaf.]2 = NextOrOld-The version number must be that of an existing file, or else thenext available version number; the usual case for a write. [Not implemented inIFS/Leaf.]3 = Any-Any legal filename, with or without a version number, is allowed.Version Number Default-Controls rules for determining the file version nmber in theabsence of an explicit version number:0 = DontDefault-Presumably, this means that there should have been an explicitversion number.1 = Lowest-Use the lowest extant version.2 = Highest-Use the highest extant version (the current file).3 = Next-Use the next version number.Multiple Writers-When set, opens the file in write-share'' mode, allowing multiple(simultaneous) writers to a file. The only correct setting of the mode bits foropening a file in this mode is: extend'' and create'' clear; read'', write'', andmultiple writers'' set. Multiple write-share opens are allowed, but they may not bemixed with non-write-share opens. The size of a file may not be changed while itis open in write-share mode. User processes are responsible for insuring correctnessof sequences of writes. Note: If create'' is set or the version number default is Next'' (thus requesting creation of a newversion), an error will result unless the LeafOpenMode specifies nromal writing; i.e., write'' is setand Multiple writers'' is not.The rest of the LeafOpen LeafOp consists of five IfsStrings, in order, the username and passwordunder which the file is to be accessed, the connect-directory and password, and the filename. Thefilename is with respect to the connect-directory, in the usual manner.The answer to a LeafOpen contains the filehandle to be used for further access to the open file, anda LeafAddress that represents the length of the file. There is one further word, which should beignored.2 = LeafCloseBoth LeafClose, and its expected answer, contain the filehandle of the file to be closed.3 = LeafDeleteLeafDelete allows a file open in Write'' mode (not Write-share'' mode) to be deleted. TheLeafDelete LeafOp contains the filehandle of the file to be deleted; the Answer is identical, but hasthe Answer bit set. [Warning: Do not try to delete a file open only for reading.]eturXtursrGtbr" 4`3 ]nB ZC8 X% U  5 T: R  O`AL5" J& G> F B  ? 2 <9T:7&*6K K4K 3C.#1I 0;$ -urP +c * &00 %Xa #G ;) %<%  uu rY u Brvr* ,9 :u=  =W?LEAF AND SEQUIN PROTOCOLS64 = LeafCloseTransactionThis is similar in all respects to LeafClose except that the specified file handle is not destroyed (andmay thus be used in further operations). In particular, the request/answer format is identical to thatfor LeafCLose, except for the LeafOpCode. The effect of LeafCloseTransaction is to cause theserver to write to disk all buffered information relevant to the specified file handle, including alloutstanding writes and changes in file length. Thus, it is useful when a client wishes to insure thatchanges to a file have been committed to stable storage; this is not, however, a true atomictransaction.''LeafCloseTransaction has no effect on files opened for reading only. However, excessive use of thisoperation may lead to inefficiency, since it causes cached data to be flushed.5 = LeafTruncateThis is an obsolete operation. A file can be truncated by doing a zero-length write with the EOFbit set in the LeafAddress.6 = LeafReadThis is used to read from a file. The LeafOp contains the relevant filehandle, the LeafAddress ofthe first byte to read, and the length (in bytes) of the data to be read. If the length of a readcannot be contained in one LeafOp, several LeafRead answers may be returned. Each answer to aLeafRead contains the filehandle, the LeafAddress of the first byte returned in this packet, thenumber of bytes remaining to be read inclusive of those in this packet, and the data itself (filled, ifnecessary, with a garbage byte.) (E.g., for a 2400(8) byte LeafRead, the lengths returned would be2400, 1400, and 400. The maximum number of data bytes in a LeafRead Answer is 1000(8).)7 = LeafWriteThis is used to write to a file. The LeafOp contains the filehandle, starting LeafAddress, the lengthin bytes, and the data. The answer contains the filehandle, starting address, and the length (thelength actually written, in the case of DontExtend LeafAddresses). A LeafWrite must be containedwithin a single Sequin packet.8 = LeafResetIf a Leaf connection is Broken'' (i.e., a lock has been broken), it must be Reset before any furtheroperations can take place (otherwise, these operations will return the BrokenLeaf'' error code.)The LeafReset contains a ResetHosts word which should be one of three values:0-Reset the connections from this host; this should not be used lightly from a multi-usersystem.1-Reset a broken'' Leaf connection. Once an error occurs on a connection, it cannot beused until it is reset.1-Reset connections from all hosts under this username; this should not be used lightly!The rest of the LeafReset LeafOp contains two IfsStrings, the username and the password underwhich the connection is to be opened. The expected response is a LeafReset Answer, whose secondword is meaningless. A LeafReset with ResetHosts = 1 on an unbroken connection is a No-op.9 = LeafNoOpThis is obsolete.eturXtursrGt bu `rR _R ]] \\ ZG Y=! W TV_ RN Ou N#r@! L Isu Gr6, FkJ DL CcO AN @[T >X ;u :'r Z 8J 7F 5 2pu 0r9vr /hI -N*(J  )4& (T $!Y(V N &Y [ vu r Z >S`.LEAF AND SEQUIN PROTOCOLS711 = LeafParamsThis is used to set varous parameters for the Sequin connection; as such, it violates the ideal of aclean separation of layers. It is a variable-length request, containing one to three data words:MaxPupData-Sets the maximum Pup data size (in bytes) for all future Pups on thisconnection; the default (and maximum) is 532; the minimum is 10.FileTimeout-Sets the file lock'' timeout in units of 5 seconds; the default is 10 minutes.The server need not allow the lock timeout to be raised above the default value; ifthis is attempted, the timeout will be set to the default, and no error will result.ConnectionTimeout-Sets the Sequin connection timeout in units of 5 seconds; thedefault is 12 hours.A zero value for any of the parameters implies that the system default should be used.The response to a LeafParams includes one word of data, whose purpose is currently undefined.0 = LeafErrorThis LeafOp indicates that an error has occured. The LeafError LeafOp contains an error sub-code,and echos the LeafOpCode and filehandle from the offending LeafOp. The error subcodes are:116IllegalLookupControlMultiple'' bit set in LeafOpen mode201NameMalformedillegal filename202IllegalCharillegal character in filename203IllegalStarillegal use of *''204IllegalVersionillegal version number205NameTooLong206IllegalDIFAccessnot allowed to access Directory Information File207FileNotFound208AccessDeniedfile protection violation209FileBusyfile already open in a conflicting way210DirNotFoundno such directory211AllocExceededdisk page allocation exceeded212FileSystemFull213CreateStreamFailedprobably disk error in file214FileAlreadyExistsrename to'' file already exists215FileUndeletable216Usernamefailures from login or connect217Userpassword""218FilesOnly""219ConnectName""220ConnectPassword""1001BrokenLeaffile lock timeout has occured1010BuddingLeafunimplemented Leaf Op1011BadHandlebad file handle presented1012LeafFileTooLong1013IllegalLeafTruncate1014AllocLeafVMemsemi-fatal IFS filesystem error1015IllegalLeafRead1016IllegalLeafWriteeturXtursrGt bu `rI _a[ ,Zf@W; 2U"1T3TQ+O LXV I-] Fu D}rO B[ ?#X% >J # < # ;A # 9 # 89 6#0 51 3 # 2)#& 0 # /! # - ,# *#! ) '# &  +.q $+.q # +.q !}+.q  # t # # l  d #  \ =RYLEAF AND SEQUIN PROTOCOLS8Leaf Timeouts and LocksNormally, Leaf allows one writer or (optionally, and) multiple readers of any given file. A file islocked against conflicting access when it is opened, and access locks are checked upon subsequentopens. Similarly, locks are released when files are closed, or Leaf connections are reset.Since a locked file cannot be accessed over other connections, if a host crashes, it might be difficultto recover. For this reason, all locks are subject to timeouts. Basically, a timeout occurs if there isno Sequin activity over a connection during a specified period. This means, among other things,that if more than one file is open under one connection, and if even one file is being accessed oftenenough to prevent a Sequin timeout, then the locks on all of the open files will remain secure, evenif no activity occurs on the other open files. On the other hand, if a connection enters the timed-out state, and subsequently another connection opens a file open under this connection, the locks onall files wll be broken. The timeouts are meant to protect against crashed connections, but notnecessarily against crashed user processes communicating via these connections.Since a Leaf server never sends unprompted packets to a client, the client must periodically sendsomething to the server to indicate that it is still alive (a SequinNop will suffice.) For the samereason, if a client accidentally times out a connection, but comes back to life after a lock has beenbroken, it will receive a LeafError (code = BrokenLeaf) when it tries to do any operation; it mustdo a LeafReset to clear this condition.There is no notion in Leaf of a per-file lock; the locks are maintained on a per-Sequin connectionbasis. However, it is not unreasonable to maintain just one open Leaf file on each of severalSequin connections; this effectively gives per-file locking.AcknowledgementsThis paper is largely based on information provided by Ted Wobber, of Xerox SDD. He haspatiently answered questions and made comments on drafts of this paper, but the responsibility forerrors is entirely mine. Other people who have contributed their efforts to this paper, andespecially to its accuracy, are Brian Reid, Eric Schoen, and Mark Roberts.eturXtursrGt bu ^rS ]nvr2) [[ XZ W;vr* UN T3H RW Q+E O.6 N#W LO IsN Gd Fke D7+ Cc' @7M >^ =/< 8]u 51r= 3%= 2)J 0J .=91LEAF AND SEQUIN PROTOCOLS9Appendix A: Filters on Sequin Sequence NumbersWhen a Sequin packet is received, the receiver must compare the Send Sequence number in thepacket to its own Receive Sequence number, to determine if the packet is in the proper order. Ifthe numbers are equal, this test has an obvious form. Unfortunately, since the sequence numbersare stored in a byte, they wrap around, and if the two numbers differ by much, it is hard to tellwhat this signifies.In the IFS implementation of Sequin, the method used is as shown below (the code is a pseudo-Pascal that allows for sub-ranges in case statements.):constSequenceMax =377B;typeSequenceStatus = (equal, previous, ahead, duplicate, outofrange);SequenceNumber = 0..SequenceMax;function SequenceCompare(x,y:SequenceNumber):SequenceStatus;begincase (x-y) of0: return(equal);-1: return(previous);-100B..-2: return(duplicate);1..100B: return(ahead);else: return(outofrange);end;end;begincase SequenceCompare(IncomingSendSeq, ExpectedSendSeq) ofoutofrange: (* Sequin is broken, abort connection *);ahead: (* Request retransmission of unacked packets *);duplicate: (* Drop packet *);previous: (* Change Incoming control to SequinRestart,then fall through *);equal: (* fall through *)end;case SequenceCompare(IncomingRecSeq, AckedSeq) of outofrange: (* Sequin is broken, abort connection *);previous: (* Drop packet *);duplicate: (* Drop packet *);ahead: (* Release packets awaiting retransmission,fall through *);equal: (* fall through *);end;AckedSeq := IncomingRecSeq;(* process packet received *);end.Appendix B: Enabling the IFS Leaf ServerThere are 2 steps in this process. The first is to invoke IFS with the /L switch. This does notenable Leaf, but an IFS started in this manner should display an L'' after its version number. Thesecond step is to chat to the IFS and issue an Enable'' command for Leaf. If Leaf is enabled, thestatistics (for) servers'' command will show statistics for it.eturXtursrGt a. ^rU ]("? [6* Z +6 X Up@ Sur1 Px( MAL5 I-< G2F$ DCA@>2=  ; 82695xx5372p06/h-2,_2*2)W5'&O$2:#G2!22 / 9t(  r:$v rF 9+ A :=ZTwo 8-bit bytes<>DestinationPortSourcePortPupHeader(20 bytes)Pup LengthTransport ControlPup TypeDestination NetworkDestination HostDestination SocketSource NetworkSource HostSource SocketContentsPossibleGarbage BytePup Checksum(0 to 532 bytes)AllocateControlRecieve SequenceSend SequenceSequinOverhead(PupID field)Figure 1: The format of a Sequin Packete #G7`Gr`#G`G\Gr\<#G7\<GSGSX#G7SXG +F#G7FG 8#G78G G*:r#G7rG*#G%\GrW9$5WW9$O #$%O-$rJ9$5WJ9$8GA#$%A$r=B9$5W=B9$%$@%A$@%z$(z$*:z$,sz$.z$0z$3z$5Wz$eC]$8$,s89$9S|9$<FI$ V9F&]$<8$ V98]$ |;6t;>;pM >;K>;@>;>^ TR_9P&  ] $,s ] $!qb| V^ +W^ :P)PJ C_*:C_ < #%^+W)$ A +$%9$Up%^W#$W#$W#GW#HG\<G%XGrWGWGWG%SGrSXGSXGqYU&'sY'sU& 9\_9$<S$>;pZ&>;X|>;U& r'aUGC` Length in bytesPossible Garbage ByteData bytesAnswerLeaf OpCodeLength of LeafOp in bytes04561515011109Figure 2: Format of first word of a LeafOpFirst wordSecond wordModeEOFHigh bits of byte address in fileLow bits of byte address in file15141312000151231515Figure 3: Format of LeafAddressReadWriteExtendMultipleCreateExplicitVersionNumberVersionNumberDefaultNotUsed151413121110987654300012345678910111215Figure 4: Format of LeafOpenModeUnusedMultipleWritersFigure 5: Format of an IFSstring9"sG9$"s$V]#q p a`<$@tY$Y$a<<G@tYGYu<GYuGY$\_Y$\_ s\_W_VW_W_:W_>;W_ra>a9aa:arT *rG$AG$rO<$rG<$rOt<GrOt<GAGGrG<GrGGr8<$r@<$A8$r8$C_ 4^ r@t<GA8Gr8<Gr8GN$ VH$9G$@ VG$G$G$Or$pK& K&K&!<% rA& P&rP&P&?WP&?WA&F&P& F&F&rF&>F&>7%r1#%<$*<$#%$*<G#<G#G#H$ 9#H$#H$V#H$#H$$#H$,s#H$4;#H$9#H$t&& V&V&&'&%%'%&%%-',-& )$ #H$()$(#%$@0W*$0W#%$@p+zV+z +zr+z+z+z!+z%+z*:+z.+z1s+z5+z:+z>;*G>;#GF#GDX+z7%  r    ! &W *: . 1s 5 : C r =v&4t',4& $y @$9G9"sG3G:r!+D_Length in bytesPossible Garbage ByteData bytesFigure 5: format of an IfsStringLeafReset = 8ResetHostsUserNamePasswordFigure 6: Format of a LeafReset0LeafReset = 81Not UsedFigure 6a: Format of a LeafReset Answerd"sG4;IG:IX"GIXG_'"s$#L9$a`#qJ#I$UpU& VrE r8G!VGr,GrG,r4^$r/$r'$p6 1 +z!zr]94$rVp6 4^$94^$74$r+6 *:4^$*:8G86 41*:0G*:/GG/G +*:r]'rCNLeafOpen = 1FileHandle = 0LeafOpenModeUserNameUserPasswordConnectNameConnectPasswordFigure 7: Format of a LeafOpen0LeafOpen = 11FileHandleFile LengthIgnoreFigure 8: Format of a LeafOpen AnswerLeafClose = 20FileHandleFileHandleLeafClose = 21Figure 9: Format of a LeafCloseFigure 10: Format of a LeafClose AnswerLeafError = 0Error SubcodeError LeafOpCodeError FileHandleFigure 11: Format of a LeafErrorFile NamerbG!VFIGrFG,r^$rZ&$9^$r`C [rU$rQC$rL$rH_$ W_ rR VN{ VJ 9ErDG9!VCGr<%r^$rp`C;t^$r,sQC$.`C 9;^$r,sZ&$,s^$9`C6t[ ,sU$H;U@$6tU& ,sbGIXLG:,sL,G,sLG8N{-r<%%r4;G!V+Gr+W,Gr+WG +r/$p1 0$r10$r-% 7-% 90$r80$r-1 ,s/$,s+WG +,s+W,GIX+G,s4;G819r(%,s(%'s :Gs :G5WGsr,GsrGs$sz$s$p #$r%$r!V$ : Ar @ rC$r?Gr!V?WGr?WGrpA& r EXX0LeafRead = 6FileHandleLeafAddressLength in bytesLength in bytesLeafAddressFileHandleLeafRead = 61DataPossible GarbageByteFigure 13: Format of a LeafRead AnswerFigure 12: Format of a LeafReadBytePossible GarbageDataFileHandleLeafAddressLength in bytesLength in bytesLeafAddressFileHandleLeafWrite = 70LeafWrite = 71bFigure 14: Format of a LeafWriteFigure 15: Format of a LeafWrite Answerr^$rZ&$9^$rrQC$r^$r`C`C [ rU$ :U@$rU& VN{rbG!VLG:rL,GrLG,sLGIXLG:,sbG5WN{6tU& H;U@$,sU$7[ .`C ;t^$r,sQC$9;^$r,sZ&$,s^$9`C,sL$:?$r:Cr$,s?G V,s?WGIX?WG+9;G<qBB@t@,sr<%&9<%sq]9p!VrG+rrGrG Vr$$rr$r-$r)A$9-$rr ]$r-$r* r$$ :$@$r$A Vr2G!VG:rG,sG,s,GIXG:,s2G5W6t$A H;$@$,s$$7* ;t-$r,s ]$9;-$r,s)A$,s-$/^ /^./^ 9/^r @ ,s @'r EXXLeafParams = 11FileLockTimeout (opt.)ConnectionTimeout (opt.)LeafParams = 111(Undefined)0MaxPupDataLengthFigure 16: Format of a LeafParamsFigure 17: Format of a LeafParams Answer9\_!V$9W!V$9S|!V$9`!VG#O-G9N!G9NGU^  U& P9\$r8\$r+W^ *:\_!V$8^ 5Y *:`!VGKXG*:W!G*:WG +^ V\$r\$r YrrLB!+U&(9KI HELVETICA HELVETICA TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMANGACHA  HELVETICA  HELVETICA  HELVETICA  HELVETICA HELVETICA Template@%-41:@SCHGILOPEKZ%-GiKV D:;]=: Z!: Z%-7i;*!J %1 " J=%:+i/E%K %='#E%:; " K:#-= +i :#Erwu:#  h%O  iI%:+i :#i#B!"!:;B""":+=i :#i<%:CZ!:#iN*!K:C%GiG:# *iCB%C:C%;:C%T=#:C5c9: Z%--HiH=G]G=G]G=G]G%E=\Pj/SQvLeafPaper.pressmogul 3-Aug-82 11:10:01 PDTQ