Remote FTP machine - availability test

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.

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?


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.

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.

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 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?