home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / perl / 8035 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.0 KB

  1. Path: sparky!uunet!ukma!gatech!purdue!not-for-mail
  2. From: spaf@cs.purdue.edu (Gene Spafford)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: ftpget package - why doesn't it work ?
  5. Date: 28 Jan 1993 18:37:42 -0500
  6. Organization: Department of Computer Sciences, Purdue University
  7. Lines: 39
  8. Message-ID: <1k9qo6INNjd@uther.cs.purdue.edu>
  9. References: <C1GKq9.up@smtl.demon.co.uk>
  10. NNTP-Posting-Host: uther.cs.purdue.edu
  11. In-reply-to: pete@smtl.demon.co.uk's message of Tue, 26 Jan 1993 11:18:08 +0000
  12.  
  13. Well, the problem may well be because of a bad assumption in chat2.pl
  14.  
  15. The error you are getting, 
  16.     Unable to connect to gate.demon.co.uk ftp port: Connection timed out 
  17.     at /usr/local/bin/ftpls line 48.
  18. is because the "connect" call in chat'open_port is failing.
  19.  
  20. Take a look in chat2.pl, up near the beginning of the open_port
  21. routine.   Does your version have a    
  22.         $serverproc = pack($sockaddr, 2, $port, $serveraddr);
  23.     unless (socket(S, 2, 1, 6)) {
  24.         # XXX hardwired $AF_SOCKET, $SOCK_STREAM, 'tcp'
  25.         # but who the heck would change these anyway? (:-)
  26. in it?  If so, it could be that the assumptions Randal made when he
  27. wrote that do *not* hold on your system.
  28.  
  29. Next, check the following places for define values:
  30.   /usr/include/sys/socket.h
  31.     AF_INET == 2   (mistyped as AF_SOCKET, as above)
  32.     SOCK_STREAM == 1
  33.   /usr/include/net/in.h
  34.     IPPROTO_TCP == 6
  35.  
  36. If one of those defines is not as indicated above, then that explains
  37. the problem.  It also is why each of the ftp packages would fail in a
  38. similar way (using chat2), but system software (probably compiled with
  39. the include files) would work.
  40.  
  41. To fix this means you should fix chat2.pl to use the correct values.
  42. Note that if the AF_INET == 2 is at fault, it must be changed
  43. in both the "pack" and "socket" calls.
  44.  
  45. If that is *not* the problem, then I'm at a loss to suggest anything
  46. further to examine.
  47. -- 
  48. Gene Spafford, COAST Project Director
  49. Software Engineering Research Center & Dept. of Computer Sciences
  50. Purdue University, W. Lafayette IN 47907-1398
  51. Internet:  spaf@cs.purdue.edu    phone:  (317) 494-7825
  52.