LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-09-2004, 05:45 AM   #1
shibdas
Member
 
Registered: Jun 2003
Posts: 32

Rep: Reputation: 15
FTP program in C


Hi everybody,
I am to develop a C program on unix system to transfer files between two unix machines using FTP. Now, it should provide all the FTP facilities and it should resend the file which is not properly transmitted. Giving this situation what should i do, should i go for an implementation of FTP in my program or should i use any third party library, please provide me your advice and send me links of some third party FTP development library which works under unix and it should be portable.

Thanks in advance

shibdas
 
Old 02-09-2004, 10:19 AM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
Why must it be in C?

We have a very robust FTP system that is implementated totally in shell script. We FTP between all sorts of machines in-house, and to vendor sites outside.

The overall design is simple:
A control file that lists the source filename(or directory), and a script that takes requests to move files. The script that moves files gets all of it's information about the file(s) from the control file.
 
Old 02-09-2004, 01:55 PM   #3
shibdas
Member
 
Registered: Jun 2003
Posts: 32

Original Poster
Rep: Reputation: 15
Hi,
Requirement of the project is C so I may not be able to do it in shell script but i think i can call the script from the c program, isn't it. Can you provide me some code of the script just give a more detailed idea, thanks for the reply
 
Old 02-09-2004, 04:37 PM   #4
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
If you're asking us to do your homework, I'm afraid we can't oblige

Have you tried using Google to search for ideas? I presume that if you are being given this assignment, your teacher or professor has given you some resources with which to get it accomplished.
 
Old 02-09-2004, 05:15 PM   #5
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
I had thought the same A programmer would usually snap at anything reasonable to get the job done. Students are stuck with stupid requirements.
 
Old 02-09-2004, 11:28 PM   #6
shibdas
Member
 
Registered: Jun 2003
Posts: 32

Original Poster
Rep: Reputation: 15
I just wanted some idea and pseudocode. I know that I have to do the job and will try to do it best to my ability, I just wanted to discuss some ideas with you all, as there is no one to help me out here as. The person who has assigned me the job does not know anything about it.

Anyways thanks for the help

shibdas
 
Old 02-10-2004, 10:43 AM   #7
worldmagic
Member
 
Registered: Oct 2003
Location: Europe/Sweden
Distribution: RedHat
Posts: 78

Rep: Reputation: 15
Comeon everyone. What student gets stuct implementing an FTP in C?

If using Shell, I beleave most would use 'scp' anyday over a scripted FTP. (If both machines are yours).

I sadly cant provide you with a C-library for this, but.. a guess would be to google for ncftp/wget source, maybe someone of them has implemented one. All depends on the licenses tho.
 
Old 02-10-2004, 10:45 AM   #8
worldmagic
Member
 
Registered: Oct 2003
Location: Europe/Sweden
Distribution: RedHat
Posts: 78

Rep: Reputation: 15
http://www.stillhq.com/cgi-bin/getpa...page=index.htm
 
Old 02-10-2004, 03:37 PM   #9
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Quote:
Originally posted by worldmagic
Comeon everyone. What student gets stuct implementing an FTP in C?
Well, I had to write an email application (sorta like a simple sendmail), and a basic web server in C for one of my courses in undergrad. It's not all that complicated. With a few resources and some sample code to look at, it didn't take too long to figure out.
 
Old 02-10-2004, 11:30 PM   #10
shibdas
Member
 
Registered: Jun 2003
Posts: 32

Original Poster
Rep: Reputation: 15
Thanks worldmagic for your link, i even don't have the permission to set up a library in the system so i am working with basic ftp client provided with the HP-UX system. I will use the library if i get a chance.

A request to u all, don't start a debate regarding on should help others or one has to do his own job. I have already progressed some of my work and i have done file transfer application previously. I just wanted to discuss the whole matter to all of u, afterall this healthy environment of discussion will help us to progress our work and deploy new ideas.

Linux is a perfect example of this philosophy, so don't start a debate and continue our discussion as we have always done

Thanks everybody

shibdas
 
  


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
ftp program Prasun1 Linux - General 2 09-20-2005 08:40 AM
need a ftp program Oh Cisco Debian 8 01-20-2005 02:46 PM
FTP Program? jabird Linux - Software 5 09-20-2004 02:55 AM
which ftp program? kpachopoulos Linux - Newbie 3 09-15-2004 08:06 AM
i need a good ftp program digital bots Linux - Newbie 6 07-03-2002 05:32 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration