Ik probeer een programmatje in linux/C te maken waarmee ik in kan loggen op een FTP server. Na eindeloos klooien met sockets kwam ik uiteindelijk op een library die je programma FTP functionaliteit kan bieden. (http://www.ibiblio.org/pub/Linux/libs/ftplib-3.1-src.tar.gz)
Nu heb ik nog niet heel veel ervaring in C en ik liep al bij de FTPConnect functie vast
In de help file staat:
Bedankt.
Nu heb ik nog niet heel veel ervaring in C en ik liep al bij de FTPConnect functie vast
In de help file staat:
Hoe moet ik deze functie precies aanroepen ? Ik heb al van alles geprobeerd.#include <ftplib.h>
int FtpConnect(const char *host, netbuf **nControl);
> host
The name of the host machine to connect to and optionally an alternate port number to use.
> nControl
The address where the pointer to the newly created control handle should be stored.
FtpConnect() establishes a connection to the FTP server on the specified machine and returns a handle which can be used to initiate data transfers. The host name should be specified as or :. may be either a host name or ip address. may be either a service name or a port number.
Ik denk dat ik in de war raak van die dubbele pointer... Iemand een idee ?main(){
char *host="ftp.surfnet.nl:21";
netbuf **nControl (maar ook netbuf *nControl etc. etc.)
int FtpConnect(host,nControl); (maar ook FtpConnect(host,&nControl) en FtpConnect(host,*nControl) )
}
Bedankt.