Solved

unix ftp in c.

Posted on 1998-11-08
6
294 Views
Last Modified: 2010-04-15
I need to write in c or c++ a ftp for unix, that will get files from NT machine.
How I can write it in c or c++, I could not find a library that support the getFile or putFile ....
0
Comment
Question by:ofer1
  • 4
6 Comments
 
LVL 2

Expert Comment

by:bertvermeerbergen
ID: 1254099
I suppose you only want to write an ftp client, and that you have an ftp server running on the NT.  Writing a client is not very hard, but as you certainly know, there is one in every standard unix distribution.  So make sure you have a good reason to start reinventing the wheel.
This said, you have a few options:
1. Get RFC959 and implement the client functionality.  If you know about socket programming, it really is not that hard.
2. Since you have a Unix box, use the standard ftp server deamon to do all the hard work and just write your client to handle the control connection, initiating transfer between the NT and Unix ftp server (so called proxy transfers).  See Q.10052364 for more info on how this works.
3. Get the source code for the ftp client under Linux.  This will give you a very good starting point (Just don't copy it and put your name under it).
4. Wait for someone to supply you with a reference to a library that implements getFile/putFile.  I suppose there must be one somewhere, but I do not have any info on this.  But if you are looking for additional control over the ftp session (the only good reason to write your own client, in my opinion), I do not think you really want do you such a library.
0
 
LVL 2

Expert Comment

by:bertvermeerbergen
ID: 1254100
Check out Q.10095891.  Client FTP functionality is currently being discussed under that topic.
0
 
LVL 10

Accepted Solution

by:
rbr earned 20 total points
ID: 1254101
Every Unix will have a ftp client. You can call it by system out of C.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 2

Expert Comment

by:bertvermeerbergen
ID: 1254102
You can, but how do you pass the commands you want executed ?
And just try to capture errors or even making sure that the files are down- or uploaded.  Every 'normal' ftp client I have seen is well designed to be used interactively.  Programmatic control was never an option during the design, I suppose.

0
 

Author Comment

by:ofer1
ID: 1254103
rbr believe me or not, if i had new how to call this ftp client from c, I wasn't put this question here
0
 
LVL 2

Expert Comment

by:bertvermeerbergen
ID: 1254104
ofer1, did you get some work done on your ftp client implementation ?

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to get time_t value that is a week old 6 169
Passing command line arguments in C 10 95
delete-remove 14 97
Memory going from 12gb to 64gb or 96gb. worth it? 15 202
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question