home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / winsock / wsftp32 / ws_read.me < prev    next >
Encoding:
Text File  |  1995-05-19  |  18.3 KB  |  397 lines

  1.  
  2.   Windows Sockets FTP Client Application -  - Version 93.12.05
  3.  
  4.   Written by:
  5.       John A. Junod             Internet: <junodj@gordon-css583.army.mil>
  6.       267 Hillwood Street                 <zj8549@trotter.usma.edu>
  7.       Martinez, GA 30907      Compuserve: 72321,366     AOL: jjunod
  8.  
  9.   THE INFORMATION AND CODE PROVIDED IS PROVIDED AS IS WITHOUT WARRANTY 
  10.   OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
  11.   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
  12.   PURPOSE. IN NO EVENT SHALL JOHN A. JUNOD BE LIABLE FOR ANY DAMAGES 
  13.   WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS 
  14.   OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF JOHN A. JUNOD HAS BEEN 
  15.   ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  16.  
  17.   This program executable and all source code is released into the public
  18.   domain.  It would be nice (but is not required) to give me a little 
  19.   credit for any use of this code.  The primary purpose of this application 
  20.   was to learn what it takes to write a Windows Sockets Application.
  21.  
  22.   The user interface for this FTP client is designed with the novice FTP user
  23.   in mind.  Usage should (??) be obvious with the possible exception of the
  24.   the transfer mode; ascii, binary or l8.  All controls are standard Windows
  25.   controls.
  26.  
  27.   My development and testing was all completed at home on two 386 PC's using
  28.   the Trumpet Windows Sockets DLL Alpha 15 with NCSA Telnet and WinQVT/Net 2.6
  29.   and 3.94 as the remote host.  Source code may be compiled with Borland C++
  30.   in large mode.
  31.  
  32.   Some code concepts and names are based on code that is copyright by the
  33.   Regents of the University of California or code published in UNIX Network
  34.   Programming by W. Richard Stevens or code in WATTCP or other public sources.
  35.   The rest is based on my knowledge of Windows programming and my 
  36.   interpretation of RFC 969 and the Windows Sockets API version 1.1.
  37.  
  38.   Known problems:
  39.  
  40.   1) May not work correctly for some FTP servers due to the directory
  41.      listing that comes back.  In this case the directories and files
  42.      dialog boxes will remain empty and the full directory listing will
  43.      be visible by clicking the [LONGDIR] button.  If you have a host that
  44.      doesn't work, e-mail me a listing of that listing and the output 
  45.      of the remote FTP help command.
  46.  
  47.   2) No restart of aborted transfers coded.
  48.  
  49.   3) No abort of transfers coded other than pressing [CLOSE] or [EXIT].
  50.  
  51.   4) No support for EBCDIC (does anyone use this??) transfers.
  52.  
  53.   5) Use of menu items in the debug window may be confusing to the novice 
  54.      user.
  55.  
  56.   6) Makes use of blocking socket calls.
  57.  
  58. Still to do:
  59. 1.  Make it use ASYNC calls.  (anyone want to help???)
  60. 2.  Support abort on transfers and restarts if necessary.
  61. 3.  Eliminate debug window.  (It could be gone now!  Any comments?)
  62. 4.  Windows 3.1 style directory list boxes.
  63.  
  64. 93.10.01
  65.   Fixed the gethostbyname problem.
  66.   Fixed WinQVT/Net 3.x directory expansion problem.
  67.   Fixed transfer abort problem with [CLOSE] or [EXIT].
  68.  
  69. 93.10.05
  70.   added host remembering
  71.   added automatic password for anonymous userid (option mail address)
  72.   corrected problem going to biochemistry.cwru.edu
  73.   corrected linked directories problem (??)
  74.  
  75. 93.10.10
  76.   moved options button to main window
  77.   fixed options, including prompting, bell, receive_unique
  78.   added filename conversion for illegal dos filenames
  79.   added timeout editing in host dialog
  80.   changed listen timeout from 5 seconds to standard timeout
  81.   changed messages going to status window
  82.   set nolinger on socket close
  83.   rewrote error module to eliminate possible copyright problem
  84.   cleaned/colored main window
  85.   added MS Visual C++ makefile
  86.  
  87. 93.10.17
  88.   added host linked userids, passwords, initial directory and hosttype
  89.   added support for new host types (note that these are mostly untested)
  90.   moved debug window routines to ws_debug.c
  91.   changed bind address to 0 for vxdtcp (seems to work ok for Trumpet also,
  92.     so I left it in, even though I never could get vxdtcp to work reliably.
  93.     vxdtcp bind returned a WSAEADDRNOTAVAIL (or something like that))
  94.   corrected bug in filename conversion
  95.   changed anonymous userid processing (must select a check box, now)
  96.  
  97. NOTE:  While WS_FTP allows you to save a password for a host and does some
  98.   minor encryption, it is not intended to be secure and is not recommended
  99.   to be used for private accounts!  It was added on request.
  100.  
  101. 93.10.24
  102.   more clean up of the source code
  103.   attempt to fix problems with Unisys 5000 EXOS (junk) ftp daemon
  104.   fix remote to local name conversion when multiple dots/spaces exist
  105.   fix timeout problem.  timeouts ONLY happen when connecting or
  106.     waiting for control message responses.  send and receive processing
  107.     contains no timeout processing.  timeouts limited to 65 seconds
  108.   rewrote host information routines to use global memory so number of
  109.     saved names may be increased.  userid automatically saved for
  110.     each host.  timeouts saved by host.
  111.   released HBRUSH resources properly
  112.  
  113. 93.11.12
  114.   uses port 21 if "services" file not found
  115.   added two line scrolling status window
  116.   updated debug and paint procedures to multi-window versions
  117.   added period to end of names not having an extention for viewer
  118.   modified about dialog box
  119.   temporary files are now located in the %TEMP% directory instead
  120.     of root of current drive.
  121.  
  122. 93.12.04
  123.   fixed VMS name parsing (hopefully) (93.11.15)
  124.   used protocol 6 if "protocol" file not found
  125.   incorporated AMS gateway (firewall) machine connection (thanks
  126.     to Jeff Welty for code modification)
  127.   lifted restriction on userid and password length
  128.   fixed MVS/VM name parsing 
  129.   incorporated account processing (not tested)
  130.   prompt for password if not entered
  131.   added support for ftp.uwp.edu (use WinQVT/Net)
  132.   eliminated blank lines in VM listing
  133.   added support for NT ftp daemon (use IBMPC TCP/IP)
  134.   added std support (autodetect) for another NT ftpd
  135.   allow a timeout on on initial connection if FTP_PRELIM
  136.   eliminated setsockopt(linger) for Lanera (also fixed problem with
  137.      WinQVT/Net ftp server)
  138.   fixed setdisk problem for MSC++ (uses _chdrive)
  139.  
  140. 93.12.05 (beta of new functions)
  141.   Reworked HOST dialog box and all HOST routines.  Now allows
  142.     unlimited save of configurations, and allows deletions.
  143.   Reworked GATEWAY host dialogs. (Gateways are saved for each config)
  144.   Now uses own WS_FTP.INI file (in Windows directory)  You will
  145.     "lose" all previous hosts.  (If you need information from the
  146.     earlier version, print out the WINDOWS\winsock.ini file.)
  147.     For a good start, copy the WS_FTP.INI file to your Windows dir.
  148.   Implemented DRAG/DROP processing.  You drag one or more files from
  149.     the Windows File Manager and drop anywhere on the main FTP window
  150.     (or when iconized) and they will be transfered to the current 
  151.     directory on the remote host using the current transfer mode.
  152.     This does support file name prompting for name changes.  Default
  153.     name will be the lowercase basename of the file.  You can't drag
  154.     directories and you can't drag from the remote host to another
  155.     process.
  156.  
  157. STILL NEED A WINDOWS HELP FILE FOR THIS THING.....
  158.  
  159.  
  160.  
  161. NT port comments by L. Kahn
  162.  
  163. You need to customize/and copy the ws_ftp.ini file to your winnt directory.
  164.  
  165.  
  166. The Windows NT port was much harder than expected, I have been slowly
  167. fixing problems and making enchancements to the system.  The following is a
  168. list of some of the changes made that I can remember.  If you want to
  169. actually look at all the changes get the original source from 129.29.64.246.
  170.  
  171.  
  172. added support for NTFS long file names. The system will not truncate on
  173. NTFS up to 220 char. names. with a max path name of 140 chars.
  174. On a fat file system it will truncate/rename to 8.3. (now only truncates
  175. on fat on win nt 3.1 since on 3.5 long names are now supported)
  176.  
  177. fixed problems where lparam and wparam were incorrectly used for
  178. messages and all the dialgs were screwed up. Also changed all the api
  179. and dialog entries to use the new win32 format.
  180.  
  181. fixed problem with the selection of a new setup name not filling in the
  182. remainder of the fields.  Changed lparam which should have been wparam.
  183.  
  184. added support to get other ftp server types by issueing the SYST
  185. command. The newer version of this program (source unavailable, see below does
  186. this).  Also added support for new ftp server types such as NT.
  187.  
  188. Added a new system option -d which enables the debugging window, 
  189. otherwise it does not pop up as before.
  190.  
  191. fixed problem with doing a strcpy and not checking for a null variable
  192. that caused an access violation under NT. Also fixed problem with newer
  193. version of qvt/winsock ftp server.
  194.  
  195. Added support so that double clicking on a local file uploads it, double
  196. clicking on a remote file downloads it.  By default you had to use the
  197. -> or <- arrows. There was a problem with the param. used for double
  198. clicking, howord(lparam) instead of hiword(wparam) was being used for
  199. the LBN_DBLCLK message.
  200.  
  201. fixed dialog box routines since makeprocinstance and freeprocinstance is
  202. not necessary under win32.
  203.  
  204. fixed problem with vax vms where when you switch to an empty directory there is no ..
  205. to switch back.  This is still even broken in current 16 bit version.
  206.  
  207. changed throughput messages on upload/download so that if it is over 1k it 
  208. prints out stats in K/sec rather than bps. 
  209.  
  210.  
  211.  
  212. NOTES: There is a newer version of this program available for windows 3.1. 
  213. It seems to have addressed many of the problems I have fixed and other 
  214. enhancements.  Unfortunately, when I sent a message to
  215. the original author describing the problems porting and all the fixes I had
  216. made, he didn't respond.  The latest source available for this program
  217. is as of DEC. 1993 and this is the version I used as a starting point.
  218. It appears the author does not want to make a newer source available
  219. since I asked for this and he did not respond.
  220.  
  221. Notes: on our new version of the solaris ftp server there is a bug when
  222. issueing the remotehelp command.  It hangs.  This program normally uses this
  223. command to try and figure out the server commands.  IT will hang if you attempt
  224. to connect to a version of the solaris server that has this problem. To get
  225. around this I have added a type solaris-unix set it to this and everything 
  226. should work fine.  IF you don't believe me try the nt native ftp app and issue
  227. the remotehelp command and the same problem will occur. i.e it will hang.
  228. (note this only occurs on solaris 5.2 it is fixed on solaris 5.3 it happened
  229. because the server was not sending the terminating line)
  230.  
  231. If other problems are found, please let me know at kahn@drcoffist.com
  232. or 71534,600 on compuserve. No promises but as I have time available I
  233. will try to look at specific problems with the NT version.  If someone
  234. else makes fixes/changes please forward me a copy of the updated source.
  235.  
  236. Thanks and good luck
  237.  
  238. larry kahn
  239. 910-630-0412
  240. kahn@kahn.pdial.interpath.net or kahn@drcoffsite.com or kahn@csn.org
  241. 71534,600 on compuserve
  242.  
  243.  
  244. newer version changes (06 94)
  245.  
  246. fixed stuff so fat partitions on nt daytona work with long file names.
  247. Also now support names such as name.name.name
  248. (on nt 3.1 fat it still will truncate names to 8.3)
  249.  
  250. Fixed startup parameters so that if you start up ws_ftp with the command
  251.  
  252. ws_ftp hostname:path/filename where there can be additional / in the path it
  253. will automatically sign on with user name anonymous and download the file.
  254. This is the behavior in the newer 16 bit version of ws_ftp and I'm mimicking
  255. it here so that you can interface with other tools such as warchie for instance.
  256. This also allows you to automatically use ws_ftp to download files as long
  257. as anonymous is enabled on the remote system.  It would not be hard to also
  258. add support for username password on the command line instead of anonymous logins
  259. if enough people are insterested I will implement it.
  260.  
  261. On installation also copy the file ws_ftp.ini to your winnt directory.
  262.  
  263.  
  264. added muti-threading in NT so that while remote operations are pending
  265. local operations can be performed.  This also enables message processing
  266. to happen during long remote operations so that the window is not all
  267. screwed up and you can now shrink it during a download
  268.  
  269.  
  270. Changed display to view
  271.  
  272. added an abort button but cannot get aborted remote operations to
  273. work reliably so for no no-oped out.
  274.  
  275. Updated connect/close buttons so that when relevant they are enabled or
  276. disabled.
  277.  
  278. Added text edit field boxes for directory selection like on the 16 bit
  279. newer version.  However for now cannot figure out how to interpret if a
  280. return key is pressed so you will have to click on another button or
  281. in the listing windows to get it to fire off after changing the text (ie you will have to change
  282. the focus. Note that this is case sensitive for the remote end because
  283. many unix system are case sensitive and also sensitive to whether or not
  284. the . is on a file name.
  285.  
  286. Also fixed a problem with vms files since fat (on daytona) now supports the entire
  287. file name is was downloading files like abc.de;1  ... Got rid of the
  288. final ; version number info (even though this may someday be desireable)
  289. it is a pain.
  290.  
  291. new version 06/29/94
  292.  
  293. finally got the abort code marginally working
  294.  
  295. had to wait for correct response on control socket if this does not
  296. occur withing 15 seconds times out and prints a message that you may
  297. need to close/exit the app since the abort failed.
  298.  
  299. You can now abort during downloads or uploads.  A warning is printed out
  300. since many servers do not handle the abort correctly and will abort but
  301. subsequent operations may not work.  IF this happens you can enable debuggin
  302. by running ws_ftp32 -d   and send me the log.  However, for many servers
  303. there is nothing I can do as is evident by this working on other servers.
  304.  
  305. If you abort during a remote directory operation you will not get the directory
  306. and will have to execute the change dir command to get a directory listing.
  307.  
  308. Also fixed stuff so when aborting it will close an open download file so it
  309. can be deleted. 
  310.  
  311. Also fixed a bug in the read routine that would hang ws_ftp because it
  312. thought a return value = 0 when the server didn't return anything meant
  313. continuation.
  314.  
  315. new version 10/06/94
  316.  
  317. Still works on either NT 3.1 or daytona NT 3.5
  318.  
  319. Will not work on windows under win32s since it uses multi-threads.
  320.  
  321. added a retries box to host dialog and to the ws_ftp.ini
  322. This field contries the number of retries for loggin on to a site.
  323. It can be used so that you can keep trying automatically all day et.,
  324. to log onto difficult sites such as cica that have a limited number of 
  325. connections. Because this could take a while it will ring 
  326. (asterisk sound) when connection
  327. is complete if you have the bell enabled in the options menu, or ding 
  328. (exclamation sound) if the connection fails after a certain number of retries.
  329.  
  330.  
  331. Also added a mirror or download/upload directory and subdirectories function.
  332. Thanks for the idea Patty.  
  333. This function will download or upload an
  334. entiry directory tree(s).  Now you can select more than one directory in the
  335. local or remote directory window.  If you try to do this and then select the
  336. chgdir button an appropriate error message will appear.  However, if you select
  337. at least one legal directory (ie not [-a-] or ..) and also have no files 
  338. selected (file selection overrides directory selection) and then hit either
  339. the upload or download arrows (--> or <--) all the files in 
  340. the directory or directories selected and subdirectories will be downloaded or
  341. uploaded. Directories will be created along the way if necessary.  At the
  342. end of this entire operation a status message will be printed telling you how
  343. many files were transfered and how many directories were created and the overall
  344. throughput.  NOTE: You cannot do any local operations while this mirror operation
  345. is processing since both the remote and local dir windows are used, for this
  346. reason these windows and the local buttons and selection field 
  347. are tuned off during the operation.  The remote buttons don't have to 
  348. be turned off since there is already a check in place to only allow 1 
  349. remote operation at a time. Also you can get into an infinite loop
  350. if copying directories from you machine back to your own machine and the
  351. form and to directories coincide. Ie if copying from e:\net to e:\net\test you
  352. will put yourself in an endless loop.  I warned you... 
  353. Also If you can't figure out a way to easily turn off the last selected item
  354. in a list (necessary so that you can de-select all files to select only directories
  355. to start the mirror operation), you need to hit the cntrl key and then 
  356. select the last item with the mouse.
  357. I have also turned off (hidden) the remote and local dir windows and file list
  358. windows, and disabled the local action buttons during a mirror operation 
  359. since these windows are used and if the user selected something in one 
  360. of them or did some operation this would screw up the mirror operation.  
  361. They will be turned back on at the end of the operation or after aborting.
  362.  
  363. I have also added new boxes on the host dialog popup for ftp server port.
  364. There were a few requests for this to enable connection to ftp servers
  365. that use non-standard ports. The default is still the normal port (21). This
  366. setting is also saved in the ws_ftp.ini file just like the new retries setting.
  367.  
  368. Since Ive put quite a lot of effort into this new version donations will gladly
  369. be accepted.  Also I'm thinking of an x-windows unix version of the program
  370. if interested drop me a line.
  371.  
  372.  
  373.  
  374. larry kahn
  375. 6550 countryside drive
  376. fayetteville, nc. 28311
  377. 910-630-0412
  378. kahn@kahn.pdial.interpath.net or kahn@drcoffsite.com or kahn@csn.org
  379. 71534,600 on compuserve
  380.  
  381.  
  382. Addendum:
  383.  
  384. I know the user has also done a port of wsftp to windows NT,, he 
  385. however will not respond to any email I have sent him about the bugs I 
  386. encountered and fixed/etc.  I did send him my original port to nt...
  387.  
  388. Anyway I believe my version is better than his as with my multi-threading
  389. I can do a local operation while a remote one is pending and also resize/move
  390. the window around.  this cannot be done on his version ported to NT...
  391. and also the new retries and mirror directory function.
  392.  
  393. See for yourself what you think... I have put my version up here since the
  394. authors port is here and I thought that you may want to compare..
  395.  
  396. larry kahn
  397.