Solved

unix ftp in c.

Posted on 1998-11-08
6
290 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now