#include <string.h>
#include <errno.h>
マクロ定義 | |
#define | DEBUGPRINT1(f, a1) |
#define | copy_strerror() strncpy( ftp->error_message, strerror(errno), sizeof(ftp->error_message)-1 ); |
関数 | |
int | sendn (int sd, const char *buf, int len, int flags) |
int | ftp_send_command (LIBOFTP *ftp, const char *cmd) |
int | ftp_receive_response (LIBOFTP *ftp, char *res_buf, int bufsiz) |
int | ftp_getready_active (LIBOFTP *ftp, const char *cmd, const char *fname) |
int | ftp_getready_pasv (LIBOFTP *ftp, const char *cmd, const char *fname) |
#define copy_strerror | ( | ) | strncpy( ftp->error_message, strerror(errno), sizeof(ftp->error_message)-1 ); |
#define DEBUGPRINT1 | ( | f, | |||
a1 | ) |
int ftp_getready_active | ( | LIBOFTP * | ftp, | |
const char * | cmd, | |||
const char * | fname | |||
) |
送受信準備 アクティブモード
ftp | LIBOFTPへのポインタ。 | |
cmd | FTPコマンド (ex: RETR, STOR, APPE) | |
fname | サーバ上のファイル名 |
int | ソケット, マイナス値ならエラーコード |
int ftp_getready_pasv | ( | LIBOFTP * | ftp, | |
const char * | cmd, | |||
const char * | fname | |||
) |
送受信準備 パッシブモード
ftp | LIBOFTPへのポインタ。 | |
cmd | FTPコマンド (ex: RETR, STOR, APPE) | |
fname | サーバ上のファイル名 |
int | ソケット, マイナス値ならエラーコード |
int ftp_receive_response | ( | LIBOFTP * | ftp, | |
char * | res_buf, | |||
int | bufsiz | |||
) |
receive response
ftp | pointer of LIBOFTP. | |
res_buf | response buffer ( null ok ) | |
bufsiz | response buffer size. |
int | reply code, or error code (minus value) |
int ftp_send_command | ( | LIBOFTP * | ftp, | |
const char * | cmd | |||
) |
send ftp command
ftp | pointer of LIBOFTP. | |
cmd | ftp command. |
int | 0 is no error, or -1 if an error. |
int sendn | ( | int | sd, | |
const char * | buf, | |||
int | len, | |||
int | flags | |||
) |
send n bytes.
sd | socket descriptor | |
buf | pointer of send buffer | |
len | message length | |
flags | flags of send() |
int | number of bytes sent, or -1 if an error. |