LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-07-2012, 02:28 PM   #1
stefano68
LQ Newbie
 
Registered: Nov 2012
Posts: 2

Rep: Reputation: Disabled
Development of a simple Client FTP: Error 425!


Hallo to every body,
I'm developing a simple client ftp under C/C++ and using socket functions. I have already developed a simple Class in Windows, just to test easily my small program, taking care to use a common language as close as possible to the linux environment. It worked in Windows! I've ported the code under linux (openSuse 12) and it doesn't work. In both cases the firewall is disabled. I'm using Attive mode in ftp: I create the first socket for the command pourpose, and after having connected to the server I created the listening socket before to ask to the server the NLST command. When I try to listen, the status is idle and after 1 or 2 minutes the socket retrieve error code 425.
What to do? Where is possibile to look for a sample code where this feature is rightly working under linux?
Thank you in advance for your answer
Stefano
 
Old 11-10-2012, 05:48 AM   #2
firstfire
Member
 
Registered: Mar 2006
Location: Ekaterinburg, Russia
Distribution: Debian, Ubuntu
Posts: 638

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Hi.

Welcome to LQ!
Try to look at the source code of existing ftp clients. For example, tnftp. Namely a dataconn() function in src/ftp.c looks relevant. I'd recommend to download the source code and grep it for word active.

Hope this helps.
 
Old 11-19-2012, 01:01 AM   #3
stefano68
LQ Newbie
 
Registered: Nov 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you fistfire for you answer, but I discovered that my code was ok. I am using a linux virtual machine within a windows 7 host, through VirtualBox. This virtualization software suffer for a bug with ftp and ping protocol, that are not forwarded correctly.
I sorted out the problem bypassing it: it works good using a Passive Ftp connection.
Thank you
 
Old 11-19-2012, 01:49 AM   #4
firstfire
Member
 
Registered: Mar 2006
Location: Ekaterinburg, Russia
Distribution: Debian, Ubuntu
Posts: 638

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Hi.

Glad to hear you solved the problem!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Source Code for a simple ftp server and client koodoo Programming 17 07-05-2013 11:48 AM
425 Failed to establish connection. ftp saravanakumar Linux - Server 1 08-09-2011 07:47 AM
425 failed to establish connection for ftp Networking linuxhippy Slackware 4 05-02-2005 03:45 AM
FTP 425 Error dnrct AIX 2 10-12-2004 06:59 PM


All times are GMT -5. The time now is 08:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration