sub.h

#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 ソケット, マイナス値ならエラーコード
覚え書き:
アクティブモードで送受信の際の、以下の3ステートをサポートする。 例) 受信時 (port open) --> PORT --> RETR

int ftp_getready_pasv ( LIBOFTP ftp,
const char *  cmd,
const char *  fname 
)

送受信準備 パッシブモード

引数:
ftp LIBOFTPへのポインタ。
cmd FTPコマンド (ex: RETR, STOR, APPE)
fname サーバ上のファイル名
戻り値:
int ソケット, マイナス値ならエラーコード
覚え書き:
パッシブモードで送受信の際の、以下の3ステートをサポートする。 例) 受信時 PASV --> RETR --> (port open)

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)
覚え書き:
set reply code to ftp attribute reply_code;

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.
覚え書き:


libOftpに対してWed Mar 24 16:27:02 2010に生成されました。  doxygen 1.5.9