home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / etc / misc / zmodemdo.txt < prev   
Encoding:
Text File  |  2003-06-11  |  100.8 KB  |  5,503 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.      The ZMODEM Asynchronous Inter Application File Transfer Protocol
  8.  
  9.  
  10.  
  11.                               Chuck Forsberg
  12.  
  13.  
  14.  
  15.                            Omen Technology Inc
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                               Chuck Forsberg
  22.  
  23.                            Omen Technology Inc
  24.  
  25.                    17505-V Northwest Sauvie Island Road
  26.  
  27.                           Portland Oregon 97231
  28.  
  29.                            Voice: 503-621-3406
  30.  
  31.             Modem (TeleGodzilla): 503-621-3746 Speed 1200,300
  32.  
  33.                           Compuserve: 70007,2304
  34.  
  35.                     UUCP: ...!tektronix!reed!omen!caf
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123. Chapter 0               Rev091186 Typeset 9-11-86                        1
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139. Chapter 0               Rev091186 Typeset 9-11-86                        2
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147. 1.  IIIINNNNTTTTEEEENNNNDDDDEEEEDDDD AAAAUUUUDDDDIIIIEEEENNCCEEEE
  148.  
  149.  
  150.  
  151. This document is intended for telecommunications managers, systems
  152.  
  153. programmers, and others who choose and implement asynchronous file
  154.  
  155. transfer protocols over dial-up networks and related environments.
  156.  
  157.  
  158.  
  159.  
  160.  
  161. 2.  EEEEVVVVOOOOLLLLUUUUTTTTIIIIOOOONNNN OOOOFFFF ZZZZMMMMOODDDEEEEMMMM
  162.  
  163.  
  164.  
  165. In the beginning of ZMODEM development, we thought a few modifications to
  166.  
  167. XMODEM might allow high performance over packet switched networks while
  168.  
  169. preserving XMODEM's simplicity.
  170.  
  171.  
  172.  
  173. The initial concept would add a block number to the ACK and NAK signals
  174.  
  175. used by XMODEM and YMODEM.  The resultant protocol would allow the sender
  176.  
  177. to send more than one block before waiting for a response.
  178.  
  179.  
  180.  
  181. But how to add the block number to XMODEM's ACK and NAK?  Pure binary
  182.  
  183. won't do, some combinations won't pass through networks and operating
  184.  
  185. systems.  Other operating systems may not be able to recognize comething
  186.  
  187. coming back unless a break signal or particular code is present.[1] Hmmm,
  188.  
  189. this starts to sound like a PACKET, with variable preamble, encoded data,
  190.  
  191. and an ending sequence, a far cry from XMODEM's simple ACK and NAK.
  192.  
  193.  
  194.  
  195. Managing the window[2] was another problem.  Experience gained in
  196.  
  197. debugging The Source's SuperKermit protocol indicated a window size of
  198.  
  199. about 1000 characters was needed at 1200 bps.  This extrapolates to the
  200.  
  201. better part of 20000 characters at 19.2 kbps.  Much of the SuperKermit's
  202.  
  203. complexity and debugging time centered around its ring buffering and
  204.  
  205. window management.  There had to be an easier way to get the job done.
  206.  
  207.  
  208.  
  209. A sore point in XMODEM and YMODEM is error recovery.  More to the point,
  210.  
  211. how can the receiver determine whether the sender has responded, or is
  212.  
  213. ready to respond to, a retransmission request?  Y/YMODEM attacks the
  214.  
  215. problem by throwing away characters until a certain period of silence.
  216.  
  217. Too short a time allows a spurious pause in output (network or timesharing
  218.  
  219. congestion) to pass as error recovery.  Too long a timeout devastates
  220.  
  221. throughput, and allows a noisy line to lock up the protocol.  SuperKermit
  222.  
  223. solves the problem with a distinct start of packet that does not appear
  224.  
  225. anywhere else.  WXMODEM and ZMODEM use character sequences to delineate
  226.  
  227. the start of frames.
  228.  
  229.  
  230.  
  231. A further error recovery problem arises in streaming protocols.  How does
  232.  
  233.  
  234.  
  235.  
  236.  
  237. __________
  238.  
  239.  
  240.  
  241.  1. Without waiting for a response
  242.  
  243.  
  244.  
  245.  2. The WINDOW is the data in transit between sender and receiver.
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255. Chapter 2               Rev091186 Typeset 9-11-86                        2
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271. Chapter 2               Rev091186 Typeset 9-11-86                        3
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279. the receiver know when (or if) the sender has recognized its error signal?
  280.  
  281. Is the next packet the correct response to the error signal?  Is it
  282.  
  283. something left over "in the queue"?  Or is this new subpacket one of many
  284.  
  285. that will have to be discarded bacause the sender did not receive the
  286.  
  287. error signal?  How long should the receiver let this continue before
  288.  
  289. sending another error signal?  How can the protocol prevent this from
  290.  
  291. degenerating into an argument about mixed signals?
  292.  
  293.  
  294.  
  295. SuperKermit uses selective retransmission, so it can accept any good
  296.  
  297. packet it receives.  Each time the SuperKermit receiver gets a data
  298.  
  299. packet, it goes through a routine to decide which outstanding packet (if
  300.  
  301. any) it "wants most" to receive, and asks for that one.
  302.  
  303.  
  304.  
  305. In the ZMODEM development, we decided to forgo the complexity of
  306.  
  307. SuperKermit's selective retransmission scheme and its associated buffer
  308.  
  309. management logic and memory requirements.
  310.  
  311.  
  312.  
  313. Another sore point with XMODEM (and WXMODEM) is the garbage added at the
  314.  
  315. end of files.  This was accpetable with old CP/M files which had no exact
  316.  
  317. length, but not with modern systems such as DOS and Unix.  YMODEM and FAST
  318.  
  319. use file length information in the header block to trim the output file,
  320.  
  321. but this causes data loss when transferring files that grow during a
  322.  
  323. transfer.  In some cases, the file length may be unknown, as when data is
  324.  
  325. obtained from a process.  Variable length data subpackets solve both of
  326.  
  327. these problems.
  328.  
  329.  
  330.  
  331. Since some characters had to be escaped anyway, there wasn't any point
  332.  
  333. wasting two bytes to represent packet length.  The length of data
  334.  
  335. subpackets is denoted by ending each subpacket with an escape sequence
  336.  
  337. analagous to BISYNC and HDLC.
  338.  
  339.  
  340.  
  341. The end result was a ZMOEM header containing a "frame type", four bytes of
  342.  
  343. supervisory information, and its own CRC-16.  Data frames consist of a
  344.  
  345. header followed by 1 or more data subpackets.  In the absence of
  346.  
  347. transmission errors, an entire file can be sent in one data frame.
  348.  
  349.  
  350.  
  351. Since the sending system may be sensitive to numerous control characters
  352.  
  353. or strip parity in the reverse data path, all of the headers sent by the
  354.  
  355. receiver are encoded in hex.  A common lower level routine receives all
  356.  
  357. headers, allowing the main program logic to deal with headers and data
  358.  
  359. subpackets as objects.
  360.  
  361.  
  362.  
  363. With equivalent binary (efficient) and hex (network friendly) frames, the
  364.  
  365. sending program can send an "invitation to receive" sequence to activate
  366.  
  367. the receiver without undue concern of crashing the remote application with
  368.  
  369. unexpected  control characters.
  370.  
  371.  
  372.  
  373. Going "back to scratch" in the protocol design presents an oppurtunity to
  374.  
  375. steal good ideas from many sources and to add a few new ones.
  376.  
  377.  
  378.  
  379. From Kermit and UUCP comes the concept of an initial dialog to exchange
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387. Chapter 2               Rev091186 Typeset 9-11-86                        3
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403. Chapter 2               Rev091186 Typeset 9-11-86                        4
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411. system parameters.
  412.  
  413.  
  414.  
  415. ZMODEM generalizes Compuserve B Protocol's host controlled transfers to
  416.  
  417. single command AutoDownload and command downloading.  A Security Challenge
  418.  
  419. discourages password hackers and Trojan Horse authors from abusing
  420.  
  421. ZMODEM's power.
  422.  
  423.  
  424.  
  425. We were also keen to the pain and $uffering of legions of
  426.  
  427. telecommunicators whose file transfers have been ruined by communications
  428.  
  429. and timesharing faults.  ZMODEM's file transfer recovery and advanced file
  430.  
  431. management are dedicated to these kindred comrades.
  432.  
  433.  
  434.  
  435. After ZMODEM had been operational a short time, Earl Hall pointed out the
  436.  
  437. obvious: ZMODEM's user friendly AutoDownload is incomplete if the user
  438.  
  439. must assign transfer options to both the sending and receiving programs.
  440.  
  441. As a result, transfer options may be specified to the sending program,
  442.  
  443. which passes them to the receiving program in the ZFILE header.
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451. 3.  AAAACCCCKKKKNNNNOOOOWWWWLLLLEEEEDDDDGGGGMMMMEEEENNNNTTTSS
  452.  
  453.  
  454.  
  455. Encouragement and suggestions by Thomas Buck, Ward Christensen, Earl Hall,
  456.  
  457. Irv Hoff, Stuart Mathison, and John Wales, are gratefully acknowledged.
  458.  
  459.  
  460.  
  461.  
  462.  
  463. 4.  RRRREEEELLLLAAAATTTTEEEEDDDD DDDDOOOOCCCCUUUUMMMMEEEENNTTSSSS
  464.  
  465.  
  466.  
  467. The following files may be useful while studying this document:
  468.  
  469.  
  470.  
  471. YYYYMMMMOOOODDDDEEEEMMMM....DDDDOOOOCCCC Describes the XMODEM and YMODe transfer protocols
  472.  
  473.  
  474.  
  475. zzzzmmmmooooddddeeeemmmm....hhhh Provides definitions for the manifest consteferenced
  476.  
  477.         herein.
  478.  
  479.  
  480.  
  481. rrrrzzzz....cccc,,,, sssszzzz....cccc,,,, rrrrbbbbssssbbbb.cccc Unix source code for operating ZMODEM programs.
  482.  
  483.  
  484.  
  485. rrrrzzzz....1111,,,, sssszzzz....1111 Manual pages for rz and sz (Troff s).
  486.  
  487.  
  488.  
  489. zzzzmmmm....cccc,,,, zzzzmmmmooooddddeeeemmmm....hhhh Operatitem independent ZMODEM subroutines, header
  490.  
  491.         file.
  492.  
  493.  
  494.  
  495.  
  496.  
  497. 5.  RRRROOOOSSSSEEEETTTTTTTTAAAA SSSSTTTTOOOONNNNEEEE
  498.  
  499.  
  500.  
  501. Here are some definitions which reflect current vernacular in the computer
  502.  
  503. media.  The attempt here is identify the file transfer protocol rather
  504.  
  505. than specific programs.
  506.  
  507.  
  508.  
  509. Frame   A ZMODEM frame consists of a header and 0 or more data subpackets.
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519. Chapter 5               Rev091186 Typeset 9-11-86                        4
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535. Chapter 5               Rev091186 Typeset 9-11-86                        5
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543. XMODEM  refers to the original 1979 file transfer etiquette introduced by
  544.  
  545.         Ward Christensen's 1979 MODEM2 program.  It's also called the
  546.  
  547.         MODEM or MODEM2 protocol.  Some who are unaware of MODEM7's
  548.  
  549.         unusual batch file mode call it MODEM7.  Other aliases include
  550.  
  551.         "CP/M Users's Group" and "TERM II FTP 3".  This protocol is
  552.  
  553.         supported by most communications programs because it is easy to
  554.  
  555.         implement.
  556.  
  557.  
  558.  
  559. XMODEM/CRC replaces XMODEM's 1 byte checksum with a two byte Cyclical
  560.  
  561.         Redundancy Check (CRC-16), improving error detection.
  562.  
  563.  
  564.  
  565. YMODEM  refers to the XMODEM/CRC protocol with the throughput and/or batch
  566.  
  567.         transmission enhancements described in YMODEM.DOC.
  568.  
  569.  
  570.  
  571.  
  572.  
  573. 6.  WWWWHHHHYYYY DDDDEEEEVVVVEEEELLLLOOOOPPPP ZZZZMMMMOOOODDEEEMMMM????
  574.  
  575.  
  576.  
  577. Since its development half a decade ago, the Ward Christensen MMMMOOOODDDDEEEEMMMM
  578.  
  579. protocol has enabled a wide variety of computer systems to interchange
  580.  
  581. data.  There is hardly a communications program that doesn't at least
  582.  
  583. claim to support this protocol, now called XXXXMMMMOOOODDDDEEEEMMMM.
  584.  
  585.  
  586.  
  587. Advances in computing, modems and networking have spread the XMODEM
  588.  
  589. protocol far beyond the micro to micro environment for which it was
  590.  
  591. designed.  These application have exposed some weaknesses:
  592.  
  593.  
  594.  
  595.    o+ The user interface is suitable for computer hobbyists.  Multiple
  596.  
  597.      commands must be keyboarded to transfer each file.
  598.  
  599.  
  600.  
  601.    o+ Since commands must be given to both programs, simple menu selections
  602.  
  603.      are not possible.
  604.  
  605.  
  606.  
  607.    o+ The short block length causes throughput to suffer when used with
  608.  
  609.      timesharing systems, packet switched networks, satellite circuits,
  610.  
  611.      and buffered (error correcting) modems.
  612.  
  613.  
  614.  
  615.    o+ The 8 bit checksum and unprotected transactions allow undetected
  616.  
  617.      errors and disrupted file transfers.
  618.  
  619.  
  620.  
  621.    o+ Only one file can be sent per command.  The file name has to be given
  622.  
  623.      twice, first to the sending program and then again to the receiving
  624.  
  625.      program.
  626.  
  627.  
  628.  
  629.    o+ The transmitted file accumulates as many as 127 bytes of garbage.
  630.  
  631.  
  632.  
  633.    o+ The modification date and other file attributes are lost.
  634.  
  635.  
  636.  
  637.    o+ XMODEM requires _c_o_m_p_l_e_t_e 8 bit transparency, all 256 codes.  XMODEM
  638.  
  639.      will not operate over some networks that use ASCII flow control or
  640.  
  641.      escape codes.  Setting pure transparency often disables important
  642.  
  643.      network control functions for the duration of the call.
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651. Chapter 6               Rev091186 Typeset 9-11-86                        5
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667. Chapter 6               Rev091186 Typeset 9-11-86                        6
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675. A number of other protocols have been developed over the years, but none
  676.  
  677. have displaced XMODEM to date.
  678.  
  679.  
  680.  
  681.    o+ Lack of public domain documentation and example programs have kept
  682.  
  683.      proprietary protocols such as MNP, Blast, and others tightly bound to
  684.  
  685.      the fortunes of their suppliers.
  686.  
  687.  
  688.  
  689.    o+ Link level protocols such as X.25, X.PC, and MNP do not manage
  690.  
  691.      application to application file transfers.
  692.  
  693.  
  694.  
  695.    o+ The Kermit protocol was developed to allow file transfers in
  696.  
  697.      environments hostile to XMODEM.  The performance compromises
  698.  
  699.      necessary to accommodate traditional mainframe environments limit
  700.  
  701.      Kermit's efficiency.  Even with completely transparent channels,
  702.  
  703.      Kermit control character quoting limits the efficiency of binary file
  704.  
  705.      transfers to about 75 per cent.[1]
  706.  
  707.  
  708.  
  709.      Kermit Sliding Windows ("SuperKermit") improves throughput over
  710.  
  711.      networks at the cost of increased complexity.  SuperKermit state
  712.  
  713.      transitions are encoded in a special language "wart" which requires a
  714.  
  715.      C compiler.  The SuperKermit C code requires full duplex
  716.  
  717.      communications and the ability to check for the presence of
  718.  
  719.      characters in the input queue, precluding its implementation on some
  720.  
  721.      operating systems.
  722.  
  723.  
  724.  
  725.      A number of submodes are used in various Kermit programs, including
  726.  
  727.      different methods of transferring binary files.  Two Kermit programs
  728.  
  729.      will mysteriously fail to operate with each other if the user has not
  730.  
  731.      correctly specified these submodes.
  732.  
  733.  
  734.  
  735. A number of extensions to the XMODEM protocol have been made under the
  736.  
  737. collective name YMODEM.
  738.  
  739.  
  740.  
  741.  o+ YMODEM-k uses 1024 byte blocks to reduce the overhead from transmission
  742.  
  743.    delays by 87 per cent compared to XMODEM, but network delays can still
  744.  
  745.    degrade performance.  Some networks may not be transmit the 1024 byte
  746.  
  747.    packets unmodified.
  748.  
  749.  
  750.  
  751.  o+ The handling of files that are not a multiple of 1024 or 128 bytes is
  752.  
  753.    awkward, especially if the file length is not known, or changes during
  754.  
  755.    transmission.
  756.  
  757.  
  758.  
  759.  o+ YYYYMMMMOOOODDDDEEEEMMMM----gggg provides efficient batch file transferserving exact file
  760.  
  761.    length and file modification date.  YYYYMMMMOOOODDDDEEEEMMMM----gggg is eally insensitive
  762.  
  763.    to network delays.  Because it does not support error recovery,
  764.  
  765.  
  766.  
  767.  
  768.  
  769. __________
  770.  
  771.  
  772.  
  773.  1. Some Kermit programs support run length encoding.
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783. Chapter 6               Rev091186 Typeset 9-11-86                        6
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799. Chapter 6               Rev091186 Typeset 9-11-86                        7
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.    YMODEM-g is usually used hardwired or with a reliable link level
  808.  
  809.    protocol.  IF YMODEM-g detects a CRC error, data transfers are aborted.
  810.  
  811.    YMODEM-g is easy to implement because it closely resembles XMODEM-CRC.
  812.  
  813.  
  814.  
  815. Another XMODEM "extension" is protocol cheating, referred to as "Turbo
  816.  
  817. Download" and OOOOvvvveeeerrrrTTTThhhhrrrruuuusssstttteeeerrrr[2ese sometimes improve XMODEM throughput
  818.  
  819. by disabling error recovery.
  820.  
  821.  
  822.  
  823. The ZMODEM Protocol corrects the weaknesses described above while
  824.  
  825. maintaining as much of XMODEM/CRC's simplicity and prior art as possible.
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833. 7.  ZZZZMMMMOOOODDDDEEEEMMMM PPPPrrrroooottttooooccccoooollDDDeeeessssiiiiggggnnnn CCCCrrrriiiitttteeeerrrriiiiaaaa
  834.  
  835.  
  836. The design of a file transfer protocol is an engineering compromise
  837.  
  838. between conflicting requirements:
  839.  
  840.  
  841.  
  842. 7.1  EEEEaaaasssseeee ooooffff UUUUsssseeee
  843.  
  844.  
  845.  
  846.  o+ ZMODEM allows either program to initiate file transfers, passing
  847.  
  848.    commands and/or modifiers to the other program.
  849.  
  850.  
  851.  
  852.  o+ File names need be entered only once.
  853.  
  854.  
  855.  
  856.  o+ Menu selections are supported.
  857.  
  858.  
  859.  
  860.  o+ Wild Card names may be used with batch transfers.
  861.  
  862.  
  863.  
  864.  o+ Minimum keystrokes required to initiate transfers.
  865.  
  866.  
  867.  
  868.  o+ ZRQINIT frame sent by sending program can trigger automatic downloads.
  869.  
  870.  
  871.  
  872.  o+ ZMODEM can step down to X/YMODEM if the other end does not support
  873.  
  874.    ZMODEM.[1]
  875.  
  876.  
  877.  
  878. 7.2  TTTThhhhrrrroooouuuugggghhhhppppuuuutttt
  879.  
  880.  
  881.  
  882. ZMODEM is designed for optimum performance with almost no degradation
  883.  
  884. caused by delays introduced by packet switched networks and timesharing
  885.  
  886. systems.
  887.  
  888.  
  889.  
  890. ZMODEM is optimized for best throughput over networks where line hits
  891.  
  892.  
  893.  
  894.  
  895.  
  896. __________
  897.  
  898.  
  899.  
  900.  2. Omen Technology Trademark
  901.  
  902.  
  903.  
  904.  1. Provided the transmission medium accommodates X/YMODEM.
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914. Chapter 7               Rev091186 Typeset 9-11-86                        7
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930. Chapter 7               Rev091186 Typeset 9-11-86                        8
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938. occur infrequently.  This assumption markedly reduces code complexity and
  939.  
  940. memory requirements.  ZMODEM protocol features enhance rapid error
  941.  
  942. recovery compared to network compatible XMODEM implementations.
  943.  
  944.  
  945.  
  946. In the absence of network delays, error recovery is rapid, much faster
  947.  
  948. than YMODEM or network compatible versions of XMODEM.
  949.  
  950.  
  951.  
  952. Many transfers will originate from a timesharing system connected to a
  953.  
  954. packet switched network.  ZMODEM features allow simple, efficient
  955.  
  956. implementation on a wide variety of timesharing hosts.
  957.  
  958.  
  959.  
  960. File transfers begin immediately regardless of which program is started
  961.  
  962. first, without the 10 second delay associated with XMODEM.
  963.  
  964.  
  965.  
  966.  
  967.  
  968. 7.3  IIIInnnntttteeeeggggrrrriiiittttyyyy aaaannnndddd RRRRobbbuuuussssttttnnnneeeessssssss
  969.  
  970.  
  971.  
  972. Once a ZMODEM session is begun, all transactions are protected with 16 bit
  973.  
  974. CRC.[2] Complex proprietary techniques such as CCCCyyyybbbbeeeerrrrnnnneeeettiicccc DDDDaaaattttaaaa
  975.  
  976. RRRReeeeccccoooovvvveeeerrrryyyy((((TTTTMMMM))))[3] are not need reliable transfers.
  977.  
  978.  
  979.  
  980. A security challenge mechanism guards against "Trojan Horse" messages.
  981.  
  982.  
  983.  
  984. 7.4  EEEEaaaasssseeee ooooffff IIIImmmmpppplllleeeemmmmeeeentttaaaattttiiiioooonnnn
  985.  
  986.  
  987.  
  988. ZMODEM accommodates a wide variety of systems:
  989.  
  990.  
  991.  
  992.  o+ Microcomputers that cannot overlap disk and serial i/o
  993.  
  994.  
  995.  
  996.  o+ Microcomputers that cannot overlap serial send and receive
  997.  
  998.  
  999.  
  1000.  o+ Computers and/or networks requiring XON/XOFF flow control
  1001.  
  1002.  
  1003.  
  1004.  o+ Computers that cannot check the serial input queue for the presence of
  1005.  
  1006.    data without having to wait for the data to arrive.
  1007.  
  1008.  
  1009.  
  1010. Although ZMODEM provides "hooks" for multiple "threads", ZMODEM is not
  1011.  
  1012. intended to replace link level protocols such as X.25.
  1013.  
  1014.  
  1015.  
  1016. ZMODEM accommodates network and timesharing system delays by continuously
  1017.  
  1018. transmitting data unless the receiver interrupts the sender to request
  1019.  
  1020. retransmission of garbled data.  ZMODEM in effect uses the entire file as
  1021.  
  1022. a window.[4]
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028. __________
  1029.  
  1030.  
  1031.  
  1032.  2. Except for the CAN-CAN-CAN-CAN-CAN abort sequence.
  1033.  
  1034.  
  1035.  
  1036.  3. Unique to Professional-YAM and PowerCom
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046. Chapter 7               Rev091186 Typeset 9-11-86                        8
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062. Chapter 7               Rev091186 Typeset 9-11-86                        9
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070. ZMODEM provides a general purpose application to application file transfer
  1071.  
  1072. protocol which may be used directly or with with reliable link level
  1073.  
  1074. protocols such as X.25, MNP, Fastlink, etc.  When used with X.25, MNP,
  1075.  
  1076. Fastlink, etc., ZMODEM detects and corrects errors in the interfaces
  1077.  
  1078. between error controlled media and the remainder of the communications
  1079.  
  1080. link.
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086. 8.  ZZZZMMMMOOOODDDDEEEEMMMM RRRREEEEQQQQUUUUIIIIRRRREEEEMMEENNNNTTTTSSSS
  1087.  
  1088.  
  1089.  
  1090. ZMODEM requires an 8 bit transfer medium.  ZMODEM escapes network control
  1091.  
  1092. characters to allow operation with packet switched networks.  In general,
  1093.  
  1094. ZMODEM operates over any path that supports XMODEM, and over some that
  1095.  
  1096. don't.
  1097.  
  1098.  
  1099.  
  1100. To support full streaming, the path should either assert flow control[1]
  1101.  
  1102. or pass full speed transmission without loss of data.
  1103.  
  1104.  
  1105.  
  1106. 8.1  FFFFiiiilllleeee CCCCoooonnnntttteeeennnnttttssss
  1107.  
  1108.  
  1109.  
  1110. ZMODEM places no constraints on the information content of binary files,
  1111.  
  1112. except that the number of bits in the file must be a multiple of 8.
  1113.  
  1114.  
  1115.  
  1116. Since ZMODEM is used to transfer files between different types of computer
  1117.  
  1118. systems, text files must meet minimum requirements if they are to be
  1119.  
  1120. readable on a wide variety of systems and environments.
  1121.  
  1122.  
  1123.  
  1124. Text lines consist of printing ASCII characters, spaces, tabs, and
  1125.  
  1126. backspaces.
  1127.  
  1128.  
  1129.  
  1130. Overstruck characters may be generated by backspacing or by overprinting
  1131.  
  1132. the line with CR (015) not followed by LF.
  1133.  
  1134.  
  1135.  
  1136. Overstruck characters generated with backspaces should be sent with the
  1137.  
  1138. most important character last to accomodate CRT displays that cannot
  1139.  
  1140. overstrike.  A text line is terminated by a CR/LF (015, 012) sequence, or
  1141.  
  1142. by a NL (012) character.  The sending program may use the ZZZZCCCCNNNNLLLL bit to
  1143.  
  1144. force the receiving program to convert the received end of line to its
  1145.  
  1146. local end of line convention.
  1147.  
  1148.  
  1149.  
  1150. A CR (013) without a linefeed implies overprinting, and is not acceptable
  1151.  
  1152. as a logical line separator.  Overprinted lines should print all important
  1153.  
  1154. characters in the last pass to allow CRT displays to display meaningful
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160. __________________________________________________________________________
  1161.  
  1162.  
  1163.  
  1164.  4. Streaming strateges are discussed in coming chapters.
  1165.  
  1166.  
  1167.  
  1168.  1. With XOFF and XON, or out of band flow control such as X.25 or CTS
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Chapter 8               Rev091186 Typeset 9-11-86                        9
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194. Chapter 8               Rev091186 Typeset 9-11-86                       10
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202. text.
  1203.  
  1204.  
  1205.  
  1206. NNNN....BBBB....:::: Files that have been translated in such a way as to modify theirth cannot be updated with the ZZZZCCCCRRRREEEECCCCOOOOVVVV Conversion Optiowihalows
  1207.  
  1208. interrupted transfers to be resumed without loss of data.
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214. 9.  ZZZZMMMMOOOODDDDEEEEMMMM BBBBAAAASSSSIIIICCCCSSSS
  1215.  
  1216.  
  1217.  
  1218. 9.1  PPPPaaaacccckkkkeeeettttiiiizzzzaaaattttiiiioooonnnn
  1219.  
  1220.  
  1221.  
  1222. ZMODEM frames differ somewhat from X/YMODEM blocks.  X/YMODEM blocks are
  1223.  
  1224. not used for the following reasons:
  1225.  
  1226.  
  1227.  
  1228.  o+ Block numbers are limited to 256
  1229.  
  1230.  
  1231.  
  1232.  o+ No provision for variable length blocks
  1233.  
  1234.  
  1235.  
  1236.  o+ Line hits corrupt protocol signals, causing failed file transfers.  In
  1237.  
  1238.    particular, modem errors sometimes generate false block numbers, false
  1239.  
  1240.    EOTs and false ACKs.  False ACKs are the most troublesome as they cause
  1241.  
  1242.    the sender to lose synchronization with the receiver.
  1243.  
  1244.  
  1245.  
  1246.    State of the art X/YMODEM programs such as Professional-YAM and
  1247.  
  1248.    PowerCom overcome some of these weaknesses with clever proprietary
  1249.  
  1250.    code, but a stronger protocol is desired.
  1251.  
  1252.  
  1253.  
  1254.  o+ It is difficult to determine the beginning and ends of X/YMODEM blocks
  1255.  
  1256.    when line hits cause a loss of synchronization.  This precludes rapid
  1257.  
  1258.    error recovery.
  1259.  
  1260.  
  1261.  
  1262. 9.2  LLLLiiiinnnnkkkk EEEEssssccccaaaappppeeee EEEEnnnnccccodddiiiinnnngggg
  1263.  
  1264.  
  1265.  
  1266. ZMODEM achieves data transparency by extending the 8 bit character set
  1267.  
  1268. (256 codes) with escape sequences based on the ZMODEM data link escape
  1269.  
  1270. character ZDLE.[1]
  1271.  
  1272.  
  1273.  
  1274. Link Escape coding permits variable length data subpackets without the
  1275.  
  1276. overhead of a separate byte count.  It allows the beginning of frames to
  1277.  
  1278. be detected without special timing techniques, facilitating rapid error
  1279.  
  1280. recovery.
  1281.  
  1282.  
  1283.  
  1284. Link Escape coding does add some overhead.  The worst case, a file
  1285.  
  1286. consisting entirely of escaped characters, would incur a 50% overhead.
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292. __________
  1293.  
  1294.  
  1295.  
  1296.  1. This and other constants are defined in the _z_m_o_d_e_m._h include file.
  1297.  
  1298.     Please note that constants with a leading 0 are octal constants in C.
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308. Chapter 9               Rev091186 Typeset 9-11-86                       10
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. Chapter 9               Rev091186 Typeset 9-11-86                       11
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332. The ZDLE character is special.  ZDLE represents a control sequence of some
  1333.  
  1334. sort.  If a ZDLE character appears in binary data, it is prefixed with
  1335.  
  1336. ZDLE, then sent as ZDLEE.
  1337.  
  1338.  
  1339.  
  1340. The value for ZDLE is octal 030 (ASCII CAN).  This particular value was
  1341.  
  1342. chosen to allow a string of CAN characters to abort a ZMODEM session,
  1343.  
  1344. compatible with X/YMODEM session abort.
  1345.  
  1346.  
  1347.  
  1348. Since CAN is not used in normal terminal operations, interactive
  1349.  
  1350. applications and communications programs can monitor the data flow for
  1351.  
  1352. ZDLE.  The following characters can be scanned to detect the ZRQINIT
  1353.  
  1354. header, the invitation to automatically download commands or files.
  1355.  
  1356.  
  1357.  
  1358. Receipt of five successive CAN characters will abort a ZMODEM session.
  1359.  
  1360. Eight CAN characters are sent.
  1361.  
  1362.  
  1363.  
  1364. The receiving program decodes any sequence of ZDLE followed by a byte with
  1365.  
  1366. bit 6 set and bit 5 reset (upper case letter, either parity) to the
  1367.  
  1368. equivalent control character by inverting bit 6.  This allows the
  1369.  
  1370. transmitter to escape any control character that cannot be sent by the
  1371.  
  1372. communications medium.  In addition, the receiver recognizes escapes for
  1373.  
  1374. 0177 and 0377 should these characters need to be escaped.
  1375.  
  1376.  
  1377.  
  1378. By default, ZMODEM software currently escapes ZDLE, 020, 0220, 021, 0221,
  1379.  
  1380. 023, and 0223.  If preceded by 0100 or 0300 (@), 015 and 0215 are also
  1381.  
  1382. escaped to protect the Telenet command escape CR-@-CR.
  1383.  
  1384.  
  1385.  
  1386. The ZMODEM routines in zm.c accept an option to escape all control
  1387.  
  1388. characters, to allow operation with less transparent networks.  The
  1389.  
  1390. routines also accept an option to escape only the ZDLE character, for
  1391.  
  1392. highest possible throughput.
  1393.  
  1394.  
  1395.  
  1396. 9.3  HHHHeeeeaaaaddddeeeerrrr
  1397.  
  1398.  
  1399.  
  1400. All ZMODEM frames begin with a header which may be sent in binary or HEX
  1401.  
  1402. form.  ZMODEM uses a single routine to recognize binary and hex headers.
  1403.  
  1404. Either form of the header contains the same raw information:
  1405.  
  1406.  
  1407.  
  1408.  o+ A type byte[2] [3]
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418. __________
  1419.  
  1420.  
  1421.  
  1422.  2. The frame types are cardinal numbers beginning with 0 to minimize
  1423.  
  1424.     state transition table memory requirements.
  1425.  
  1426.  
  1427.  
  1428.  3. Future extensions to ZMODEM may use the high order bits of the type
  1429.  
  1430.     byte to indicate thread selection.
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440. Chapter 9               Rev091186 Typeset 9-11-86                       11
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. Chapter 9               Rev091186 Typeset 9-11-86                       12
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  o+ Four bytes of data indicating flags and/or numeric quantities depending
  1465.  
  1466.    on the frame type
  1467.  
  1468.  
  1469.  
  1470.                    FFFFiiiigggguuuurrrreeee 1111....  Order of Bytes in Head                   TYPE:  frame type
  1471.  
  1472.                    F0: Flags least significant byte
  1473.  
  1474.                    P0: file Position least significant
  1475.  
  1476.                    P3: file Position most significant
  1477.  
  1478.  
  1479.  
  1480.                            TYPE  F3 F2 F1 F0
  1481.  
  1482.                            -------------------
  1483.  
  1484.                            TYPE  P0 P1 P2 P3
  1485.  
  1486.  
  1487.  
  1488. 9.3.1  BBBBiiiinnnnaaaarrrryyyy HHHHeeeeaaaaddddeeeerrrr
  1489.  
  1490. A binary header is only sent by the sending program to the receiving
  1491.  
  1492. program.
  1493.  
  1494.  
  1495.  
  1496. A binary header begins with the sequence ZPAD, ZDLE, ZBIN.
  1497.  
  1498.  
  1499.  
  1500. The frame type byte is ZDLE encoded.
  1501.  
  1502.  
  1503.  
  1504. The four position/flags bytes are ZDLE encoded.
  1505.  
  1506.  
  1507.  
  1508. A two byte CRC of the frame type and position/flag bytes is ZDLE encoded.
  1509.  
  1510.  
  1511.  
  1512. 0 or more binary data subpackets will follow depending on the frame type.
  1513.  
  1514.  
  1515.  
  1516. The function _z_s_b_h_d_r transmits a binary header.  The function _z_g_e_t_h_d_r
  1517.  
  1518. receives a binary or hex header.
  1519.  
  1520.  
  1521.  
  1522.                          FFFFiiiigggguuuurrrreeee 2222....  Binary Header
  1523.  
  1524.             * ZDLE A TYPE F3/P0 F2/P1 F1/P2 F0/P3 CRC-1 CRC-2
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530. 9.3.2  HHHHEEEEXXXX HHHHeeeeaaaaddddeeeerrrr
  1531.  
  1532. The receiver sends responses in hex headers.  The sender also uses hex
  1533.  
  1534. headers when they are not followed by binary data subpackets.
  1535.  
  1536.  
  1537.  
  1538. Hex encoding accomodates XON/XOFF flow control.  The hex header receiving
  1539.  
  1540. routine ignores flow control characters.
  1541.  
  1542.  
  1543.  
  1544. Use of Kermit style encoding for control and paritied characters was
  1545.  
  1546. considered and rejected because of increased possibility of interacting
  1547.  
  1548. with some timesharing systems's line edit functions.  Use of HEX headers
  1549.  
  1550. from the receiving program allows control characters to be used to
  1551.  
  1552. interrupt the sender when errors are detected.  Except for header types
  1553.  
  1554. that imply data subpackets to follow, a HEX header may be used in place of
  1555.  
  1556. a binary header wherever convenient.
  1557.  
  1558.  
  1559.  
  1560. A hex header begins with the sequence ZPAD, ZPAD, ZDLE, ZHEX.  The _z_g_e_t_h_d_r
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568. Chapter 9               Rev091186 Typeset 9-11-86                       12
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584. Chapter 9               Rev091186 Typeset 9-11-86                       13
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592. routine synchronizes with the ZPAD-ZDLE sequence.  The extra ZPAD allows
  1593.  
  1594. other parts of the program to detect a ZMODEM header and then call _z_g_e_t_h_d_r
  1595.  
  1596. to receive the header.
  1597.  
  1598.  
  1599.  
  1600. The type byte, the four position/flag bytes, and the CRC thereof are sent
  1601.  
  1602. in hex using the character set 01234567890abcdef.  Upper case hex digits
  1603.  
  1604. are not allowed; they false trigger X/YMODEM programs.
  1605.  
  1606.  
  1607.  
  1608. A carriage return, line feed, and XON[4] are appended to the HEX header
  1609.  
  1610. but are not strictly a part of it.  The CR/LF aids debugging from
  1611.  
  1612. printouts.  The XON releases the sender from spurious XOFF flow control
  1613.  
  1614. characters generated by line noise, a common occurrence.
  1615.  
  1616.  
  1617.  
  1618. 0 or more ASCII Encoded data subpackets will follow depending on the frame
  1619.  
  1620. type.
  1621.  
  1622.  
  1623.  
  1624. The function _z_s_h_h_d_r sends a hex header.
  1625.  
  1626.  
  1627.  
  1628.                           FFFFiiiigggguuuurrrreeee 3333....  HEX Header
  1629.  
  1630.  
  1631.  
  1632.       * * ZDLE B TYPE F3/P0 F2/P1 F1/P2 F0/P3 CRC-1 CRC-2 CR LF XON
  1633.  
  1634.  
  1635.  
  1636. (TYPE, F3...F0, CRC-1, and CRC-2 are each sent as two hex digits.)
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642. 9.4  BBBBiiiinnnnaaaarrrryyyy DDDDaaaattttaaaa SSSSuuuubbbbpaaacccckkkkeeeettttssss
  1643.  
  1644.  
  1645.  
  1646. Binary data subpackets immediately follow the associated binary header
  1647.  
  1648. packet.  A binary data packet contains 0 to 1024 bytes of data.
  1649.  
  1650. Recommended length values are 256 bytes below 4800 bps, 1024 above 4800
  1651.  
  1652. bps or when the data link is known to be relatively error free.  Except
  1653.  
  1654. for the last subpacket in a file,[5] lengths should be a power of two.
  1655.  
  1656.  
  1657.  
  1658. No padding is used with binary data subpackets.  The data bytes are ZDLE
  1659.  
  1660. encoded and transmitted.  A ZDLE and frameend are then sent, followed by
  1661.  
  1662. two ZDLE encoded CRC bytes.  The CRC accumulates the data bytes and
  1663.  
  1664. frameend.
  1665.  
  1666.  
  1667.  
  1668. The function _z_s_d_a_t_a sends a data subpacket.  The function _z_r_d_a_t_a receives
  1669.  
  1670. a data subpacket.
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682. __________
  1683.  
  1684.  
  1685.  
  1686.  4. XON is not sent after a ZFIN header, to allow clean session cleanup.
  1687.  
  1688.  
  1689.  
  1690.  5. Or file segment if a sparse file is being processed
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700. Chapter 9               Rev091186 Typeset 9-11-86                       13
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716. Chapter 9               Rev091186 Typeset 9-11-86                       14
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724. 9.5  AAAASSSSCCCCIIIIIIII EEEEnnnnccccooooddddeeeedddd DDDDatttaaaa SSSSuuuubbbbppppaaaacccckkkkeeeetttt
  1725.  
  1726.  
  1727.  
  1728. The format of ASCII Encoded data subpackets is not currently specified.
  1729.  
  1730. These would be used for server commands, or main transfers in 7 bit
  1731.  
  1732. environments.
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738. 10.  PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL TTTTRRRRAAAANNNNSSSSAACCCTTTTIIIIOOOONNNN OOOOVVVVEEEERRRRVVVVIIIIEEEEWWWW
  1739.  
  1740.  
  1741.  
  1742. As with the XMODEM recommendation, ZMODEM timing is receiver driven.  The
  1743.  
  1744. transmitter should not time out at all, except to abort the program if no
  1745.  
  1746. headers are received for an extended period of time, say one minute.[1]
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752. 10.1  SSSSeeeessssssssiiiioooonnnn SSSSttttaaaarrrrttttuuuup
  1753.  
  1754.  
  1755. To start a ZMODEM file transfer session, the sending program is called
  1756.  
  1757. with the names of the desired file(s) and option(s).
  1758.  
  1759.  
  1760.  
  1761. The sending program may send the string "rz\r" to invoke the receiving
  1762.  
  1763. program from a possible command mode.  The "rz" followed by carriage
  1764.  
  1765. return activates a ZMODEM receive program or command if it were not
  1766.  
  1767. already active.
  1768.  
  1769.  
  1770.  
  1771. The sender may then display a message intended for human consumption, such
  1772.  
  1773. as a list of the files requested, etc.
  1774.  
  1775.  
  1776.  
  1777. Then the sender may send a ZZZZRRRRQQQQIIIINNNNIIIITTTT header.  The ZZZZRRQQQIIIINNNNIIIITTTT header causes a
  1778.  
  1779. previously started receive program to send its ZZZZRRRRIIIINNNNIIIITTTT header witdelay.
  1780.  
  1781.  
  1782.  
  1783. In an interactive or conversational mode, the receiving application may
  1784.  
  1785. monitor the data stream for ZDLE.  The following characters may be scanned
  1786.  
  1787. for BBBB00000000 indicating a ZRQINIT header, a command to download a command or
  1788.  
  1789. data.
  1790.  
  1791.  
  1792.  
  1793. The sending program awaits a command from the receiving program to start
  1794.  
  1795. file transfers.  If a "C", "G", or NAK is received, an XMODEM or YMODEM
  1796.  
  1797. file transfer is indicated, and file transfer(s) use the X/YMODEM
  1798.  
  1799. protocol.  Note: With ZMODEM and YMODEM Batch, the sending program
  1800.  
  1801. provides the file name, but not with XMODEM.
  1802.  
  1803.  
  1804.  
  1805. In case of garbled data, the sending program can repeat the invitation to
  1806.  
  1807. receive a number of times until a session starts.
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815. __________
  1816.  
  1817.  
  1818.  
  1819.  1. Special considerations apply when sending commands.
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829. Chapter 10              Rev091186 Typeset 9-11-86                       14
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845. Chapter 10              Rev091186 Typeset 9-11-86                       15
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853. When the ZMODEM receive program starts, it immediately sends a ZZZZRRRRIIIINNNNIIIIT
  1854. header to initiate ZMODEM file transfers, or a ZZZZCCCCHHHHAAAALLLLLLLLEEEENNGGEEEE header to verify
  1855.  
  1856. the sending program.  The receive program resends its header at _r_e_s_p_o_n_s_e
  1857.  
  1858. _t_i_m_e (default 10 second) intervals for a suitable period of time (40
  1859.  
  1860. seconds total) before falling back to X/YMODEM protocol.
  1861.  
  1862.  
  1863.  
  1864. If the receiving program receives a ZZZZRRRRQQQQIIIINNNNIIIITTTT header, it reshe ZZZZRRRRIIIINNNNIIIITTTT
  1865.  
  1866. header.  If the sending program receives the ZZZZCCCCHHHHAAAALLLLLLLLEEEENNNGEEEE header, it places
  1867.  
  1868. the data in ZP0...ZP3 in an answering ZZZZAAAACCCCKKKK header.
  1869.  
  1870.  
  1871.  
  1872. If the receiving program receives a ZZZZRRRRIIIINNNNIIIITTTT header, it is an echocating that the sending program is not operational.
  1873.  
  1874.  
  1875.  
  1876. Eventually the sending program correctly receives the ZZZZRRRRIIIINNNNIIIITTTT hea
  1877.  
  1878. The sender may then send an optional ZZZZSSSSIIIINNNNIIIITTTT frame to define the ing
  1879.  
  1880. program's AAAAttttttttnnnn sequence.  The receiver sends a ZZZZAAAACCCCKKKK  in response,
  1881.  
  1882. optionally containing the serial number of the receiving program, or 0.
  1883.  
  1884.  
  1885.  
  1886. 10.2  FFFFiiiilllleeee TTTTrrrraaaannnnssssmmmmiiiissssssssiooonnnn
  1887.  
  1888.  
  1889.  
  1890. The sender then sends a ZZZZFFFFIIIILLLLEEEE header with ZMODEM Conversion, Managemend Transport options[2] followed by a ZCRCW data subpacket containing the
  1891.  
  1892. file name, file length, modification date, and other information identical
  1893.  
  1894. to that used by YMODEM Batch.
  1895.  
  1896.  
  1897.  
  1898. The receiver examines the file name, length, and date information provided
  1899.  
  1900. by the sender in the context of the specified transfer options, the
  1901.  
  1902. current state of its file system(s), and local security requirements.  The
  1903.  
  1904. receiving program should insure the pathname and options are compatible
  1905.  
  1906. with its operating environment and local security requirements.
  1907.  
  1908.  
  1909.  
  1910. The receiver may respond with a ZZZZSSSSKKKKIIIIPPPP header, which makes the sender
  1911.  
  1912. proceed to the next file (if any) in the batch.
  1913.  
  1914.  
  1915.  
  1916.        If the receiver has a file with the same name and length,
  1917.  
  1918.        it may respond with a ZZZZCCCCRRRRCCCC header, which requires the
  1919.  
  1920.        sender to perform a CRC on the file and transmit the CRC in
  1921.  
  1922.        a ZZZZCCCCRRRRCCCC header.  The receiver uses this information to
  1923.  
  1924.        determine whether to accept the file or skip it.  This
  1925.  
  1926.        sequence is triggered by the ZMCRC Management Option.[3]
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932. __________
  1933.  
  1934.  
  1935.  
  1936.  2. See below, under ZFILE header type.
  1937.  
  1938.  
  1939.  
  1940.  3. The type of CRC has not been determined yet.  The obvious choice of
  1941.  
  1942.     the CRC-16 used to protect packets may not be optimum for detecting
  1943.  
  1944.     differences between long files.  The fact that the file lengths are
  1945.  
  1946.     identical may give some guidance to the selection of CRC.
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954. Chapter 10              Rev091186 Typeset 9-11-86                       15
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970. Chapter 10              Rev091186 Typeset 9-11-86                       16
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978. A ZZZZRRRRPPPPOOOOSSSS header from the receiver initiates transmission of the file daarting at the offset in the file specified in the ZZZZRRRRPPPPOOOOSSSS header.
  1979.  
  1980. Normally the receiver specifies the data transfer begin begin at offset 0
  1981.  
  1982. in the file.
  1983.  
  1984.        The receiver may start the transfer further down in the
  1985.  
  1986.        file.  This allows a file transfer interrupted by a loss
  1987.  
  1988.        or carrier or system crash to be completed on the next
  1989.  
  1990.        connection without requiring the entire file to be
  1991.  
  1992.        retransmitted.[4] If downloading a file from a timesharing
  1993.  
  1994.        system that becomes sluggish, the transfer can be
  1995.  
  1996.        interrupted and resumed later with no loss of data.
  1997.  
  1998.  
  1999.  
  2000. The sender sends a ZZZZDDDDAAAATTTTAAAA binary header (with file position) followed b or more data subpackets.
  2001.  
  2002.  
  2003.  
  2004. The receiver compares the file position in the ZZZZDDDDAAAATTTTAAAA header with the
  2005.  
  2006. number of characters successfully received to the file.  If they do not
  2007.  
  2008. agree, a ZZZZRRRRPPPPOOOOSSSS error response is generated to force the sender to the
  2009.  
  2010. right position within the file.[5]
  2011.  
  2012.  
  2013.  
  2014. A data subpacket terminated by ZZZZCCCCRRRRCCCCGGGGOOOO and CRC does not elicit a se
  2015.  
  2016. unless an error is detected; more data subpacket(s) follow immediately.
  2017.  
  2018.  
  2019.  
  2020.        ZZZZCCCCRRRRCCCCQQQQ data subpackets expect a ZZZZAAAACCCCKKKK reswith the
  2021.  
  2022.        receiver's file offset if no error, otherwise a ZZZZRRRRPPPPOOOOSSSS
  2023.  
  2024.        response with the last good file offset.  Another data
  2025.  
  2026.        subpacket continues immediately.  ZZZZCCCCRRRRCCCCQQQQ subpackets are
  2027.  
  2028.        not used if the receiver does not indicate FDX ability
  2029.  
  2030.        with the CCCCAAAANNNNFFFFDDDDXXXX bit.
  2031.  
  2032.  
  2033.  
  2034. ZZZZCCCCRRRRCCCCWWWW data subpackets expect a response before the next frame is sent.he receiver does not indicate overlapped I/O capability with the
  2035.  
  2036. CCCCAAAANNNNOOOOVVVVIIIIOOOO bit, or sets a buffer size, the sender uses the ZCCCRRRRCCCCWWWW to allow
  2037.  
  2038. the receiver to write its buffer before sending more data.
  2039.  
  2040.  
  2041.  
  2042.        A zero length data frame may be used as an idle
  2043.  
  2044.        subpacket to prevent the receiver from timing out in
  2045.  
  2046.        case data is not immediately available to the sender.
  2047.  
  2048.  
  2049.  
  2050. In the absence of fatal error, the sender eventually encounters end of
  2051.  
  2052. file.  If the end of file is encountered within a frame, the frame is
  2053.  
  2054. closed with a ZZZZCCCCRRRRCCCCEEEE data subpacket which does not elicit a response
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060. __________
  2061.  
  2062.  
  2063.  
  2064.  4. This does not apply to files that have been translated.
  2065.  
  2066.  
  2067.  
  2068.  5. If the ZMSPARS option is used, the receiver instead seeks to the
  2069.  
  2070.     position given in the ZDATA header.
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080. Chapter 10              Rev091186 Typeset 9-11-86                       16
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096. Chapter 10              Rev091186 Typeset 9-11-86                       17
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104. except in case of error.
  2105.  
  2106.  
  2107.  
  2108. The sender sends a ZZZZEEEEOOOOFFFF header with the file ending offset equal to
  2109.  
  2110. the number of characters in the file.  The receiver compares this
  2111.  
  2112. number with the number of characters received.  If the receiver has
  2113.  
  2114. received all of the file, it closes the file.  If the file close was
  2115.  
  2116. satisfactory, the receiver responds with ZZZZRRRRIIIINNNNIIIITTTT.  If the receive
  2117. not received all the bytes of the file, the receiver sends ZZZZRRRRPPPPOOOOSSSS with
  2118.  
  2119. the current file offset, forcing the sender to resend the missing
  2120.  
  2121. data.  (If the receiver cannot properly close the file, a ZZZZFFFFEEEERRRRRRRR headerent.)
  2122.  
  2123.  
  2124.  
  2125.        After all files are processed, any further protocol
  2126.  
  2127.        errors should not prevent the sending program from
  2128.  
  2129.        returning with a success status.
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135. 10.3  SSSSeeeessssssssiiiioooonnnn CCCClllleeeeaaaannnnuuuup
  2136.  
  2137.  
  2138. The sender closes the session with a ZZZZFFFFIIIINNNN header.  The receiver
  2139.  
  2140. acknowledges this with its own ZZZZFFFFIIIINNNN header.
  2141.  
  2142.  
  2143.  
  2144. When the sender receives the acknowledging header, it sends two
  2145.  
  2146. characters, "OO" (Over and Out) and exits to the operating system or
  2147.  
  2148. application that invoked it.  The receiver waits briefly for the "O"
  2149.  
  2150. characters, then exits whether they were received or not.
  2151.  
  2152.  
  2153.  
  2154. 10.4  SSSSeeeessssssssiiiioooonnnn CCCCaaaannnncccceeeellll Seeeeqqqquuuueeeennnncccceeee
  2155.  
  2156.  
  2157.  
  2158. If the receiving program has been receiving data in streaming mode,
  2159.  
  2160. the AAAAttttttttnnnn sequence is executed to interrupt data transmission.  The
  2161.  
  2162. Cancel sequence of eight CAN characters[6] and ten backspace
  2163.  
  2164. characters is sent.
  2165.  
  2166.  
  2167.  
  2168.        static char canistr[] = {
  2169.  
  2170.         24,24,24,24,24,24,24,24,8,8,8,8,8,8,8,8,8,8,0
  2171.  
  2172.        };
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192. __________
  2193.  
  2194.  
  2195.  
  2196.  6. The trailing backspace characters attempt to erase the effects of the
  2197.  
  2198.     CAN characters if they are received by a command interpreter.
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208. Chapter 10              Rev091186 Typeset 9-11-86                       17
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224. Chapter 10              Rev091186 Typeset 9-11-86                       18
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232. 11.  SSSSTTTTRRRREEEEAAAAMMMMIIIINNNNGGGG TTTTEEEECCCCHHHHNNIIIQQQQUUUUEEEESSSS //// EEEERRRRRRRROOOORRRR RRRREEEECCCCVVVVEEEERRRRYYYY
  2233.  
  2234.  
  2235.  
  2236. It is a fact of life that no single method of streaming is applicable
  2237.  
  2238. to a majority of today's computing and telecommunications
  2239.  
  2240. environments.  ZMODEM provides several data streaming methods
  2241.  
  2242. selected according to the limitations of the sending environment,
  2243.  
  2244. receiving environment, and transmission channel(s).
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250. 11.1  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg wiiiitttthhhh SSSSaaaammmmpppplllliiiinnnngggg
  2251.  
  2252.  
  2253.  
  2254. If the receiver can overlap serial I/O with disk I/O, and if the
  2255.  
  2256. sender can sample the reverse channel for the presence of data
  2257.  
  2258. without having to wait, full streaming can be used with no AAAAttttttttnnnn
  2259.  
  2260. sequence required.  The sender begins data transmission with a ZZZZDDDDAAAATTTTAAAA
  2261.  
  2262. header and continuous ZZZZCCCCRRRRCCCCGGGG data subpackets.  When the receiver
  2263.  
  2264. detects an error, it executes the AAAAttttttttnnnn sequence and then sends a
  2265.  
  2266. ZZZZRRRRPPPPOOOOSSSS header with the correct position within the file.
  2267.  
  2268.  
  2269.  
  2270. At the end of each transmitted data subpacket, the sender checks for
  2271.  
  2272. the presence of an error header from the receiver.  To do this, the
  2273.  
  2274. sender samples the reverse data stream for the presence of either a
  2275.  
  2276. ZPAD or CAN character.  Any other character is ignored.[1]
  2277.  
  2278.  
  2279.  
  2280. ZPAD indicates some sort of error header from the receiver.  A CAN
  2281.  
  2282. suggests the user is attempting to "stop the bubble machine" by
  2283.  
  2284. keyboarding CAN characters.  If one of these characters is seen, an
  2285.  
  2286. empty ZCRCW data subpacket is sent to force the receiver to send a
  2287.  
  2288. ZZZZAAAACCCCKKKK header in case the ZPAD or CAN was spurious and the receiver was
  2289.  
  2290. still reading data subpackets.
  2291.  
  2292.  
  2293.  
  2294. Then the receiver's response header is read and acted upon.[2] A
  2295.  
  2296. ZZZZRRRRPPPPOOOOSSSS header resets the sender's file offset to the correct position.
  2297.  
  2298. If a ZZZZAAAACCCCKKKK header is recieved, the reverse channel is sampled for the
  2299.  
  2300. possible presence of another header from the receiver.  If a ZZZZRRRRPPPPOOOOSSSS
  2301.  
  2302. header is received, it is processed as above.  A ZZZZFFFFIIIINNNN, ZZZZAAAABBBBORRRRTTTT, or
  2303.  
  2304. TTTTIIIIMMMMEEEEOOOOUUUUTTTT terminates the session; a ZZZZSSSSKKKKIIPPP terminates the processing of
  2305.  
  2306. this file.  Otherwise, transmission resumes at the (possibly reset)
  2307.  
  2308. file offset with a ZZZZDDDDAAAATTTTAAAA header followed by data subpackets.
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322. __________
  2323.  
  2324.  
  2325.  
  2326.  1. The call to rdchk() in sssszzzz....cccc performs this function.
  2327.  
  2328.  
  2329.  
  2330.  2. The call to getinsync() in sssszzzz....cccc performs this function.
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340. Chapter 11              Rev091186 Typeset 9-11-86                       18
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356. Chapter 11              Rev091186 Typeset 9-11-86                       19
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364. 11.2  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg wiiiitttthhhh RRRReeeevvvveeeerrrrsssseeee IIIInnnntttterrrrrrrruuuupppptttt
  2365.  
  2366.  
  2367.  
  2368. The above method cannot be used if the reverse data stream cannot be
  2369.  
  2370. sampled without entering an I/O wait.  An alternate method is to
  2371.  
  2372. instruct the receiver to interrupt the sending program when an error
  2373.  
  2374. is detected.
  2375.  
  2376.  
  2377.  
  2378. The receiver can interrupt the sender with a control character, break
  2379.  
  2380. signal, or combination thereof, as specified in the AAAAttttttttnnnn sequence.
  2381.  
  2382. After executing the AAAAttttttttnnnn sequence, the receiver sends a hex ZZZZRRRRPOOOSSSS
  2383.  
  2384. header to force the sender to resend the lost data.
  2385.  
  2386.  
  2387.  
  2388. When the sending program responds to this interrupt, it reads a HEX
  2389.  
  2390. header (normally ZRPOS) from the receiver and takes the action
  2391.  
  2392. described in the previous section.  The Unix sssszzzz....cccc program uses a
  2393.  
  2394. setjmp/longjmp call to catch the interrupt generated by the AAAAttttttttnnnn
  2395.  
  2396. sequence.  Catching the interrupt activates the getinsync() function
  2397.  
  2398. to read the receiver's error header and take appropriate action.
  2399.  
  2400.  
  2401.  
  2402. Unix sssszzzz....cccc uses an AAAAttttttttnnnn sequence of Ctrl-C followed bsecond
  2403.  
  2404. pause to interrupt the sender, then give the sender (Unix) time to
  2405.  
  2406. prepare for the receiver's error header.
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412. 11.3  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg wiiiitttthhhh aaaa SSSSlllliiiiddddiiiinnnngggg WWWWiiiinnnndoooowwww
  2413.  
  2414.  
  2415.  
  2416. If none of the above methods is applicable, hope is not yet lost.  If
  2417.  
  2418. the sender can buffer responses from the receiver, the sender can use
  2419.  
  2420. ZCRCQ data subpackets to get ACKs from the receiver without
  2421.  
  2422. interrupting the transmission of data.  After a sufficient number of
  2423.  
  2424. ZCRCQ data subpackets have been sent, the sender can read one of the
  2425.  
  2426. headers that should have arrived in its receive interrupt buffer.
  2427.  
  2428.  
  2429.  
  2430. A problem with this method is the possibility of wasting an excessive
  2431.  
  2432. amount of time responding to the receiver's error header.  It may be
  2433.  
  2434. possible to program the reciever's AAAAttttttttnnnn sequence to flush the
  2435.  
  2436. sender's interrupt buffer before sending the ZRPOS header.
  2437.  
  2438.  
  2439.  
  2440. 11.4  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg ovvvveeeerrrr EEEErrrrrrrroooorrrr FFFFrrrreeeeeeee CCCChhhhannnnnnnneeeellllssss
  2441.  
  2442.  
  2443.  
  2444. File transfer protocols predicated on the existence of an error free
  2445.  
  2446. end to end communications channel have been proposed from time to
  2447.  
  2448. time.  Such channels have proven to be more readily available in
  2449.  
  2450. theory than in actuality.
  2451.  
  2452.  
  2453.  
  2454. A ZMODEM sender assuming an error free channel with end to end flow
  2455.  
  2456. control can send the entire file in one frame without any checking of
  2457.  
  2458. the reverse stream.  If this channel is completely transparent, only
  2459.  
  2460. ZDLE need be escaped.  The resulting protocol overhead for average
  2461.  
  2462. long files is less than one per cent.[3]
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472. Chapter 11              Rev091186 Typeset 9-11-86                       19
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488. Chapter 11              Rev091186 Typeset 9-11-86                       20
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496. 11.5  SSSSeeeeggggmmmmeeeennnntttteeeedddd SSSSttttrrrreeeeammmiiiinnnngggg
  2497.  
  2498.  
  2499.  
  2500. If the receiver cannot overlap serial and disk I/O, it uses the
  2501.  
  2502. ZZZZRRRRIIIINNNNIIIITTTT frame to specify a buffer length which the sender will norflow.  The sending program sends a ZZZZCCCCRRRRCCCCWWWW data subpacket and waits
  2503.  
  2504. for a ZZZZAAAACCCCKKKK header before sending the next segment of the file.
  2505.  
  2506.  
  2507.  
  2508. If the sending program supports reverse data stream sampling or
  2509.  
  2510. interrupt, error recovery will be faster (on average) than a protocol
  2511.  
  2512. (such as YMODEM) that sends large blocks.
  2513.  
  2514.  
  2515.  
  2516. A sufficiently large receiving buffer allows throughput to closely
  2517.  
  2518. approach that of full streaming.  For example, 16kb segmented
  2519.  
  2520. streaming adds about 3 per cent to full streaming ZMODEM file
  2521.  
  2522. transfer times when the round trip delay is five seconds.
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528. 12.  AAAATTTTTTTTEEEENNNNTTTTIIIIOOOONNNN SSSSEEEEQQQQUUUUEENNNCCCCEEEE
  2529.  
  2530.  
  2531.  
  2532. The receiving program sends the AAAAttttttttnnnn sequence whenever it detects an
  2533.  
  2534. error and needs to interrupt the sending program.
  2535.  
  2536.  
  2537.  
  2538. The default AAAAttttttttnnnn string value is empty (no Attn sequence).  The
  2539.  
  2540. receiving program resets Attn to the empty default before each
  2541.  
  2542. transfer session.
  2543.  
  2544.  
  2545.  
  2546. The sender specifies the Attn sequence in its optional ZSINIT frame.
  2547.  
  2548. The AAAAttttttttnnnn string is terminated with a null.
  2549.  
  2550.  
  2551.  
  2552. Two meta-characters perform special functions:
  2553.  
  2554.  
  2555.  
  2556.    o+ \335 (octal) Send a break signal
  2557.  
  2558.  
  2559.  
  2560.    o+ \336 (octal) Pause one second
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566. 13.  FFFFRRRRAAAAMMMMEEEE TTTTYYYYPPPPEEEESSSS
  2567.  
  2568.  
  2569.  
  2570. The numeric values for the values shown in boldface are given in
  2571.  
  2572. _z_m_o_d_e_m._h.  Unused bits and unused bytes in the header (ZP0...ZP3) are
  2573.  
  2574. set to 0.
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584. __________________________________________________________________________
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  3. One in 256 for escaping ZDLE, about two in 1024 for data subpacket
  2591.  
  2592.     CRC's
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602. Chapter 13              Rev091186 Typeset 9-11-86                       20
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618. Chapter 13              Rev091186 Typeset 9-11-86                       21
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626. 13.1  ZZZZRRRRQQQQIIIINNNNIIIITTTT
  2627.  
  2628.  
  2629.  
  2630. Sent by the sending program, to trigger the receiving program to send
  2631.  
  2632. its ZRINIT header.  This avoids the aggravating startup delay
  2633.  
  2634. associated with XMODEM and Kermit transfers.  The sending program may
  2635.  
  2636. repeat the receive invitation (including ZRQINIT) if a response is
  2637.  
  2638. not obtained at first.
  2639.  
  2640.  
  2641.  
  2642. ZF0 contains ZCOMMAND if the program is attempting to send a command,
  2643.  
  2644. 0 otherwise.
  2645.  
  2646.  
  2647.  
  2648. 13.2  ZZZZRRRRIIIINNNNIIIITTTT
  2649.  
  2650.  
  2651.  
  2652. Sent by the receiving program.  ZF0 and ZF1 contain the  bitwise or
  2653.  
  2654. of the receiver capability flags:
  2655.  
  2656. #define CANFDX  1 /* Receiver can send and receive simultaneously */
  2657.  
  2658. #define CANOVIO 2 /* Receiver can receive during disk I/O */
  2659.  
  2660. #define CANBRK  4 /* Rx can send a break signal */
  2661.  
  2662. #define CANCRY  8 /* Receiver can decrypt */
  2663.  
  2664.  
  2665.  
  2666. ZP0 and ZP1 contain the size of the receiver's buffer in bytes, or 0
  2667.  
  2668. if nonstop I/O is allowed.
  2669.  
  2670.  
  2671.  
  2672. 13.3  ZZZZSSSSIIIINNNNIIIITTTT
  2673.  
  2674.  
  2675.  
  2676. Sender sends capability flags (currently all 0) (none currently
  2677.  
  2678. defined) followed by a binary data subpacket terminated with ZZZZCCCCRRRRCCCCWWWW.
  2679.  
  2680. The data subpacket contains the null terminated AAAAttttttttnnnn sequence,
  2681.  
  2682. maximum length 32 bytes including the terminating null.
  2683.  
  2684.  
  2685.  
  2686. 13.4  ZZZZAAAACCCCKKKK
  2687.  
  2688.  
  2689.  
  2690. Acknowedgement to a ZZZZSSSSIIIINNNNIIIITTTT frame, ZZZZCCCCHHHHAAAALLLLEEEENNNNGGGGEEEE header, or ZZZZCCCCRRRRCCCCWWWW data
  2691.  
  2692. subpacket.  ZP0 to ZP3 contain file offset.  The response to
  2693.  
  2694. ZCHALLENGE contains the same 32 bit number received in the ZCHALLENGE
  2695.  
  2696. header.
  2697.  
  2698.  
  2699.  
  2700. 13.5  ZZZZFFFFIIIILLLLEEEE
  2701.  
  2702.  
  2703.  
  2704. This frame denotes the beginning of a file transmission attempt.
  2705.  
  2706. ZF0, ZF1, and ZF2 may contain options.  A value of 0 in each of these
  2707.  
  2708. bytes implies no special treatment.  Options specified to the
  2709.  
  2710. receiver override options specified to the sender with the exception
  2711.  
  2712. of ZZZZCCCCBBBBIIIINNNN which overrides any other Conversion Option given to the
  2713.  
  2714. sender or receiver.
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720. 13.5.1  ZZZZFFFF0000:::: CCCCoooonnnnvvvveeeerrrrssssiiiioooon OOOOppppttttiiiioooonnnn
  2721.  
  2722. If the receiver does not recognize the Conversion Option, an
  2723.  
  2724. application dependent default conversion may apply.
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734. Chapter 13              Rev091186 Typeset 9-11-86                       21
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750. Chapter 13              Rev091186 Typeset 9-11-86                       22
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758. ZZZZCCCCBBBBIIIINNNN "Binary" transfer - inhibit conversion unconditionally
  2759.  
  2760.  
  2761.  
  2762. ZZZZCCCCNNNNLLLL Convert received end of line to local end of line
  2763.  
  2764.      convention.  The supported end of line conventions are
  2765.  
  2766.      CR/LF (most ASCII based operating systems except Unix
  2767.  
  2768.      and Macintosh), and NL (Unix).  Either of these two end
  2769.  
  2770.      of line conventions meet the permissible ASCII
  2771.  
  2772.      definitions for Carriage Return and Line Feed/New Line.
  2773.  
  2774.  
  2775.  
  2776. ZZZZCCCCRRRREEEECCCCOOOOVVVV Recover/Resume interrupted file transfer.  ZCREVOV    also useful for updating a remote copy of a file that
  2777.  
  2778.      grows without resending of old data.  If the destination
  2779.  
  2780.      file exists and is no longer than the source, append to
  2781.  
  2782.      the destination file and start transfer at the offset
  2783.  
  2784.      corresponding to the receiver's end of file.  This
  2785.  
  2786.      option does not apply if the source file is shorter.
  2787.  
  2788.      Files that have been converted (e.g., ZCNL) or subject
  2789.  
  2790.      to a single ended Transport Option cannot have their
  2791.  
  2792.      transfers recovered.
  2793.  
  2794.  
  2795.  
  2796. 13.5.2  ZZZZFFFF1111:::: MMMMaaaannnnaaaaggggeeeemmmmeeeennnnt OOOOppppttttiiiioooonnnn
  2797.  
  2798. If the receiver does not recognize the Management Option, the
  2799.  
  2800. file should be transferred normally.
  2801.  
  2802.  
  2803.  
  2804. ZZZZMMMMNNNNEEEEWWWW Transfer file if destination file absent.  Otherwise,
  2805.  
  2806.      transfer file overwriting destination if source file
  2807.  
  2808.      newer or longer.
  2809.  
  2810.  
  2811.  
  2812. ZZZZMMMMCCCCRRRRCCCC Compare the source and destination files.  Transfer if
  2813.  
  2814.      file lengths or file polynomials differ.
  2815.  
  2816.  
  2817.  
  2818. ZZZZMMMMAAAAPPPPNNNNDDDD Append source file contents to the end of the existing
  2819.  
  2820.      destination file (if any).
  2821.  
  2822.  
  2823.  
  2824. ZZZZMMMMCCCCLLLLOOOOBBBB Replace existing destination file (if any).
  2825.  
  2826.  
  2827.  
  2828. ZZZZTTTTSSSSPPPPAAAARRRRSSSS Special processing for sparse file; each file segm    is transmitted as a separate frame, where the frames are
  2829.  
  2830.      not necessarily contiguous.  The sender should end each
  2831.  
  2832.      segment with a ZCRCW (or possibly ZCRCQ) data subpacket
  2833.  
  2834.      and process the expected ZACK to insure no data is lost.
  2835.  
  2836.  
  2837.  
  2838. ZZZZMMMMDDDDIIIIFFFFFFFF Transfer file if destination file absent.  Otherwise,
  2839.  
  2840.      transfer file overwriting destination if files have
  2841.  
  2842.      different lengths or dates.
  2843.  
  2844.  
  2845.  
  2846. ZZZZMMMMPPPPRRRROOOOTTTT Protect destination file by transferring file only if
  2847.  
  2848.      the destination file is absent.
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862. Chapter 13              Rev091186 Typeset 9-11-86                       22
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878. Chapter 13              Rev091186 Typeset 9-11-86                       23
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886. 13.5.3  ZZZZFFFF2222:::: TTTTrrrraaaannnnssssppppoooorrrrttttOppppttttiiiioooonnnn
  2887.  
  2888. If the receiver does not implement the particular transport
  2889.  
  2890. option, the file is copied without conversion for later
  2891.  
  2892. processing.
  2893.  
  2894.  
  2895.  
  2896. ZZZZTTTTLLLLZZZZWWWW Lempel-Ziv compression.  Transmitted data will be
  2897.  
  2898.      identical to that produced by ccccoooommmmpppprrrreeeessssssss 4444.0000 operating on
  2899.  
  2900.      a computer with VAX byte ordering, using 12 bit
  2901.  
  2902.      encoding.
  2903.  
  2904.  
  2905.  
  2906. ZZZZTTTTCCCCRRRRYYYYPPPPTTTT Encryption.  An initial null terminated string
  2907.  
  2908.      identifies the key.  Details to be determined.
  2909.  
  2910.  
  2911.  
  2912. ZZZZTTTTRRRRLLLLEEEE Run Length encoding, Details to be determined.
  2913.  
  2914.  
  2915.  
  2916. A ZZZZCCCCRRRRCCCCWWWW data subpacket follows with file name, file length,
  2917.  
  2918. modification date, and other information described in a later
  2919.  
  2920. chapter.
  2921.  
  2922.  
  2923.  
  2924. 13.6  ZZZZSSSSKKKKIIIIPPPP
  2925.  
  2926.  
  2927.  
  2928. Sent by the receiver in response to ZZZZFFFFIIIILLLLEEEE, makes the sender skip to
  2929.  
  2930. the next file.
  2931.  
  2932.  
  2933.  
  2934. 13.7  ZZZZNNNNAAAAKKKK
  2935.  
  2936.  
  2937.  
  2938. Indicates last header was garbled.  (See also ZZZZRRRRPPPPOOOOSSSS).
  2939.  
  2940.  
  2941.  
  2942. 13.8  ZZZZAAAABBBBOOOORRRRTTTT
  2943.  
  2944.  
  2945.  
  2946. Sent by receiver to terminate batch file transfers when requested by
  2947.  
  2948. the user.  Sender responds with a ZZZZFFFFIIIINNNN sequence.[1]
  2949.  
  2950.  
  2951.  
  2952. 13.9  ZZZZFFFFIIIINNNN
  2953.  
  2954.  
  2955.  
  2956. Sent by sending program to terminate a ZMODEM session.  Receiver
  2957.  
  2958. responds with its own ZZZZFFFFIIIINNNN.
  2959.  
  2960.  
  2961.  
  2962. 13.10  ZZZZRRRRPPPPOOOOSSSS
  2963.  
  2964.  
  2965.  
  2966. Sent by receiver to force file transfer to resume at file offset
  2967.  
  2968. given in ZP0...ZP3.
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978.  
  2979.  
  2980. __________
  2981.  
  2982.  
  2983.  
  2984.  1. Or ZZZZCCCCOOOOMMMMPPPPLLLL in case of server mode.
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994. Chapter 13              Rev091186 Typeset 9-11-86                       23
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010. Chapter 13              Rev091186 Typeset 9-11-86                       24
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018. 13.11  ZZZZDDDDAAAATTTTAAAA
  3019.  
  3020.  
  3021.  
  3022. ZP0...ZP3 contain file offset.  One or more data subpackets follow.
  3023.  
  3024.  
  3025.  
  3026. 13.12  ZZZZEEEEOOOOFFFF
  3027.  
  3028.  
  3029.  
  3030. Sender reports End of File.  ZP0...ZP3 contain the ending file
  3031.  
  3032. offset.
  3033.  
  3034.  
  3035.  
  3036. 13.13  ZZZZFFFFEEEERRRRRRRR
  3037.  
  3038.  
  3039.  
  3040. Error in reading or writing file, protocol equivalent to ZZZZAAAABBBBOOOORRRRTTTT..14  ZZZZCCCCRRRRCCCC
  3041.  
  3042.  
  3043.  
  3044. Request (receiver) and response (sender) for file polynomial.
  3045.  
  3046. ZP0...ZP3 contain file polynomial.
  3047.  
  3048.  
  3049.  
  3050. 13.15  ZZZZCCCCHHHHAAAALLLLLLLLEEEENNNNGGGGEEEE
  3051.  
  3052.  
  3053.  
  3054. Request sender to echo a random number in ZP0...ZP3 in a ZACK frame.
  3055.  
  3056. Sent by the receiving program to the sending program to verify that
  3057.  
  3058. it is connected to an operating program, and was not activated by
  3059.  
  3060. spurious data or a Trojan Horse message.
  3061.  
  3062.  
  3063.  
  3064. 13.16  ZZZZCCCCOOOOMMMMPPPPLLLL
  3065.  
  3066.  
  3067.  
  3068. Request now completed.
  3069.  
  3070.  
  3071.  
  3072. 13.17  ZZZZCCCCAAAANNNN
  3073.  
  3074.  
  3075.  
  3076. This is a pseudo frame type returned by gethdr() in response to a
  3077.  
  3078. Session Abort sequence.
  3079.  
  3080.  
  3081.  
  3082. 13.18  ZZZZFFFFRRRREEEEEEEECCCCNNNNTTTT
  3083.  
  3084.  
  3085.  
  3086. Sending program requests a ZACK frame with ZP0...ZP3 containing the
  3087.  
  3088. number of free bytes on the current file system.  A value of 0
  3089.  
  3090. represents an indefinite amount of free space.
  3091.  
  3092.  
  3093.  
  3094. 13.19  ZZZZCCCCOOOOMMMMMMMMAAAANNNNDDDD
  3095.  
  3096.  
  3097.  
  3098. ZCOMMAND is sent in a binary frame.  ZZZZFFFF0000 contains 0000 or ZZZZCCCCAAAACKKKK1111 (see
  3099.  
  3100. below).
  3101.  
  3102.  
  3103.  
  3104. A ZCRCW data subpacket follows, with the ASCII text command string
  3105.  
  3106. terminated with a NULL character.  If the command is intended to be
  3107.  
  3108. executed by the operating system hosting the receiving program
  3109.  
  3110. (e.g., "shell escape"), it must have "!" as the first character.
  3111.  
  3112. Otherwise the command is meant to be executed by the application
  3113.  
  3114. program which received the command.
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122. Chapter 13              Rev091186 Typeset 9-11-86                       24
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138. Chapter 13              Rev091186 Typeset 9-11-86                       25
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146. If the receiver detects an illegal or badly formed command, the
  3147.  
  3148. receiver immediately responds with a ZCOMPL header with an error
  3149.  
  3150. code in ZP0...ZP3.
  3151.  
  3152.  
  3153.  
  3154. If ZF0 contained ZZZZCCCCAAAACCCCKKKK1111,,,, the receiver immediately respondsa
  3155.  
  3156. ZCOMPL header with 0 status.
  3157.  
  3158.  
  3159.  
  3160. Otherwise, the receiver responds with a ZCOMPL header when the
  3161.  
  3162. operation is completed.  The exit status of the completed command is
  3163.  
  3164. stored in ZP0...ZP3.  A 0 exit status implies nominal completion of
  3165.  
  3166. the command.
  3167.  
  3168.  
  3169.  
  3170. If the command causes a file to be transmitted, the command sender
  3171.  
  3172. will see a ZRQINIT frame from the other computer attempting to send
  3173.  
  3174. data.
  3175.  
  3176.  
  3177.  
  3178. The sender examines ZF0 of the received ZRQINIT header to verify it
  3179.  
  3180. is not an echo of its own ZRQINIT header.  It is illegal for the
  3181.  
  3182. sending program to command the receiving program to send a command.
  3183.  
  3184.  
  3185.  
  3186. If the receiver program does not implement command downloading, it
  3187.  
  3188. should display the command to the standard error output, then return
  3189.  
  3190. a ZCOMPL header.
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198. 14.  SSSSEEEESSSSSSSSIIIIOOOONNNN TTTTRRRRAAAANNNNSSSSAAAACCTTTIIIIOOOONNNN EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  3199.  
  3200.  
  3201.  
  3202. 14.1  AAAA ssssiiiimmmmpppplllleeee ffffiiiilllleeee ttttrrrrannnnssssffffeeeerrrr
  3203.  
  3204.  
  3205.  
  3206. A simple transaction, one file, no errors, no CHALLENGE, overlapped
  3207.  
  3208. I/O:
  3209.  
  3210.  
  3211.  
  3212. Sender         Receiver
  3213.  
  3214.  
  3215.  
  3216. "rz\r"
  3217.  
  3218. ZRQINIT(0)
  3219.  
  3220.                ZRINIT
  3221.  
  3222. ZFILE
  3223.  
  3224.                ZRPOS
  3225.  
  3226. ZDATA data ...
  3227.  
  3228. ZEOF
  3229.  
  3230.                ZRINIT
  3231.  
  3232. ZFIN
  3233.  
  3234.                ZFIN
  3235.  
  3236. OO
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.  
  3254. Chapter 14              Rev091186 Typeset 9-11-86                       25
  3255.  
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.  
  3267.  
  3268.  
  3269.  
  3270. Chapter 14              Rev091186 Typeset 9-11-86                       26
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278. 14.2  CCCChhhhaaaalllllllleeeennnnggggeeee aaaannnndddd CCCCommmmmmmmaaaannnndddd DDDDoooowwwwnnnnllllooooaaaadddd
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284. Sender         Receiver
  3285.  
  3286.  
  3287.  
  3288. "rz\r"
  3289.  
  3290. ZRQINIT(ZCOMMAND)
  3291.  
  3292.                ZCHALLENGE(rnd)
  3293.  
  3294. ZACK(rnd)
  3295.  
  3296.                ZRINIT
  3297.  
  3298. ZCOMMAND
  3299.  
  3300.                (Performs Command)
  3301.  
  3302.                ZCOMPL
  3303.  
  3304. ZFIN
  3305.  
  3306.                ZFIN
  3307.  
  3308. OO
  3309.  
  3310.  
  3311.  
  3312.  
  3313.  
  3314.  
  3315.  
  3316. 15.  ZZZZFFFFIIIILLLLEEEE FFFFRRRRAAAAMMMMEEEE FFFFIIIILLLLEIIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  3317.  
  3318.  
  3319.  
  3320. ZMODEM sends the same file information with the ZZZZFFFFIIIILLLLEEEE frame data
  3321.  
  3322. that YMODEM Batch sends in its block 0.
  3323.  
  3324.  
  3325.  
  3326. NNNN....BBBB....:::: OOOOnnnnllllyyyy tttthhhheeee ppppaaathhhhnnnnaaaammmmeeee ((((ffffiiiilllleeee nnnnaaaammmm)))) ppppaaaarrrrtttt iiiissss mmmmaaaannnnddddaaaattttoorrryyyy....
  3327.  
  3328.  
  3329.  
  3330. PPPPaaaatttthhhhnnnnaaaammmmeeee The pathname (conventionally, the file nameent as a
  3331.  
  3332.      null terminated ASCII string.  This is the filename format used
  3333.  
  3334.      by the handle oriented MSDOS(TM) functions and C library fopen
  3335.  
  3336.      functions.  An assembly language example follows:
  3337.  
  3338.                            DB     'foo.bar',0
  3339.  
  3340.      No spaces are included in the pathname.  Normally only the file
  3341.  
  3342.      name stem (no directory prefix) is transmitted unless the
  3343.  
  3344.      sender has selected YAM's ffff option to send the ffffuuuullllllll relative
  3345.  
  3346.      pathname.  The source drive designator (A:, B:, etc.) is not
  3347.  
  3348.      sent.
  3349.  
  3350.  
  3351.  
  3352.      Filename Considerations:
  3353.  
  3354.  
  3355.  
  3356.         o+ File names should be translated to lower case unless the
  3357.  
  3358.           sending system supports upper/lower case file names.  This
  3359.  
  3360.           is a convenience for users of systems (such as Unix) which
  3361.  
  3362.           store filenames in upper and lower case.
  3363.  
  3364.  
  3365.  
  3366.         o+ The receiver should accommodate file names in lower and
  3367.  
  3368.           upper case.
  3369.  
  3370.  
  3371.  
  3372.         o+ When transmitting files between different operating
  3373.  
  3374.           systems, file names must be acceptable to both the sender
  3375.  
  3376.           and receiving operating systems.  If not, transformations
  3377.  
  3378.           should be applied to make the file names acceptable.  If
  3379.  
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386. Chapter 15              Rev091186 Typeset 9-11-86                       26
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402. Chapter 15              Rev091186 Typeset 9-11-86                       27
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.           the transformations are unsuccessful, an file name should
  3411.  
  3412.           be invented be the receiving program.
  3413.  
  3414.  
  3415.  
  3416.      If directories are included, they are delimited by /; i.e.,
  3417.  
  3418.      "subdir/foo" is acceptable, "subdir\foo" is not.
  3419.  
  3420.  
  3421.  
  3422. LLLLeeeennnnggggtttthhhh The file length and each of the succeeding fields are
  3423.  
  3424.      optional.[1] The length field is stored as a decimal string
  3425.  
  3426.      counting the number of data bytes in the file.
  3427.  
  3428.  
  3429.  
  3430.      With ZMODEM, the receiver uses the file length as an estimate
  3431.  
  3432.      only.  It may be used to display an estimate of the
  3433.  
  3434.      transmission time, and may be compared with the amount of free
  3435.  
  3436.      disk space.  The actual length of the received file is
  3437.  
  3438.      determined by the data transfer.  A file may grow after
  3439.  
  3440.      transmission commences, and all the data will be sent.
  3441.  
  3442.  
  3443.  
  3444. MMMMooooddddiiiiffffiiiiccccaaaattttiiiioooonnnn DDDDaaaateeee A single space separates the modification date
  3445.  
  3446.      from the file length.
  3447.  
  3448.  
  3449.  
  3450.      The mod date is optional, and the filename and length may be
  3451.  
  3452.      sent without requiring the mod date to be sent.
  3453.  
  3454.  
  3455.  
  3456.      The mod date is sent as an octal number giving the time the
  3457.  
  3458.      ccccoooonnnntttteeeennnnttttssss of the file were last changed measuredconds from
  3459.  
  3460.      Jan 1 1970 Universal Coordinated Time (GMT).  A date of 0
  3461.  
  3462.      implies the modification date is unknown and should be left as
  3463.  
  3464.      the date the file is received.
  3465.  
  3466.  
  3467.  
  3468.      This standard format was chosen to eliminate ambiguities
  3469.  
  3470.      arising from transfers between different time zones.
  3471.  
  3472.  
  3473.  
  3474.      Two Microsoft blunders complicate the use of modification dates
  3475.  
  3476.      in file transfers with MSDOS(TM) systems.  The first is the
  3477.  
  3478.      lack of timezone standardization in MS-DOS.  A file's creation
  3479.  
  3480.      time can not be known unless the timezone of the system that
  3481.  
  3482.      wrote the file[2] is known.  Unix solved this problem (for
  3483.  
  3484.      planet Earth, anyway) by stamping files with Universal Time
  3485.  
  3486.      (GMT).  Microsoft would have to include the timezone of origin
  3487.  
  3488.      in the directory entries, but does not.  Professional-YAM gets
  3489.  
  3490.      around this problem by using the zzzz parameter which is set to
  3491.  
  3492.      the number of minutes local time lags GMT.  For files known to
  3493.  
  3494.      originate from a different timezone, the ----zzzzTTTT option may be used
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500. __________
  3501.  
  3502.  
  3503.  
  3504.  1. Fields may not be skipped.
  3505.  
  3506.  
  3507.  
  3508.  2. Not necessarily that of the transmitting system!
  3509.  
  3510.  
  3511.  
  3512.  
  3513.  
  3514.  
  3515.  
  3516.  
  3517.  
  3518. Chapter 15              Rev091186 Typeset 9-11-86                       27
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534. Chapter 15              Rev091186 Typeset 9-11-86                       28
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542.      to specify TTTT as the timezone for an individual file transfer.
  3543.  
  3544.  
  3545.  
  3546.      The second problem is the lack of a separate file creation date
  3547.  
  3548.      in DOS.  Since some backup schemes used with DOS rely on the
  3549.  
  3550.      file creation date to select files to be copied to the archive,
  3551.  
  3552.      back-dating the file modification date could interfere with the
  3553.  
  3554.      safety of the transferred files.  For this reason,
  3555.  
  3556.      Professional-YAM does not modify the date of received files
  3557.  
  3558.      with the header information unless the dddd parameter is non zero.
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564. FFFFiiiilllleeee MMMMooooddddeeee A single space separates the file mode fro
  3565.      modification date.  The file mode is stored as an octal string.
  3566.  
  3567.      Unless the file originated from a Unix system, the file mode is
  3568.  
  3569.      set to 0.  rz(1) checks the file mode for the 0x8000 bit which
  3570.  
  3571.      indicates a Unix type regular file.  Files with the 0x8000 bit
  3572.  
  3573.      set are assumed to have been sent from another Unix (or
  3574.  
  3575.      similar) system which uses the same file conventions.  Such
  3576.  
  3577.      files are not translated in any way.
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583. SSSSeeeerrrriiiiaaaallll NNNNuuuummmmbbbbeeeerrrr A single spaceates the serial number from the
  3584.  
  3585.      file mode.  The serial number of the transmitting program is
  3586.  
  3587.      stored as an octal string.  Programs which do not have a serial
  3588.  
  3589.      number should omit this field, or set it to 0.  The receiver's
  3590.  
  3591.      use of this field is optional.
  3592.  
  3593.  
  3594.  
  3595. The file information is terminated by a null.  If only the pathname
  3596.  
  3597. is sent, the pathname is terminated with ttttwwwwoooo nulls.  The length of
  3598.  
  3599. the file information subpacket, including the trailing null, must
  3600.  
  3601. not exceed 1024 bytes; a typical length is less than 64 bytes.
  3602.  
  3603.  
  3604.  
  3605.  
  3606.  
  3607. 16.  PPPPEEEERRRRFFFFOOOORRRRMMMMAAAANNNNCCCCEEEE RRRREEEESSUUULLLLTTTTSSSS
  3608.  
  3609.  
  3610.  
  3611. 16.1  CCCCoooommmmppppaaaattttiiiibbbbiiiilllliiiittttyyyy
  3612.  
  3613.  
  3614.  
  3615. Extensive testing has demonstrated ZMODEM to be compatible with
  3616.  
  3617. satellite links, packet switched networks, microcomputers,
  3618.  
  3619. minicomputers, regular and error correcting buffered modems at 75 to
  3620.  
  3621. 19200 bps.  ZMODEM's marked economy of reverse channel bandwith
  3622.  
  3623. allows modems that dynamically partition bandwidth between the two
  3624.  
  3625. directions to operate at optimal speeds.
  3626.  
  3627.  
  3628.  
  3629. 16.2  TTTThhhhrrrroooouuuugggghhhhppppuuuutttt
  3630.  
  3631.  
  3632.  
  3633. Between two single task PC-XT computers sending a program image on
  3634.  
  3635. an in house Telenet link, SuperKermit provided 72 ch/sec throughput
  3636.  
  3637. at 1200 baud.  YMODEM-k yielded 85 chars/sec, and ZMODEM provided
  3638.  
  3639. 113 chars/sec.  XMODEM was not measured, but would have been much
  3640.  
  3641. slower based on observed network propagation delays.
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649. Chapter 16              Rev091186 Typeset 9-11-86                       28
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.  
  3658.  
  3659.  
  3660.  
  3661.  
  3662.  
  3663.  
  3664.  
  3665. Chapter 16              Rev091186 Typeset 9-11-86                       29
  3666.  
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673. Recent tests downloading program images to an IBM PC (4.7 mHz V20)
  3674.  
  3675. running YAMK 15.68 with table driven CRC calculation yielded a
  3676.  
  3677. throughput of about 17kb on a 19.2 kb direct connection.
  3678.  
  3679.  
  3680.  
  3681. 16.3  EEEErrrrrrrroooorrrr RRRReeeeccccoooovvvveeeerrrryyyy
  3682.  
  3683.  
  3684.  
  3685. Some tests of ZMODEM protocol error recovery performance have been
  3686.  
  3687. made.  A PC-AT with SCO SYS V Xenix or DOS 3.1 was connected to a PC
  3688.  
  3689. with DOS 2.1 either directly at 9600 bps or with unbuffered dial-up
  3690.  
  3691. 1200 bps modems.  The ZMODEM software was configured to use 1024
  3692.  
  3693. byte data subpacket lengths above 2400 bps, 256 otherwise.
  3694.  
  3695.  
  3696.  
  3697. Because no time delays are necessary in normal file transfers, per
  3698.  
  3699. file negotiations are much faster than with YMODEM, the only
  3700.  
  3701. observed delay being the time required by the program(s) to update
  3702.  
  3703. logging files.
  3704.  
  3705.  
  3706.  
  3707. During a file transfer, a short line hit seen by the receiver
  3708.  
  3709. usually induces a CRC error.  The interrupt sequence is usually seen
  3710.  
  3711. by the sender before the next data subpacket is completely sent, and
  3712.  
  3713. the resultant loss of data throughput averages about half a data
  3714.  
  3715. subpacket per line hit.  At 1200 bps this is would be about .75
  3716.  
  3717. second lost per hit.  At 10-5 error rate, this would degrade
  3718.  
  3719. throughput by about 9 per cent.
  3720.  
  3721.  
  3722.  
  3723. The throughput degradation increases with channel delay, as data
  3724.  
  3725. subpackets in transit through the channel are discarded when an
  3726.  
  3727. error is detected.
  3728.  
  3729.  
  3730.  
  3731. A longer noise burst that affects both the receiver and the sender's
  3732.  
  3733. reception of the interrupt sequence usually causes the sender to
  3734.  
  3735. remain silent until the receiver times out in 10 seconds.  If the
  3736.  
  3737. round trip channel delay exceeds the receiver's 10 second timeout,
  3738.  
  3739. recovery from this type of error may become difficult.
  3740.  
  3741.  
  3742.  
  3743. Noise affecting only the sender is usually ignored, with one common
  3744.  
  3745. exception.  Spurious XOFF characters generated by noise stop the
  3746.  
  3747. sender until the receiver times out and sends an interrupt sequence
  3748.  
  3749. which concludes with an XON.
  3750.  
  3751.  
  3752.  
  3753. In summation, ZMODEM performance in the presence of errors resembles
  3754.  
  3755. that of X.PC and SuperKermit.  Short bursts cause minimal data loss.
  3756.  
  3757. Long bursts (such as pulse dialing noises) often require a timeout
  3758.  
  3759. error to restore the flow of data.
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.  
  3778.  
  3779.  
  3780.  
  3781. Chapter 17              Rev091186 Typeset 9-11-86                       29
  3782.  
  3783.  
  3784.  
  3785.  
  3786.  
  3787.  
  3788.  
  3789.  
  3790.  
  3791.  
  3792.  
  3793.  
  3794.  
  3795.  
  3796.  
  3797. Chapter 17              Rev091186 Typeset 9-11-86                       30
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805. 17.  PPPPAAAACCCCKKKKEEEETTTT SSSSWWWWIIIITTTTCCCCHHHHEEEEDDNNNEEEETTTTWWWWOOOORRRRKKKK CCCCOOOONNNNSSSSIIIIDDDDEERRRRAAATTTTIIIIOOOONNNNSSSS
  3806.  
  3807.  
  3808.  
  3809. Flow control is necessary for printing messages and directories, and
  3810.  
  3811. for streaming file transfer protocols.  A non transparent flow
  3812.  
  3813. control is incompatible with XMODEM and YMODEM transfers.  XMODEM
  3814.  
  3815. and YMODEM protocols require complete transparency of all 256 8 bit
  3816.  
  3817. codes to operate properly.
  3818.  
  3819.  
  3820.  
  3821. The best flow control (when X.25 or hardware CTS is unavailable)
  3822.  
  3823. does not "eat" any characters at all.  When the PAD's buffer almost
  3824.  
  3825. fills up, an XOFF should be emitted.  When the buffer is no longer
  3826.  
  3827. nearly full, send an XON.  Otherwise, the network should neither
  3828.  
  3829. generate nor eat XON or XOFF control characters.
  3830.  
  3831.  
  3832.  
  3833. On Telenet, this can be met by setting CCIT X3 5:1 and 12:0 at bbbbooootttthhhh
  3834.  
  3835. ends of the network.  For best throughput, parameter 64 (advance
  3836.  
  3837. ACK) should be set to something like 4.  Packets should be forwarded
  3838.  
  3839. when the packet is a full 128 bytes, or after a moderate delay
  3840.  
  3841. (3:0,4:10,6:0).
  3842.  
  3843.  
  3844.  
  3845. With PC-Pursuit, it is sufficient to set parameter 5 to 1 at both
  3846.  
  3847. ends.
  3848.  
  3849.  
  3850.  
  3851. For YMODEM, PAD buffering should guarantee that a minimum of 1040
  3852.  
  3853. characters can be sent in a burst without loss of data or generation
  3854.  
  3855. of flow control characters.  Failure to provide this buffering will
  3856.  
  3857. generate excessive retries with YMODEM.
  3858.  
  3859.  
  3860.  
  3861.                    TTTTAAAABBBBLLLLEEEE 1111....  Flow Control Compatibility
  3862.  
  3863.  
  3864.  
  3865.          Connectivity            Interactive   XMODEM   KERMIT   ZMODEM
  3866.  
  3867.  
  3868.  
  3869. Direct Connection                YES           YES      YES      YES
  3870.  
  3871. Network, no flow control         NNNNOOOO            YES      (1)      (1)
  3872.  
  3873. Network, transparent f.c.        YES           YES      YES      YES
  3874.  
  3875. Network, semi-transparent f.c.   YES           NNNNOOOO       YES      YES
  3876.  
  3877. Network, 7 bit                   YES           NNNNOOOO       YES(2)   NO(3)
  3878.  
  3879.  
  3880.  
  3881. (1) Cannot operate in streaming mode.  Kermit is very slow because
  3882.  
  3883. of 96 byte max packet size.  ZMODEM can optimize burst length for
  3884.  
  3885. fastest transfers.
  3886.  
  3887.  
  3888.  
  3889. (2) Parity bits must be encoded, slowing binary transfers.
  3890.  
  3891.  
  3892.  
  3893. (3) Protocol extension possible for encoding data to 7 bits.
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.  
  3902.  
  3903.  
  3904.  
  3905.  
  3906.  
  3907.  
  3908.  
  3909.  
  3910.  
  3911.  
  3912.  
  3913. Chapter 18              Rev091186 Typeset 9-11-86                       30
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922.  
  3923.  
  3924.  
  3925.  
  3926.  
  3927.  
  3928.  
  3929. Chapter 18              Rev091186 Typeset 9-11-86                       31
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937. 18.  PPPPEEEERRRRFFFFOOOORRRRMMMMAAAANNNNCCCCEEEE CCCCOOOOMMPPPAAAARRRRIIIISSSSOOOONNNN TTTTAAAABBBBLLLLEEEESSSS
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943. "Round Trip Delay Time" includes the time for the last byte in a
  3944.  
  3945. packet to propagate through the operating systems and network to the
  3946.  
  3947. receiver, plus the time for the receiver's response to that packet
  3948.  
  3949. to propagate back to the sender.
  3950.  
  3951.  
  3952.  
  3953. The figures shown below are calculated for round trip delay times of
  3954.  
  3955. 40 milliseconds and 5 seconds.  Shift registers in the two computers
  3956.  
  3957. and a pair of 212 modems generate a round trip delay time on the
  3958.  
  3959. order of 40 milliseconds.  Operation with busy timesharing computers
  3960.  
  3961. and networks can easily generate round trip delays of five seconds.
  3962.  
  3963. Because the round trip delays cause visible interruptions of data
  3964.  
  3965. transfer when using XMODEM protocol, the subjective effect of these
  3966.  
  3967. delays is greatly exaggerated, especially when the user is paying
  3968.  
  3969. for connect time.
  3970.  
  3971.  
  3972.  
  3973. A 102400 byte binary file with randomly distributed codes is sent at
  3974.  
  3975. 1200 bps 8 data bits, 1 stop bit.  The calculations assume no
  3976.  
  3977. transmission errors.  For each of the protocols, only the per file
  3978.  
  3979. functions are considered.  Processor and I/O overhead are not
  3980.  
  3981. included.  YM-k refers to YMODEM with 1024 byte data packets.  YM-g
  3982.  
  3983. refers to the YMODEM "g" option.  ZMODEM uses 256 byte data
  3984.  
  3985. subpackets for this example.  SuperKermit uses maximum packet size,
  3986.  
  3987. 8 bit transparent transmission, no run length compression.  The 4
  3988.  
  3989. block WXMODEM window is too small to span the 5 second delay in this
  3990.  
  3991. example; the resulting thoughput degradation is ignored.
  3992.  
  3993.  
  3994.  
  3995. For comparison, a straight "dump" of the file contents with no file
  3996.  
  3997. management or error checking takes 853 seconds.
  3998.  
  3999.  
  4000.  
  4001.                  TTTTAAAABBBBLLLLEEEE 2222....  Protocol Overhead Information
  4002.  
  4003.            (102400 byte binary file, 5 Second Round Trip)
  4004.  
  4005.  
  4006.  
  4007.       Protocol          XMODEM   YM-k    YM-g   ZMODEM   SKermit WXMODEM
  4008.  
  4009.  
  4010.  
  4011. Protocol Round Trips    804      104     5      5        5                 4
  4012.  
  4013. Trip Time at 40ms       32s      4s      0      0        0                 0
  4014.  
  4015. Trip Time at 5s         4020s    520s    25s    25s      25                20
  4016.  
  4017.  
  4018.  
  4019. Overhead Characters     4803     603     503    3600     38280             8000
  4020.  
  4021.  
  4022.  
  4023. Transfer Time at 0s     893s     858s    857s   883s     1172s             916s
  4024.  
  4025. Transfer Time at 40ms   925s     862s    857s   883s     1172s             916s
  4026.  
  4027. Transfer Time at 5s     5766s    1378s   882s   918s     1197s             936s
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034.  
  4035.  
  4036.  
  4037.  
  4038.  
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045. Chapter 18              Rev091186 Typeset 9-11-86                       31
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061. Chapter 18              Rev091186 Typeset 9-11-86                       32
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.                  FFFFiiiigggguuuurrrreeee 4444....  Transmission Time Compar           (102400 byte binary file, 5 Second Round Trip)
  4070.  
  4071.  
  4072.  
  4073. ************************************************** XMODEM
  4074.  
  4075. ************ YMODEM-K
  4076.  
  4077. ********** SuperKermit (Sliding Windows)
  4078.  
  4079. ******* ZMODEM 16kb Segmented Streaming
  4080.  
  4081. ******* ZMODEM Full Streaming
  4082.  
  4083. ******* YMODEM-G
  4084.  
  4085.  
  4086.  
  4087.         TTTTAAAABBBBLLLLEEEE 3333....  Local Timesharing Computer Download Perfe
  4088.  
  4089.  
  4090.  
  4091.     Command       Protocol   Time/HD   Time/FD   Throughput   Efficiency
  4092.  
  4093.  
  4094.  
  4095. kermit -x         Kermit     1:49      2:03      327          34%
  4096.  
  4097. sz -Xa phones.t   XMODEM     1:20      1:44      343          36%
  4098.  
  4099. sz -a phones.t    ZMODEM      :39       :48      915          95%
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105. Times were measured downloading a 35721 character text file at 9600
  4106.  
  4107. bps, from Santa Cruz SysV 2.1.2 Xenix on a 9 mHz IBM PC-AT to DOS
  4108.  
  4109. 2.1 on an IBM PC.  Xenix was in multiuser mode but otherwise idle.
  4110.  
  4111. Transfer times to PC hard disk and floppy disk destinations are
  4112.  
  4113. shown.
  4114.  
  4115.  
  4116.  
  4117. C-Kermit 4.2(030) used server mode and file compression, sending to
  4118.  
  4119. Pro-YAM 15.52 using 0 delay and a "get phones.t" command.
  4120.  
  4121.  
  4122.  
  4123. Crosstalk 3.6 used XMODEM 8 bit checksum (CRC not available) and an
  4124.  
  4125. "ESC rx phones.t" command.  The Crosstalk time does nnnnooootttt include the
  4126.  
  4127. time needed to enter the extra commands not needed by Kermit and
  4128.  
  4129. ZMODEM.
  4130.  
  4131.  
  4132.  
  4133. Professional-YAM used ZMODEM AutoDownload.  ZMODEM times included a
  4134.  
  4135. security challenge of the sending program.
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175. Chapter 18              Rev091186 Typeset 9-11-86                       32
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191. Chapter 18              Rev091186 Typeset 9-11-86                       33
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.                        TTTTAAAABBBBLLLLEEEE 4444....  Protocol Checklist
  4200.  
  4201.  
  4202.  
  4203. Item                  FAST   XMODEM  WXM   YMDM-k  YMDM-g  ZMODEM  SKermit
  4204.  
  4205.  
  4206.  
  4207. IIIINNNN SSSSEEEERRRRVVVVIIIICCCCEEEE            NNNNOOOO     1979 NNOOOO    1982    1985    1986    1985
  4208.  
  4209.  
  4210.  
  4211. UUUUSSSSEEEERRRR FFFFEEEEAAAATTTTUUUURRRREEEESSSS
  4212.  
  4213. User Friendly I/F     -      -       -     -       -       YES     -
  4214.  
  4215. Commands/batch        2      2*N     2*N   2       2       1       1(1)
  4216.  
  4217. Commands/file         0      2       2     0       0       0       0
  4218.  
  4219. Command Download      -      -       -     -       -       YES     YES(6)
  4220.  
  4221. Menu Compatible       -      -       -     -       -       YES     -
  4222.  
  4223. Transfer Recovery     -      -       -     -       -       YES     -
  4224.  
  4225. File Management       -      -       -     -       -       YES     -
  4226.  
  4227. Security Check        -      -       -     -       -       YES     -
  4228.  
  4229. X/YMODEM Fallback     -      YES     YES   -       -       YES     -
  4230.  
  4231.  
  4232.  
  4233. CCCCOOOOMMMMPPPPAAAATTTTIIIIBBBBIIIILLLLIIIITTTTYYYY
  4234.  
  4235. Dynamic Files         FFFFAAAAIIIILLLL   YES     YES   FFFFAAAAIIIILLLL    FAAAAIIIILLLL    YES     YES
  4236.  
  4237. Packet SW NETS        -      -       YES   -       -       YES     YES
  4238.  
  4239. 7 bit PS NETS         -      -       -     -       -       (8)     YES
  4240.  
  4241. Old Mainframes        -      -       -     -       -       (8)     YES
  4242.  
  4243. CP/M-80               -      YES     YES   YES     -       YES(9)  -
  4244.  
  4245.  
  4246.  
  4247. AAAATTTTTTTTRRRRIIIIBBBBUUUUTTTTEEEESSSS
  4248.  
  4249. Reliability(5)        FAIL   fair    ???   fair    FAIL    HIGH    HIGH
  4250.  
  4251. Streaming             YES    -       YES   -       YES     YES     YES
  4252.  
  4253. Overhead(2)           0%     7%      7%    1%      1%      1%      30%
  4254.  
  4255. Faithful Xfers        YES    -       -     YES(3)  YES(3)  YES     YES
  4256.  
  4257. Preserve Date         NO(7)  -       -     YES     YES     YES     -
  4258.  
  4259.  
  4260.  
  4261. CCCCOOOOMMMMPPPPLLLLEEEEXXXXIIIITTTTYYYY
  4262.  
  4263. CRC-16                REQD   -       REQD  REQD    REQD    REQD    opt
  4264.  
  4265. 32 bit math           REQD   -       -     (3)     (3)     REQD    -
  4266.  
  4267. No-Wait Sample        -      -       REQD  -       -       opt     REQD
  4268.  
  4269. Ring Buffers          -      -       REQD  -       -       opt     REQD
  4270.  
  4271. XMODEM Similar        NONE   YES     LOW   HIGH    HIGH    LOW     NONE
  4272.  
  4273. Complexity            MED    LOW(5)  MED   LOW(5)  LOW     MED     HIGH
  4274.  
  4275.  
  4276.  
  4277. EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS
  4278.  
  4279. Server Operation      -      -       -     -       -       YES(4)  YES
  4280.  
  4281. Multiple Threads      -      -       -     -       -       future  -
  4282.  
  4283.  
  4284.  
  4285. NOTES:
  4286.  
  4287. (1) Server mode only
  4288.  
  4289. (2) Character count, binary file, transparent channel
  4290.  
  4291. (3) 32 bit math needed for accurate transfer (no garbage added)
  4292.  
  4293. (4) AutoDownload operation
  4294.  
  4295. (5) X/YMODEM Reliability enhancemnets greatly add to complexity
  4296.  
  4297. (6) Server commands only
  4298.  
  4299. (7) No provision for transfers across time zones
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.  
  4307. Chapter 18              Rev091186 Typeset 9-11-86                       33
  4308.  
  4309.  
  4310.  
  4311.  
  4312.  
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323. Chapter 18              Rev091186 Typeset 9-11-86                       34
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331. (8) Future enhancement provided for
  4332.  
  4333. (9) With Segmented Streaming
  4334.  
  4335. WXM: XMODEM derivative with data encoding and Windowing
  4336.  
  4337. FAST: File transfer protocol requiring end-to-end 8-bit transparent,
  4338.  
  4339. error free communications.
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347. 19.  FFFFUUUUTTTTUUUURRRREEEE EEEEXXXXTTTTEEEENNNNSSSSIIIIOONNNSSSS
  4348.  
  4349.  
  4350.  
  4351. Future extensions include:
  4352.  
  4353.  
  4354.  
  4355.    o+ Compatibility with 7 bit networks
  4356.  
  4357.  
  4358.  
  4359.    o+ Server/Link Level operation: An END-TO-END error corrected
  4360.  
  4361.      program to program session is required for financial and other
  4362.  
  4363.      sensitive applications.
  4364.  
  4365.  
  4366.  
  4367.    o+ 32 bit CRC: for sensitive applications
  4368.  
  4369.  
  4370.  
  4371.    o+ Multiple independent threads
  4372.  
  4373.  
  4374.  
  4375.    o+ Encryption
  4376.  
  4377.  
  4378.  
  4379.    o+ Compression
  4380.  
  4381.  
  4382.  
  4383.    o+ File Comparision
  4384.  
  4385.  
  4386.  
  4387.    o+ Selective transfer within a file (e.g., modified segments of a
  4388.  
  4389.      database file).
  4390.  
  4391.  
  4392.  
  4393.  
  4394.  
  4395. 20.  RRRREEEEVVVVIIIISSSSIIIIOOOONNNNSSSS
  4396.  
  4397.  
  4398.  
  4399. 9-11-86:  ZMPROT file management option added.  8-20-86:  More
  4400.  
  4401. performance data included.  8-4-86:  ASCII DLE (Ctrl-P, 020) now
  4402.  
  4403. escaped; compatible with previous versions.  More document revisions
  4404.  
  4405. for clarity.
  4406.  
  4407.  
  4408.  
  4409. 7-15-86: This document was extensively edited to improve clarity and
  4410.  
  4411. correct small errors.  The definition of the ZMNEW management option
  4412.  
  4413. was modified, and the ZMDIFF management option was added.  The
  4414.  
  4415. cancel sequence was changed from two to five CAN characters after
  4416.  
  4417. spurious two character cancel sequences were detected.
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.  
  4430.  
  4431.  
  4432.  
  4433.  
  4434.  
  4435.  
  4436.  
  4437.  
  4438.  
  4439. Chapter 21              Rev091186 Typeset 9-11-86                       34
  4440.  
  4441.  
  4442.  
  4443.  
  4444.  
  4445.  
  4446.  
  4447.  
  4448.  
  4449.  
  4450.  
  4451.  
  4452.  
  4453.  
  4454.  
  4455. Chapter 21              Rev091186 Typeset 9-11-86                       35
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463. 21.  MMMMOOOORRRREEEE IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOONNN
  4464.  
  4465.  
  4466.  
  4467. More information may be obtained by calling TeleGodzilla at
  4468.  
  4469. 503-621-3746.
  4470.  
  4471.  
  4472.  
  4473. UUCP sites can obtain the nroff/troff source to this file with
  4474.  
  4475.           uucp omen!/usr/caf/public/zmodem/zmodem.mm /tmp
  4476.  
  4477.  
  4478.  
  4479. A continually updated list of available files is stored in
  4480.  
  4481. /usr/spool/uucppublic/FILES.
  4482.  
  4483.  
  4484.  
  4485. The following L.sys line allows UUCP to call site "omen" via Omen's
  4486.  
  4487. bulletin board system "TeleGodzilla".  TeleGodzilla uses Pro-YAM in
  4488.  
  4489. host operation.
  4490.  
  4491.  
  4492.  
  4493. In response to TeleGodzilla's "Name Please:" uucico gives the
  4494.  
  4495. Pro-YAM "link" command as a user name.  The password (Giznoid)
  4496.  
  4497. controls access to the Xenix system connected to the IBM PC's other
  4498.  
  4499. serial port.  Communications between Pro-YAM and Xenix use 9600 bps;
  4500.  
  4501. YAM converts this to the caller's speed.
  4502.  
  4503.  
  4504.  
  4505. Finally, the calling uucico logs in as uucp.
  4506.  
  4507.  
  4508.  
  4509.  
  4510.  
  4511. omen Any ACU 1200 1-503-621-3746 e:--e: link d: Giznoid n:--n: uucp
  4512.  
  4513.  
  4514.  
  4515.  
  4516.  
  4517.  
  4518.  
  4519. 22.  ZZZZMMMMOOOODDDDEEEEMMMM PPPPRRRROOOOGGGGRRRRAAAAMMMMSS
  4520.  
  4521. A copy of this document, a demonstration version of
  4522.  
  4523. Professional-YAM, a flash-up tree structured help file and
  4524.  
  4525. processor, are available in _Z_M_O_D_E_M._A_R_C on TeleGodzilla.  This file
  4526.  
  4527. must be unpacked with _A_R_C-_E._C_O_M compatible with ARC5x files.  _A_R_C-
  4528.  
  4529. _E._C_O_M is also available on TeleGodzilla.
  4530.  
  4531.  
  4532.  
  4533. Source code and manual pages for UNIX programs are available on
  4534.  
  4535. TeleGodzilla in _R_Z_S_Z_1._S_H_Q and _R_Z_S_Z_2._S_H_Q, squeezed "shell archives".
  4536.  
  4537. To use these files, unsqueeze them with YAMDEMO's "usq" command,
  4538.  
  4539. upload them to Unix, and then execute them as shell scripts to break
  4540.  
  4541. them into the program and documentation source files.  More detailed
  4542.  
  4543. instructions may be found in Chapter 8 of the Professional-YAM
  4544.  
  4545. User's manual.  Most Unix like systems are supported, including V7,
  4546.  
  4547. Sys III, 4.x BSD, SYS V, Idris, Coherent, and Regulus.
  4548.  
  4549.  
  4550.  
  4551. 22.1  AAAAddddddddiiiinnnngggg ZZZZMMMMOOOODDDDEEEEMMMM tttto DDDDOOOOSSSS PPPPrrrrooooggggrrrraaaammmmssss
  4552.  
  4553.  
  4554.  
  4555. DOS programs such as bulletin boards may call YAMDEMO.EXE with the
  4556.  
  4557. DOS EXEC function to support fast, reliable ZMODEM file transfers.
  4558.  
  4559. This method allows program developers to add ZMODEM support with a
  4560.  
  4561. minimum of software development at the expense of higher memory
  4562.  
  4563.  
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569. Chapter 22              Rev091186 Typeset 9-11-86                       35
  4570.  
  4571.  
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585. Chapter 22              Rev091186 Typeset 9-11-86                       36
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593. utilization than built-in routines.
  4594.  
  4595.  
  4596.  
  4597. YAMDEMO.EXE beginning with Version 15.61 include an _x_m_o_d_e_m command
  4598.  
  4599. which performs the following functions:
  4600.  
  4601.  
  4602.  
  4603.  o+ Sets _r_e_s_t_r_i_c_t_e_d opertaion, restricting pathnames and disallowing
  4604.  
  4605.    modification of existing files
  4606.  
  4607.  
  4608.  
  4609.  o+ Causes error messages to be sent to the modem
  4610.  
  4611.  
  4612.  
  4613.  o+ Forces an exit after the command is finished
  4614.  
  4615.  
  4616.  
  4617. When YAMDEMO.EXE is used in this way, the default setup file
  4618.  
  4619. DEMOPHON.T should be overriden with the DOS environment variable
  4620.  
  4621. PHONES:
  4622.  
  4623.                       set PHONES=C:/newphone.t
  4624.  
  4625. where newphone.t contains
  4626.  
  4627. setup              return
  4628.  
  4629. (other commands may be added as necessary).
  4630.  
  4631.  
  4632.  
  4633. If a comm port other than COM1 is used, the DPORT environment
  4634.  
  4635. variable should be set:
  4636.  
  4637.                             set DPORT=2
  4638.  
  4639.  
  4640.  
  4641. The Online help processor included in ZMODEM.ARC and the
  4642.  
  4643. Professional-YAM User's Manual contain other useful information that
  4644.  
  4645. applies to YAMDEMO.EXE.
  4646.  
  4647.  
  4648.  
  4649. YAMDEMO.EXE unmodified may be copied and used without licensing or
  4650.  
  4651. other liability.  Omen Technology requests that YAMDEMO.EXE be
  4652.  
  4653. distributed only in conjunction with all the files included in
  4654.  
  4655. ZMODEM.ARC, as distributed by Omen, with no files deleted.
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663. 23.  YYYYMMMMOOOODDDDEEEEMMMM PPPPRRRROOOOGGGGRRRRAAAAMMMMSS
  4664.  
  4665. Unix programs supporting the YMODEM protocol are available on
  4666.  
  4667. TeleGodzilla in the "upgrade" subdirectory as RBSB.SHQ (a SQueezed
  4668.  
  4669. shell archive).  Most Unix like systems are supported, including V7,
  4670.  
  4671. Sys III, 4.2 BSD, SYS V, Idris, Coherent, and Regulus.
  4672.  
  4673.  
  4674.  
  4675. A version for VAX-VMS is available in VRBSB.SHQ, in the same
  4676.  
  4677. directory.
  4678.  
  4679.  
  4680.  
  4681. Irv Hoff has added YMODEM 1k packets and YMODEM batch transfers to
  4682.  
  4683. the KMD and IMP series programs, which replace the XMODEM and
  4684.  
  4685. MODEM7/MDM7xx series respectively.  Overlays are available for a
  4686.  
  4687. wide variety of CP/M systems.
  4688.  
  4689.  
  4690.  
  4691. Many other programs, including MEX and MEX-PC also support some of
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.  
  4699. Chapter 23              Rev091186 Typeset 9-11-86                       36
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715. Chapter 23              Rev091186 Typeset 9-11-86                       37
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723. the YMODEM extensions.
  4724.  
  4725.  
  4726.  
  4727. Questions about YMODEM, the Professional-YAM communications program,
  4728.  
  4729. and requests for evaluation copies may be directed to:
  4730.  
  4731.  
  4732.  
  4733.      Chuck Forsberg
  4734.  
  4735.      Omen Technology Inc
  4736.  
  4737.      17505-V Sauvie Island Road
  4738.  
  4739.      Portland Oregon 97231
  4740.  
  4741.      Voice: 503-621-3406
  4742.  
  4743.      Modem (TeleGodzilla): 503-621-3746
  4744.  
  4745.      Usenet: ...!tektronix!reed!omen!caf
  4746.  
  4747.      Compuserve: 70007,2304
  4748.  
  4749.      Source: TCE022
  4750.  
  4751.  
  4752.  
  4753.                                   Yours very truly,
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.  
  4763.  
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.  
  4779.  
  4780.  
  4781.  
  4782.  
  4783.  
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831. Chapter 23              Rev091186 Typeset 9-11-86                       37
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839.  
  4840.  
  4841.  
  4842.  
  4843.  
  4844.  
  4845.  
  4846.  
  4847.  
  4848.  
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854.  
  4855.                               CONTENTS
  4856.  
  4857.  
  4858.  
  4859.  
  4860.  
  4861.  1.  INTENDED AUDIENCE................................................   2
  4862.  
  4863.  
  4864.  
  4865.  2.  EVOLUTION OF ZMODEM..............................................   2
  4866.  
  4867.  
  4868.  
  4869.  3.  ACKNOWLEDGMENTS..................................................   4
  4870.  
  4871.  
  4872.  
  4873.  4.  RELATED DOCUMENTS................................................   4
  4874.  
  4875.  
  4876.  
  4877.  5.  ROSETTA STONE....................................................   4
  4878.  
  4879.  
  4880.  
  4881.  6.  WHY DEVELOP ZMODEM?..............................................   5
  4882.  
  4883.  
  4884.  
  4885.  7.  ZMODEM Protocol Design Criteria..................................   7
  4886.  
  4887.      7.1    Ease of Use...............................................   7
  4888.  
  4889.      7.2    Throughput................................................   7
  4890.  
  4891.      7.3    Integrity and Robustness..................................   8
  4892.  
  4893.      7.4    Ease of Implementation....................................   8
  4894.  
  4895.  
  4896.  
  4897.  8.  ZMODEM REQUIREMENTS..............................................   9
  4898.  
  4899.      8.1    File Contents.............................................   9
  4900.  
  4901.  
  4902.  
  4903.  9.  ZMODEM BASICS....................................................  10
  4904.  
  4905.      9.1    Packetization.............................................  10
  4906.  
  4907.      9.2    Link Escape Encoding......................................  10
  4908.  
  4909.      9.3    Header....................................................  11
  4910.  
  4911.      9.4    Binary Data Subpackets....................................  13
  4912.  
  4913.      9.5    ASCII Encoded Data Subpacket..............................  14
  4914.  
  4915.  
  4916.  
  4917. 10.  PROTOCOL TRANSACTION OVERVIEW....................................  14
  4918.  
  4919.      10.1   Session Startup...........................................  14
  4920.  
  4921.      10.2   File Transmission.........................................  15
  4922.  
  4923.      10.3   Session Cleanup...........................................  17
  4924.  
  4925.      10.4   Session Cancel Sequence...................................  17
  4926.  
  4927.  
  4928.  
  4929. 11.  STREAMING TECHNIQUES / ERROR RECOVERY............................  18
  4930.  
  4931.      11.1   Full Streaming with Sampling..............................  18
  4932.  
  4933.      11.2   Full Streaming with Reverse Interrupt.....................  19
  4934.  
  4935.      11.3   Full Streaming with a Sliding Window......................  19
  4936.  
  4937.      11.4   Full Streaming over Error Free Channels...................  19
  4938.  
  4939.      11.5   Segmented Streaming.......................................  20
  4940.  
  4941.  
  4942.  
  4943. 12.  ATTENTION SEQUENCE...............................................  20
  4944.  
  4945.  
  4946.  
  4947. 13.  FRAME TYPES......................................................  20
  4948.  
  4949.      13.1   ZRQINIT...................................................  21
  4950.  
  4951.      13.2   ZRINIT....................................................  21
  4952.  
  4953.      13.3   ZSINIT....................................................  21
  4954.  
  4955.      13.4   ZACK......................................................  21
  4956.  
  4957.  
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.                                   - i -
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.      13.5   ZFILE.....................................................  21
  4988.  
  4989.      13.6   ZSKIP.....................................................  23
  4990.  
  4991.      13.7   ZNAK......................................................  23
  4992.  
  4993.      13.8   ZABORT....................................................  23
  4994.  
  4995.      13.9   ZFIN......................................................  23
  4996.  
  4997.      13.10  ZRPOS.....................................................  23
  4998.  
  4999.      13.11  ZDATA.....................................................  24
  5000.  
  5001.      13.12  ZEOF......................................................  24
  5002.  
  5003.      13.13  ZFERR.....................................................  24
  5004.  
  5005.      13.14  ZCRC......................................................  24
  5006.  
  5007.      13.15  ZCHALLENGE................................................  24
  5008.  
  5009.      13.16  ZCOMPL....................................................  24
  5010.  
  5011.      13.17  ZCAN......................................................  24
  5012.  
  5013.      13.18  ZFREECNT..................................................  24
  5014.  
  5015.      13.19  ZCOMMAND..................................................  24
  5016.  
  5017.  
  5018.  
  5019. 14.  SESSION TRANSACTION EXAMPLES.....................................  25
  5020.  
  5021.      14.1   A simple file transfer....................................  25
  5022.  
  5023.      14.2   Challenge and Command Download............................  26
  5024.  
  5025.  
  5026.  
  5027. 15.  ZFILE FRAME FILE INFORMATION.....................................  26
  5028.  
  5029.  
  5030.  
  5031. 16.  PERFORMANCE RESULTS..............................................  28
  5032.  
  5033.      16.1   Compatibility.............................................  28
  5034.  
  5035.      16.2   Throughput................................................  28
  5036.  
  5037.      16.3   Error Recovery............................................  29
  5038.  
  5039.  
  5040.  
  5041. 17.  PACKET SWITCHED NETWORK CONSIDERATIONS...........................  30
  5042.  
  5043.  
  5044.  
  5045. 18.  PERFORMANCE COMPARISON TABLES....................................  31
  5046.  
  5047.  
  5048.  
  5049. 19.  FUTURE EXTENSIONS................................................  34
  5050.  
  5051.  
  5052.  
  5053. 20.  REVISIONS........................................................  34
  5054.  
  5055.  
  5056.  
  5057. 21.  MORE INFORMATION.................................................  35
  5058.  
  5059.  
  5060.  
  5061. 22.  ZMODEM PROGRAMS..................................................  35
  5062.  
  5063.      22.1   Adding ZMODEM to DOS Programs.............................  35
  5064.  
  5065.  
  5066.  
  5067. 23.  YMODEM PROGRAMS..................................................  36
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.  
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.  
  5090.  
  5091.  
  5092.  
  5093.  
  5094.  
  5095.                                   - ii -
  5096.  
  5097.  
  5098.  
  5099.  
  5100.  
  5101.  
  5102.  
  5103.  
  5104.  
  5105.  
  5106.  
  5107.  
  5108.  
  5109.  
  5110.  
  5111.  
  5112.  
  5113.  
  5114.  
  5115.  
  5116.  
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.                              LIST OF FIGURES
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131. Figure 1.  Order of Bytes in Header...................................  12
  5132.  
  5133.  
  5134.  
  5135. Figure 2.  Binary Header..............................................  12
  5136.  
  5137.  
  5138.  
  5139. Figure 3.  HEX Header.................................................  13
  5140.  
  5141.  
  5142.  
  5143. Figure 4.  Transmission Time Comparison...............................  32
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.  
  5161.  
  5162.  
  5163.  
  5164.  
  5165.  
  5166.  
  5167.  
  5168.  
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.  
  5192.  
  5193.  
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.  
  5221.  
  5222.  
  5223.  
  5224.  
  5225.  
  5226.  
  5227.                                  - iii -
  5228.  
  5229.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.  
  5251.  
  5252.  
  5253.  
  5254.  
  5255.  
  5256.  
  5257.                               LIST OF TABLES
  5258.  
  5259.  
  5260.  
  5261.  
  5262.  
  5263. TABLE 1.  Flow Control Compatibility..................................  30
  5264.  
  5265.  
  5266.  
  5267. TABLE 2.  Protocol Overhead Information...............................  31
  5268.  
  5269.  
  5270.  
  5271. TABLE 3.  Local Timesharing Computer Download Performance.............  32
  5272.  
  5273.  
  5274.  
  5275. TABLE 4.  Protocol Checklist..........................................  33
  5276.  
  5277.  
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.  
  5286.  
  5287.  
  5288.  
  5289.  
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.                                   - iv -
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.  
  5367.  
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.      The ZMODEM Asynchronous Inter Application File Transfer Protocol
  5380.  
  5381.  
  5382.  
  5383.                               Chuck Forsberg
  5384.  
  5385.  
  5386.  
  5387.                            Omen Technology Inc
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.                                  _A_B_S_T_R_A_C_T
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401. The ZMODEM file transfer protocol greatly simplifies file transfers
  5402.  
  5403. compared to XMODEM.  In addition to allowing a friendly user interface,
  5404.  
  5405. ZMODEM provides Personal Computer and other users an efficient, accurate,
  5406.  
  5407. robust file transfer method.
  5408.  
  5409.  
  5410.  
  5411. ZMODEM provides efficient file transfers with timesharing systems,
  5412.  
  5413. satellite relays, and wide area packet switched networks.
  5414.  
  5415.  
  5416.  
  5417. ZMODEM provides advanced file management features including AutoDownload
  5418.  
  5419. (Automatic file Download initiated without user intervention), aborted
  5420.  
  5421. transfer recovery, selective file transfers, and security verified command
  5422.  
  5423. downloading.
  5424.  
  5425.  
  5426.  
  5427. ZMODEM is carefully designed to provide these benefits using a minimum of
  5428.  
  5429. new technology beyond XMODEM/CRC.
  5430.  
  5431.  
  5432.  
  5433. ZMODEM protocol features allow implementation on a wide variety of systems
  5434.  
  5435. operating in a wide variety of environments.  A choice of buffering and
  5436.  
  5437. windowing modes allows ZMODEM to operate on systems that cannot support
  5438.  
  5439. other streaming protocols.  Finely tuned control character escaping allows
  5440.  
  5441. operation with real world networks without Kermit's high overhead.
  5442.  
  5443.  
  5444.  
  5445. Although ZMODEM software is more complex than primitive XMODEM routines,
  5446.  
  5447. actual C source code for working ZMODEM programs allows developers to
  5448.  
  5449. provide solid, reliable ZMODEM implementations with minimum effort.
  5450.  
  5451.  
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.  
  5486.  
  5487.  
  5488.  
  5489.  
  5490.  
  5491.  
  5492.  
  5493.  
  5494.  
  5495.  
  5496.  
  5497.  
  5498.  
  5499.  
  5500.  
  5501.  
  5502.  
  5503.