Skip navigation.
Home
The QNX Community Portal

View topic - Remote FTP machine - availability test

Remote FTP machine - availability test

For the old QNX2 and QNX4 RTOS

Remote FTP machine - availability test

Postby Pilotek » Thu Mar 29, 2012 2:00 pm

Please, is there some possibility to test (before FTP client sends the file) whether the remote FTP Server machine can "receive" the file?

Ping is not sufficient (ping is perfect but some network services are "frozen"/hanged/halted).

Thank you.
Pilotek
Senior Member
 
Posts: 124
Joined: Thu Jan 25, 2007 3:52 pm

Re: Remote FTP machine - availability test

Postby maschoen » Thu Mar 29, 2012 3:50 pm

Pilotek wrote:Please, is there some possibility to test (before FTP client sends the file) whether the remote FTP Server machine can "receive" the file?

Ping is not sufficient (ping is perfect but some network services are "frozen"/hanged/halted).

Thank you.


The problem with your question is that "can receive the file" means different things at different levels.

1) Ping tells you that there is a cpu at the IP address that responds to ping, not much information here.
2) You could open a socket to the IP:PORT of the ftp daemon. This would tell you that ftp is available.
3) You could open a socket to the IP:PORT and enter a USERID:PASSWORD and see if you are successful.
4) You could do 3) and then try to send a file. It's possible that you won't have permission to write where you want to. The only way to find out (other than having another access, such as telnet) would be to try.
5) You could do 4) and start sending the file, but until you complete sending, you won't know if there is enough room on the disk.

I suspect however that you just want to do 2).

An alternative would be to use the CURL library and examine the return codes you receive.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: Remote FTP machine - availability test

Postby Pilotek » Fri Mar 30, 2012 2:46 pm

Thank you very much maschoen. Yes, seems that 2) should do what we want (FTP on the other side is "alive") much better.

But the last thing - CURL library sounds interesting (the best would be some return info to the program that needs cyclically send data file to remote FTP partner).

What is CURL library?
Pilotek
Senior Member
 
Posts: 124
Joined: Thu Jan 25, 2007 3:52 pm

Re: Remote FTP machine - availability test

Postby maschoen » Fri Mar 30, 2012 6:54 pm

CURL --> C- URL

Curl is an open source library that does a number of things. I've used it mainly to implement the ftp protocol into a QNX C program. It also does HTTP quite well.

http://curl.haxx.se/



Pilotek wrote:Thank you very much maschoen. Yes, seems that 2) should do what we want (FTP on the other side is "alive") much better.

But the last thing - CURL library sounds interesting (the best would be some return info to the program that needs cyclically send data file to remote FTP partner).

What is CURL library?
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: Remote FTP machine - availability test

Postby Pilotek » Tue Apr 03, 2012 1:28 pm

There is cURL library only for QNX6 there. Is it possible to use it in QNX 4.25 too?
Pilotek
Senior Member
 
Posts: 124
Joined: Thu Jan 25, 2007 3:52 pm

Re: Remote FTP machine - availability test

Postby maschoen » Tue Apr 03, 2012 5:34 pm

Pilotek wrote:There is cURL library only for QNX6 there. Is it possible to use it in QNX 4.25 too?


CURL is open source. You can download and compile it for QNX 4.25. It only requires TCP/IP. I haven't used it under QNX 4 myself, but I can't think of a reason that it would not work, once compiled.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: Remote FTP machine - availability test

Postby Pilotek » Tue Nov 20, 2012 2:37 pm

Please, is there anybody out there who successfully compiled CURL lib under QNX4 and it was working OK?

Isn't somewhere already compiled CURL library for QNX4?

Is there any other action-feedback(=result) method of sending files over TCP/IP from one QNX4 PC to another QNX4 PC (not native QNX Network, but only TCP/IP network)?
I mean other than executing shell FTP from C-programm (and having no feedback of success or failure).
Pilotek
Senior Member
 
Posts: 124
Joined: Thu Jan 25, 2007 3:52 pm

Re: Remote FTP machine - availability test

Postby mario » Wed Nov 21, 2012 8:28 pm

Pilotek wrote:Please, is there anybody out there who successfully compiled CURL lib under QNX4 and it was working OK?

Isn't somewhere already compiled CURL library for QNX4?

Is there any other action-feedback(=result) method of sending files over TCP/IP from one QNX4 PC to another QNX4 PC (not native QNX Network, but only TCP/IP network)?
I mean other than executing shell FTP from C-programm (and having no feedback of success or failure).



rcp?
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: Remote FTP machine - availability test

Postby Pilotek » Thu Nov 22, 2012 9:53 am

rcp may by used in TCP/IP network (i.e. not native QNX network)?
Native QNX network can't be used bacause of the same node-number machines acting like redundant pairs.

And may be used (and return some kind of result) within C-program?
Pilotek
Senior Member
 
Posts: 124
Joined: Thu Jan 25, 2007 3:52 pm


Return to QNX2 and QNX4

Who is online

Users browsing this forum: No registered users and 1 guest