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