home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / docum / xyz.doc / zmodem.doc < prev   
Encoding:
Text File  |  1992-03-28  |  121.7 KB  |  3,117 lines

  1.  
  2.  
  3.  
  4.        The ZMODEM Inter Application    File Transfer Protocol
  5.  
  6.                   Chuck Forsberg
  7.  
  8.                Omen    Technology Inc
  9.  
  10.  
  11.       A overview of    this document is available as ZMODEM.OV
  12.                  (in ZMDMOV.ARC)
  13.  
  14.  
  15.  
  16.  
  17.  
  18. This file may be redistributed without restriction provided the    text is
  19. not altered.
  20.  
  21. Please distribute as widely as possible.
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.                Omen Technology Incorporated
  30.               The High Reliability Software
  31.  
  32.            17505-V Northwest Sauvie Island Road
  33.               Portland Oregon 97231
  34.             VOICE: 503-621-3406 :VOICE
  35.       Modem: 503-621-3746 Speed 1200,2400,19200(Telebit PEP)
  36.              Compuserve:70007,2304  GEnie:CAF
  37.             UUCP: ...!tektronix!reed!omen!caf
  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. Chapter    0         Rev Oct-14-88  Typeset 10-14-88             1
  63.  
  64. Chapter    0             ZMODEM Protocol                 2
  65.  
  66.  
  67.  
  68. 1.  IIIINNNNTTTTEEEENNNNDDDDEEEEDDDD AAAAUUUUDDDDIIIIEEEENNNNCCCCEEEE
  69.  
  70. This document is intended for telecommunications managers, systems
  71. programmers, and others    who choose and implement asynchronous file
  72. transfer protocols over    dial-up    networks and related environments.
  73.  
  74.  
  75. 2.  WWWWHHHHYYYY    DDDDEEEEVVVVEEEELLLLOOOOPPPP    ZZZZMMMMOOOODDDDEEEEMMMM????
  76.  
  77. Since its development half a decade ago, the Ward Christensen MMMMOOOODDDDEEEEMMMM
  78. protocol has enabled a wide variety of computer    systems    to interchange
  79. data.  There is    hardly a communications    program    that doesn't at    least
  80. claim to support this protocol,    now called XXXXMMMMOOOODDDDEEEEMMMM.
  81.  
  82. Advances in computing, modems and networking have spread the XMODEM
  83. protocol far beyond the    micro to micro environment for which it    was
  84. designed.  These application have exposed some weaknesses:
  85.  
  86.    o+ The awkward user interface    is suitable for    computer hobbyists.
  87.      Multiple commands must be keyboarded to transfer each file.
  88.  
  89.    o+ Since commands must be given to both programs, simple menu    selections
  90.      are not possible.
  91.  
  92.    o+ The short block length causes throughput to suffer    when used with
  93.      timesharing systems, packet switched networks, satellite circuits,
  94.      and buffered (error correcting) modems.
  95.  
  96.    o+ The 8 bit checksum    and unprotected    supervison allow undetected errors
  97.      and disrupted file    transfers.
  98.  
  99.    o+ Only one file can be sent per command.  The file name has to be given
  100.      twice, first to the sending program and then again    to the receiving
  101.      program.
  102.  
  103.    o+ The transmitted file accumulates as many as 127 bytes of garbage.
  104.  
  105.    o+ The modification date and other file attributes are lost.
  106.  
  107.    o+ XMODEM requires _c_o_m_p_l_e_t_e 8    bit transparency, all 256 codes.  XMODEM
  108.      will not operate over some    networks that use ASCII    flow control or
  109.      escape codes.  Setting network transparency disables important
  110.      control functions for the duration    of the call.
  111.  
  112. A number of other protocols have been developed    over the years,    but none
  113. have proven satisfactory.
  114.  
  115.    o+ Lack of public domain documentation and example programs have kept
  116.      proprietary protocols such    as RRRReeeellllaaaayyyy,,,, BBBBllllaaaasssstttt,,,, DDDDAAAARRRRTTTT,,,, and others tightly
  117.      bound to the fortunes of their suppliers.    These protocols    have not
  118.      benefited from public scrutiny of their design features.
  119.  
  120.  
  121.  
  122. Chapter    2         Rev Oct-14-88  Typeset 10-14-88             2
  123.  
  124. Chapter    2             ZMODEM Protocol                 3
  125.  
  126.  
  127.  
  128.    o+ Link level    protocols such as XXXX....22225555,,,,    XXXX....PPPPCCCC,,,, and MMMMNNNNPPPP do not manage
  129.      application to application    file transfers.
  130.  
  131.    o+ Link Level    protocols do not eliminate end-to-end errors.  Interfaces
  132.      between error-free    networks are not necessarily error-free.
  133.      Sometimes,    error-free networks aren't.
  134.  
  135.    o+ The KKKKeeeerrrrmmmmiiiitttt    protocol was developed to allow    file transfers in
  136.      environments hostile to XMODEM.  The performance compromises
  137.      necessary to accommodate traditional mainframe environments limit
  138.      Kermit's efficiency.  Even    with completely    transparent channels,
  139.      Kermit control character quoting limits the efficiency of binary file
  140.      transfers to about    75 per cent.[1]
  141.  
  142.      A number of submodes are used in various Kermit programs, including
  143.      different methods of transferring binary files.  Two Kermit programs
  144.      will mysteriously fail to operate with each other if the user has not
  145.      correctly specified these submodes.
  146.  
  147.      Kermit Sliding Windows ("SuperKermit") improves throughput    over
  148.      networks at the cost of increased complexity.  SuperKermit    requires
  149.      full duplex communications    and the    ability    to check for the presence
  150.      of    characters in the input    queue, precluding its implementation on
  151.      some operating systems.
  152.  
  153.      SuperKermit state transitions are encoded in a special language
  154.      "wart" which requires a C compiler.
  155.  
  156.      SuperKermit sends an ACK packet for each data packet of 96    bytes
  157.      (fewer if control characters are present).     This reduces throughput
  158.      on    high speed modems, from    1350 to    177 characters per second in one
  159.      test.
  160.  
  161. A number of extensions to the XMODEM protocol have been    made to    improve
  162. performance and    (in some cases)    the user interface.  They provide useful
  163. improvements in    some applications but not in others.  XMODEM's unprotected
  164. control    messages compromise their reliability.    Complex    proprietary
  165. techniques such    as CCCCyyyybbbbeeeerrrrnnnneeeettttiiiicccc DDDDaaaattttaaaa RRRReeeeccccoooovvvveeeerrrryyyy((((TTTTMMMM))))[2] improve reliability,
  166. but are    not universally    available.  Some of the    XMODEM mutant protocols
  167. have significant design    flaws of their own.
  168.  
  169.  o+ XXXXMMMMOOOODDDDEEEEMMMM----kkkk uses 1024 byte blocks to reduce the    overhead from transmission
  170.    delays by 87    per cent compared to XMODEM, but network delays    still
  171.  
  172.  
  173. __________
  174.  
  175.  1. Some Kermit    programs support run length encoding.
  176.  
  177.  2. Unique to DSZ, ZCOMM, Professional-YAM and PowerCom
  178.  
  179.  
  180.  
  181.  
  182. Chapter    2         Rev Oct-14-88  Typeset 10-14-88             3
  183.  
  184. Chapter    2             ZMODEM Protocol                 4
  185.  
  186.  
  187.  
  188.    degrade performance.     Some networks cannot transmit 1024 byte packets
  189.    without flow    control, which is difficult to apply without impairing the
  190.    perfect transparency    required by XMODEM.  XMODEM-k adds garbage to
  191.    received files.
  192.  
  193.  o+ YYYYMMMMOOOODDDDEEEEMMMM sends    the file name, file length, and    creation date at the
  194.    beginning of    each file, and allows optional 1024 byte blocks    for
  195.    improved throughput.     The handling of files that are    not a multiple of
  196.    1024    or 128 bytes is    awkward, especially if the file    length is not
  197.    known in advance, or    changes    during transmission.  The large    number of
  198.    non conforming and substandard programs claiming to support YMODEM
  199.    further complicates its use.
  200.  
  201.  o+ YYYYMMMMOOOODDDDEEEEMMMM----gggg provides efficient batch file transfers, preserving    exact file
  202.    length and file modification    date.  YMODEM-g    is a modification to
  203.    YMODEM wherein ACKs for data    blocks are not used.  YMODEM-g is
  204.    essentially insensitive to network delays.  Because it does not support
  205.    error recovery, YMODEM-g must be used hard wired or with a reliable
  206.    link    level protocol.     Successful application    at high    speed requires
  207.    cafeful attention to    transparent flow control.  When    YMODEM-g detects a
  208.    CRC error, data transfers are aborted.  YMODEM-g is easy to implement
  209.    because it closely resembles    standard YMODEM-1k.
  210.  
  211.  o+ WWWWXXXXMMMMOOOODDDDEEEEMMMM,,,, SSSSEEEEAAAAlllliiiinnnnkkkk,,,, and MMMMEEEEGGGGAAAAlllliiiinnnnkkkk have applied a subset    of ZMODEM's
  212.    techniques to "Classic XMODEM" to improve upon their    suppliers'
  213.    previous offerings.    They provide good performance under ideal
  214.    conditions.
  215.  
  216. Another    XMODEM "extension" is protocol cheating, such as Omen Technology's
  217. OOOOvvvveeeerrrrTTTThhhhrrrruuuusssstttteeeerrrr((((TTTTMMMM)))) and OOOOvvvveeeerrrrTTTThhhhrrrruuuusssstttteeeerrrr IIIIIIII((((TTTTMMMM)))).  The
  218. se improve XMODEM    throughput
  219. under some conditions by compromising error recovery.
  220.  
  221. The ZMODEM Protocol corrects the weaknesses described above while
  222. maintaining as much of XMODEM/CRC's simplicity and prior art as    possible.
  223.  
  224.  
  225.  
  226. 3.  ZZZZMMMMOOOODDDDEEEEMMMM PPPPrrrroooottttooooccccoooollll DDDDeeeessssiiiiggggnnnn CCCCrrrriiiitttteeeerrrriiiiaaaa
  227.  
  228. The design of a    file transfer protocol is an engineering compromise
  229. between    conflicting requirements:
  230.  
  231. 3.1  EEEEaaaasssseeee ooooffff UUUUsssseeee
  232.  
  233.  o+ ZMODEM allows either    program    to initiate file transfers.
  234.  
  235.  o+ The sender can pass commands    and/or modifiers to the    receiving program.
  236.  
  237.  o+ File    names need be entered only once.
  238.  
  239.  
  240.  
  241.  
  242.  
  243. Chapter    3         Rev Oct-14-88  Typeset 10-14-88             4
  244.  
  245. Chapter    3             ZMODEM Protocol                 5
  246.  
  247.  
  248.  
  249.  o+ Menu    selections are supported.
  250.  
  251.  o+ Wild    Card names may be used with batch transfers.
  252.  
  253.  o+ Minimum keystrokes required to initiate transfers.
  254.  
  255.  o+ ZRQINIT frame sent by sending program can trigger automatic downloads.
  256.  
  257.  o+ ZMODEM can optionally step down to YMODEM if    the other end does not
  258.    support ZMODEM.[1]
  259.  
  260. 3.2  TTTThhhhrrrroooouuuugggghhhhppppuuuutttt
  261.  
  262. All file transfer protocols make tradeoffs between throughput,
  263. reliability, universality, and complexity according to the technology and
  264. knowledge base available to their designers.
  265.  
  266. In the design of ZMODEM, three applications deserve special attention.
  267.  
  268.   o+ Network applications with significant delays (relative to character
  269.     transmission time) and low error rate
  270.  
  271.   o+ Timesharing    and buffered modem applications    with significant delays
  272.     and    throughput that    is quickly degraded by reverse channel traffic.
  273.     ZMODEM's economy of    reverse    channel    bandwidth allows modems    that
  274.     dynamically    partition bandwidth between the    two directions to operate
  275.     at optimal speeds.    Special    ZMODEM features    allow simple, efficient
  276.     implementation on a    wide variety of    timesharing hosts.
  277.  
  278.   o+ Traditional    direct modem to    modem communications with high error rate
  279.  
  280. Unlike Sliding Windows Kermit, ZMODEM is not optimized for optimum
  281. throughput when    error rate and delays are both high.  This tradeoff
  282. markedly reduces code complexity and memory requirements.  ZMODEM
  283. generally provides faster error    recovery than network compatible XMODEM
  284. implementations.
  285.  
  286. In the absence of network delays, rapid    error recovery is possible, much
  287. faster than MEGAlink and network compatible versions of    YMODEM and XMODEM.
  288.  
  289. File transfers begin immediately regardless of which program is    started
  290. first, without the 10 second delay associated with XMODEM.
  291.  
  292.  
  293.  
  294.  
  295.  
  296. __________
  297.  
  298.  1. Provided the transmission medium accommodates X/YMODEM.
  299.  
  300.  
  301.  
  302.  
  303. Chapter    3         Rev Oct-14-88  Typeset 10-14-88             5
  304.  
  305. Chapter    3             ZMODEM Protocol                 6
  306.  
  307.  
  308.  
  309. 3.3  IIIInnnntttteeeeggggrrrriiiittttyyyy aaaannnndddd RRRRoooobbbbuuuussssttttnnnneeeessssssss
  310.  
  311. Once a ZMODEM session is begun,    aaaallllllll transactions are protected with 16 or
  312. 32 bit CRC.[2] Complex proprietary techniques such as Omen Technology's
  313. CCCCyyyybbbbeeeerrrrnnnneeeettttiiiicccc DDDDaaaattttaaaa    RRRReeeeccccoooovvvveeeerrrryyyy((((TTTTMMMM))))[3]    are not    needed for reliable transfers.
  314. This complete protection of data and supervisory information accounts for
  315. most of    ZMODEM's high reliability compared to XMODEM derived protocols
  316. including WXMODEM, SEAlink, MEGAlink, etc.
  317.  
  318. An optional 32-bit CRC used as the frame check sequence    in ADCCP (ANSI
  319. X3.66, also known as FIPS PUB 71 and FED-STD-1003, the U.S. versions of
  320. CCITT's    X.25) is available.  The 32 bit    CRC reduces undetected errors by
  321. at least five orders of    magnitude when properly    applied    (-1 preset,
  322. inversion).
  323.  
  324. A security challenge mechanism guards against "Trojan Horse" messages
  325. written    to mimic legitimate command or file downloads.
  326.  
  327. 3.4  EEEEaaaasssseeee ooooffff IIIImmmmpppplllleeeemmmmeeeennnnttttaaaattttiiiioooonnnn
  328.  
  329. ZMODEM accommodates a wide variety of systems:
  330.  
  331.  o+ Microcomputers that cannot overlap disk and serial i/o
  332.  
  333.  o+ Microcomputers that cannot overlap serial send and receive
  334.  
  335.  o+ Computers and/or networks requiring XON/XOFF    flow control
  336.  
  337.  o+ Computers that cannot check the serial input    queue for the presence of
  338.    data    without    having to wait for the data to arrive.
  339.  
  340. Although ZMODEM    provides "hooks" for multiple "threads", ZMODEM    is not
  341. intended to replace link level protocols such as X.25.
  342.  
  343. ZMODEM accommodates network and    timesharing system delays by continuously
  344. transmitting data unless the receiver interrupts the sender to request
  345. retransmission of garbled data.     ZMODEM    in effect uses the entire file as
  346. a window.[4] Using the entire file as a    window simplifies buffer
  347. management, avoiding the window    overrun    failure    modes that affect
  348. MEGAlink, SuperKermit, and others.
  349.  
  350.  
  351. __________
  352.  
  353.  2. Except for the CAN-CAN-CAN-CAN-CAN abort sequence which requires five
  354.     _s_u_c_c_e_s_s_i_v_e CAN characters.
  355.  
  356.  3. Unique to Professional-YAM,    ZCOMM, and PowerCom
  357.  
  358.  4. Streaming strategies are discussed in coming chapters.
  359.  
  360.  
  361.  
  362.  
  363. Chapter    3         Rev Oct-14-88  Typeset 10-14-88             6
  364.  
  365. Chapter    3             ZMODEM Protocol                 7
  366.  
  367.  
  368.  
  369. ZMODEM provides    a general purpose application to application file transfer
  370. protocol which may be used directly or with with reliable link level
  371. protocols such as X.25,    MNP, Fastlink, etc.  When used with X.25, MNP,
  372. Fastlink, etc.,    ZMODEM detects and corrects errors in the interfaces
  373. between    error controlled media and the remainder of the    communications
  374. link.
  375.  
  376. ZMODEM was developed _f_o_r _t_h_e _p_u_b_l_i_c _d_o_m_a_i_n under a Telenet contract.  The
  377. ZMODEM protocol    descriptions and the Unix rz/sz    program    source code are
  378. public domain.    No licensing, trademark, or copyright restrictions apply
  379. to the use of the protocol, the    Unix rz/sz source code and the _Z_M_O_D_E_M
  380. name.
  381.  
  382.  
  383. 4.  EEEEVVVVOOOOLLLLUUUUTTTTIIIIOOOONNNN OOOOFFFF ZZZZMMMMOOOODDDDEEEEMMMM
  384.  
  385. In early 1986, Telenet funded a    project    to develop an improved public
  386. domain application to application file transfer    protocol.  This    protocol
  387. would alleviate    the throughput problems    network    customers were
  388. experiencing with XMODEM and Kermit file transfers.
  389.  
  390. In the beginning, we thought a few modifications to XMODEM would allow
  391. high performance over packet switched networks while preserving    XMODEM's
  392. simplicity.
  393.  
  394. The initial concept would add a    block number to    the ACK    and NAK    characters
  395. used by    XMODEM.     The resultant protocol    would allow the    sender to send
  396. more than one block before waiting for a response.
  397.  
  398. But how    to add the block number    to XMODEM's ACK    and NAK?  WXMODEM,
  399. SEAlink, MEGAlink and some other protocols add binary byte(s) to indicate
  400. the block number.
  401.  
  402. Pure binary was    unsuitable for ZMODEM because binary code combinations
  403. won't pass bidirectionally through some    modems,    networks and operating
  404. systems.  Other    operating systems may not be able to recognize something
  405. coming back[1] unless a    break signal or    a system dependent code    or
  406. sequence is present.  By the time all this and other problems with the
  407. simple ACK/NAK sequences mentioned above were corrected, XMODEM's simple
  408. ACK and    NACK characters    had evolved into a real    packet.     The Frog was
  409. riveting.
  410.  
  411. Managing the window[2] was another problem.  Experience    gained in
  412.  
  413.  
  414. __________
  415.  
  416.  1. Without stopping for a response
  417.  
  418.  2. The    WINDOW is the data in transit between sender and receiver.
  419.  
  420.  
  421.  
  422.  
  423. Chapter    4         Rev Oct-14-88  Typeset 10-14-88             7
  424.  
  425. Chapter    4             ZMODEM Protocol                 8
  426.  
  427.  
  428.  
  429. debugging The Source's SuperKermit protocol indicated a    window size of
  430. about 1000 characters was needed at 1200 bps.  High speed modems require a
  431. window of 20000    or more    characters for full throughput.     Much of the
  432. SuperKermit's inefficiency, complexity and debugging time centered around
  433. its ring buffering and window management.  There had to    be a better way    to
  434. get the    job done.
  435.  
  436. A sore point with XMODEM and its progeny is error recovery.  More to the
  437. point, how can the receiver determine whether the sender has responded,    or
  438. is ready to respond, to    a retransmission request?  XMODEM attacks the
  439. problem    by throwing away characters until a certain period of silence.
  440. Too short a time allows    a spurious pause in output (network or timesharing
  441. congestion) to masquerade as error recovery.  Too long a timeout
  442. devastates throughput, and allows a noisy line to lock up the protocol.
  443. SuperKermit solves the problem with a distinct start of    packet character
  444. (SOH).    WXMODEM    and ZMODEM use unique character    sequences to delineate the
  445. start of frames.  SEAlink and MEGAlink do not address this problem.
  446.  
  447. A further error    recovery problem arises    in streaming protocols.     How does
  448. the receiver know when (or if) the sender has recognized its error signal?
  449. Is the next packet the correct response    to the error signal?  Is it
  450. something left over "in    the queue"?  Or    is this    new subpacket one of many
  451. that will have to be discarded because the sender did not receive the
  452. error signal?  How long    should this continue before sending another error
  453. signal?     How can the protocol prevent this from    degenerating into an
  454. argument about mixed signals?
  455.  
  456. SuperKermit uses selective retransmission, so it can accept any    good
  457. packet it receives.  Each time the SuperKermit receiver    gets a data
  458. packet,    it must    decide which outstanding packet    (if any) it "wants most"
  459. to receive, and    asks for that one.  In practice, complex software "hacks"
  460. are needed to attain acceptable    robustness.[3]
  461.  
  462. For ZMODEM, we decided to forgo    the complexity of SuperKermit's    packet
  463. assembly scheme    and its    associated buffer management logic and memory
  464. requirements.
  465.  
  466. Another    sore point with    XMODEM and WXMODEM is the garbage added    to files.
  467. This was acceptable with the old CP/M files which had no exact length, but
  468. not with newer systems such as PC-DOS and Unix.     YMODEM    uses file length
  469. information transmitted    in the header block to trim the    output file, but
  470. this causes data loss when transferring    files that grow    during a transfer.
  471.  
  472.  
  473. __________
  474.  
  475.  3. For    example, when SuperKermit encounters certain errors, the _w_n_d_e_s_r
  476.     function is    called to determine the    next block to request.    A burst    of
  477.     errors generates several wasteful requests to retransmit the same
  478.     block.
  479.  
  480.  
  481.  
  482.  
  483. Chapter    4         Rev Oct-14-88  Typeset 10-14-88             8
  484.  
  485. Chapter    4             ZMODEM Protocol                 9
  486.  
  487.  
  488.  
  489. In some    cases, the file    length may be unknown, as when data is obtained
  490. from a process.     Variable length data subpackets solve both of these
  491. problems.
  492.  
  493. Since some characters had to be    escaped    anyway,    there wasn't any point
  494. wasting    bytes to fill out a fixed packet length    or to specify a    variable
  495. packet length.    In ZMODEM, the length of data subpackets is denoted by
  496. ending each subpacket with an escape sequence similar to BISYNC    and HDLC.
  497.  
  498. The end    result is a ZMOEM header containing a "frame type", four bytes of
  499. supervisory information, and its own CRC.  Data    frames consist of a header
  500. followed by 1 or more data subpackets.    In the absence of transmission
  501. errors,    an entire file can be sent in one data frame.
  502.  
  503. Since the sending system may be    sensitive to numerous control characters
  504. or strip parity    in the reverse data path, all of the headers sent by the
  505. receiver are sent in hex.  A common lower level    routine    receives all
  506. headers, allowing the main program logic to deal with headers and data
  507. subpackets as objects.
  508.  
  509. With equivalent    binary (efficient) and hex (application    friendly) frames,
  510. the sending program can    send an    "invitation to receive"    sequence to
  511. activate the receiver without crashing the remote application with
  512. unexpected control characters.
  513.  
  514. Going "back to scratch"    in the protocol    design presents    an opportunity to
  515. steal good ideas from many sources and to add a    few new    ones.
  516.  
  517. From Kermit and    UUCP comes the concept of an initial dialog to exchange
  518. system parameters.
  519.  
  520. ZMODEM generalizes Compuserve B    Protocol's host    controlled transfers to
  521. single command AutoDownload and    command    downloading.  A    Security Challenge
  522. discourages password hackers and Trojan    Horse authors from abusing
  523. ZMODEM's power.
  524.  
  525. We were    also keen to the pain and $uffering of legions of
  526. telecommunicators whose    file transfers have been ruined    by communications
  527. and timesharing    faults.     ZMODEM's file transfer    recovery and advanced file
  528. management are dedicated to these kindred comrades.
  529.  
  530. After ZMODEM had been operational a short time,    Earl Hall pointed out the
  531. obvious: ZMODEM's user friendly    AutoDownload was almost    useless    if the
  532. user must assign transfer options to each of the sending and receiving
  533. programs.  Now,    transfer options may be    specified to/by    the sending
  534. program, which passes them to the receiving program in the ZFILE header.
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543. Chapter    5         Rev Oct-14-88  Typeset 10-14-88             9
  544.  
  545. Chapter    5             ZMODEM Protocol                10
  546.  
  547.  
  548.  
  549. 5.  RRRROOOOSSSSEEEETTTTTTTTAAAA SSSSTTTTOOOONNNNEEEE
  550.  
  551. Here are some definitions which    reflect    current    vernacular in the computer
  552. media.    The attempt here is identify the file transfer protocol    rather
  553. than specific programs.
  554.  
  555. FRAME    A ZMODEM frame consists    of a header and    0 or more data subpackets.
  556.  
  557. XMODEM    refers to the original 1977 file transfer etiquette introduced by
  558.     Ward Christensen's MODEM2 program.  It's also called the MODEM or
  559.     MODEM2 protocol.  Some who are unaware of MODEM7's unusual batch
  560.     file mode call it MODEM7.  Other aliases include "CP/M Users's
  561.     Group" and "TERM II FTP    3".  This protocol is supported    by most
  562.     communications programs    because    it is easy to implement.
  563.  
  564. XMODEM/CRC replaces XMODEM's 1 byte checksum with a two    byte Cyclical
  565.     Redundancy Check (CRC-16), improving error detection.
  566.  
  567. XMODEM-1k Refers to XMODEM-CRC with optional 1024 byte blocks.
  568.  
  569. YMODEM    refers to the XMODEM/CRC protocol with batch transmission and
  570.     optional 1024 byte blocks as described in YMODEM.DOC.[1]
  571.  
  572.  
  573. 6.  ZZZZMMMMOOOODDDDEEEEMMMM RRRREEEEQQQQUUUUIIIIRRRREEEEMMMMEEEENNNNTTTTSSSS
  574.  
  575. ZMODEM requires    an 8 bit transfer medium.[1] ZMODEM escapes network
  576. control    characters to allow operation with packet switched networks.  In
  577. general, ZMODEM    operates over any path that supports XMODEM, and over many
  578. that don't.
  579.  
  580. To support full    streaming,[2] the transmission path should either assert
  581. flow control or    pass full speed    transmission without loss of data.
  582. Otherwise the ZMODEM sender must manage    the window size.
  583.  
  584. 6.1  FFFFiiiilllleeee CCCCoooonnnntttteeeennnnttttssss
  585.  
  586. 6.1.1  BBBBiiiinnnnaaaarrrryyyy FFFFiiiilllleeeessss
  587. ZMODEM places no constraints on    the information    content    of binary files,
  588. except that the    number of bits in the file must    be a multiple of 8.
  589.  
  590.  
  591.  
  592. __________
  593.  
  594.  1. Available on TeleGodzilla as part of YZMODEM.ZOO
  595.  
  596.  1. The    ZMODEM design allows encoded packets for less transparent media.
  597.  
  598.  2. With XOFF and XON, or out of band flow control such    as X.25    or CTS
  599.  
  600.  
  601.  
  602.  
  603. Chapter    6         Rev Oct-14-88  Typeset 10-14-88            10
  604.  
  605. Chapter    6             ZMODEM Protocol                11
  606.  
  607.  
  608.  
  609. 6.1.2  TTTTeeeexxxxtttt FFFFiiiilllleeeessss
  610. Since ZMODEM is    used to    transfer files between different types of computer
  611. systems, text files must meet minimum requirements if they are to be
  612. readable on a wide variety of systems and environments.
  613.  
  614. Text lines consist of printing ASCII characters, spaces, tabs, and
  615. backspaces.
  616.  
  617. 6.1.2.1     AAAASSSSCCCCIIIIIIII EEEEnnnndddd ooooffff LLLLiiiinnnneeee
  618. The ASCII code definition allows text lines terminated by a CR/LF (015,
  619. 012) sequence, or by a NL (012)    character.  Lines logically terminated by
  620. a lone CR (013)    are not    ASCII text.
  621.  
  622. A CR (013) without a linefeed implies overprinting, and    is not acceptable
  623. as a logical line separator.  Overprinted lines    should print all important
  624. characters in the last pass to allow CRT displays to display meaningful
  625. text.  Overstruck characters may be generated by backspacing or    by
  626. overprinting the line with CR (015) not    followed by LF.
  627.  
  628. Overstruck characters generated    with backspaces    should be sent with the
  629. most important character last to accommodate CRT displays that cannot
  630. overstrike.  The sending program may use the ZZZZCCCCNNNNLLLL bit to force the
  631. receiving program to convert the received end of line to its local end of
  632. line convention.[3]
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655. __________
  656.  
  657.  3. Files that have been translated in such a way as to    modify their
  658.     length cannot be updated with the ZZZZCCCCRRRREEEECCCCOOOOVVVV Conversion Option.
  659.  
  660.  
  661.  
  662.  
  663. Chapter    6         Rev Oct-14-88  Typeset 10-14-88            11
  664.  
  665. Chapter    6             ZMODEM Protocol                12
  666.  
  667.  
  668.  
  669. 7.  ZZZZMMMMOOOODDDDEEEEMMMM BBBBAAAASSSSIIIICCCCSSSS
  670.  
  671. 7.1  PPPPaaaacccckkkkeeeettttiiiizzzzaaaattttiiiioooonnnn
  672.  
  673. ZMODEM frames differ somewhat from XMODEM blocks.  XMODEM blocks are not
  674. used for the following reasons:
  675.  
  676.  o+ Block numbers are limited to    256
  677.  
  678.  o+ No provision    for variable length blocks
  679.  
  680.  o+ Line    hits corrupt protocol signals, causing failed file transfers.  In
  681.    particular, modem errors sometimes generate false block numbers, false
  682.    EOTs    and false ACKs.     False ACKs are    the most troublesome as    they cause
  683.    the sender to lose synchronization with the receiver.
  684.  
  685.    State of the    art programs such as Professional-YAM and ZCOMM    overcome
  686.    some    of these weaknesses with clever    proprietary code, but a    stronger
  687.    protocol is desired.
  688.  
  689.  o+ It is difficult to determine    the beginning and ends of XMODEM blocks
  690.    when    line hits cause    a loss of synchronization.  This precludes rapid
  691.    error recovery.
  692.  
  693. 7.2  LLLLiiiinnnnkkkk EEEEssssccccaaaappppeeee EEEEnnnnccccooooddddiiiinnnngggg
  694.  
  695. ZMODEM achieves    data transparency by extending the 8 bit character set
  696. (256 codes) with escape    sequences based    on the ZMODEM data link    escape
  697. character ZDLE.[1]
  698.  
  699. Link Escape coding permits variable length data    subpackets without the
  700. overhead of a separate byte count.  It allows the beginning of frames to
  701. be detected without special timing techniques, facilitating rapid error
  702. recovery.
  703.  
  704. Link Escape coding does    add some overhead.  The    worst case, a file
  705. consisting entirely of escaped characters, would incur a 50% overhead.
  706.  
  707. The ZDLE character is special.    ZDLE represents    a control sequence of some
  708. sort.  If a ZDLE character appears in binary data, it is prefixed with
  709. ZDLE, then sent    as ZDLEE.
  710.  
  711. The value for ZDLE is octal 030    (ASCII CAN).  This particular value was
  712. chosen to allow    a string of 5 consecutive CAN characters to abort a ZMODEM
  713.  
  714.  
  715. __________
  716.  
  717.  1. This and other constants are defined in the    _z_m_o_d_e_m._h include file.
  718.     Please note    that constants with a leading 0    are octal constants in C.
  719.  
  720.  
  721.  
  722.  
  723. Chapter    7         Rev Oct-14-88  Typeset 10-14-88            12
  724.  
  725. Chapter    7             ZMODEM Protocol                13
  726.  
  727.  
  728.  
  729. session, compatible with YMODEM    session    abort.
  730.  
  731. Since CAN is not used in normal    terminal operations, interactive
  732. applications and communications    programs can monitor the data flow for
  733. ZDLE.  The following characters    can be scanned to detect the ZRQINIT
  734. header,    the invitation to automatically    download commands or files.
  735.  
  736. Receipt    of five    successive CAN characters will abort a ZMODEM session.
  737. Eight CAN characters are sent.
  738.  
  739. The receiving program decodes any sequence of ZDLE followed by a byte with
  740. bit 6 set and bit 5 reset (upper case letter, either parity) to    the
  741. equivalent control character by    inverting bit 6.  This allows the
  742. transmitter to escape any control character that cannot    be sent    by the
  743. communications medium.    In addition, the receiver recognizes escapes for
  744. 0177 and 0377 should these characters need to be escaped.
  745.  
  746. ZMODEM software    escapes    ZDLE, 020, 0220, 021, 0221, 023, and 0223.  If
  747. preceded by 0100 or 0300 (@), 015 and 0215 are also escaped to protect the
  748. Telenet    command    escape CR-@-CR.     The receiver ignores 021, 0221, 023, and
  749. 0223 characters    in the data stream.
  750.  
  751. The ZMODEM routines in zm.c accept an option to    escape all control
  752. characters, to allow operation with less transparent networks.    This
  753. option can be given to either the sending or receiving program.
  754.  
  755. 7.3  HHHHeeeeaaaaddddeeeerrrr
  756.  
  757. All ZMODEM frames begin    with a header which may    be sent    in binary or HEX
  758. form.  ZMODEM uses a single routine to recognize binary    and hex    headers.
  759. Either form of the header contains the same raw    information:
  760.  
  761.  o+ A type byte[2] [3]
  762.  
  763.  o+ Four    bytes of data indicating flags and/or numeric quantities depending
  764.    on the frame    type
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772. __________
  773.  
  774.  2. The    frame types are    cardinal numbers beginning with    0 to minimize
  775.     state transition table memory requirements.
  776.  
  777.  3. Future extensions to ZMODEM    may use    the high order bits of the type
  778.     byte to indicate thread selection.
  779.  
  780.  
  781.  
  782.  
  783. Chapter    7         Rev Oct-14-88  Typeset 10-14-88            13
  784.  
  785. Chapter    7             ZMODEM Protocol                14
  786.  
  787.  
  788.  
  789.            FFFFiiiigggguuuurrrreeee 1111....  Order of Bytes in    Header
  790.  
  791.            TYPE:  frame    type
  792.            F0: Flags least significant byte
  793.            P0: file Position least significant
  794.            P3: file Position most significant
  795.  
  796.                TYPE     F3 F2 F1 F0
  797.                -------------------
  798.                TYPE     P0 P1 P2 P3
  799.  
  800. 7.3.1  11116666 BBBBiiiitttt CCCCRRRRCCCC BBBBiiiinnnnaaaarrrryyyy HHHHeeeeaaaaddddeeeerrrr
  801. A binary header    is sent    by the sending program to the receiving    program.
  802. ZDLE encoding accommodates XON/XOFF flow control.
  803.  
  804. A binary header    begins with the    sequence ZPAD, ZDLE, ZBIN.
  805.  
  806. The frame type byte is ZDLE encoded.
  807.  
  808. The four position/flags    bytes are ZDLE encoded.
  809.  
  810. A two byte CRC of the frame type and position/flag bytes is ZDLE encoded.
  811.  
  812. 0 or more binary data subpackets with 16 bit CRC will follow depending on
  813. the frame type.
  814.  
  815. The function _z_s_b_h_d_r transmits a    binary header.    The function _z_g_e_t_h_d_r
  816. receives a binary or hex header.
  817.  
  818.            FFFFiiiigggguuuurrrreeee 2222....  16 Bit CRC Binary    Header
  819.         * ZDLE A TYPE F3/P0    F2/P1 F1/P2 F0/P3 CRC-1    CRC-2
  820.  
  821.  
  822. 7.3.2  33332222 BBBBiiiitttt CCCCRRRRCCCC BBBBiiiinnnnaaaarrrryyyy HHHHeeeeaaaaddddeeeerrrr
  823. A "32 bit CRC" Binary header is    similar    to a Binary Header, except the
  824. ZZZZBBBBIIIINNNN (A) character is replaced by a ZZZZBBBBIIIINNNN33332222 (C) character, and four
  825. characters of CRC are sent.  0 or more binary data subpackets with 32 bit
  826. CRC will follow    depending on the frame type.
  827.  
  828. The common variable _T_x_f_c_s_3_2 may    be set TRUE for    32 bit CRC iff the
  829. receiver indicates the capability with the CCCCAAAANNNNFFFFCCCC33332222 bit.     The zgethdr,
  830. zsdata and zrdata functions automatically adjust to the    type of    Frame
  831. Check Sequence being used.
  832.            FFFFiiiigggguuuurrrreeee 3333....  32 Bit CRC Binary    Header
  833.       *    ZDLE C TYPE F3/P0 F2/P1    F1/P2 F0/P3 CRC-1 CRC-2    CRC-3 CRC-4
  834.  
  835.  
  836. 7.3.3  HHHHEEEEXXXX HHHHeeeeaaaaddddeeeerrrr
  837. The receiver sends responses in    hex headers.  The sender also uses hex
  838. headers    when they are not followed by binary data subpackets.
  839.  
  840.  
  841.  
  842.  
  843. Chapter    7         Rev Oct-14-88  Typeset 10-14-88            14
  844.  
  845. Chapter    7             ZMODEM Protocol                15
  846.  
  847.  
  848.  
  849. Hex encoding protects the reverse channel from random control characters.
  850. The hex    header receiving routine ignores parity.
  851.  
  852. Use of Kermit style encoding for control and paritied characters was
  853. considered and rejected    because    of increased possibility of interacting
  854. with some timesharing systems' line edit functions.  Use of HEX    headers
  855. from the receiving program allows control characters to    be used    to
  856. interrupt the sender when errors are detected.    A HEX header may be used
  857. in place of a binary header wherever convenient.  If a data packet follows
  858. a HEX header, it is protected with CRC-16.
  859.  
  860. A hex header begins with the sequence ZPAD, ZPAD, ZDLE,    ZHEX.  The _z_g_e_t_h_d_r
  861. routine    synchronizes with the ZPAD-ZDLE    sequence.  The extra ZPAD
  862. character allows the sending program to    detect an asynchronous header
  863. (indicating an error condition)    and then call _z_g_e_t_h_d_r to receive the
  864. header.
  865.  
  866. The type byte, the four    position/flag bytes, and the 16    bit CRC    thereof
  867. are sent in hex    using the character set    01234567890abcdef.  Upper case hex
  868. digits are not allowed;    they false trigger XMODEM and YMODEM programs.
  869. Since this form    of hex encoding    detects    many patterns of errors,
  870. especially missing characters, a hex header with 32 bit    CRC has    not been
  871. defined.
  872.  
  873. A carriage return and line feed    are sent with HEX headers.  The    receive
  874. routine    expects    to see at least    one of these characters, two if    the first
  875. is CR.    The CR/LF aids debugging from printouts, and helps overcome
  876. certain    operating system related problems.
  877.  
  878. An XON character is appended to    all HEX    packets    except ZACK and    ZFIN.  The
  879. XON releases the sender    from spurious XOFF flow    control    characters
  880. generated by line noise, a common occurrence.  XON is not sent after ZACK
  881. headers    to protect flow    control    in streaming situations.  XON is not sent
  882. after a    ZFIN header to allow clean session cleanup.
  883.  
  884. 0 or more data subpackets will follow depending    on the frame type.
  885.  
  886. The function _z_s_h_h_d_r sends a hex    header.
  887.  
  888.               FFFFiiiigggguuuurrrreeee 4444....  HEX Header
  889.  
  890.       *    * ZDLE B TYPE F3/P0 F2/P1 F1/P2    F0/P3 CRC-1 CRC-2 CR LF    XON
  891.  
  892. (TYPE, F3...F0,    CRC-1, and CRC-2 are each sent as two hex digits.)
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903. Chapter    7         Rev Oct-14-88  Typeset 10-14-88            15
  904.  
  905. Chapter    7             ZMODEM Protocol                16
  906.  
  907.  
  908.  
  909. 7.4  BBBBiiiinnnnaaaarrrryyyy DDDDaaaattttaaaa SSSSuuuubbbbppppaaaacccckkkkeeeettttssss
  910.  
  911. Binary data subpackets immediately follow the associated binary    header
  912. packet.     A binary data packet contains 0 to 1024 bytes of data.
  913. Recommended length values are 256 bytes    below 2400 bps,    512 at 2400 bps,
  914. and 1024 above 4800 bps    or when    the data link is known to be relatively
  915. error free.[4]
  916.  
  917. No padding is used with    binary data subpackets.     The data bytes    are ZDLE
  918. encoded    and transmitted.  A ZDLE and frameend are then sent, followed by
  919. two or four ZDLE encoded CRC bytes.  The CRC accumulates the data bytes
  920. and frameend.
  921.  
  922. The function _z_s_d_a_t_a sends a data subpacket.  The function _z_r_d_a_t_a receives
  923. a data subpacket.
  924.  
  925. 7.5  AAAASSSSCCCCIIIIIIII EEEEnnnnccccooooddddeeeedddd DDDDaaaattttaaaa    SSSSuuuubbbbppppaaaacccckkkkeeeetttt
  926.  
  927. The format of ASCII Encoded data subpackets is not currently specified.
  928. These could be used for    server commands, or main transfers in 7    bit
  929. environments.
  930.  
  931.  
  932. 8.  PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL TTTTRRRRAAAANNNNSSSSAAAACCCCTTTTIIIIOOOONNNN OOOOVVVVEEEERRRRVVVVIIIIEEEEWWWW
  933.  
  934. As with    the XMODEM recommendation, ZMODEM timing is receiver driven.  The
  935. transmitter should not time out    at all,    except to abort    the program if no
  936. headers    are received for an extended period of time, say one minute.[1]
  937.  
  938.  
  939. 8.1  SSSSeeeessssssssiiiioooonnnn SSSSttttaaaarrrrttttuuuupppp
  940.  
  941. To start a ZMODEM file transfer    session, the sending program is    called
  942. with the names of the desired file(s) and option(s).
  943.  
  944. The sending program may    send the string    "rz\r" to invoke the receiving
  945. program    from a possible    command    mode.  The "rz"    followed by carriage
  946. return activates a ZMODEM receive program or command if    it were    not
  947. already    active.
  948.  
  949. The sender may then display a message intended for human consumption, such
  950.  
  951.  
  952. __________
  953.  
  954.  4. Strategies for adjusting the subpacket length for optimal results
  955.     based on real time error rates are still evolving.    Shorter    subpackets
  956.     speed error    detection but increase protocol    overhead slightly.
  957.  
  958.  1. Special considerations apply when sending commands.
  959.  
  960.  
  961.  
  962.  
  963. Chapter    8         Rev Oct-14-88  Typeset 10-14-88            16
  964.  
  965. Chapter    8             ZMODEM Protocol                17
  966.  
  967.  
  968.  
  969. as a list of the files requested, etc.
  970.  
  971. Then the sender    may send a ZZZZRRRRQQQQIIIINNNNIIIITTTT header.  The    ZZZZRRRRQQQQIIIINNNNIIIITTTT    header causes a
  972. previously started receive program to send its ZZZZRRRRIIIINNNNIIIITTTT header without
  973. delay.
  974.  
  975. In an interactive or conversational mode, the receiving    application may
  976. monitor    the data stream    for ZDLE.  The following characters may    be scanned
  977. for BBBB00000000    indicating a ZRQINIT header, a command to download a command or
  978. data.
  979.  
  980. The sending program awaits a command from the receiving    program    to start
  981. file transfers.     If a "C", "G",    or NAK is received, an XMODEM or YMODEM
  982. file transfer is indicated, and    file transfer(s) use the YMODEM    protocol.
  983. Note: With ZMODEM and YMODEM, the sending program provides the file name,
  984. but not    with XMODEM.
  985.  
  986. In case    of garbled data, the sending program can repeat    the invitation to
  987. receive    a number of times until    a session starts.
  988.  
  989. When the ZMODEM    receive    program    starts,    it immediately sends a ZZZZRRRRIIIINNNNIIIITTTT
  990. header to initiate ZMODEM file transfers, or a ZZZZCCCCHHHHAAAALLLLLLLLEEEENNNNGGGGEEEE header to verify
  991. the sending program.  The receive program resends its header at    _r_e_s_p_o_n_s_e
  992. _t_i_m_e (default 10 second) intervals for a suitable period of time (40
  993. seconds    total) before falling back to YMODEM protocol.
  994.  
  995. If the receiving program receives a ZZZZRRRRQQQQIIIINNNNIIIITTTT header, it resends the ZZZZRRRRIIIINNNNIIIITTTT
  996. header.     If the    sending    program    receives the ZZZZCCCCHHHHAAAALLLLLLLLEEEENNNNGGGGEEEE    header,    it places
  997. the data in ZP0...ZP3 in an answering ZZZZAAAACCCCKKKK header.
  998.  
  999. If the receiving program receives a ZZZZRRRRIIIINNNNIIIITTTT header, it is an echo
  1000. indicating that    the sending program is not operational.
  1001.  
  1002. Eventually the sending program correctly receives the ZZZZRRRRIIIINNNNIIIITTTT header.
  1003.  
  1004. The sender may then send an optional ZZZZSSSSIIIINNNNIIIITTTT frame to define the    receiving
  1005. program's AAAAttttttttnnnn sequence, or to specify complete    control    character
  1006. escaping.[2]
  1007.  
  1008. If the ZSINIT header specifies ESCCTL or ESC8, a HEX header is used, and
  1009. the receiver activates the specified ESC modes before reading the
  1010. following data subpacket.
  1011.  
  1012. The receiver sends a ZZZZAAAACCCCKKKK header in response, containing either    the serial
  1013.  
  1014.  
  1015. __________
  1016.  
  1017.  2. If the receiver specifies the same or higher level of escaping, the
  1018.     ZSINIT frame need not be sent unless an Attn sequence is needed.
  1019.  
  1020.  
  1021.  
  1022.  
  1023. Chapter    8         Rev Oct-14-88  Typeset 10-14-88            17
  1024.  
  1025. Chapter 8             ZMODEM Protocol                18
  1026.  
  1027.  
  1028.  
  1029. number of the receiving    program, or 0.
  1030.  
  1031. 8.2  FFFFiiiilllleeee TTTTrrrraaaannnnssssmmmmiiiissssssssiiiioooonnnn
  1032.  
  1033. The sender then    sends a    ZZZZFFFFIIIILLLLEEEE header with ZMODEM Conversion, Management,
  1034. and Transport options[3] followed by a ZCRCW data subpacket containing the
  1035. file name, file    length,    modification date, and other information identical
  1036. to that    used by    YMODEM Batch.
  1037.  
  1038. The receiver examines the file name, length, and date information provided
  1039. by the sender in the context of    the specified transfer options,    the
  1040. current    state of its file system(s), and local security    requirements.  The
  1041. receiving program should insure    the pathname and options are compatible
  1042. with its operating environment and local security requirements.
  1043.  
  1044. The receiver may respond with a    ZZZZSSSSKKKKIIIIPPPP header, which makes the sender
  1045. proceed    to the next file (if any) in the batch.
  1046.  
  1047.        The receiver has    a file with the    same name and length, may
  1048.        respond with a ZZZZCCCCRRRRCCCC header with a byte count, which
  1049.        requires    the sender to perform a    32 bit CRC on the
  1050.        specified number    of bytes in the    file and transmit the
  1051.        complement of the CRC in    an answering ZZZZCCCCRRRRCCCC header.[4] The
  1052.        receiver    uses this information to determine whether to
  1053.        accept the file or skip it.  This sequence may be triggered
  1054.        by the ZMCRC Management Option.
  1055.  
  1056. A ZZZZRRRRPPPPOOOOSSSS    header from the    receiver initiates transmission    of the file data
  1057. starting at the    offset in the file specified in    the ZZZZRRRRPPPPOOOOSSSS header.
  1058. Normally the receiver specifies    the data transfer to begin begin at
  1059. offset 0 in the    file.
  1060.        The receiver may    start the transfer further down    in the
  1061.        file.  This allows a file transfer interrupted by a loss
  1062.        or carrier or system crash to be    completed on the next
  1063.        connection without requiring the    entire file to be
  1064.        retransmitted.[5] If downloading    a file from a timesharing
  1065.        system that becomes sluggish, the transfer can be
  1066.        interrupted and resumed later with no loss of data.
  1067.  
  1068. The sender sends a ZZZZDDDDAAAATTTTAAAA binary    header (with file position) followed by
  1069.  
  1070.  
  1071. __________
  1072.  
  1073.  3. See    below, under ZFILE header type.
  1074.  
  1075.  4. The    crc is initialized to 0xFFFFFFFF.  A byte count    of 0 implies the
  1076.     entire file.
  1077.  
  1078.  5. This does not apply    to files that have been    translated.
  1079.  
  1080.  
  1081.  
  1082.  
  1083. Chapter    8         Rev Oct-14-88  Typeset 10-14-88            18
  1084.  
  1085. Chapter    8             ZMODEM Protocol                19
  1086.  
  1087.  
  1088.  
  1089. one or more data subpackets.
  1090.  
  1091. The receiver compares the file position    in the ZZZZDDDDAAAATTTTAAAA header with the
  1092. number of characters successfully received to the file.     If they do not
  1093. agree, a ZZZZRRRRPPPPOOOOSSSS error response is generated to force the    sender to the
  1094. right position within the file.[6]
  1095.  
  1096. A data subpacket terminated by ZZZZCCCCRRRRCCCCGGGG and CRC does not elicit a response
  1097. unless an error    is detected; more data subpacket(s) follow immediately.
  1098.  
  1099.        ZZZZCCCCRRRRCCCCQQQQ data subpackets expect a ZZZZAAAACCCCKKKK response with the
  1100.        receiver's file offset if no error, otherwise a ZZZZRRRRPPPPOOOOSSSS
  1101.        response    with the last good file    offset.     Another data
  1102.        subpacket continues immediately.     ZZZZCCCCRRRRCCCCQQQQ subpackets are
  1103.        not used    if the receiver    does not indicate FDX ability
  1104.        with the    CCCCAAAANNNNFFFFDDDDXXXX bit.
  1105.  
  1106. ZZZZCCCCRRRRCCCCWWWW data subpackets expect a response    before the next    frame is sent.
  1107. If the receiver    does not indicate overlapped I/O capability with the
  1108. CCCCAAAANNNNOOOOVVVVIIIIOOOO    bit, or    sets a buffer size, the    sender uses the    ZZZZCCCCRRRRCCCCWWWW to allow
  1109. the receiver to    write its buffer before    sending    more data.
  1110.  
  1111.        A zero length data frame    may be used as an idle
  1112.        subpacket to prevent the    receiver from timing out in
  1113.        case data is not    immediately available to the sender.
  1114.  
  1115. In the absence of fatal    error, the sender eventually encounters    end of
  1116. file.  If the end of file is encountered within    a frame, the frame is
  1117. closed with a ZZZZCCCCRRRRCCCCEEEE data subpacket which does not elicit a response
  1118. except in case of error.
  1119.  
  1120. The sender sends a ZZZZEEEEOOOOFFFF    header with the    file ending offset equal to
  1121. the number of characters in the    file.  The receiver compares this
  1122. number with the    number of characters received.    If the receiver    has
  1123. received all of    the file, it closes the    file.  If the file close was
  1124. satisfactory, the receiver responds with ZZZZRRRRIIIINNNNIIIITTTT.  If the receiver has
  1125. not received all the bytes of the file,    the receiver ignores the ZEOF
  1126. because    a new ZDATA is coming.    If the receiver    cannot properly    close
  1127. the file, a ZZZZFFFFEEEERRRRRRRR header is sent.
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135. __________
  1136.  
  1137.  6. If the ZMSPARS option is used, the receiver    instead    seeks to the
  1138.     position given in the ZDATA    header.
  1139.  
  1140.  
  1141.  
  1142.  
  1143. Chapter    8         Rev Oct-14-88  Typeset 10-14-88            19
  1144.  
  1145. Chapter    8             ZMODEM Protocol                20
  1146.  
  1147.  
  1148.  
  1149.        After all files are processed, any further protocol
  1150.        errors should not prevent the sending program from
  1151.        returning with a    success    status.
  1152.  
  1153.  
  1154. 8.3  SSSSeeeessssssssiiiioooonnnn CCCClllleeeeaaaannnnuuuupppp
  1155.  
  1156. The sender closes the session with a ZZZZFFFFIIIINNNN header.  The receiver
  1157. acknowledges this with its own ZZZZFFFFIIIINNNN header.
  1158.  
  1159. When the sender    receives the acknowledging header, it sends two
  1160. characters, "OO" (Over and Out)    and exits to the operating system or
  1161. application that invoked it.  The receiver waits briefly for the "O"
  1162. characters, then exits whether they were received or not.
  1163.  
  1164. 8.4  SSSSeeeessssssssiiiioooonnnn AAAAbbbboooorrrrtttt SSSSeeeeqqqquuuueeeennnncccceeee
  1165.  
  1166. If the receiver    is receiving data in streaming mode, the AAAAttttttttnnnn
  1167. sequence is executed to    interrupt data transmission before the Cancel
  1168. sequence is sent.  The Cancel sequence consists    of eight CAN
  1169. characters and ten backspace characters.  ZMODEM only requires five
  1170. Cancel characters, the other three are "insurance".
  1171.  
  1172. The trailing backspace characters attempt to erase the effects of the
  1173. CAN characters if they are received by a command interpreter.
  1174.  
  1175.        static char canistr[] = {
  1176.     24,24,24,24,24,24,24,24,8,8,8,8,8,8,8,8,8,8,0
  1177.        };
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203. Chapter    8         Rev Oct-14-88  Typeset 10-14-88            20
  1204.  
  1205. Chapter    8             ZMODEM Protocol                21
  1206.  
  1207.  
  1208.  
  1209. 9.  SSSSTTTTRRRREEEEAAAAMMMMIIIINNNNGGGG TTTTEEEECCCCHHHHNNNNIIIIQQQQUUUUEEEESSSS //// EEEERRRRRRRROOOORRRR RRRREEEECCCCOOOOVVVVEEEERRRRYYYY
  1210.  
  1211. It is a    fact of    life that no single method of streaming    is applicable
  1212. to a majority of today's computing and telecommunications
  1213. environments.  ZMODEM provides several data streaming methods
  1214. selected according to the limitations of the sending environment,
  1215. receiving environment, and transmission    channel(s).
  1216.  
  1217.  
  1218. 9.1  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg wwwwiiiitttthhhh SSSSaaaammmmpppplllliiiinnnngggg
  1219.  
  1220. If the receiver    can overlap serial I/O with disk I/O, and if the
  1221. sender can sample the reverse channel for the presence of data
  1222. without    having to wait,    full streaming can be used with    no AAAAttttttttnnnn
  1223. sequence required.  The    sender begins data transmission    with a ZZZZDDDDAAAATTTTAAAA
  1224. header and continuous ZZZZCCCCRRRRCCCCGGGG data subpackets.  When the receiver
  1225. detects    an error, it executes the AAAAttttttttnnnn sequence    and then sends a
  1226. ZZZZRRRRPPPPOOOOSSSS header with the correct position within the file.
  1227.  
  1228. At the end of each transmitted data subpacket, the sender checks for
  1229. the presence of    an error header    from the receiver.  To do this,    the
  1230. sender samples the reverse data    stream for the presence    of either a
  1231. ZPAD or    CAN character.[1] Flow control characters (if present) are
  1232. acted upon.
  1233.  
  1234. Other characters (indicating line noise) increment a counter which is
  1235. reset whenever the sender waits    for a header from the receiver.     If
  1236. the counter overflows, the sender sends    the next data subpacket    as
  1237. ZCRCW, and waits for a response.
  1238.  
  1239. ZPAD indicates some sort of error header from the receiver.  A CAN
  1240. suggests the user is attempting    to "stop the bubble machine" by
  1241. keyboarding CAN    characters.  If    one of these characters    is seen, an
  1242. empty ZCRCE data subpacket is sent.  Normally, the receiver will have
  1243. sent an    ZRPOS or other error header, which will    force the sender to
  1244. resume transmission at a different address, or take other action.  In
  1245. the unlikely event the ZPAD or CAN character was spurious, the
  1246. receiver will time out and send    a ZRPOS    header.[2]
  1247.  
  1248. Then the receiver's response header is read and    acted upon.[3]
  1249.  
  1250.  
  1251. __________
  1252.  
  1253.  1. The    call to    rdchk()    in sssszzzz....cccc    performs this function.
  1254.  
  1255.  2. The    obvious    choice of ZCRCW    packet,    which would trigger an ZACK from
  1256.     the    receiver, is not used because multiple in transit frames could
  1257.     result if the channel has a    long propagation delay.
  1258.  
  1259.  3. The    call to    getinsync() in sssszzzz....cccc performs this function.
  1260.  
  1261.  
  1262.  
  1263. Chapter    9         Rev Oct-14-88  Typeset 10-14-88            21
  1264.  
  1265. Chapter 9             ZMODEM Protocol                22
  1266.  
  1267.  
  1268.  
  1269. A ZZZZRRRRPPPPOOOOSSSS    header resets the sender's file    offset to the correct
  1270. position.  If possible,    the sender should purge    its output buffers
  1271. and/or networks    of all unprocessed output data,    to minimize the
  1272. amount of unwanted data    the receiver must discard before receiving
  1273. data starting at the correct file offset.  The next transmitted    data
  1274. frame should be    a ZCRCW    frame followed by a wait to guarantee
  1275. complete flushing of the network's memory.
  1276.  
  1277. If the receiver    gets a ZZZZAAAACCCCKKKK header with    an address that    disagrees
  1278. with the sender    address, it is ignored,    and the    sender waits for
  1279. another    header.     A ZZZZFFFFIIIINNNN, ZZZZAAAABBBBOOOORRRRTTTT, or TTTTIIIIMMMMEEEEOOOOUUUUTTTT terminates the session; a
  1280. ZZZZSSSSKKKKIIIIPPPP terminates the processing    of this    file.
  1281.  
  1282. The reverse channel is then sampled for    the presence of    another
  1283. header from the    receiver.[4] if    one is detected, the getinsync()
  1284. function is again called to read another error header.    Otherwise,
  1285. transmission resumes at    the (possibly reset) file offset with a    ZZZZDDDDAAAATTTTAAAA
  1286. header followed    by data    subpackets.
  1287.  
  1288.  
  1289. 9.1.1  WWWWiiiinnnnddddoooowwww MMMMaaaannnnaaaaggggeeeemmmmeeeennnntttt
  1290. When sending data through a network, some nodes    of the network store
  1291. data while it is transferred to    the receiver.  7000 bytes and more of
  1292. transient storage have been observed.  Such a large amount of storage
  1293. causes the transmitter to "get ahead" of the reciever.    This can be
  1294. fatal with MEGAlink and    other protocols    that depend on timely
  1295. notification of    errors from the    receiver.  This    condition is not
  1296. fatal with ZMODEM, but it does slow error recovery.
  1297.  
  1298. To manage the window size, the sending program uses ZCRCQ data
  1299. subpackets to trigger ZACK headers from    the receiver.  The returning
  1300. ZACK headers inform the    sender of the receiver's progress.  When the
  1301. window size (current transmitter file offset - last reported receiver
  1302. file offset) exceeds a specified value,    the sender waits for a
  1303. ZACK[5]    packet with a receiver file offset that    reduces    the window
  1304. size.
  1305.  
  1306. Unix _s_z    versions beginning with    May 9 1987 control the window size
  1307. with the "-w N"    option,    where N    is the maximum window size.  Pro-YAM,
  1308. ZCOMM and DSZ versions beginning with May 9 1987 control the window
  1309. size with "zmodem pwN".     This is compatible with previous versions of
  1310. these programs.[6]
  1311.  
  1312.  
  1313. __________
  1314.  
  1315.  4. If sampling    is possible.
  1316.  
  1317.  5. ZRPOS and other error packets are handled normally.
  1318.  
  1319.  6. When used with modems or networks that simultaneously assert flow
  1320.  
  1321.  
  1322.  
  1323. Chapter    9         Rev Oct-14-88  Typeset 10-14-88            22
  1324.  
  1325. Chapter    9             ZMODEM Protocol                23
  1326.  
  1327.  
  1328.  
  1329. 9.2  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg wwwwiiiitttthhhh RRRReeeevvvveeeerrrrsssseeee IIIInnnntttteeeerrrrrrrruuuupppptttt
  1330.  
  1331. The above method cannot    be used    if the reverse data stream cannot be
  1332. sampled    without    entering an I/O    wait.  An alternate method is to
  1333. instruct the receiver to interrupt the sending program when an error
  1334. is detected.
  1335.  
  1336. The receiver can interrupt the sender with a control character,    break
  1337. signal,    or combination thereof,    as specified in    the AAAAttttttttnnnn sequence.
  1338. After executing    the AAAAttttttttnnnn sequence, the receiver    sends a    hex ZZZZRRRRPPPPOOOOSSSS
  1339. header to force    the sender to resend the lost data.
  1340.  
  1341. When the sending program responds to this interrupt, it    reads a    HEX
  1342. header (normally ZRPOS)    from the receiver and takes the    action
  1343. described in the previous section.  The    Unix sssszzzz....cccc program uses a
  1344. setjmp/longjmp call to catch the interrupt generated by    the AAAAttttttttnnnn
  1345. sequence.  Catching the    interrupt activates the    getinsync() function
  1346. to read    the receiver's error header and    take appropriate action.
  1347.  
  1348. When compiled for standard SYSTEM III/V    Unix, sssszzzz....cccc uses    an AAAAttttttttnnnn
  1349. sequence of Ctrl-C followed by a 1 second pause    to interrupt the
  1350. sender,    then give the sender (Unix) time to prepare for    the
  1351. receiver's error header.
  1352.  
  1353.  
  1354. 9.3  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg wwwwiiiitttthhhh SSSSlllliiiiddddiiiinnnngggg WWWWiiiinnnnddddoooowwww
  1355.  
  1356. If none    of the above methods is    applicable, hope is not    yet lost.  If
  1357. the sender can buffer responses    from the receiver, the sender can use
  1358. ZCRCQ data subpackets to get ACKs from the receiver without
  1359. interrupting the transmission of data.    After a    sufficient number of
  1360. ZCRCQ data subpackets have been    sent, the sender can read one of the
  1361. headers    that should have arrived in its    receive    interrupt buffer.
  1362.  
  1363. A problem with this method is the possibility of wasting an excessive
  1364. amount of time responding to the receiver's error header.  It may be
  1365. possible to program the    receiver's AAAAttttttttnnnn    sequence to flush the
  1366. sender's interrupt buffer before sending the ZRPOS header.
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374. __________________________________________________________________________
  1375.  
  1376.     control with XON and XOFF characters aaaannnndddd pass XON characters that
  1377.     violate flow control, the receiving    program    should have a revision
  1378.     date of May    9 or later.
  1379.  
  1380.  
  1381.  
  1382.  
  1383. Chapter    9         Rev Oct-14-88  Typeset 10-14-88            23
  1384.  
  1385. Chapter    9             ZMODEM Protocol                24
  1386.  
  1387.  
  1388.  
  1389. 9.4  FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg oooovvvveeeerrrr EEEErrrrrrrroooorrrr FFFFrrrreeeeeeee CCCChhhhaaaannnnnnnneeeellllssss
  1390.  
  1391. File transfer protocols    predicated on the existence of an error    free
  1392. end to end communications channel have been proposed from time to
  1393. time.  Such channels have proven to be more readily available in
  1394. theory than in actuality.  The frequency of undetected errors
  1395. increases when modem scramblers    have more bits than the    error
  1396. detecting CRC.
  1397.  
  1398. A ZMODEM sender    assuming an error free channel with end    to end flow
  1399. control    can send the entire file in one    frame without any checking of
  1400. the reverse stream.  If    this channel is    completely transparent,    only
  1401. ZDLE need be escaped.  The resulting protocol overhead for average
  1402. long files is less than    one per    cent.[7]
  1403.  
  1404. 9.5  SSSSeeeeggggmmmmeeeennnntttteeeedddd SSSSttttrrrreeeeaaaammmmiiiinnnngggg
  1405.  
  1406. If the receiver    cannot overlap serial and disk I/O, it uses the
  1407. ZZZZRRRRIIIINNNNIIIITTTT frame to    specify    a buffer length    which the sender will not
  1408. overflow.  The sending program sends a ZZZZCCCCRRRRCCCCWWWW data subpacket and    waits
  1409. for a ZZZZAAAACCCCKKKK header before sending the next segment of the file.
  1410.  
  1411. If the sending program supports    reverse    data stream sampling or
  1412. interrupt, error recovery will be faster (on average) than a protocol
  1413. (such as YMODEM) that sends large blocks.
  1414.  
  1415. A sufficiently large receiving buffer allows throughput    to closely
  1416. approach that of full streaming.  For example, 16kb segmented
  1417. streaming adds about 3 per cent    to full    streaming ZMODEM file
  1418. transfer times when the    round trip delay is five seconds.
  1419.  
  1420.  
  1421. 10.  AAAATTTTTTTTEEEENNNNTTTTIIIIOOOONNNN SSSSEEEEQQQQUUUUEEEENNNNCCCCEEEE
  1422.  
  1423. The receiving program sends the    AAAAttttttttnnnn sequence whenever it detects an
  1424. error and needs    to interrupt the sending program.
  1425.  
  1426. The default AAAAttttttttnnnn string    value is empty (no Attn    sequence).  The
  1427. receiving program resets Attn to the empty default before each
  1428. transfer session.
  1429.  
  1430. The sender specifies the Attn sequence in its optional ZSINIT frame.
  1431. The AAAAttttttttnnnn string    is terminated with a null.
  1432.  
  1433.  
  1434.  
  1435. __________
  1436.  
  1437.  7. One    in 256 for escaping ZDLE, about    two (four if 32    bit CRC    is used)
  1438.     in 1024 for    data subpacket CRC's
  1439.  
  1440.  
  1441.  
  1442.  
  1443. Chapter    10         Rev Oct-14-88  Typeset 10-14-88            24
  1444.  
  1445. Chapter    10             ZMODEM Protocol                25
  1446.  
  1447.  
  1448.  
  1449. Two meta-characters perform special functions:
  1450.  
  1451.    o+ \335 (octal) Send a break signal
  1452.  
  1453.    o+ \336 (octal) Pause    one second
  1454.  
  1455.  
  1456. 11.  FFFFRRRRAAAAMMMMEEEE TTTTYYYYPPPPEEEESSSS
  1457.  
  1458. The numeric values for the values shown    in boldface are    given in
  1459. _z_m_o_d_e_m._h.  Unused bits and unused bytes    in the header (ZP0...ZP3) are
  1460. set to 0.
  1461.  
  1462. 11.1  ZZZZRRRRQQQQIIIINNNNIIIITTTT
  1463.  
  1464. Sent by    the sending program, to    trigger    the receiving program to send
  1465. its ZRINIT header.  This avoids    the aggravating    startup    delay
  1466. associated with    XMODEM and Kermit transfers.  The sending program may
  1467. repeat the receive invitation (including ZRQINIT) if a response    is
  1468. not obtained at    first.
  1469.  
  1470. ZF0 contains ZCOMMAND if the program is    attempting to send a command,
  1471. 0 otherwise.
  1472.  
  1473. 11.2  ZZZZRRRRIIIINNNNIIIITTTT
  1474.  
  1475. Sent by    the receiving program.    ZF0 and    ZF1 contain the     bitwise or
  1476. of the receiver    capability flags:
  1477. #define    CANCRY        8    /* Receiver can    decrypt    */
  1478. #define    CANFDX       01    /* Rx can send and receive true    FDX */
  1479. #define    CANOVIO       02    /* Rx can receive data during disk I/O */
  1480. #define    CANBRK       04    /* Rx can send a break signal */
  1481. #define    CANCRY      010    /* Receiver can    decrypt    */
  1482. #define    CANLZW      020    /* Receiver can    uncompress */
  1483. #define    CANFC32      040    /* Receiver can    use 32 bit Frame Check */
  1484. #define    ESCCTL     0100    /* Receiver expects ctl    chars to be escaped
  1485. */
  1486. #define    ESC8     0200    /* Receiver expects 8th    bit to be escaped */
  1487.  
  1488. ZP0 and    ZP1 contain the    size of    the receiver's buffer in bytes,    or 0
  1489. if nonstop I/O is allowed.
  1490.  
  1491. 11.3  ZZZZSSSSIIIINNNNIIIITTTT
  1492.  
  1493. The Sender sends flags followed    by a binary data subpacket terminated
  1494. with ZZZZCCCCRRRRCCCCWWWW.
  1495.  
  1496. /* Bit Masks for ZSINIT    flags byte ZF0 */
  1497. #define    TESCCTL    0100   /* Transmitter expects ctl chars    to be escaped
  1498. */
  1499. #define    TESC8    0200   /* Transmitter expects 8th bit to be escaped
  1500.  
  1501.  
  1502.  
  1503. Chapter    11         Rev Oct-14-88  Typeset 10-14-88            25
  1504.  
  1505. Chapter    11             ZMODEM Protocol                26
  1506.  
  1507.  
  1508.  
  1509. */
  1510.  
  1511. The data subpacket contains the    null terminated    AAAAttttttttnnnn sequence,
  1512. maximum    length 32 bytes    including the terminating null.
  1513.  
  1514. 11.4  ZZZZAAAACCCCKKKK
  1515.  
  1516. Acknowledgment to a ZZZZSSSSIIIINNNNIIIITTTT frame, ZZZZCCCCHHHHAAAALLLLLLLLEEEENNNNGGGGEEEE header, ZZZZCCCCRRRRCCCCQQQQ or ZZZZCCCCRRRRCCCCWWWW
  1517. data subpacket.     ZP0 to    ZP3 contain file offset.  The response to
  1518. ZCHALLENGE contains the    same 32    bit number received in the ZCHALLENGE
  1519. header.
  1520.  
  1521. 11.5  ZZZZFFFFIIIILLLLEEEE
  1522.  
  1523. This frame denotes the beginning of a file transmission    attempt.
  1524. ZF0, ZF1, and ZF2 may contain options.    A value    of 0 in    each of    these
  1525. bytes implies no special treatment.  Options specified to the
  1526. receiver override options specified to the sender with the exception
  1527. of ZZZZCCCCBBBBIIIINNNN.  A ZZZZCCCCBBBBIIIINNNN from    the sender overrides any other Conversion
  1528. Option given to    the receiver except ZCRESUM.  A    ZZZZCCCCBBBBIIIINNNN from the
  1529. receiver overrides any other Conversion    Option sent by the sender.
  1530.  
  1531.  
  1532. 11.5.1    ZZZZFFFF0000:::: CCCCoooonnnnvvvveeeerrrrssssiiiioooonnnn    OOOOppppttttiiiioooonnnn
  1533. If the receiver    does not recognize the Conversion Option, an
  1534. application dependent default conversion may apply.
  1535.  
  1536. ZZZZCCCCBBBBIIIINNNN "Binary" transfer    - inhibit conversion unconditionally
  1537.  
  1538. ZZZZCCCCNNNNLLLL Convert received end of line to local end of line
  1539.      convention.  The supported    end of line conventions    are
  1540.      CR/LF (most ASCII based operating systems except Unix
  1541.      and Macintosh), and NL (Unix).  Either of these two end
  1542.      of    line conventions meet the permissible ASCII
  1543.      definitions for Carriage Return and Line Feed/New Line.
  1544.      Neither the ASCII code nor    ZMODEM ZCNL encompass lines
  1545.      separated only by carriage    returns.  Other    processing
  1546.      appropriate to ASCII text files and the local operating
  1547.      system may    also be    applied    by the receiver.[1]
  1548.  
  1549. ZZZZCCCCRRRREEEECCCCOOOOVVVV    Recover/Resume interrupted file    transfer.  ZCREVOV is
  1550.      also useful for updating a    remote copy of a file that
  1551.      grows without resending of    old data.  If the destination
  1552.      file exists and is    no longer than the source, append to
  1553.      the destination file and start transfer at    the offset
  1554.  
  1555.  
  1556. __________
  1557.  
  1558.  1. Filtering RUBOUT, NULL, Ctrl-Z, etc.
  1559.  
  1560.  
  1561.  
  1562.  
  1563. Chapter    11         Rev Oct-14-88  Typeset 10-14-88            26
  1564.  
  1565. Chapter    11             ZMODEM Protocol                27
  1566.  
  1567.  
  1568.  
  1569.      corresponding to the receiver's end of file.  This
  1570.      option does not apply if the source file is shorter.
  1571.      Files that    have been converted (e.g., ZCNL) or subject
  1572.      to    a single ended Transport Option    cannot have their
  1573.      transfers recovered.
  1574.  
  1575. 11.5.2    ZZZZFFFF1111:::: MMMMaaaannnnaaaaggggeeeemmmmeeeennnntttt    OOOOppppttttiiiioooonnnn
  1576. If the receiver    does not recognize the Management Option, the
  1577. file should be transferred normally.
  1578.  
  1579. The ZZZZMMMMSSSSKKKKNNNNOOOOLLLLOOOOCCCC bit instructs the    receiver to bypass the
  1580. current    file if    the receiver does not have a file with the
  1581. same name.
  1582.  
  1583. Five bits (defined by ZZZZMMMMMMMMAAAASSSSKKKK) define the following set of
  1584. mutually exclusive management options.
  1585.  
  1586. ZZZZMMMMNNNNEEEEWWWWLLLL Transfer    file if    destination file absent.  Otherwise,
  1587.      transfer file overwriting destination if the source file
  1588.      is    newer or longer.
  1589.  
  1590. ZZZZMMMMCCCCRRRRCCCC Compare the source and destination files.     Transfer if
  1591.      file lengths or file polynomials differ.
  1592.  
  1593. ZZZZMMMMAAAAPPPPNNNNDDDD Append source file contents to the end of the existing
  1594.      destination file (if any).
  1595.  
  1596. ZZZZMMMMCCCCLLLLOOOOBBBB Replace existing    destination file (if any).
  1597.  
  1598. ZZZZMMMMDDDDIIIIFFFFFFFF Transfer    file if    destination file absent.  Otherwise,
  1599.      transfer file overwriting destination if files have
  1600.      different lengths or dates.
  1601.  
  1602. ZZZZMMMMPPPPRRRROOOOTTTT Protect destination file    by transferring    file only if
  1603.      the destination file is absent.
  1604.  
  1605. ZZZZMMMMNNNNEEEEWWWW Transfer file if destination file    absent.     Otherwise,
  1606.      transfer file overwriting destination if the source file
  1607.      is    newer.
  1608.  
  1609. 11.5.3    ZZZZFFFF2222:::: TTTTrrrraaaannnnssssppppoooorrrrtttt OOOOppppttttiiiioooonnnn
  1610. If the receiver    does not implement the particular transport
  1611. option,    the file is copied without conversion for later
  1612. processing.
  1613.  
  1614. ZZZZTTTTLLLLZZZZWWWW Lempel-Ziv compression.  Transmitted data    will be
  1615.      identical to that produced    by ccccoooommmmpppprrrreeeessssssss 4444....0000    operating on
  1616.      a computer    with VAX byte ordering,    using 12 bit
  1617.      encoding.
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623. Chapter    11         Rev Oct-14-88  Typeset 10-14-88            27
  1624.  
  1625. Chapter    11             ZMODEM Protocol                28
  1626.  
  1627.  
  1628.  
  1629. ZZZZTTTTCCCCRRRRYYYYPPPPTTTT    Encryption.  An    initial    null terminated    string
  1630.      identifies    the key.  Details to be    determined.
  1631.  
  1632. ZZZZTTTTRRRRLLLLEEEE Run Length encoding, Details to be determined.
  1633.  
  1634. A ZZZZCCCCRRRRCCCCWWWW    data subpacket follows with file name, file length,
  1635. modification date, and other information described in a    later
  1636. chapter.
  1637.  
  1638. 11.5.4    ZZZZFFFF3333:::: EEEExxxxtttteeeennnnddddeeeedddd OOOOppppttttiiiioooonnnnssss
  1639. The Extended Options are bit encoded.
  1640.  
  1641. ZZZZTTTTSSSSPPPPAAAARRRRSSSS    Special    processing for sparse files, or    sender managed
  1642.      selective retransmission.    Each file segment is transmitted as
  1643.      a separate    frame, where the frames    are not    necessarily
  1644.      contiguous.  The sender should end    each segment with a ZCRCW
  1645.      data subpacket and    process    the expected ZACK to insure no data
  1646.      is    lost.  ZTSPARS cannot be used with ZCNL.
  1647.  
  1648. 11.6  ZZZZSSSSKKKKIIIIPPPP
  1649.  
  1650. Sent by    the receiver in    response to ZZZZFFFFIIIILLLLEEEE, makes the sender skip to
  1651. the next file.
  1652.  
  1653. 11.7  ZZZZNNNNAAAAKKKK
  1654.  
  1655. Indicates last header was garbled.  (See also ZZZZRRRRPPPPOOOOSSSS).
  1656.  
  1657. 11.8  ZZZZAAAABBBBOOOORRRRTTTT
  1658.  
  1659. Sent by    receiver to terminate batch file transfers when    requested by
  1660. the user.  Sender responds with    a ZZZZFFFFIIIINNNN sequence.[2]
  1661.  
  1662. 11.9  ZZZZFFFFIIIINNNN
  1663.  
  1664. Sent by    sending    program    to terminate a ZMODEM session.    Receiver
  1665. responds with its own ZZZZFFFFIIIINNNN.
  1666.  
  1667. 11.10  ZZZZRRRRPPPPOOOOSSSS
  1668.  
  1669. Sent by    receiver to force file transfer    to resume at file offset
  1670. given in ZP0...ZP3.
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676. __________
  1677.  
  1678.  2. Or ZZZZCCCCOOOOMMMMPPPPLLLL in case of server    mode.
  1679.  
  1680.  
  1681.  
  1682.  
  1683. Chapter    11         Rev Oct-14-88  Typeset 10-14-88            28
  1684.  
  1685. Chapter    11             ZMODEM Protocol                29
  1686.  
  1687.  
  1688.  
  1689. 11.11  ZZZZDDDDAAAATTTTAAAA
  1690.  
  1691. ZP0...ZP3 contain file offset.    One or more data subpackets follow.
  1692.  
  1693. 11.12  ZZZZEEEEOOOOFFFF
  1694.  
  1695. Sender reports End of File.  ZP0...ZP3 contain the ending file
  1696. offset.
  1697.  
  1698. 11.13  ZZZZFFFFEEEERRRRRRRR
  1699.  
  1700. Error in reading or writing file, protocol equivalent to ZZZZAAAABBBBOOOORRRRTTTT.
  1701.  
  1702. 11.14  ZZZZCCCCRRRRCCCC
  1703.  
  1704. Request    (receiver) and response    (sender) for file polynomial.
  1705. ZP0...ZP3 contain file polynomial.
  1706.  
  1707. 11.15  ZZZZCCCCHHHHAAAALLLLLLLLEEEENNNNGGGGEEEE
  1708.  
  1709. Request    sender to echo a random    number in ZP0...ZP3 in a ZACK frame.
  1710. Sent by    the receiving program to the sending program to    verify that
  1711. it is connected    to an operating    program, and was not activated by
  1712. spurious data or a Trojan Horse    message.
  1713.  
  1714. 11.16  ZZZZCCCCOOOOMMMMPPPPLLLL
  1715.  
  1716. Request    now completed.
  1717.  
  1718. 11.17  ZZZZCCCCAAAANNNN
  1719.  
  1720. This is    a pseudo frame type returned by    gethdr() in response to    a
  1721. Session    Abort sequence.
  1722.  
  1723. 11.18  ZZZZFFFFRRRREEEEEEEECCCCNNNNTTTT
  1724.  
  1725. Sending    program    requests a ZACK    frame with ZP0...ZP3 containing    the
  1726. number of free bytes on    the current file system.  A value of 0
  1727. represents an indefinite amount    of free    space.
  1728.  
  1729. 11.19  ZZZZCCCCOOOOMMMMMMMMAAAANNNNDDDD
  1730.  
  1731. ZCOMMAND is sent in a binary frame.  ZZZZFFFF0000 contains 0000 or ZZZZCCCCAAAACCCCKKKK1111 (see
  1732. below).
  1733.  
  1734. A ZCRCW    data subpacket follows,    with the ASCII text command string
  1735. terminated with    a NULL character.  If the command is intended to be
  1736. executed by the    operating system hosting the receiving program
  1737. (e.g., "shell escape"),    it must    have "!" as the    first character.
  1738. Otherwise the command is meant to be executed by the application
  1739. program    which receives the command.
  1740.  
  1741.  
  1742.  
  1743. Chapter    11         Rev Oct-14-88  Typeset 10-14-88            29
  1744.  
  1745. Chapter    11             ZMODEM Protocol                30
  1746.  
  1747.  
  1748.  
  1749. If the receiver    detects    an illegal or badly formed command, the
  1750. receiver immediately responds with a ZCOMPL header with    an error
  1751. code in    ZP0...ZP3.
  1752.  
  1753. If ZF0 contained ZZZZCCCCAAAACCCCKKKK1111,,,, the receiver immediately responds with    a
  1754. ZCOMPL header with 0 status.
  1755.  
  1756. Otherwise, the receiver    responds with a    ZCOMPL header when the
  1757. operation is completed.     The exit status of the    completed command is
  1758. stored in ZP0...ZP3.  A    0 exit status implies nominal completion of
  1759. the command.
  1760.  
  1761. If the command causes a    file to    be transmitted,    the command sender
  1762. will see a ZRQINIT frame from the other    computer attempting to send
  1763. data.
  1764.  
  1765. The sender examines ZF0    of the received    ZRQINIT    header to verify it
  1766. is not an echo of its own ZRQINIT header.  It is illegal for the
  1767. sending    program    to command the receiving program to send a command.
  1768.  
  1769. If the receiver    program    does not implement command downloading,    it
  1770. may display the    command    to the standard    error output, then return a
  1771. ZCOMPL header.
  1772.  
  1773.  
  1774.  
  1775. 12.  SSSSEEEESSSSSSSSIIIIOOOONNNN TTTTRRRRAAAANNNNSSSSAAAACCCCTTTTIIIIOOOONNNN EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  1776.  
  1777. 12.1  AAAA    ssssiiiimmmmpppplllleeee ffffiiiilllleeee ttttrrrraaaannnnssssffffeeeerrrr
  1778.  
  1779. A simple transaction, one file,    no errors, no CHALLENGE, overlapped
  1780. I/O:
  1781.  
  1782. Sender           Receiver
  1783.  
  1784. "rz\r"
  1785. ZRQINIT(0)
  1786.            ZRINIT
  1787. ZFILE
  1788.            ZRPOS
  1789. ZDATA data ...
  1790. ZEOF
  1791.            ZRINIT
  1792. ZFIN
  1793.            ZFIN
  1794. OO
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803. Chapter    12         Rev Oct-14-88  Typeset 10-14-88            30
  1804.  
  1805. Chapter    12             ZMODEM Protocol                31
  1806.  
  1807.  
  1808.  
  1809. 12.2  CCCChhhhaaaalllllllleeeennnnggggeeee    aaaannnndddd CCCCoooommmmmmmmaaaannnndddd DDDDoooowwwwnnnnllllooooaaaadddd
  1810.  
  1811.  
  1812. Sender            Receiver
  1813.  
  1814. "rz\r"
  1815. ZRQINIT(ZCOMMAND)
  1816.             ZCHALLENGE(random-number)
  1817. ZACK(same-number)
  1818.             ZRINIT
  1819. ZCOMMAND, ZDATA
  1820.             (Performs Command)
  1821.             ZCOMPL
  1822. ZFIN
  1823.             ZFIN
  1824. OO
  1825.  
  1826.  
  1827. 13.  ZZZZFFFFIIIILLLLEEEE FFFFRRRRAAAAMMMMEEEE FFFFIIIILLLLEEEE IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  1828.  
  1829. ZMODEM sends the same file information with the    ZZZZFFFFIIIILLLLEEEE frame data
  1830. that YMODEM Batch sends    in its block 0.
  1831.  
  1832. NNNN....BBBB....:::: TTTThhhheeee ppppaaaatttthhhhnnnnaaaammmmeeee ((((ffffiiiilllleeee nnnnaaaammmmeeee)))) ffffiiiieeeelllldddd iiiissss    mmmmaa
  1833. aannnnddddaaaattttoooorrrryyyy....
  1834.  
  1835. Pathname The pathname (conventionally, the file    name) is sent as a
  1836.      null terminated ASCII string.  This is the    filename format    used
  1837.      by    the handle oriented MSDOS(TM) functions    and C library fopen
  1838.      functions.     An assembly language example follows:
  1839.                DB      'foo.bar',0
  1840.      No    spaces are included in the pathname.  Normally only the    file
  1841.      name stem (no directory prefix) is    transmitted unless the
  1842.      sender has    selected YAM's ffff option    to send    the ffffuuuullllllll absolute or
  1843.      relative pathname.     The source drive designator (A:, B:, etc.)
  1844.      usually is    not sent.
  1845.  
  1846.              FFFFiiiilllleeeennnnaaaammmmeeee CCCCoooonnnnssssiiiiddddeeeerrrraaaattttiiiioooonnnnssss
  1847.  
  1848.     o+ File names should be translated to lower case    unless the
  1849.       sending system supports upper/lower case file    names.    This
  1850.       is a convenience for users of    systems    (such as Unix) which
  1851.       store    filenames in upper and lower case.
  1852.  
  1853.     o+ The receiver should accommodate file names in    lower and
  1854.       upper    case.
  1855.  
  1856.     o+ When transmitting files between different operating
  1857.       systems, file    names must be acceptable to both the sender
  1858.       and receiving    operating systems.  If not, transformations
  1859.       should be applied to make the    file names acceptable.    If
  1860.       the transformations are unsuccessful,    a new file name    may
  1861.  
  1862.  
  1863.  
  1864. Chapter    13         Rev Oct-14-88  Typeset 10-14-88            31
  1865.  
  1866. Chapter    13             ZMODEM Protocol                32
  1867.  
  1868.  
  1869.  
  1870.       be invented be the receiving program.
  1871.  
  1872.      If    directories are    included, they are delimited by    /; i.e.,
  1873.      "subdir/foo" is acceptable, "subdir\foo" is not.
  1874.  
  1875. Length The file    length and each    of the succeeding fields are
  1876.      optional.[1] The length field is stored as    a decimal string
  1877.      counting the number of data bytes in the file.
  1878.  
  1879.      The ZMODEM    receiver uses the file length as an estimate only.
  1880.      It    may be used to display an estimate of the transmission time,
  1881.      and may be    compared with the amount of free disk space.  The
  1882.      actual length of the received file    is determined by the data
  1883.      transfer.    A file may grow    after transmission commences, and
  1884.      all the data will be sent.
  1885.  
  1886. Modification Date A single space separates the modification date
  1887.      from the file length.
  1888.  
  1889.      The mod date is optional, and the filename    and length may be
  1890.      sent without requiring the    mod date to be sent.
  1891.  
  1892.      The mod date is sent as an    octal number giving the    time the
  1893.      ccccoooonnnntttteeeennnnttttssss of the file were last changed measured in    seconds    from
  1894.      Jan 1 1970    Universal Coordinated Time (GMT).  A date of 0
  1895.      implies the modification date is unknown and should be left as
  1896.      the date the file is received.
  1897.  
  1898.      This standard format was chosen to    eliminate ambiguities
  1899.      arising from transfers between different time zones.
  1900.  
  1901.  
  1902. File Mode A single space separates the file mode from the
  1903.      modification date.     The file mode is stored as an octal string.
  1904.      Unless the    file originated    from a Unix system, the    file mode is
  1905.      set to 0.    rz(1) checks the file mode for the 0x8000 bit which
  1906.      indicates a Unix type regular file.  Files    with the 0x8000    bit
  1907.      set are assumed to    have been sent from another Unix (or
  1908.      similar) system which uses    the same file conventions.  Such
  1909.      files are not translated in any way.
  1910.  
  1911.  
  1912. Serial Number A    single space separates the serial number from the
  1913.      file mode.     The serial number of the transmitting program is
  1914.      stored as an octal    string.     Programs which    do not have a serial
  1915.  
  1916.  
  1917. __________
  1918.  
  1919.  1. Fields may not be skipped.
  1920.  
  1921.  
  1922.  
  1923.  
  1924. Chapter    13         Rev Oct-14-88  Typeset 10-14-88            32
  1925.  
  1926. Chapter    13             ZMODEM Protocol                33
  1927.  
  1928.  
  1929.  
  1930.      number should omit    this field, or set it to 0.  The receiver's
  1931.      use of this field is optional.
  1932.  
  1933.  
  1934. Number of Files    Remaining Iff the number of files remaining is sent,
  1935.      a single space separates this field from the previous field.
  1936.      This field    is coded as a decimal number, and includes the
  1937.      current file.  This field is an estimate, and incorrect values
  1938.      must not be allowed to cause loss of data.     The receiver's    use
  1939.      of    this field is optional.
  1940.  
  1941.  
  1942. Number of Bytes    Remaining Iff the number of bytes remaining is sent,
  1943.      a single space separates this field from the previous field.
  1944.      This field    is coded as a decimal number, and includes the
  1945.      current file.  This field is an estimate, and incorrect values
  1946.      must not be allowed to cause loss of data.     The receiver's    use
  1947.      of    this field is optional.
  1948.  
  1949.  
  1950. File Type Iff the file type is sent, a single space separates this
  1951.      field from    the previous field.  This field    is coded as a
  1952.      decimal number.  Currently    defined    values are:
  1953.  
  1954.      0      Sequential file - no special type
  1955.  
  1956.      1      Other    types to be defined.
  1957.      The receiver's use    of this    field is optional.
  1958.  
  1959.  
  1960. The file information is    terminated by a    null.  If only the pathname
  1961. is sent, the pathname is terminated with ttttwwwwoooo nulls.  The length    of
  1962. the file information subpacket,    including the trailing null, must
  1963. not exceed 1024    bytes; a typical length    is less    than 64    bytes.
  1964.  
  1965.  
  1966.  
  1967.  
  1968. 14.  PPPPEEEERRRRFFFFOOOORRRRMMMMAAAANNNNCCCCEEEE RRRREEEESSSSUUUULLLLTTTTSSSS
  1969.  
  1970. 14.1  CCCCoooommmmppppaaaattttiiiibbbbiiiilllliiiittttyyyy
  1971.  
  1972. Extensive testing has demonstrated ZMODEM to be    compatible with
  1973. satellite links, packet    switched networks, microcomputers,
  1974. minicomputers, regular and error correcting buffered modems at 75 to
  1975. 19200 bps.  ZMODEM's economy of    reverse    channel    bandwidth allows
  1976. modems that dynamically    partition bandwidth between the    two
  1977. directions to operate at optimal speeds.
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. Chapter    14         Rev Oct-14-88  Typeset 10-14-88            33
  1985.  
  1986. Chapter    14             ZMODEM Protocol                34
  1987.  
  1988.  
  1989.  
  1990. 14.2  TTTThhhhrrrroooouuuugggghhhhppppuuuutttt
  1991.  
  1992. Between    two single task    PC-XT computers    sending    a program image    on
  1993. an in house Telenet link, SuperKermit provided 72 ch/sec throughput
  1994. at 1200    baud.  YMODEM-k    yielded    85 chars/sec, and ZMODEM provided
  1995. 113 chars/sec.    XMODEM was not measured, but would have    been much
  1996. slower based on    observed network propagation delays.
  1997.  
  1998. Recent tests downloading large binary files to an IBM PC (4.7 mHz
  1999. V20) running YAMK 16.30    with table driven 32 bit CRC calculation
  2000. yielded    a throughput of    1870 cps on a 19200 bps    direct connection.
  2001.  
  2002. Tests with TELEBIT TrailBlazer modems have shown transfer rates
  2003. approaching 1400 characters per    second for long    files.    When files
  2004. are compressed,    effective transfer rates of 2000 characters per
  2005. second are possible.
  2006.  
  2007.  
  2008. 14.3  EEEErrrrrrrroooorrrr RRRReeeeccccoooovvvveeeerrrryyyy
  2009.  
  2010. Some tests of ZMODEM protocol error recovery performance have been
  2011. made.  A PC-AT with SCO    SYS V Xenix or DOS 3.1 was connected to    a PC
  2012. with DOS 2.1 either directly at    9600 bps or with unbuffered dial-up
  2013. 1200 bps modems.  The ZMODEM software was configured to    use 1024
  2014. byte data subpacket lengths above 2400 bps, 256    otherwise.
  2015.  
  2016. Because    no time    delays are necessary in    normal file transfers, per
  2017. file negotiations are much faster than with YMODEM, the    only
  2018. observed delay being the time required by the program(s) to update
  2019. logging    files.
  2020.  
  2021. During a file transfer,    a short    line hit seen by the receiver
  2022. usually    induces    a CRC error.  The interrupt sequence is    usually    seen
  2023. by the sender before the next data subpacket is    completely sent, and
  2024. the resultant loss of data throughput averages about half a data
  2025. subpacket per line hit.     At 1200 bps this is would be about .75
  2026. second lost per    hit.  At 10-5 error rate, this would degrade
  2027. throughput by about 9 per cent.
  2028.  
  2029. The throughput degradation increases with increasing channel delay,
  2030. as more    data subpackets    in transit through the channel are discarded
  2031. when an    error is detected.
  2032.  
  2033. A longer noise burst that affects both the receiver and    the sender's
  2034. reception of the interrupt sequence usually causes the sender to
  2035. remain silent until the    receiver times out in 10 seconds.  If the
  2036. round trip channel delay exceeds the receiver's    10 second timeout,
  2037. recovery from this type    of error may become difficult.
  2038.  
  2039. Noise affecting    only the sender    is usually ignored, with one common
  2040. exception.  Spurious XOFF characters generated by noise    stop the
  2041.  
  2042.  
  2043.  
  2044. Chapter    14         Rev Oct-14-88  Typeset 10-14-88            34
  2045.  
  2046. Chapter    14             ZMODEM Protocol                35
  2047.  
  2048.  
  2049.  
  2050. sender until the receiver times    out and    sends an interrupt sequence
  2051. which concludes    with an    XON.
  2052.  
  2053. In summation, ZMODEM performance in the    presence of errors resembles
  2054. that of    X.PC and SuperKermit.  Short bursts cause minimal data
  2055. retransmission.     Long bursts (such as pulse dialing noises) often
  2056. require    a timeout error    to restore the flow of data.
  2057.  
  2058.  
  2059. 15.  PPPPAAAACCCCKKKKEEEETTTT SSSSWWWWIIIITTTTCCCCHHHHEEEEDDDD NNNNEEEETTTTWWWWOOOORRRRKKKK CCCCOOOONNNNSSSSIIIIDDDDEEEERRRRAAAATTTTIIIIOOOONNNNSS
  2060. SS
  2061.  
  2062. Flow control is    necessary for printing messages    and directories, and
  2063. for streaming file transfer protocols.    A non transparent flow
  2064. control    is incompatible    with XMODEM and    YMODEM transfers.  XMODEM
  2065. and YMODEM protocols require complete transparency of all 256 8    bit
  2066. codes to operate properly.
  2067.  
  2068. The "best" flow    control    (when X.25 or hardware CTS is unavailable)
  2069. would not "eat"    any characters at all.    When the PAD's buffer almost
  2070. fills up, an XOFF should be emitted.  When the buffer is no longer
  2071. nearly full, send an XON.  Otherwise, the network should neither
  2072. generate nor eat XON or    XOFF control characters.
  2073.  
  2074. On Telenet, this can be    met by setting CCIT X3 5:1 and 12:0 at bbbbooootttthhhh
  2075. ends of    the network.  For best throughput, parameter 64    (advance
  2076. ACK) should be set to something    like 4.     Packets should    be forwarded
  2077. when the packet    is a full 128 bytes, or    after a    moderate delay
  2078. (3:0,4:10,6:0).
  2079.  
  2080. With PC-Pursuit, it is sufficient to set parameter 5 to    1 at both
  2081. ends after one is connected to the remote modem.
  2082.  
  2083.     <ENTER>@<ENTER>
  2084.     set 5:1<ENTER>
  2085.     rst? 5:1<ENTER>
  2086.     cont<ENTER>
  2087.  
  2088. Unfortunately, many PADs do not    accept the "rst?" command.
  2089.  
  2090. For YMODEM, PAD    buffering should guarantee that    a minimum of 1040
  2091. characters can be sent in a burst without loss of data or generation
  2092. of flow    control    characters.  Failure to    provide    this buffering will
  2093. generate excessive retries with    YMODEM.
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105. Chapter    15         Rev Oct-14-88  Typeset 10-14-88            35
  2106.  
  2107. Chapter    15             ZMODEM Protocol                36
  2108.  
  2109.  
  2110.  
  2111.          TTTTAAAABBBBLLLLEEEE 1111....  Network and Flow    Control    Compatibility
  2112.  
  2113. ______________________________________________________________________________
  2114. |   Connectivity    |  Interactive|  XMODEM|  WXMODEM|    SUPERKERMIT|  ZMODEM |
  2115. _|________________________________________|____________________________|__________________|____________________|____________________________|____________________|_
  2116. _|____________________|______________|_________|__________|______________|__________|
  2117. |Direct    Connect        |  YES      |  YES   |  YES    |    YES       |  YES    |
  2118. _|____________________|______________|_________|__________|______________|__________|
  2119. |Network, no FC        |  nnnnoooo      |  YES   |  (4)    |    (6)       |  YES (1)|
  2120. _|____________________|______________|_________|__________|______________|__________|
  2121. |Net, transparent FC|  YES      |  YES   |  YES    |    YES       |  YES    |
  2122. _|____________________|______________|_________|__________|______________|__________|
  2123. |Net, non-trans. FC |  YES      |  nnnnoooo       |  no (5) |    YES       |  YES    |
  2124. _|____________________|______________|_________|__________|______________|__________|
  2125. |Network, 7 bit        |  YES      |  nnnnoooo       |  no     |    YES (2)       |  YES (3)|
  2126. _|____________________|______________|_________|__________|______________|__________|
  2127.  
  2128. (1) ZMODEM can optimize    window size or burst length for    fastest
  2129. transfers.
  2130. (2) Parity bits    must be    encoded, slowing binary    transfers.
  2131. (3) Natural protocol extension possible    for encoding data to 7 bits.
  2132. (4) Small WXMODEM window size may may allow operation.
  2133. (5) Some flow control codes are    not escaped in WXMODEM.
  2134. (6) Kermit window size must be reduced to avoid    buffer overrun.
  2135.  
  2136.  
  2137. 16.  PPPPEEEERRRRFFFFOOOORRRRMMMMAAAANNNNCCCCEEEE CCCCOOOOMMMMPPPPAAAARRRRIIIISSSSOOOONNNN TTTTAAAABBBBLLLLEEEESSSS
  2138.  
  2139.  
  2140. "Round Trip Delay Time"    includes the time for the last byte in a
  2141. packet to propagate through the    operating systems and network to the
  2142. receiver, plus the time    for the    receiver's response to that packet
  2143. to propagate back to the sender.
  2144.  
  2145. The figures shown below    are calculated for round trip delay times of
  2146. 40 milliseconds    and 5 seconds.    Shift registers    in the two computers
  2147. and a pair of 212 modems generate a round trip delay time on the
  2148. order of 40 milliseconds.  Operation with busy timesharing computers
  2149. and networks can easily    generate round trip delays of five seconds.
  2150. Because    the round trip delays cause visible interruptions of data
  2151. transfer when using XMODEM protocol, the subjective effect of these
  2152. delays is greatly exaggerated, especially when the user    is paying
  2153. for connect time.
  2154.  
  2155. A 102400 byte binary file with randomly    distributed codes is sent at
  2156. 1200 bps 8 data    bits, 1    stop bit.  The calculations assume no
  2157. transmission errors.  For each of the protocols, only the per file
  2158. functions are considered.  Processor and I/O overhead are not
  2159. included.  YM-k    refers to YMODEM with 1024 byte    data packets.  YM-g
  2160. refers to the YMODEM "g" option.  ZMODEM uses 256 byte data
  2161. subpackets for this example.  SuperKermit uses maximum standard
  2162.  
  2163.  
  2164.  
  2165. Chapter    16         Rev Oct-14-88  Typeset 10-14-88            36
  2166.  
  2167. Chapter    16             ZMODEM Protocol                37
  2168.  
  2169.  
  2170.  
  2171. packet size, 8 bit transparent transmission, no    run length
  2172. compression.  The 4 block WXMODEM window is too    small to span the 5
  2173. second delay in    this example; the resulting thoughput degradation is
  2174. ignored.
  2175.  
  2176. For comparison,    a straight "dump" of the file contents with no file
  2177. management or error checking takes 853 seconds.
  2178.  
  2179.          TTTTAAAABBBBLLLLEEEE 2222....  Protocol Overhead Information
  2180.        (102400 byte    binary file, 5 Second Round Trip)
  2181.  
  2182. ____________________________________________________________________________
  2183. |      Protocol          |     XMODEM|  YM-k |  YM-g|     ZMODEM|  SKermit|  WXMODEM|
  2184. _|____________________________________________|__________________|________________|______________|__________________|____________________|____________________|_
  2185. _|______________________|_________|________|_______|_________|__________|__________|
  2186. |Protocol Round    Trips |     804   |  104  |  5   |     5     |  5     |  4       |
  2187. _|______________________|_________|________|_______|_________|__________|__________|
  2188. |Trip Time at 40ms    |     32s   |  4s   |  0   |     0     |  0     |  0       |
  2189. _|______________________|_________|________|_______|_________|__________|__________|
  2190. |Trip Time at 5s      |     4020s |  520s |  25s |     25s   |  25     |  20       |
  2191. _|____________________________________________|__________________|________________|______________|__________________|____________________|____________________|_
  2192. _|______________________|_________|________|_______|_________|__________|__________|
  2193. |Overhead Characters  |     4803  |  603  |  503 |     3600  |  38280     |  8000   |
  2194. _|____________________________________________|__________________|________________|______________|__________________|____________________|____________________|_
  2195. _|______________________|_________|________|_______|_________|__________|__________|
  2196. |Line Turnarounds     |     1602  |  204  |  5   |     5     |  2560     |  1602   |
  2197. _|____________________________________________|__________________|________________|______________|__________________|____________________|____________________|_
  2198. _|______________________|_________|________|_______|_________|__________|__________|
  2199. |Transfer Time at 0s  |     893s  |  858s |  857s|     883s  |  1172s     |  916s   |
  2200. _|______________________|_________|________|_______|_________|__________|__________|
  2201. |Transfer Time at 40ms|     925s  |  862s |  857s|     883s  |  1172s     |  916s   |
  2202. _|______________________|_________|________|_______|_________|__________|__________|
  2203. |Transfer Time at 5s  |     5766s |  1378s|  882s|     918s  |  1197s     |  936s   |
  2204. _|______________________|_________|________|_______|_________|__________|__________|
  2205.  
  2206.  
  2207.          FFFFiiiigggguuuurrrreeee    5555....  Transmission Time Comparison
  2208.        (102400 byte    binary file, 5 Second Round Trip)
  2209.  
  2210. ************************************************** XMODEM
  2211. ************ YMODEM-K
  2212. ********** SuperKermit (Sliding    Windows)
  2213. *******    ZMODEM 16kb Segmented Streaming
  2214. *******    ZMODEM Full Streaming
  2215. *******    YMODEM-G
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225. Chapter    16         Rev Oct-14-88  Typeset 10-14-88            37
  2226.  
  2227. Chapter    16             ZMODEM Protocol                38
  2228.  
  2229.  
  2230.  
  2231.     TTTTAAAABBBBLLLLEEEE 3333....  Local    Timesharing Computer Download Performance
  2232.  
  2233. __________________________________________________________________________
  2234. |    Command    |  Protocol|  Time/HD|    Time/FD|  Throughput|  Efficiency|
  2235. _|________________________________|______________________|____________________|____________________|__________________________|__________________________|_
  2236. _|________________|___________|__________|__________|_____________|_____________|
  2237. |kermit    -x    |  Kermit  |  1:49   |    2:03   |  327        |  34%     |
  2238. _|________________|___________|__________|__________|_____________|_____________|
  2239. |sz -Xa    phones.t|  XMODEM  |  1:20   |    1:44   |  343        |  36%     |
  2240. _|________________|___________|__________|__________|_____________|_____________|
  2241. |sz -a phones.t    |  ZMODEM  |   :39   |     :48   |  915        |  95%     |
  2242. _|________________|___________|__________|__________|_____________|_____________|
  2243.  
  2244.  
  2245. Times were measured downloading    a 35721    character text file at 9600
  2246. bps, from Santa    Cruz SysV 2.1.2    Xenix on a 9 mHz IBM PC-AT to DOS
  2247. 2.1 on an IBM PC.  Xenix was in    multiuser mode but otherwise idle.
  2248. Transfer times to PC hard disk and floppy disk destinations are
  2249. shown.
  2250.  
  2251. C-Kermit 4.2(030) used server mode and file compression, sending to
  2252. Pro-YAM    15.52 using 0 delay and    a "get phones.t" command.
  2253.  
  2254. Crosstalk XVI 3.6 used XMODEM 8    bit checksum (CRC not available) and
  2255. an "ESC    rx phones.t" command.  The Crosstalk time does nnnnooootttt include
  2256. the time needed    to enter the extra commands not    needed by Kermit and
  2257. ZMODEM.
  2258.  
  2259. Professional-YAM used ZMODEM AutoDownload.  ZMODEM times included a
  2260. security challenge to the sending program.
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285. Chapter    16         Rev Oct-14-88  Typeset 10-14-88            38
  2286.  
  2287. Chapter    16             ZMODEM Protocol                39
  2288.  
  2289.  
  2290.  
  2291.               TTTTAAAABBBBLLLLEEEE 4444....    File Transfer Speeds
  2292.  
  2293. ______________________________________________________________________________
  2294. | Prot           file       bytes    bps        ch/sec           Notes         |
  2295. _|__________________________________________________________________________________________________________________________________________________________|_
  2296. |X      jancol.c       18237    2400   53           Tymnet PTL 5/3/87     |
  2297. |X      source.xxx       6143        2400   56           Source PTL 5/29/87    |
  2298. |X      jancol.c       18237    2400   64           Tymnet PTL         |
  2299. |XN      tsrmaker.arc       25088    1200   94           GEnie PTL         |
  2300. |B/ovth      emaibm.arc       51200    1200   101           CIS PTL MNP         |
  2301. |UUCP      74 files, each   >7000    1200   102           (Average)         |
  2302. |ZM      jancol.c       18237    1200   112           DataPac (604-687-7144)|
  2303. |X/ovth      emaibm.arc       51200    1200   114           CIS PTL MNP         |
  2304. |ZM      emaibm.arc       51200    1200   114           CIS PTL MNP         |
  2305. |ZM      frombyte87.txt   62506    1200   117           BIX             |
  2306. |SK      source.xxx       6143        2400   170           Source PTL 5/29/87    |
  2307. |ZM      jancol.c       18237    2400   221           Tymnet PTL upl/dl     |
  2308. |B/ovth      destro.gif       33613    2400   223           CIS/PTL 9-12-87         |
  2309. |ZM      jancol.c       18237    2400   224           Tymnet PTL         |
  2310. |ZM      tp40kerm.arc       112640   2400   224           BIX 6/88             |
  2311. |ZM      readme.lis       9466        2400   231           BIX 6/88             |
  2312. |ZM      jancol.c       18237    2400   226/218     TeleGodzilla upl         |
  2313. |ZM      jancol.c       18237    2400   226           Tymnet PTL 5/3/87     |
  2314. |ZM      zmodem.ov       35855    2400   227           CIS PTL node         |
  2315. |C      jancol.c       18237    2400   229           Tymnet PTL 5/3/87     |
  2316. |ZM      jancol.c       18237    2400   229/221     TeleGodzilla         |
  2317. |ZM      zmodem.ov       35855    2400   229           CIS PTL node upl         |
  2318. |ZM      jancol.c       18237    2400   232           CIS PTL node         |
  2319. |QB      gifeof.arc       32187    2400   232           CIS PTL node         |
  2320. |ZM      pcpbbs.txt       38423    2400   534           MNP Level 5         |
  2321. |ZM      mbox           473104   9600   948/942     TeleGodzilla upl         |
  2322. |ZM      zmodem.arc       318826   14k       1357/1345   TeleGodzilla         |
  2323. |ZM      mbox           473104   14k       1367/1356   TeleGodzilla upl         |
  2324. |ZM      c2.doc       218823   38k       3473           Xenix 386 TK upl         |
  2325. |ZM      mbox -a       511893   38k       3860           386 Xenix 2.2 Beta    |
  2326. |ZM      c.doc           218823   57k       5611           AT Clone    & 386         |
  2327. _|_____________________________________________________________________________|
  2328.  
  2329. Times are for downloads    unless noted.  Where two speeds    are noted,
  2330. the faster speed is reported by    the receiver because its transfer
  2331. time calculation excludes the security check and transaction log
  2332. file processing.  The TeleGodzilla computer is a 4.77 mHz IBM PC
  2333. with a 10 MB hard disk.     The 386 computer uses an Intel    motherboard
  2334. at 18 mHz 1ws.    The AT Clone (QIC) runs    at 8 mHz 0ws.
  2335. Abbreviations:
  2336.  B     Compuserve B Protocol
  2337.  QB    Compuserve Quick-B/B+ Protocol
  2338.  B/ovth            CIS B with Omen    Technology OverThruster(TM)
  2339.  C     Capture DC2/DC4 (no protocol)
  2340.  K     Kermit
  2341.  MNP   Microcom    MNP error correcting SX/1200 modem
  2342.  
  2343.  
  2344.  
  2345. Chapter    16         Rev Oct-14-88  Typeset 10-14-88            39
  2346.  
  2347. Chapter    16             ZMODEM Protocol                40
  2348.  
  2349.  
  2350.  
  2351.  PTL   Portland    Oregon network node
  2352.  SK    Sliding Window Kermit (SuperKermit) w=15
  2353.  X     XMODEM
  2354.  XN    XMODEM protocol implemented in network modes
  2355.  X/ovth            XMODEM,    Omen Technology    OverThruster(TM)
  2356.  ZM    ZMODEM
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405. Chapter    16         Rev Oct-14-88  Typeset 10-14-88            40
  2406.  
  2407. Chapter    16             ZMODEM Protocol                41
  2408.  
  2409.  
  2410.  
  2411.                TTTTAAAABBBBLLLLEEEE 5555....     Protocol Checklist
  2412. Etc: Relay, BLAST, DART
  2413.  
  2414. _________________________________________________________________________
  2415. |Item               XMODEM  YMDM-k   YMDM-g  ZMODEM  SK        Etc.|
  2416. _|________________________________________________|__________________|__________________|________________|________________|________________|____________|_
  2417. |IIIINNNN SSSSEEEERRRRVVVVIIIICCCCEEEE        |  1977     | 1982      | 1985  | 1986  | 1985  | ?    |
  2418. |VENDORS        |  ??     | ??      | >20      | >20      | ??      | 1    |
  2419. _|________________________________________________|__________________|__________________|________________|________________|________________|____________|_
  2420. |HOST AVAILABILITY    |     |      |      |      |      |    |
  2421. |Compuserve        |  YES     | -      | -      | YES      | -      | -    |
  2422. |BIX            |  YES     | -      | -      | YES      | YES      | -    |
  2423. |Portal            |     |      | YES      | -      | -      | SOON|
  2424. |The Source        |  YES     | -      | -      | -      | YES      | -    |
  2425. _|________________________|_________|_________|________|________|________|______|
  2426. |UUUUSSSSEEEERRRR FFFFEEEEAAAATTTTUUUURRRREEEESSSS        |     |      |      |      |      |    |
  2427. |User Friendly        |  -     | -      | -      | YES      | (10)  | -    |
  2428. |Commands/batch        |  2*N     | 2      | 2      | 1      | 1(1)  |    |
  2429. |Commands/file        |  2     | 0      | 0      | 0      | 0      |    |
  2430. |Command Download    |  -     | -      | -      | YES      | YES(6)| -    |
  2431. |Menu Compatible    |  -     | -      | -      | YES      | -      | -    |
  2432. |Crash Recovery        |  -     | -      | -      | YES      | -      | ??    |
  2433. |File Management    |  -     | -      | -      | YES      | -      | some|
  2434. |Security Check        |  -     | -      | -      | YES      | -      | -    |
  2435. _|________________________|_________|_________|________|________|________|______|
  2436. |CCCCOOOOMMMMPPPPAAAATTTTIIIIBBBBIIIILLLLIIIITTTTYYYY        |     |      |      |      |      |    |
  2437. |Dynamic Files        |  YES     | -      | -      | YES      | YES      | ?    |
  2438. |Packet    SW NETS        |  -     | -      | -      | YES      | YES      | ?    |
  2439. |7 bit PS NETS        |  -     | -      | -      | (3)      | YES      | ?    |
  2440. |Old Mainframes        |  -     | -      | -      | (3)      | YES      | ?    |
  2441. _|________________________|_________|_________|________|________|________|______|
  2442. |AAAATTTTTTTTRRRRIIIIBBBBUUUUTTTTEEEESSSS        |     |      |      |      |      |    |
  2443. |Reliability(5)        |  fair     | fair(5)| none  | BEST  | good  | ?    |
  2444. |Streaming        |  -     | -      | YES      | YES      | YES      |    |
  2445. |Overhead(2)        |  7%     | 1%      | 1%      | 4%(8) | 30%      |    |
  2446. |Faithful Xfers        |  -     | YES(7) | YES(7)| YES      | YES      | ?    |
  2447. |Preserve Date        |  -     | YES      | YES      | YES      | -      | ?    |
  2448. _|________________________|_________|_________|________|________|________|______|
  2449. |CCCCOOOOMMMMPPPPLLLLEEEEXXXXIIIITTTTYYYY        |     |      |      |      |      |    |
  2450. |No-Wait Sample        |  -     | -      | -      | opt      | REQD  | REQD|
  2451. |Ring Buffers        |  -     | -      | -      | opt      | REQD  | REQD|
  2452. |Complexity        |  LOW(5)| LOW(5) | LOW      | MED      | HIGH  | ?    |
  2453. _|________________________|_________|_________|________|________|________|______|
  2454. |EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS        |     |      |      |      |      |    |
  2455. |Server    Operation    |  -     | -      | -      | YES(4)| YES      | ?    |
  2456. |Multiple Threads    |  -     | -      | -      | future| -      | -    |
  2457. _|________________________________________________|__________________|__________________|________________|________________|________________|____________|_
  2458.  
  2459. NOTES:
  2460. (1) Server mode    or Omen    Technology Kermit AutoDownload
  2461. (2) Character count, binary file, transparent channel
  2462.  
  2463.  
  2464.  
  2465. Chapter    16         Rev Oct-14-88  Typeset 10-14-88            41
  2466.  
  2467. Chapter    16             ZMODEM Protocol                42
  2468.  
  2469.  
  2470.  
  2471. (3) Future enhancement provided    for
  2472. (4) AutoDownload operation
  2473. (5) Omen Technology's CCCCyyyybbbbeeeerrrrnnnneeeettttiiiicccc DDDDaaaattttaaaa RRRReeeeccccoooovvvveeeerrrryyyy((((TTTTMMMM)))) improves XMODEM
  2474. and YMODEM reliability with complex proprietary    logic.
  2475. (6) Server commands only
  2476. (7) Only with True YMODEM(TM)
  2477. (8) More then 3% from protected    network    control    characters
  2478. (9) With Segmented Streaming
  2479. (10) With Pro-YAM extensions
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525. Chapter    16         Rev Oct-14-88  Typeset 10-14-88            42
  2526.  
  2527. Chapter    16             ZMODEM Protocol                43
  2528.  
  2529.  
  2530.  
  2531. 17.  FFFFUUUUTTTTUUUURRRREEEE EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS
  2532.  
  2533. Future extensions include:
  2534.  
  2535.    o+ Compatibility with    7 bit networks
  2536.  
  2537.    o+ Server/Link Level operation: An END-TO-END    error corrected
  2538.      program to    program    session    is required for    financial and other
  2539.      sensitive applications.
  2540.  
  2541.    o+ Multiple independent threads
  2542.  
  2543.    o+ Bidirectional transfers (STEREO ZMODEM)
  2544.  
  2545.    o+ Encryption
  2546.  
  2547.    o+ Compression
  2548.  
  2549.    o+ File Comparison
  2550.  
  2551.    o+ Selective transfer    within a file (e.g., modified segments of a
  2552.      database file)
  2553.  
  2554.    o+ Selective Retransmission for error    correction
  2555.  
  2556.  
  2557. 18.  RRRREEEEVVVVIIIISSSSIIIIOOOONNNNSSSS
  2558.  
  2559. 10-14-88 Pascal    source code now    available in Phil Burn's PibTerm
  2560. v4.2.  6-24-88    An exception to    the previously unconditional ZCBIN
  2561. override: a ZCRESUM specified by the receiver need not be overridden
  2562. by the sender's    ZCBIN.
  2563.  
  2564. 11-18-87 Editorial improvements
  2565.  
  2566. 10-27-87 Optional fields added for number of files remaining to    be
  2567. sent and total number of bytes remaining to be sent.
  2568.  
  2569. 07-31-1987 The receiver    should ignore a    ZEOF with an offset that
  2570. does not match the current file    length.     The previous action of
  2571. responding with    ZRPOS caused transfers to fail if a CRC    error
  2572. occurred immediately before end    of file, because two retransmission
  2573. requests were being sent for each error.  This has been    observed
  2574. under exceptional conditions, such as data transmission    at speeds
  2575. greater    than the receiving computer's interrupt    response capabilitiy
  2576. or gross misapplication    of flow    control.
  2577.  
  2578. Discussion of the Tx backchannel garbage count and ZCRCW after error
  2579. ZRPOS was added.  Many revisions for clarity.
  2580.  
  2581. 07-09-87 Corrected XMODEM's development    date, incorrectly stated as
  2582.  
  2583.  
  2584.  
  2585. Chapter    18         Rev Oct-14-88  Typeset 10-14-88            43
  2586.  
  2587. Chapter    18             ZMODEM Protocol                44
  2588.  
  2589.  
  2590.  
  2591. 1979 instead of    the actual August 1977.     More performance data was
  2592. added.
  2593.  
  2594. 05-30-87 Added ZMNEW and ZMSKNOLOC
  2595.  
  2596. 05-14-87 Window    management, ZACK zshhdr    XON removed, control
  2597. character escaping, ZMSPARS changed to ZXPARS, editorial changes.
  2598.  
  2599. 04-13-87  The ZMODEM file transfer protocol's public domain status
  2600. is emphasized.
  2601.  
  2602. 04-04-87: minor    editorial changes, added conditionals for overview
  2603. version.
  2604.  
  2605. 03-15-87: 32 bit CRC added.
  2606.  
  2607. 12-19-86: 0 Length ZCRCW data subpacket    sent in    response to ZPAD or
  2608. ZDELE detected on reverse channel has been changed to ZCRCE.  The
  2609. reverse    channel    is now checked for activity before sending each
  2610. ZDATA header.
  2611.  
  2612. 11-08-86: Minor    changes    for clarity.
  2613.  
  2614. 10-2-86:  ZCNL definition expanded.
  2615.  
  2616. 9-11-86:  ZMPROT file management option    added.
  2617.  
  2618. 8-20-86:  More performance data    included.
  2619.  
  2620. 8-4-86:     ASCII DLE (Ctrl-P, 020) now escaped; compatible with
  2621. previous versions.  More document revisions for    clarity.
  2622.  
  2623. 7-15-86: This document was extensively edited to improve clarity and
  2624. correct    small errors.  The definition of the ZMNEW management option
  2625. was modified, and the ZMDIFF management    option was added.  The
  2626. cancel sequence    was changed from two to    five CAN characters after
  2627. spurious two character cancel sequences    were detected.
  2628.  
  2629.  
  2630. 19.  MMMMOOOORRRREEEE IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  2631.  
  2632. Please contact Omen Technology for troff source    files and typeset
  2633. copies of this document.
  2634.  
  2635.  
  2636. 19.1  TTTTeeeelllleeeeGGGGooooddddzzzziiiillllllllaaaa BBBBuuuulllllllleeeettttiiiinnnn BBBBooooaaaarrrrdddd
  2637.  
  2638. More information may be    obtained by calling the    TeleGodzilla
  2639. bulletin board at 503-621-3746.     TeleGodzilla supports 19200
  2640. (Telebit PEP), 2400 and    1200 bps callers with automatic    speed
  2641. recognition.
  2642.  
  2643.  
  2644.  
  2645. Chapter    19         Rev Oct-14-88  Typeset 10-14-88            44
  2646.  
  2647. Chapter    19             ZMODEM Protocol                45
  2648.  
  2649.  
  2650.  
  2651. Relevant files include YZMODEM.ZOO, YAMDEMO.ZOO, YAMHELP.ZOO,
  2652. ZCOMMEXE.ARC, ZCOMMDOC.ARC, ZCOMMHLP.ARC.
  2653.  
  2654. Useful commands    for TeleGodzilla include "menu", "dir",    "sx file
  2655. (XMODEM)", "kermit sb file ...", and "sz file ...".
  2656.  
  2657. 19.2  UUUUnnnniiiixxxx UUUUUUUUCCCCPPPP    AAAAcccccccceeeessssssss
  2658.  
  2659. UUCP sites can obtain the current version of this file with
  2660.           uucp omen!/u/caf/public/zmodem.doc /tmp
  2661. A continually updated list of available    files is stored    in
  2662. /usr/spool/uucppublic/FILES.
  2663.        uucp     omen!~uucp/FILES   /usr/spool/uucppublic
  2664.  
  2665. The following L.sys line allows    UUCP to    call site "omen" via Omen's
  2666. bulletin board system "TeleGodzilla".  TeleGodzilla is an instance
  2667. of Omen    Technology's Professional-YAM in host operation, acting    as a
  2668. bulletin board and front ending    a Xenix    system.
  2669.  
  2670. In response to TeleGodzilla's "Name Please:" (e:--e:), uucico gives
  2671. the Pro-YAM "link" command as a    user name.  Telegodzilla then asks
  2672. for a link password (d:).  The password    (Giznoid) controls access to
  2673. the Xenix system connected to the IBM PC's other serial    port.
  2674. Communications between Pro-YAM and Xenix use 9600 bps; YAM converts
  2675. this to    the caller's speed.
  2676.  
  2677. Finally, the calling uucico sees the Xenix "Login:" message (n:--
  2678. n:), and logs in as "uucp".  No    password is used for the uucp
  2679. account.
  2680.  
  2681. omen Any ACU 2400 1-503-621-3746 e:--e:    link d:    Giznoid    n:--n: uucp
  2682.  
  2683.  
  2684.  
  2685. 20.  ZZZZMMMMOOOODDDDEEEEMMMM PPPPRRRROOOOGGGGRRRRAAAAMMMMSSSS
  2686.  
  2687. A copy of this document, a demonstration version of
  2688. Professional-YAM, a flash-up tree structured help file and
  2689. processor, are available in _Y_Z_M_O_D_E_M._Z_O_O    on TeleGodzilla    and other
  2690. bulletin boards.  This file must be unpacked with _L_O_O_Z._E_X_E, also
  2691. available on TeleGodzilla.  _Y_Z_M_O_D_E_M._Z_O_O    may be distributed provided
  2692. none of    the files are deleted or modified without the written
  2693. consent    of Omen    Technology.
  2694.  
  2695. TeleGodzilla and other bulletin    boards also feature ZZZZCCCCOOOOMMMMMMMM, a
  2696. shareware communications program.  ZCOMM includes Omen Technology's
  2697. TurboLearn(TM) Script Writer, ZMODEM, Omen's highly acclaimed XMODEM
  2698. and YMODEM protocol support, Sliding Windows Kermit, several
  2699. traditional protocols, a powerful script language, and the most
  2700. accurate VT100/102 emulation available in a usr    supported program.
  2701. The ZCOMM files    include:
  2702.  
  2703.  
  2704.  
  2705. Chapter    20         Rev Oct-14-88  Typeset 10-14-88            45
  2706.  
  2707. Chapter    20             ZMODEM Protocol                46
  2708.  
  2709.  
  2710.  
  2711.   o+ ZZZZCCCCOOOOMMMMMMMMEEEEXXXXEEEE....AAAARRRRCCCC Executable files and beginner's telephone directory
  2712.  
  2713.   o+ ZZZZCCCCOOOOMMMMMMMMDDDDOOOOCCCC....AAAARRRRCCCC "Universal Line Printer Edition" Manual
  2714.  
  2715.   o+ ZZZZCCCCOOOOMMMMMMMMHHHHLLLLPPPP....AAAARRRRCCCC Tree structured Flash-UP help processor and
  2716.     database
  2717.  
  2718. C source code and manual pages for the Unix/Xenix _r_z and _s_z programs
  2719. are available on TeleGodzilla in _R_Z_S_Z._Z_O_O.  This ZOO archive may be
  2720. unpacked with _L_O_O_Z._E_X_E,    also available on TeleGodzilla.     Most Unix
  2721. like systems are supported, including V7, Sys III, 4.x BSD, SYS    V,
  2722. Idris, Coherent, and Regulus.
  2723.  
  2724. _R_Z_S_Z._Z_O_O includes a ZCOMM/Pro-YAM/PowerCom script _Z_U_P_L._T to upload
  2725. the small (178 lines) YMODEM bootstrap program _M_I_N_I_R_B._C    without    a
  2726. file transfer protocol.     _M_I_N_I_R_B    uses the Unix stty(1) program to set
  2727. the required raw tty modes, and    compiles without special flags on
  2728. virtually all Unix and Xenix systems.  _Z_U_P_L._T directs the Unix
  2729. system to compile _M_I_N_I_R_B, then uses it as a bootstrap to upload    the
  2730. rz/sz source and manual    files.
  2731.  
  2732. Pascal source code for ZMODEM support is available in PibTerm v4.2
  2733. written    by Phil    Burns.
  2734.  
  2735. The PC-DOS EEEEXXXXEEEECCCC----PPPPCCCC,,,, QQQQuuuuiiiicccckkkkBBBBBBBBSSSS,,,, OOOOppppuuuussss and NNNNoooocccchhhhaaaannnnggggeeee    bulletin boards
  2736. support    ZMODEM.     Integrated ZMODEM support for the CCCCoooolllllllliiiieeee bulletin
  2737. board program is planned.  Most    of the PC-DOS bulletin board
  2738. programs that lack integrated ZMODEM support ZMODEM with external
  2739. modules    (DSZ, etc.).
  2740.  
  2741. The BBBBiiiinnnnkkkklllleeeeyyyyTTTTeeeerrrrmmmm,,,, DDDDuuuuttttcccchhhhiiiieeee and DDDD''''BBBBrrrriiiiddddggggeeee email systems support ZMODEM
  2742. as their primary protocol.
  2743.  
  2744. The IIIINNNN----SSSSYYYYNNNNCCCCHHHH PC-DOS Teleconferencing system uses ZMODEM.
  2745.  
  2746. The LAN    modem sharing program LLLLiiiinnnneeee PPPPlllluuuussss    has announced ZMODEM
  2747. support.
  2748.  
  2749. Many programs have added direct    ZMODEM support,    including Crosstalk
  2750. Mark IV, and Telix 3.
  2751.  
  2752. Most other PC-DOS communications programs support external ZMODEM
  2753. via Omen Technology's DSZ, including PibTerm, Qmodem SST and BOYAN.
  2754.  
  2755. The ZZZZMMMMDDDDMMMM communications    program    by Jwahar Bammi    runs on    Atari ST
  2756. machines.
  2757.  
  2758. The OOOOnnnnlllliiiinnnneeee!!!!  and AAAA----TTTTaaaallllkkkk    GGGGoooolllldddd programs for the Amiga support ZMODEM.
  2759.  
  2760. The Byte Information eXchange supports ZMODEM.    The Compuserve
  2761. Information Service has    ported the Unix    rz/sz ZMODEM programs to
  2762.  
  2763.  
  2764.  
  2765. Chapter    20         Rev Oct-14-88  Typeset 10-14-88            46
  2766.  
  2767. Chapter    20             ZMODEM Protocol                47
  2768.  
  2769.  
  2770.  
  2771. DECSYSTEM 20 assembler,    and has    announced future support for ZMODEM.
  2772.  
  2773. 20.1  AAAAddddddddiiiinnnngggg ZZZZMMMMOOOODDDDEEEEMMMM ttttoooo DDDDOOOOSSSS PPPPrrrrooooggggrrrraaaammmmssss
  2774.  
  2775. _D_S_Z is a small shareware program that supports XMODEM, YMODEM, and
  2776. ZMODEM file transfers.    _D_S_Z is designed    to be called from a bulletin
  2777. board program or another communications    program.  It may be called
  2778. as
  2779.              dsz port 2    sz file1 file2
  2780. to send    files, or as
  2781.                dsz port 2 rz
  2782. to receive zero    or more    file(s), or as
  2783.              dsz port 2    rz filea fileb
  2784. to receive two files, the first    to _f_i_l_e_a and the second    (if sent) to
  2785. _f_i_l_e_b.    This form of _d_s_z may be    used to    control    the pathname of
  2786. incoming file(s).  In this example, if the sending program attempted
  2787. to send    a third    file, the transfer would be terminated.
  2788.  
  2789. _D_s_z uses DOS stdout for    messages (no direct CRT    access), acquires
  2790. the COMM port vectors with standard DOS    calls, and restores the    COMM
  2791. port's interrupt vector    and registers upon exit.
  2792.  
  2793. Further    information on _d_s_z may be found    in _d_s_z._d_o_c and the ZCOMM or
  2794. Pro-YAM    user manuals.
  2795.  
  2796.  
  2797. 21.  YYYYMMMMOOOODDDDEEEEMMMM PPPPRRRROOOOGGGGRRRRAAAAMMMMSSSS
  2798.  
  2799. The Unix _r_z/_s_z programs    support    YMODEM as well as ZMODEM.  Most    Unix
  2800. like systems are supported, including V7, Sys III, 4.2 BSD, SYS    V,
  2801. Idris, Coherent, and Regulus.
  2802.  
  2803. A version for VAX-VMS is available in VRBSB.SHQ, in the    same
  2804. directory.
  2805.  
  2806. Irv Hoff has added 1k packets and YMODEM transfers to the KMD and
  2807. IMP series programs, which replace the XMODEM and MODEM7/MDM7xx
  2808. series respectively.  Overlays are available for a wide    variety    of
  2809. CP/M systems.
  2810.  
  2811. Many other programs, including MEX-PLUS    and Crosstalk Mark IV also
  2812. support    some of    YMODEM's features.
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825. Chapter    21         Rev Oct-14-88  Typeset 10-14-88            47
  2826.  
  2827. Chapter    21             ZMODEM Protocol                48
  2828.  
  2829.  
  2830.  
  2831. Questions about    YMODEM,    the Professional-YAM communications program,
  2832. and requests for evaluation copies may be directed to:
  2833.  
  2834.      Chuck Forsberg
  2835.      Omen Technology Inc
  2836.      17505-V Sauvie Island Road
  2837.      Portland Oregon 97231
  2838.      VOICE: 503-621-3406 :VOICE
  2839.      Modem (TeleGodzilla): 503-621-3746
  2840.      Usenet: ...!tektronix!reed!omen!caf
  2841.      Compuserve: 70007,2304
  2842.      Source: TCE022
  2843.  
  2844.  
  2845. 22.  AAAACCCCKKKKNNNNOOOOWWWWLLLLEEEEDDDDGGGGMMMMEEEENNNNTTTTSSSS
  2846.  
  2847. The High Reliability Software(TM), TurboLearn Script Writer(TM),
  2848. Cybernetic Data    Recovery(TM), AutoDownload(TM),    Intelligent Crash
  2849. Recovery(TM), Error Containment(TM), Full Time Capture(TM), True
  2850. YMODEM(TM), OverThruster(TM), Password Guardian(TM),
  2851. CryptoScript(TM), and TurboDial(TM) are    Omen Technology    trademarks.
  2852.  
  2853. ZMODEM was developed _f_o_r _t_h_e _p_u_b_l_i_c _d_o_m_a_i_n under a Telenet contract.
  2854. The ZMODEM protocol descriptions and the Unix rz/sz program source
  2855. code are public    domain.     No licensing, trademark, or copyright
  2856. restrictions apply to the use of the protocol, the Unix    rz/sz source
  2857. code and the _Z_M_O_D_E_M name.
  2858.  
  2859. Encouragement and suggestions by Thomas    Buck, Ward Christensen,    Earl
  2860. Hall, Irv Hoff,    Stuart Mathison, and John Wales, are gratefully
  2861. acknowledged.  32 bit CRC code courtesy    Gary S.    Brown.
  2862.  
  2863.  
  2864. 23.  RRRREEEELLLLAAAATTTTEEEEDDDD FFFFIIIILLLLEEEESSSS
  2865.  
  2866. The following files may    be useful while    studying this document:
  2867.  
  2868. YYYYMMMMOOOODDDDEEEEMMMM....DDDDOOOOCCCC Describes the XMODEM, XMODEM-1k, and    YMODEM batch file
  2869.     transfer protocols.  This file is available on TeleGodzilla
  2870.     as YMODEM.DQC.
  2871.  
  2872. zzzzmmmmooooddddeeeemmmm....hhhh Definitions for ZMODEM    manifest constants
  2873.  
  2874. rrrrzzzz....cccc,,,, sssszzzz....cccc,,,, rrrrbbbbssssbbbb....cccc Unix    source code for    operating ZMODEM programs.
  2875.  
  2876. rrrrzzzz....1111,,,, sssszzzz....1111 Manual pages    for rz and sz (Troff sources).
  2877.  
  2878. zzzzmmmm....cccc    Operating system independent low level ZMODEM subroutines.
  2879.  
  2880. mmmmiiiinnnniiiirrrrbbbb....cccc A YMODEM bootstrap program, 178 lines.
  2881.  
  2882.  
  2883.  
  2884.  
  2885. Chapter    23         Rev Oct-14-88  Typeset 10-14-88            48
  2886.  
  2887. Chapter    23             ZMODEM Protocol                49
  2888.  
  2889.  
  2890.  
  2891. RRRRZZZZSSSSZZZZ....ZZZZOOOOOOOO,,,,rrrrzzzzsssszzzz....aaaarrrrcccc Contain the C    source code and    manual pages listed
  2892.     above, plus a ZCOMM script to upload minirb.c to a Unix    or
  2893.     Xenix system, compile it, and use the program to upload    the
  2894.     ZMODEM source files with error checking.
  2895.  
  2896. DDDDSSSSZZZZ....ZZZZOOOOOOOO,,,,ddddsssszzzz....aaaarrrrcccc    Contains DSZ.COM, a shareware X/Y/ZMODEM subprogram,
  2897.     DESQview "pif" files for background operation in minimum
  2898.     memory,    and DSZ.DOC.
  2899.  
  2900. ZZZZCCCCOOOOMMMMMMMM****....AAAARRRRCCCC Archive files for ZCOMM, a powerful shareware
  2901.     communications program.
  2902.  
  2903. Chapter    23         Rev Oct-14-88  Typeset 10-14-88            49
  2904.  
  2905.  
  2906.  
  2907.                   CONTENTS
  2908.  
  2909.  
  2910.  1.  INTENDED AUDIENCE................................................     2
  2911.  
  2912.  2.  WHY DEVELOP ZMODEM?..............................................     2
  2913.  
  2914.  3.  ZMODEM Protocol Design Criteria..................................     4
  2915.      3.1    Ease of Use...............................................     4
  2916.      3.2    Throughput................................................     5
  2917.      3.3    Integrity and Robustness..................................     6
  2918.      3.4    Ease of Implementation....................................     6
  2919.  
  2920.  4.  EVOLUTION OF ZMODEM..............................................     7
  2921.  
  2922.  5.  ROSETTA STONE....................................................    10
  2923.  
  2924.  6.  ZMODEM REQUIREMENTS..............................................    10
  2925.      6.1    File Contents.............................................    10
  2926.  
  2927.  7.  ZMODEM BASICS....................................................    12
  2928.      7.1    Packetization.............................................    12
  2929.      7.2    Link Escape    Encoding......................................    12
  2930.      7.3    Header....................................................    13
  2931.      7.4    Binary Data    Subpackets....................................    16
  2932.      7.5    ASCII Encoded Data Subpacket..............................    16
  2933.  
  2934.  8.  PROTOCOL TRANSACTION OVERVIEW....................................    16
  2935.      8.1    Session Startup...........................................    16
  2936.      8.2    File Transmission.........................................    18
  2937.      8.3    Session Cleanup...........................................    20
  2938.      8.4    Session Abort Sequence....................................    20
  2939.  
  2940.  9.  STREAMING TECHNIQUES / ERROR RECOVERY............................    21
  2941.      9.1    Full Streaming with    Sampling..............................    21
  2942.      9.2    Full Streaming with    Reverse    Interrupt.....................    23
  2943.      9.3    Full Streaming with    Sliding    Window........................    23
  2944.      9.4    Full Streaming over    Error Free Channels...................    24
  2945.      9.5    Segmented Streaming.......................................    24
  2946.  
  2947. 10.  ATTENTION SEQUENCE...............................................    24
  2948.  
  2949. 11.  FRAME TYPES......................................................    25
  2950.      11.1   ZRQINIT...................................................    25
  2951.      11.2   ZRINIT....................................................    25
  2952.      11.3   ZSINIT....................................................    25
  2953.      11.4   ZACK......................................................    26
  2954.      11.5   ZFILE.....................................................    26
  2955.      11.6   ZSKIP.....................................................    28
  2956.      11.7   ZNAK......................................................    28
  2957.      11.8   ZABORT....................................................    28
  2958.  
  2959.                   - i -
  2960.  
  2961.      11.9   ZFIN......................................................    28
  2962.      11.10  ZRPOS.....................................................    28
  2963.      11.11  ZDATA.....................................................    29
  2964.      11.12  ZEOF......................................................    29
  2965.      11.13  ZFERR.....................................................    29
  2966.      11.14  ZCRC......................................................    29
  2967.      11.15  ZCHALLENGE................................................    29
  2968.      11.16  ZCOMPL....................................................    29
  2969.      11.17  ZCAN......................................................    29
  2970.      11.18  ZFREECNT..................................................    29
  2971.      11.19  ZCOMMAND..................................................    29
  2972.  
  2973. 12.  SESSION TRANSACTION EXAMPLES.....................................    30
  2974.      12.1   A simple file transfer....................................    30
  2975.      12.2   Challenge and Command Download............................    31
  2976.  
  2977. 13.  ZFILE FRAME FILE INFORMATION.....................................    31
  2978.  
  2979. 14.  PERFORMANCE RESULTS..............................................    33
  2980.      14.1   Compatibility.............................................    33
  2981.      14.2   Throughput................................................    34
  2982.      14.3   Error Recovery............................................    34
  2983.  
  2984. 15.  PACKET SWITCHED NETWORK CONSIDERATIONS...........................    35
  2985.  
  2986. 16.  PERFORMANCE COMPARISON TABLES....................................    36
  2987.  
  2988. 17.  FUTURE EXTENSIONS................................................    43
  2989.  
  2990. 18.  REVISIONS........................................................    43
  2991.  
  2992. 19.  MORE INFORMATION.................................................    44
  2993.      19.1   TeleGodzilla Bulletin Board...............................    44
  2994.      19.2   Unix UUCP Access..........................................    45
  2995.  
  2996. 20.  ZMODEM PROGRAMS..................................................    45
  2997.      20.1   Adding ZMODEM to DOS Programs.............................    47
  2998.  
  2999. 21.  YMODEM PROGRAMS..................................................    47
  3000.  
  3001. 22.  ACKNOWLEDGMENTS..................................................    48
  3002.  
  3003. 23.  RELATED FILES....................................................    48
  3004.  
  3005.  
  3006. LIST OF    FIGURES
  3007.  
  3008. Figure 1.  Order of Bytes in Header...................................    14
  3009.  
  3010. Figure 2.  16 Bit CRC Binary Header...................................    14
  3011.  
  3012.                   - ii -
  3013.  
  3014.  
  3015. Figure 3.  32 Bit CRC Binary Header...................................    14
  3016.  
  3017. Figure 4.  HEX Header.................................................    15
  3018.  
  3019. Figure 5.  Transmission    Time Comparison...............................    37
  3020.  
  3021.  
  3022. LIST OF    TABLES
  3023.  
  3024.  
  3025. TABLE 1.  Network and Flow Control Compatibility......................    36
  3026.  
  3027. TABLE 2.  Protocol Overhead Information...............................    37
  3028.  
  3029. TABLE 3.  Local    Timesharing Computer Download Performance.............    38
  3030.  
  3031. TABLE 4.  File Transfer    Speeds........................................    39
  3032.  
  3033. TABLE 5.  Protocol Checklist..........................................    41
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.                  - iii -
  3063.  
  3064.  
  3065.  
  3066.        The ZMODEM Inter Application    File Transfer Protocol
  3067.  
  3068.                   Chuck Forsberg
  3069.  
  3070.                Omen    Technology Inc
  3071.  
  3072.  
  3073.                  _A_B_S_T_R_A_C_T
  3074.  
  3075.  
  3076.  
  3077. The ZMODEM file    transfer protocol provides reliable file and command
  3078. transfers with complete    EEEENNNNDDDD----TTTTOOOO----EEEENNNNDDDD data    integrity between application
  3079. programs.  ZMODEM's 32 bit CRC protects    against    errors that continue to
  3080. sneak into even    the most advanced networks.
  3081.  
  3082. Unlike traditional and many recently introduced    protocols, ZMODEM
  3083. safeguards all data and    supervisory information    with effective error
  3084. detection.
  3085.  
  3086. ZMODEM rapidly transfers files,    particularly with buffered (error
  3087. correcting) modems, timesharing    systems, satellite relays, and wide area
  3088. packet switched    networks.
  3089.  
  3090. User Friendliness is an    important ZMODEM feature.  ZMODEM AutoDownload
  3091. (Automatic file    Download initiated without user    intervention) greatly
  3092. simplifies file    transfers compared to the traditional protocols.
  3093.  
  3094. ZMODEM provides    advanced file management features including Crash
  3095. Recovery, flexible control of selective    file transfers,    and security
  3096. verified command downloading.
  3097.  
  3098. ZMODEM protocol    features allow implementation on a wide    variety    of systems
  3099. operating in a wide variety of environments.  A    choice of buffering and
  3100. windowing modes    allows ZMODEM to operate on systems that cannot    support
  3101. other streaming    protocols.  Finely tuned control character escaping allows
  3102. operation with real world networks without Kermit's high overhead.
  3103.  
  3104. ZMODEM is the only high    performance high reliability public protocol that
  3105. does not require large buffer allocations for normal file transfers.
  3106.  
  3107. Although ZMODEM    software is more complex than unreliable XMODEM    routines,
  3108. a comphrensive protocol    description and    actual C source    code to    pppprrrroooodddduuuuccccttttiiiioooonnnn
  3109. programs have allowed dozens of    developers to upgrade their applications
  3110. with efficient,    reliable ZMODEM    file transfers with a minimum of effort.
  3111.  
  3112. ZMODEM was developed _f_o_r _t_h_e _p_u_b_l_i_c _d_o_m_a_i_n under a Telenet contract.  The
  3113. ZMODEM protocol    descriptions and the Unix rz/sz    program    source code are
  3114. public domain.    No licensing, trademark, or copyright restrictions apply
  3115. to the use of the protocol, the    Unix rz/sz source code and the _Z_M_O_D_E_M
  3116. name.
  3117.