NetBurner 3.5.8
PDF Version
ftp.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
98#ifndef _NB_FTP_H
99#define _NB_FTP_H
100
101#include <nettypes.h>
102
108#define FTP_OK (0)
109#define FTP_TIMEOUT (-1)
110#define FTP_PASSWORDERROR (-2)
111#define FTP_CONNECTFAIL (-3)
112#define FTP_COMMANDFAIL (-4)
113#define FTP_COMMANDERROR (-4)
114#define FTP_BADSESSION (-5)
115#define FTP_NETWORKERROR (-6)
138int FTP_InitializeSession(IPADDR4 server_address, uint16_t port, PCSTR UserName, PCSTR Password, uint32_t time_out);
139
152int FTP_CloseSession(int session);
153
169int FTPGetDir(int ftp_Session, char *dir_buf, int nbytes, uint16_t timeout);
170
184int FTPSetDir(int ftp_Session, const char *new_dir, uint16_t timeout);
185
200int FTPDeleteDir(int ftp_Session, const char *dir_to_delete, uint16_t timeout);
201
215int FTPMakeDir(int ftp_Session, const char *dir_to_make, uint16_t timeout);
216
230int FTPUpDir(int ftp_Session, uint16_t timeout);
231
245int FTPDeleteFile(int ftp_Session, const char *file_name, uint16_t timeout);
246
262int FTPRenameFile(int ftp_Session, const char *old_file_name, const char *new_file_name, uint16_t timeout);
263
317int FTPSendFile(int ftp_Session, const char *full_file_name, BOOL bBinaryMode, uint16_t timeout);
318
370int FTPGetFile(int ftp_Session, const char *full_file_name, BOOL bBinaryMode, uint16_t timeout);
371
392int FTPGetList(int ftp_Session, const char *full_dir_name, uint16_t timeout);
393
414int FTPGetFileNames(int ftp_Session, const char *full_dir_name, uint16_t timeout);
415
432int FTPRawCommand(int ftp_Session, const char *cmd, char *cmd_buf, int nbytes, uint16_t timeout);
433
454int FTPGetCommandResult(int ftp_Session, char *cmd_buf, int nbytes, uint16_t timeout);
455
475int FTPRawStreamCommand(int ftp_Session, const char *cmd, int *pResult, char *cmd_buf, int nbytes, uint16_t timeout);
476
488void FTPActiveMode(int ftp_Session);
489
501void FTPPassiveMode(int ftp_Session);
502
503#endif
504
Used to store and manipulate IPv4 addresses in dual stack mode.
Definition nettypes.h:225
int FTPRenameFile(int ftp_Session, const char *old_file_name, const char *new_file_name, uint16_t timeout)
Rename a file.
int FTPRawStreamCommand(int ftp_Session, const char *cmd, int *pResult, char *cmd_buf, int nbytes, uint16_t timeout)
Send a command and receive a response over a stream connection.
int FTPSendFile(int ftp_Session, const char *full_file_name, BOOL bBinaryMode, uint16_t timeout)
Initialize the process to send a file to a FTP server.
int FTPGetList(int ftp_Session, const char *full_dir_name, uint16_t timeout)
Initialize the process to receive a directory listing from a FTP server.
void FTPActiveMode(int ftp_Session)
Set the data connection mode to active (PORT).
int FTPRawCommand(int ftp_Session, const char *cmd, char *cmd_buf, int nbytes, uint16_t timeout)
Send a FTP command to the FTP server.
int FTPGetFileNames(int ftp_Session, const char *full_dir_name, uint16_t timeout)
Initialize the process to receive just the file names in a directory from a FTP server.
int FTPDeleteDir(int ftp_Session, const char *dir_to_delete, uint16_t timeout)
Delete a directory.
int FTPGetCommandResult(int ftp_Session, char *cmd_buf, int nbytes, uint16_t timeout)
Returns the result of the last FTP operation.
int FTPMakeDir(int ftp_Session, const char *dir_to_make, uint16_t timeout)
Create a new directory.
int FTPSetDir(int ftp_Session, const char *new_dir, uint16_t timeout)
Set the current working directory.
int FTP_CloseSession(int session)
Close a FTP session.
int FTPDeleteFile(int ftp_Session, const char *file_name, uint16_t timeout)
Delete a file.
int FTPUpDir(int ftp_Session, uint16_t timeout)
Move up one directory level.
int FTPGetFile(int ftp_Session, const char *full_file_name, BOOL bBinaryMode, uint16_t timeout)
Initialize the process to get a file from a FTP server.
int FTP_InitializeSession(IPADDR4 server_address, uint16_t port, PCSTR UserName, PCSTR Password, uint32_t time_out)
Initialize a FTP session with a FTP server.
void FTPPassiveMode(int ftp_Session)
Set the data connection mode to passive (PASV).
int FTPGetDir(int ftp_Session, char *dir_buf, int nbytes, uint16_t timeout)
Get the current working directory.