ftp_site(3)

NAME
ftp_site, ftp_systype, ftp_status - misc FTP operations

SYNOPSIS
#include <libfget.h>

int ftp_site(FTP *ftp, char *sitecmd, unsigned short flags);

char *ftp_systype(FTP *ftp);

int ftp_status(FTP *ftp, char *buf, size_t bufsize);

VERSION
This man page documents version 1.2 of libfget.

DESCRIPTION
The ftp_site() function executes an FTP SITE command on the FTP server associated with ftp. The flags argument is a bitmask of zero or more of the following flags:

FTP_DATACONN
    The SITE command requires an ftp-data connection.

The ftp_systype() function returns a string representing the system type of the FTP server associated with ftp.

The ftp_status() function queries the status of the FTP server associated with ftp and stores the response in the buffer buf of size bufsize.

RETURN VALUE
The ftp_site() and ftp_status() functions return 0 on success, or -1 on error (and set errno).

The ftp_systype() function returns a string representing the system type of the FTP server on success, or NULL on error (and sets errno).

If errno is set to ECONNRESET, it indicates that the server shut down the connection. The caller is then responsible for calling ftp_quit() with the FTP_FASTCLOSE flag set.

SEE ALSO
ftp_connect(3)