; FILE P200.INI (CKOP200.INI) ; Macros for invoking P version 2.xx from OS/2 C-Kermit. ; ; Jeffrey Altman, Altmania Productions and Seer Technologies, New York ; ; Version 9 ; December 30, 1994 ; ; P is an external protocol package providing X-modem, Y-modem, Y-modem-G ; and Z-modem send and receive capabilities on OS/2 via Serial, IBM TCP/IP 2.0, ; and Named Pipe connections written by Jyrki Salmi . ; ; The P protocol dynamic link library is freeware available from most major ; ftp sites (ftp-os2.nmsu.edu, ftp.cdrom.com), bulletin board services ; and CompuServe (IBMCOM and OS2BVEN). From the documentation: ; ;"3. Distribution policy ; ; P.EXE - the front-end for the DLL is distributed as public ; domain, which means that anyone can modify and recompile the ; sources and do whatever they want with it. However, credits to ; the original author (me) would be highly appreciated but not ; required, if found so repugnant. ; ; P.DLL - the transfer protocol engine is distributed as ; freeware, which means that the author (me) wants to keep his ; copyright to the program but gives everyone the right to use ; and copy it freely, without of charge." ; ; P version 2.xx was designed with OS/2 C-Kermit in mind. The following ; macro definitions provide X,Y, and Z modem file send and receive ; capabilities on all connection types supported by OS/2 C-Kermit 5A(190) ; excluding NetBIOS and DECnet. With C-Kermit versions prior to 5A(190) ; only asynchronous connections are supported. ; ; Commands: ; sz/rz - send/receive with Zmodem ; sy/ry - send/receive with Ymodem ; sg/rg - send/receive with Ymodem-G ; sx/rx - send/receive with Xmodem ; ; As of this writing, the current release of P is 2.04. ; ; WARNING: ; As of version 2.04, P's TCP/IP support only works with IBM TCP/IP 2.0. ; If when trying these commands on a TCP/IP TELNET connection, you receive ; an error "cannot load SO32DLL" this means that you are not using IBM ; TCP/IP version 2.0. ; This file should need no changes in order to work with future 2.xx ; releases of P that support other TCP/IP protocol stack packages. ; ; DISCLAIMER: ; These macro definitions are included with C-Kermit as a convenience ; to users of P 2.xx. Columbia University is not a source for the P ; software, nor does it support P in any way. ; echo Initializing X,Y,YG,Z-modem support using P version 2.xx... ; define some global variables ; these settings may be altered at any time within kermit by redefining them define p_recv_dir . ; where files received by P are placed define p_commbufs 4096 ; size of the communication buffers define p_filebuf 32768 ; size of the file I/O buffers if < \v(version) 501190 goto asynconly ; Send via Zmodem define sz - if equal "\v(connection)" "serial" goto async, - if equal "\v(connection)" "named_pipe" goto pipe, - if equal "\v(connection)" "tcp/ip_telnet" goto socket, - echo "sz not supported on \v(connection) connections.",- end, - :async, - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -resume -protocol zmodem -send \%1, end, - :pipe, - !p.exe -type pipe -handle \v(ttyfd) -commbufs \m(p_commbufs) -resume - -filebuf \m(p_filebuf) -mileage -protocol zmodem -send \%1, end, - :socket, - !p.exe -type socket -handle \v(ttyfd) -telnet -commbufs \m(p_commbufs) - -resume -filebuf \m(p_filebuf) -mileage -protocol zmodem - -send \%1, end ; Receive via Zmodem define rz - if equal "\v(connection)" "serial" goto async, - if equal "\v(connection)" "named_pipe" goto pipe, - if equal "\v(connection)" "tcp/ip_telnet" goto socket, - echo "rz not supported on \v(connection) connections.",- end, - :async, - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -resume -protocol zmodem -directory \m(p_recv_dir) -receive, end, - :pipe, - !p.exe -type pipe -handle \v(ttyfd) -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol zmodem - -resume -directory \m(p_recv_dir) -receive, end, - :socket, - !p.exe -type socket -handle \v(ttyfd) -telnet -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol zmodem - -resume -directory \m(p_recv_dir) -receive, end ; Send via Ymodem-G define sg - if equal "\v(connection)" "serial" goto async, - if equal "\v(connection)" "named_pipe" goto pipe, - if equal "\v(connection)" "tcp/ip_telnet" goto socket, - echo "sy not supported on \v(connection) connections.",- end, - :async, - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol ymodem-g -send \%1, end, - :pipe, - !p.exe -type pipe -handle \v(ttyfd) -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol ymodem-g -send \%1, end, - :socket, - !p.exe -type socket -handle \v(ttyfd) -telnet -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol ymodem-g -send \%1, end ; Receive via Ymodem-G define rg - if equal "\v(connection)" "serial" goto async, - if equal "\v(connection)" "named_pipe" goto pipe, - if equal "\v(connection)" "tcp/ip_telnet" goto socket, - echo "ry not supported on \v(connection) connections.",- end, - :async, - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol ymodem-g -directory \m(p_recv_dir) -receive, end, - :pipe, - !p.exe -type pipe -handle \v(ttyfd) -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol ymodem-g - -directory \m(p_recv_dir) -receive, end, - :socket, - !p.exe -type socket -handle \v(ttyfd) -telnet -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol ymodem-g - -directory \m(p_recv_dir) -receive, end ; Send via Ymodem define sy - if equal "\v(connection)" "serial" goto async, - if equal "\v(connection)" "named_pipe" goto pipe, - if equal "\v(connection)" "tcp/ip_telnet" goto socket, - echo "sy not supported on \v(connection) connections.",- end, - :async, - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol ymodem -send \%1, end, - :pipe, - !p.exe -type pipe -handle \v(ttyfd) -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol ymodem -send \%1, end, - :socket, - !p.exe -type socket -handle \v(ttyfd) -telnet -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol ymodem -send \%1, end ; Receive via Ymodem define ry - if equal "\v(connection)" "serial" goto async, - if equal "\v(connection)" "named_pipe" goto pipe, - if equal "\v(connection)" "tcp/ip_telnet" goto socket, - echo "ry not supported on \v(connection) connections.",- end, - :async, - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol ymodem -directory \m(p_recv_dir) -receive, end, - :pipe, - !p.exe -type pipe -handle \v(ttyfd) -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol ymodem - -directory \m(p_recv_dir) -receive, end, - :socket, - !p.exe -type socket -handle \v(ttyfd) -telnet -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol ymodem - -directory \m(p_recv_dir) -receive, end ; Send via Xmodem define sx - if equal "\v(connection)" "serial" goto async, - if equal "\v(connection)" "named_pipe" goto pipe, - if equal "\v(connection)" "tcp/ip_telnet" goto socket, - echo "sx not supported on \v(connection) connections.",- end, - :async, - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol xmodem -send \%1, end, - :pipe, - !p.exe -type pipe -handle \v(ttyfd) -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol xmodem -send \%1, end, - :socket, - !p.exe -type socket -handle \v(ttyfd) -telnet -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol xmodem -send \%1, end ; Receive via Xmodem define rx - if equal "\v(connection)" "serial" goto async, - if equal "\v(connection)" "named_pipe" goto pipe, - if equal "\v(connection)" "tcp/ip_telnet" goto socket, - echo "rx not supported on \v(connection) connections.",- end, - :async, - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol xmodem -directory \m(p_recv_dir) -receive \%1, end, - :pipe, - !p.exe -type pipe -handle \v(ttyfd) -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol xmodem - -directory \m(p_recv_dir) -receive \%1, end, - :socket, - !p.exe -type socket -handle \v(ttyfd) -telnet -commbufs \m(p_commbufs) - -filebuf \m(p_filebuf) -mileage -protocol xmodem - -directory \m(p_recv_dir) -receive \%1, end end 0 ; Support for async connections only when \v(connection) is not defined. :ASYNCONLY ; Send via Zmodem define sz - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol zmodem -send \%1, end, - ; Receive via Zmodem define rz - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol zmodem -directory \m(p_recv_dir) -receive, end, - ; Send via Ymodem-G define sg - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol ymodem-g -send \%1, end, - ; Receive via Ymodem-G define rg - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol ymodem-g -directory \m(p_recv_dir) -receive, end, - ; Send via Ymodem define sy - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol ymodem -send \%1, end, - ; Receive via Ymodem define ry - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol ymodem -directory \m(p_recv_dir) -receive, end, - ; Send via Xmodem define sx - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol xmodem -send \%1, end, - ; Receive via Xmodem define rx - !p.exe -type async -handle \v(ttyfd) -speed \v(speed) - -commbufs \m(p_commbufs) -filebuf \m(p_filebuf) -mileage - -protocol xmodem -directory \m(p_recv_dir) -receive \%1, end, - :p200end