The ftpsys() call stores the string containing the FTP server description of the operating system running on the host in a buffer.
Syntax
#include <ftpapi.h> int ftpsys(host, userid, passwd, acct, buf, buflen) char *host; char *userid; char *passwd; char *acct, char *buf; int *buflen;
Parameters
host
To specify the port number (other than the well-know port) used by the FTP server, code the host name, followed by a blank, then the port number. For example, specify ftpsys ("server1 1234",...)
Description
The ftpsys() call stores the string containing the FTP server description of the operating system running on the host in the buffer buf. The string describing the operating system of the host is truncated to fit buf if it is longer than buflen. The returned string is always null-terminated.
Return Values
The value 0 indicates success; the value -1 indicates an error. The value of ftperrno indicates the specific error. See Return Values for a description of the return codes.
Examples
int rc;rc=ftpsys("ralvmm","jason","ehgr1",hostsysbuf, sizeof hostsysbuf);
After the ftpsys() call the buffer hostsysbuf contains the following:
VM is the operating system of this server.
The FTP server reply describing the operating system of host ralvmm using user ID jason with password eghr1 is stored to hostsysbuf.