home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / flink11.zip / P.doc < prev    next >
Text File  |  1994-09-04  |  34KB  |  879 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                                  "P"
  7.  
  8.                     The transfer protocol package
  9.  
  10.                              version 2.03
  11.  
  12.                   Copyright (c) 1994 by Jyrki Salmi
  13.  
  14.                          All rights reserved.
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. 1. Introduction
  22.  
  23.         This is a transfer protocol package providing Zmodem,
  24.         Ymodem-g, Ymodem and Xmodem protocols for Bulletin Board
  25.         Systems, Terminal programs and where ever reliable high speed
  26.         file transfer protocols are needed.
  27.  
  28.         Package consists of two parts:
  29.  
  30.           P.DLL - A dynamic link library that contains the transfer
  31.                   protocol routines.
  32.  
  33.           P.EXE - The front-end for P.DLL. A program that processes
  34.                   user options and then calls the DLL to do the actual
  35.                   transfer.
  36.         
  37.         During development the main goal has been achieving the maximum
  38.         performance possible under OS/2. Not much time has been spent
  39.         on creating a beautiful and 'friendly' user interface. If you
  40.         aren't happy with P.EXE, you can always make your own
  41.         front-end for the DLL.
  42.                 
  43.         The author takes no responsibility whatsoever for any damage
  44.         caused by P. If you decide to use this package or parts of it,
  45.         you do it at your own risk!
  46.  
  47.  
  48. 2. Credits
  49.  
  50.         Chuck Forsberg for creating Zmodem and documenting it.
  51.         Public domain sources of rzsz were used as a reference during
  52.         the development of P.DLL.
  53.  
  54.         Ward Christensen for creating Xmodem and Ymodem.
  55.  
  56.         Gary S. Brown for the CRC calculation routines. These were
  57.         found from the public domain rzsz sources.
  58.  
  59.         Jeffrey Altman for providing me a sample CK_P.INI file.
  60.  
  61.         Many people who reported about bugs in the previous versions
  62.         of P and gave me lots of new ideas.
  63.  
  64.  
  65. 3. Distribution policy
  66.  
  67.         P.EXE - the front-end for the DLL is distributed as public
  68.         domain, meaning that anyone can modify and recompile the
  69.         sources and do whatever they want with it. However, credits to
  70.         the original author (me) would be highly appreciated but not
  71.         required, if found so repugnant.
  72.  
  73.         P.DLL - the transfer protocol engine is distributed as
  74.         freeware, meaning that the author (me) wants to keep his
  75.         copyright to the program but gives everyone the right to use
  76.         and copy it freely, without of charge.
  77.         
  78.  
  79. 4. Supported protocols and their variations
  80.  
  81. 4.1 Xmodem
  82.  
  83.         This is one of the oldest transfer protocols ever. It was
  84.         developed by Ward Christensen in 1977. It proved to be an
  85.         excellent file transfer protocol because of its robustness and
  86.         reasonable performance.
  87.  
  88.         The basic Xmodem used 128 byte blocks and one byte Checksum
  89.         for error checking. There has been many extension to Xmodem
  90.         over the years. One is CRC-16 checking and one is the use of
  91.         1024 byte blocks. Both of these extensions are support by P
  92.         (-alternative option and -kilo option).
  93.  
  94. 4.2 Ymodem
  95.  
  96.         Ymodem is one of many extensions to Xmodem. It adds one block
  97.         in front of every transferred file, providing file name, size
  98.         and date information, you don't have to enter the file name at
  99.         both ends of transmission like with Xmodem. Ymodem
  100.         also made it possible to transfer many files with just one
  101.         command. Ymodem uses CRC-16 as its default error checking
  102.         method, however Checksum is still supported (-alternative
  103.         option). P uses 128 blocks with Ymodem as the default, you
  104.         might want to use 1024 byte blocks (-kilo option) to improve
  105.         the throughput.
  106.  
  107.         Xmodem and Ymodem were very efficient with low speed
  108.         connections, but due to introduction of new high speed and
  109.         buffered modems we found that it wasn't enough.
  110.  
  111. 4.3 Ymodem-g
  112.  
  113.         Ymodem-g is an extension to Ymodem protocol. All it adds is a
  114.         continuous data transfer. Transferred blocks don't wait for
  115.         acknowledge before transferring the next one. Ymodem-g made it
  116.         possible to take out virtually all of the throughput provided
  117.         by hardware. However, it had one downgrade: It didn't have any
  118.         kind of error recovery. CRC-16 checking was still done, but in
  119.         case of an error the transfer was simply aborted instead of
  120.         retransmission of the broken block.
  121.  
  122.         There were also many other problems with all of the Xmodem
  123.         derived implementations. They needed a totally transparent
  124.         data path, making it impossible to use them over connections
  125.         which used software flow control (XON/XOFF).
  126.  
  127.         The error recovery / speed tradeoff was also one of the main
  128.         reasons for the development of new de facto protocol: Zmodem.
  129.  
  130. 4.4 Zmodem
  131.  
  132.         Zmodem was developed by Chuck Forsberg at Omen Technology,
  133.         Inc. in 1986. It wasn't based on the old Xmodem engine and
  134.         that made it possible to implement many new features. The
  135.         major feature was its possibility to send data in continuous
  136.         stream and still recover from possible errors. Zmodem also
  137.         introduced escaping, making it possible to transfer binary
  138.         files over non-transparent connections.
  139.  
  140.         User convenience was also taken in consideration in
  141.         development of Zmodem. Transmission parameters needed to be
  142.         specified only at the one end. File name, size, and date
  143.         information is of course also transferred, just like in
  144.         Ymodem. Automatic start of receiving is also made possible by
  145.         sending a ZRQINIT sequence at the beginning of the transfer,
  146.         allowing terminal programs to monitor for it.
  147.  
  148.         Zmodem supports 32-bit CRC frame checking (frames are
  149.         equivalent to Xmodem and Ymodem blocks) which increases the
  150.         reliability remarkably.
  151.  
  152.         With Zmodem you don't have to transfer files right from the
  153.         beginning in case connection was lost for some reason. Zmodem
  154.         offers a crash recovery which you can use to continue the
  155.         transfer from right there where it got interrupted.
  156.  
  157.         Since the late 1980s Zmodem has remained as the de facto
  158.         transfer protocol and is still going strong.
  159.  
  160.  
  161. 5. Installation
  162.  
  163.         To transfer files you will need only P.EXE and P.DLL. The
  164.         DLL will be searched from the directories on your LIBPATH and
  165.         if not found there, it's looked up from the directory where
  166.         your P.EXE resides.
  167.  
  168. 5.1 C-Kermit
  169.  
  170.         Included in this package is file CK_P.INI which is an
  171.         initialization file for C-Kermit version 5A(190). Copy it to
  172.         your C-Kermit directory and add the following line in your
  173.         CKERMOD.INI file:
  174.  
  175.         take ck_p.ini
  176.  
  177.         Next time you'll start your C-Kermit you'll have following
  178.         commands added to it:
  179.  
  180.         rz - Receive with Zmodem
  181.         sz - Send with Zmodem
  182.         ry - Receive with Ymodem
  183.         sy - Send with Ymodem
  184.         rg - Receive with Ymodem-g
  185.         sg - Send with Ymodem-g
  186.         rx - Receive with Xmodem
  187.         sx - Send with Xmodem
  188.  
  189.         The connect type will be automatically detected and therefore
  190.         same commands work for asynchronous, named pipe and TCP/IP
  191.         stream socket connections.
  192.  
  193.         Check the CK_P.INI file and change the paths and options if
  194.         necessary.
  195.  
  196. 5.2 LiveWire
  197.  
  198.         Included in this package is a file named LW_P.CMD. It is an
  199.         OS/2 command file that is meant to be called from LiveWire.
  200.  
  201.         First, copy that LW_P.CMD to your LiveWire directory and then
  202.         start LiveWire.
  203.  
  204.         Go to Protocol menu and choose first blank entry from the
  205.         list. Fill the fields with following information:
  206.  
  207. ╒════ External Protocol ═══════════════════════════════════════════════════╕
  208. │ Name                  Zmodem (P)░░░░░░░░░░                               │
  209. │ Hotkey                P                                                  │
  210. │ Prompt filename       Yes                                                │
  211. │ Auto-receive string   B00░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
  212. │ Receive command 1     LW_P.CMD async receive Zmodem %0 %1 %2 %3░░░░░░░░░ │
  213. │ Receive command 2     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
  214. │ Send command 1        LW_P.CMD async send Zmodem %0 %1 %2 %3░░░░░░░░░░░░ │
  215. │ Send command 2        ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
  216. ╘══════════════════════════════════════════════════════════════════════════╛
  217.  
  218.         Note that you'll get the arrow pointing upwards by pressing
  219.         CTRL-X.
  220.  
  221.         Now choose Zmodem-32 batch from the list and set the
  222.         Auto-download to Off. From now on P's Zmodem will
  223.         automatically start Zmodem receiving when needed.
  224.  
  225.         Other protocols are added just like but by replacing
  226.         occurrences of "Zmodem" with the name of corresponding
  227.         protocol: "Ymodem", "Ymodem-g" or "Xmodem". Also remember to
  228.         remove the Auto-receive string for other protocols.
  229.  
  230.         To use P with named pipe connection you have to have separate
  231.         protocol entries. Add protocols just like above but change the
  232.         "async" text to "pipe" in each protocol command.
  233.  
  234.         See also LW_P.CMD if you want to change the options passed to
  235.         P.EXE.
  236.  
  237.  
  238. 6. Command-line parameters of P.EXE
  239.  
  240.         When you run P.EXE without any parameters you will get an usage
  241.         that lists all of the available options. Here they are once again,
  242.     with detailed descriptions:
  243.  
  244. 6.1 -type {async | pipe | socket}
  245.  
  246.         Select the type of communications to be used.
  247.  
  248.         async  = OS/2 Asynchronous device (RS-232C)
  249.         pipe   = OS/2 Named pipe (Local or network)
  250.         socket = TCP/IP stream socket
  251.  
  252.         If not specified, async will be assumed.
  253.  
  254. 6.2 -device <name | path>
  255.  
  256.         Specify the name of asynchronous device (e.g. COM1), or path
  257.         to the named pipe (e.g. \PIPE\P).
  258.  
  259.         Affects only to async and pipe communications.
  260.  
  261. 6.3 -host <address>
  262.  
  263.         Internet address of host to connect to. This can be a
  264.         resolvable name or plain IP number.
  265.  
  266.         Affects only to socket communications.
  267.  
  268. 6.4 -port <port>
  269.  
  270.         Number of stream socket port to use. Choose this number to be
  271.         big enough to not collide with other ports. See your
  272.         TCPIP\ETC\PROTOCOLS file for reserved ports.
  273.  
  274.         Affects only to socket communications.
  275.  
  276. 6.5 -server
  277.  
  278.         Specifies that we act as a server for the file transfer. We'll
  279.         create a named pipe or stream socket and wait for a client to
  280.         connect to it. The wait time can specified with the -wait
  281.         option.
  282.  
  283.         Has an effect only when type of communications is pipe or socket,
  284.         and no already open handle is available.
  285.  
  286. 6.6 -wait <seconds>
  287.  
  288.         Specifies the number of seconds to wait for the client to connect to
  289.         us. While waiting a beep can be heard every second, to disable
  290.         the noise specify -quiet option.
  291.  
  292.         Has an effect only when acting as a server.
  293.  
  294. 6.7 -share
  295.  
  296.         Open the communication device in shared mode. Specify this
  297.         option if you can't pass a handle to P and you have to "steal"
  298.         the communication device from a suspended process. With this
  299.         option it is also possible to use P.EXE from a DOS program.
  300.  
  301.         Affects only to async and pipe communications, when no already open
  302.         handle is available.
  303.  
  304. 6.8 -handle <handle>
  305.  
  306.         Specifies a handle for an already open asynchronous device,
  307.         pipe or socket. If specified and connection is asynchronous or
  308.         pipe, the -device option should also be specified to make the
  309.         error messages report possible errors on the correct
  310.         device. If -device is not specified, error messages could be
  311.         something like this:
  312.  
  313.         Failed to control device: "(null)"
  314.  
  315.         But if for example "-device com1" option was specified the
  316.         error message would be:
  317.  
  318.         Failed to control device: "com1"
  319.  
  320.         That's all the -device option is used for when handle is
  321.         available, therefore it's not required for transfer to work.
  322.  
  323.         For stream socket connections -host and -port option are not
  324.         needed at all. Socket numbers are used with error messages
  325.         instead of device name.
  326.  
  327. 6.9 -loose
  328.  
  329.         If specified, the state of carrier signal will be ignored during the
  330.         the file transfer. You might need to specify this option if
  331.         your modem fails to maintain the state of carrier signal, or
  332.         if you're transferring files with a null-modem cable.
  333.  
  334.         Affects only to async communications.
  335.  
  336. 6.10 -telnet
  337.  
  338.         Escape telnet IAC characters and CR NUL sequences in the data stream
  339.         and process possible incoming telnet commands. Use this option
  340.         when you're transferring files through a telnet
  341.         session. However, this can be used with other types of
  342.         communication too.
  343.  
  344. 6.11 -receive
  345.  
  346.         Specifies that we are receiving files.
  347.  
  348. 6.12 -send
  349.  
  350.         Specifies that we are sending files.
  351.  
  352. 6.13 -protocol {xmodem | ymodem | ymodem-g | zmodem}
  353.  
  354.         Specifies the transfer protocol to be used. See section 4 in
  355.         this document for further information about the transfer
  356.         protocols.
  357.  
  358.         If not specified, Zmodem will be assumed.
  359.  
  360. 6.14 -escape {controls | minimal}
  361.  
  362.         Specify the escaping to be done during the file transfer.
  363.  
  364.         By default P escapes following characters in the data flow
  365.         when transferring with Zmodem:
  366.  
  367.         ASCII 16        (Ctrl-P)
  368.         ASCII 144       (Ctrl-P with 8th bit set)
  369.         ASCII 17   (*)  (XON)
  370.         ASCII 145  (*)  (XON with 8th bit set)
  371.         ASCII 19   (*)  (XOFF)
  372.         ASCII 147  (*)  (XOFF with 8th bit set)
  373.         ASCII 24   (*)  (Ctrl-X)
  374.         ASCII 152       (Ctrl-X with 8th bit set)
  375.  
  376.         And these if they follow an ASCII 64 ('@') or
  377.         ASCII 192 ('@' with 8th bit set):
  378.  
  379.         ASCII 13        (Carriage return)
  380.         ASCII 141       (Carriage return with 8th bit set)
  381.  
  382.         control - This makes us to escape all control characters
  383.                   (ASCII 0 to 31). Escaping generates overhead by
  384.                   transmitting two bytes to represent every control
  385.                   character. Use it only if your connection can't pass
  386.                   them through. 
  387.  
  388.         minimal - This makes us to escape as few characters as
  389.                   possible so that the protocol still works with
  390.                   standard implementations (marked with asterisks in
  391.                   the list above).
  392.  
  393.         Affects only to Zmodem transfers.
  394.  
  395. 6.15 -alternative
  396.  
  397.         Specifies that an alternative error checking method should be used.
  398.  
  399.         Here is the list of supported protocols with their default and
  400.         alternative checking methods:
  401.  
  402.         Protocol        Default         Alternative
  403.         --------        -------         -----------
  404.         Zmodem          CRC-32          CRC-16
  405.         Ymodem-g        CRC-16          N/A
  406.         Ymodem          CRC-16          Checksum
  407.         Xmodem          Checksum        CRC-16
  408.  
  409.         See the following sections for detailed information about the
  410.         checking methods.
  411.  
  412.         This option has no meaning when sending files with Ymodem-g,
  413.         Ymodem or Xmodem, it is up to the receiver to choose the error
  414.         checking method to be used.
  415.  
  416. 6.15.1 CRC-32
  417.  
  418.         32-bit CRC is the most effective error checking method
  419.         supported by P. It's based on a 32-bit number (4 bytes)
  420.         calculated with a polynomial specified by ANSI X3.66
  421.         specification.
  422.  
  423.         This 32-bit number is calculated by the sender and
  424.         transferred with every 1024 (or less) bytes. The receiver does
  425.         the same calculation on received data and if the results
  426.         are different the data is requested to be sent again. The
  427.         probability of garbled data getting through is practically
  428.         nil.
  429.  
  430. 6.15.2 CRC-16
  431.  
  432.         This is based on a 16-bit number (2 bytes) calculated with a
  433.         similar polynomial to one used with 32-bit CRC. The
  434.         probability of garbled data getting through is much higher
  435.         than with CRC-32, but it's still very very small.
  436.  
  437. 6.15.3 Checksum
  438.  
  439.         This an ancient checking method used by the first versions of
  440.         Xmodem. It's based on a 8-bit (1 byte) number calculated from
  441.         transferred data by summing up all bytes in it.
  442.  
  443.         For example, Checksum of three bytes: 'a' (ASCII decimal 97),
  444.         'b' (ASCII decimal 98) and 'c' (ASCII decimal 99) is '&'
  445.         (ASCII decimal 38). It comes from 97 + 98 + 99 = 294 saved in
  446.         8-bit number, which cuts it to 38.
  447.  
  448.         With Checksum checking the probability of garbled data getting
  449.         acknowledged is relatively high, so whenever possible you
  450.         should use CRC-16 instead. 
  451.  
  452. 6.16 -kilo
  453.  
  454.         If specified, 1024 byte blocks will be used instead of default
  455.         128 byte. This speeds up the transfer considerably on high
  456.         speed connections. However, the probability of garbled data
  457.         getting through grows when there is more data to calculate the
  458.         check value from, thus you should avoid using 1024 byte blocks
  459.         with Checksum checking.
  460.  
  461.         Affects only to Ymodem-g, Ymodem and Xmodem sending, when
  462.         receiving it's up to the sender to define the block size.
  463.  
  464. 6.17 -window <bytes>
  465.  
  466.         Specifies the size of transfer window to be used. Valid range is
  467.         from 256 to 65472, and the size must be a multiple of 64.
  468.  
  469.         By specifying a window size you make P to wait for acknowledge
  470.         from the remote for every <bytes> transferred, when the
  471.         default is sending data in full streaming, without any
  472.         acknowledges.
  473.  
  474.         Using this option might be necessary if you're sending data through a
  475.         network where some nodes might timeout if data isn't
  476.         transferred to one direction for a certain time.
  477.  
  478.         Using a small window size slows down the transfer somewhat.
  479.  
  480.         Affects only to Zmodem transfers.
  481.  
  482. 6.18 -automatic
  483.  
  484.         Specifies that we should send a string "rz" followed by a carriage
  485.         return to the remote before starting the transfer. If there's
  486.         an UNIX shell running at the other end it will be interpreted
  487.         as the user has just typed "rz" and then pressed enter, and
  488.         the UNIX rz program will be run.
  489.  
  490.         If you're not transferring files to an UNIX system this option
  491.         just generates more garbage to remote screen at the
  492.         initialization phase, in case it hasn't started the receiving
  493.         program yet.
  494.  
  495.         Affects only to Zmodem sending.
  496.  
  497. 6.19 -serial
  498.  
  499.         If specified, the serial number of the remote will we queried and
  500.         displayed. This option is meant for informational purposes
  501.         only.
  502.  
  503.         Affects only to Zmodem sending.
  504.  
  505. 6.20 -attention <string>
  506.  
  507.         Specifies an attention string that will be sent when receiving
  508.         files with Zmodem and you would like to get the attention of the
  509.         sender. 
  510.  
  511.         Following characters have a special meaning in the attention string:
  512.  
  513.         ASCII 221 -- Break signal
  514.         ASCII 222 -- One second pause
  515.  
  516. 6.21 -commbufs <bytes>
  517.  
  518.         Specifies the size of both, input and output communication buffer.
  519.         Default is 2048 bytes.
  520.  
  521.         Specifying a bigger buffer has an effect only to protocols
  522.         sending and receiving data in continuous streams: Zmodem and
  523.         Ymodem-g.
  524.  
  525.         With a bigger buffer and a reliable connection you can speed up
  526.         the throughput considerably. But if the connection requires
  527.         retransmits, a big buffer can slow down the throughput much
  528.         more and generate a lot of annoying garbage to the remote
  529.         screen if the transfer gets cancelled.
  530.  
  531.         For example if you specify 32768 bytes long buffers, we will
  532.         block in read or write routines until all data is read or
  533.         written. If you're sending with Zmodem and there is an error
  534.         in transmission, it won't be recovered until all data in the
  535.         buffers is transferred. And if you're using Ymodem-g the
  536.         transfer will be aborted in case of an error, all data in
  537.         buffers will be written to the remote screen until we
  538.         recognize the abortion.
  539.  
  540.         And when receiving with Zmodem or Ymodem-g, we won't check for
  541.         possible transmission errors until whole buffer is received,
  542.         making it possible for us to transfer a lot of data that's to
  543.         be resent.
  544.  
  545.         There's no maximum limit for the buffer sizes. The bigger you
  546.         specify the more memory will be eaten. Under multitasking
  547.         environments like OS/2, with bigger buffers a bit less
  548.         processor time will be consumed during the transfer.
  549.  
  550. 6.22 -comminbuf <bytes>
  551.  
  552.         Specifies explicitly the size of communication input
  553.         buffer. See -commbufs option for further information.
  554.  
  555. 6.23 -commoutbuf <bytes>
  556.  
  557.         Specifies explicitly the size of communication output
  558.         buffer. See -commbufs option for further information.
  559.  
  560. 6.24 -filebuf <bytes>
  561.  
  562.         Specifies the size of file read and write buffer. If not specified,
  563.         no internal file buffering will be done.
  564.  
  565.         By specifying a bigger file buffer it is possible to speed up
  566.         considerably file transfers to or from slow media, like
  567.         CD-ROMs or floppy drives.
  568.  
  569.         It's also possible to send contents of a floppy without needing
  570.         to keep it in the drive all the time. Just specify big enough
  571.         buffer for files to be sent and all data will be read into
  572.         memory in the beginning of the transfer and send from there.
  573.  
  574.         Transfers using an asynchronous device (cps < 10000) are not
  575.         likely to benefit from a bigger file buffer, but if the
  576.         communication device is either named pipe or stream socket,
  577.         bigger buffer is most likely to improve the throughput.
  578.  
  579.         There's no maximum limit for the size of file buffer, you
  580.         could even transfer contents of a whole hard drive if you
  581.         wanted to (and had enough memory for the buffer).
  582.  
  583.         The optimal buffer size is best found by experimenting. You
  584.         could start for example by specifying a 32k byte buffer and
  585.         compare the CPSs to what you get without a buffer at all.
  586.  
  587. 6.25 -speed <bps>
  588.  
  589.         Specifies the throughput speed in bits per second. This
  590.         value will be used only to calculate the transfer time
  591.         estimates. If not specified or <bps> is 0, time estimates
  592.         will not be shown.
  593.  
  594. 6.26 -mileage
  595.  
  596.         If specified, the number of files and bytes left to transfer
  597.         (and estimated time) is displayed before each file.
  598.  
  599.         Affects only to batch transfers and works only when receiving
  600.         and the sender provides such information.
  601.  
  602. 6.27 -options
  603.  
  604.         If specified, the conversion, management and transport options
  605.         received from the sender will be shown on the screen in a
  606.         verbal form. This option is meant mainly to aid problem
  607.         determination.
  608.  
  609.         Affects only to Zmodem receiving.
  610.  
  611. 6.28 -headers
  612.  
  613.         Specifies that received Zmodem headers and their contents
  614.         should be shown on the screen in a verbal form during the
  615.         transfer. This option is meant mainly to aid problem
  616.         determination.
  617.  
  618.         Affects only to Zmodem transfers.
  619.  
  620. 6.29 -frameends
  621.  
  622.         Specifies that received Zmodem frame ends should be shown on
  623.         the screen in verbal form during the transfer. This option is
  624.         meant mainly to aid problem determination. 
  625.  
  626.         Affects only to Zmodem transfers.
  627.  
  628. 6.30 -quiet
  629.  
  630.         Do not beep after the file transfer and when acting as a communication
  631.         server and waiting for a client to connect to us.
  632.  
  633. 6.31 -priority <class> <delta>
  634.  
  635.         Specifies the priority of file transfer process.
  636.  
  637.         Valid values for priority class are:
  638.  
  639.         0 - No class change
  640.         1 - Idle-time
  641.         2 - Regular
  642.         3 - Time-critical
  643.         4 - Server
  644.  
  645.         Priority delta can be any value in range of -31 to 31.
  646.  
  647.         You might want to specify a higher priority for the file
  648.         transfer process if you are running simultaneously something
  649.         that is consuming lot of CPU time, like playing DOS games, etc.
  650.  
  651.         Lower priority might come into consideration if you're
  652.         transferring files on the background and don't want the
  653.         foreground process to get effected by the transfer.
  654.  
  655. 6.32 -dszlog <path>
  656.  
  657.         If specified, a DSZ compatible log about files transferred
  658.         will be created in the file pointed by the <path>. This option
  659.         is essential for most of the Bulletin Board Systems.
  660.  
  661. 6.33 -pause
  662.  
  663.         Wait for a key press after the transfer, before exiting. This
  664.         option might became useful if you're using P.EXE as an
  665.         external protocol provider for some software that clears the
  666.         screen after we exit. By clearing the screen it prevents the
  667.         user from reading the messages displayed by P.EXE at the end
  668.         of the transfer.
  669.  
  670. 6.34 -directory <directory>
  671.  
  672.         Specifies the directory where received files are to be saved.
  673.         If not specified, files will be saved to the current
  674.         directory. Directory path can be trailed by a backslash or not.
  675.  
  676. 6.35 -paths
  677.  
  678.         Do not strip drive and directory components from the file
  679.         paths sent and received.
  680.  
  681.         Be careful with this option if you're receiving files, it
  682.         would be possible for the other end to send files to any drive
  683.         and directory on your system.
  684.  
  685.         Has no meaning to Xmodem transfers.
  686.  
  687. 6.36 -create
  688.  
  689.         If specified, non-existing directory structures will be
  690.         created.
  691.  
  692.         Has meaning only when receiving files and -paths option is
  693.         specified.
  694.  
  695. 6.37 -clean
  696.  
  697.         Delete files from failed transfers. If specified, transfers cannot
  698.         be resumed later on. This option is useful for keeping your
  699.         disks clean from garbage files.
  700.  
  701. 6.38 -touch
  702.  
  703.         If specified, the date information received with files will be
  704.         ignored. The date of received files will correspond to the
  705.         time of transfer.
  706.  
  707. 6.39 -recursive
  708.  
  709.         If specified, files specified on the command-line are searched
  710.         recursively, making it possible to send contents of whole
  711.         directory structure.
  712.  
  713.         Affects only to Zmodem, Ymodem-g and Ymodem sending.
  714.  
  715. 6.40 -text
  716.  
  717.         If specified, a text conversion will be done on received and sent
  718.         files. Meaning that CR LF line end sequences will be
  719.         translated to the convention used by the remote system and
  720.         vice versa.
  721.  
  722.         Note that this option should be used only when transferring
  723.         text files.
  724.  
  725.         With Zmodem, this option is passed also to the remote at the
  726.         initialization phase.
  727.  
  728. 6.41 -resume
  729.  
  730.         Specifies that we should try to resume aborted file transfers
  731.         i.e. when file already exists and its size is smaller than the
  732.         size of the new file.
  733.  
  734.         With Zmodem, this option is passed also to the remote at the
  735.         initialization phase.
  736.  
  737.         Affects only to Zmodem transfers.
  738.  
  739. 6.42 -existing
  740.  
  741.         If specified, no new files will be created. Only the already
  742.         existing files will be updated or re-transferred.
  743.  
  744.         With Zmodem, this option is passed also to the remote at the
  745.         initialization phase.
  746.  
  747. 6.43 -update
  748.  
  749.         If specified, already existing files will be replaced only if the
  750.         new file is longer or newer.
  751.  
  752.         With Zmodem, this option is passed also to the remote at the
  753.         initialization phase.
  754.  
  755. 6.44 -append
  756.  
  757.         If specified, already existing files will get the new data appended
  758.         to them.
  759.  
  760.         With Zmodem, this option is passed also to the remote at the
  761.         initialization phase.
  762.  
  763. 6.45 -replace
  764.  
  765.         If specified, already existing files will be replaced by the new
  766.         ones.
  767.  
  768.         With Zmodem, this option is passed also to the remote at the
  769.         initialization phase.
  770.  
  771. 6.46 -newer
  772.  
  773.         If specified, already existing files will be replaced only if the
  774.         new one has a later date.
  775.  
  776.         With Zmodem, this option is passed also to the remote at the
  777.         initialization phase.
  778.  
  779. 6.47 -different
  780.  
  781.         If specified, already existing files will be replaced only if
  782.         dates or lengths are different.
  783.  
  784.         With Zmodem, this option is passed also to the remote at the
  785.         initialization phase.
  786.  
  787. 6.48 -protect
  788.  
  789.         If specified, already existing files won't be replaced at any
  790.         situation.
  791.  
  792.         With Zmodem, this option is passed also to the remote at the
  793.         initialization phase.
  794.  
  795. 6.49 -rename
  796.  
  797.         If specified, files will be renamed if one with an identical name
  798.         already exists.
  799.  
  800.         With Zmodem, this option is passed also to the remote at the
  801.         initialization phase.
  802.  
  803. 6.50 [<file> | <@listfile> ...]
  804.  
  805.         The rest of the command-line is for paths to files to be sent
  806.         or received. If you have a lot of files to transfer you might
  807.         want to use a listfile instead of specifying them all on the
  808.         command-line. Listfiles are plain ASCII files containing file
  809.         paths on separate lines.
  810.  
  811.         Listfiles are distinguished from the normal file paths on the
  812.         command-line by the preceding '@' character. You can mix up
  813.         any number of paths and listfiles on the command-line.
  814.  
  815.         Either backslash ('\') or slash ('/') characters can be used
  816.         as a directory and name separator.
  817.  
  818.         If the name of first file to be transferred begins with a
  819.         character '-', it should be preceded by a plain '-' separated
  820.         by space from the last option and this file name.
  821.  
  822.         When sending files, the use of these file paths is obvious,
  823.         those files are to be sent. If the file specified can't be
  824.         opened, either it doesn't exist or it's being used by some
  825.         another application, it will be skipped.
  826.  
  827.         You can specify any number of files to be transferred with
  828.         protocols that support batch transmissions, that is all but
  829.         Xmodem. With Xmodem you can specify only one file, whether you
  830.         are receiving or sending.
  831.  
  832.         When receiving with a protocol supporting batch transfers you
  833.         don't have to specify any files at all. However, if you do,
  834.         only those files specified will be received. If you are
  835.         receiving with Zmodem, the files not found on the command-line
  836.         will be skipped. With Ymodem, the transfer will be aborted,
  837.         because the protocol does not support skipping.
  838.  
  839.  
  840. 7. Using P.DLL with your own applications
  841.  
  842.         The whole protocol engine itself resides in P.DLL. P.EXE only
  843.         acts as a front-end. Anyone can use the DLL with their
  844.         application to provide file transfer protocols. User interface
  845.         is not limited anyway, the calling program can be either PM
  846.         based or plain VIO text application.
  847.  
  848.         P.DLL can be linked to your application by using an import
  849.         library or by dynamically loading and freeing the library when
  850.         needed. For more information about import libraries see your C
  851.         compiler's manual or IMPLIB section of OS/2 Toolkit's Tools
  852.         Reference. No import library is included in this distribution,
  853.         you have to create one from the DLL with IMPLIB or similar
  854.         utility.
  855.  
  856.         P.DLL has only one entry function: p_transfer(). A pointer to a
  857.         configuration structure is passed as a parameter to the entry
  858.         function. The configuration structure contains transfer
  859.         parameters and pointers to callback functions which are used
  860.         to give information about the progress of the transfer back to
  861.         the calling application, and to handle files being
  862.         transferred. For detailed description of the configuration
  863.         structure and callback functions see P.H header file in the
  864.         "exesrc" directory.
  865.  
  866.         The best way to get hold of it is probably by studying the
  867.         sources of P.EXE, especially callback.c.
  868.  
  869.  
  870. 8. Afterword
  871.  
  872.         I hope you find some use for all this. If you have any problems,
  873.         questions or you just want to give a comment, drop me a note:
  874.  
  875.         Internet: jytasa@jyu.fi
  876.         FidoNet: Jyrki Salmi (2:225/12)
  877.  
  878.  
  879.                                 * * *