NetBurner 3.5.0
PDF Version
 
ftpd.h
Go to the documentation of this file.
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
56#ifndef _NB_FTPD_H
57#define _NB_FTPD_H
58
59#include <nettypes.h>
60
61
65#define FTPD_FAIL (0)
66#define FTPD_OK (1)
67#define FTPD_RUNNING (2)
68#define FTPD_NOT_RUNNING (3)
69#define FTPD_LISTEN_ERR (4)
76#define FTPD_FILE_SIZE_NOSUCH_FILE (-1)
77#define FTPD_FILE_SIZE_UNKNOWN (0)
86#ifdef FTPD_SSL_SUPPORT
102int FTPDStartSSL(uint16_t port, uint8_t server_priority, bool enableFTPS = false, bool encryptData = false);
103#endif
104
119int FTPDStart(uint16_t port, uint8_t server_priority);
120
130
145typedef void(FTPDCallBackReportFunct)(int handle, const char *name_to_report);
146
167void *FTPDSessionStart(const char *user, const char *passwd, const IPADDR4 hi_ip);
168
176void FTPDSessionEnd(void *pSession);
177
195int FTPD_DirectoryExists(const char *full_directory, void *pSession);
196
209int FTPD_CreateSubDirectory(const char *current_directory, const char *new_dir, void *pSession);
210
222int FTPD_DeleteSubDirectory(const char *current_directory, const char *sub_dir, void *pSession);
223
252int FTPD_ListSubDirectories(const char *current_directory, void *pSession, FTPDCallBackReportFunct *pFunc, int handle);
253
271int FTPD_FileExists(const char *full_directory, const char *file_name, void *pSession);
272
278int FTPD_GetFileSize(const char *full_directory, const char *file_name);
279
291int FTPD_SendFileToClient(const char *full_directory, const char *file_name, void *pSession, int fd);
292
303int FTPD_AbleToCreateFile(const char *full_directory, const char *file_name, void *pSession);
304
316int FTPD_GetFileFromClient(const char *full_directory, const char *file_name, void *pSession, int fd);
317
328int FTPD_DeleteFile(const char *current_directory, const char *file_name, void *pSession);
329
340int FTPD_Rename(const char *current_directory, const char *cur_file_name, const char *new_file_name, void *pSession);
341
371int FTPD_ListFile(const char *current_directory, void *pSession, FTPDCallBackReportFunct *pFunc, int handle);
372
375#endif
376
378
Used to store and manipulate IPv4 addresses in dual stack mode.
Definition nettypes.h:208
void FTPDSessionEnd(void *pSession)
Indicate an FTP user session will be terminated. This callback function gives the user program the op...
Definition _common/EFFS/FAT/src/ftp_f.cpp:192
int FTPD_FileExists(const char *full_directory, const char *file_name, void *pSession)
Report on the whether or not a file exists Check for the existence of a file, usually just before an ...
Definition _common/EFFS/FAT/src/ftp_f.cpp:294
int FTPD_ListSubDirectories(const char *current_directory, void *pSession, FTPDCallBackReportFunct *pFunc, int handle)
Called by the FTP Server to list all subdirectories under the current directory Called by the FTP Ser...
Definition _common/EFFS/FAT/src/ftp_f.cpp:261
int FTPD_ListFile(const char *current_directory, void *pSession, FTPDCallBackReportFunct *pFunc, int handle)
Lists all files in the current directory List all files in the current directory. This function must ...
Definition _common/EFFS/FAT/src/ftp_f.cpp:651
int FTPDStartSSL(uint16_t port, uint8_t server_priority, bool enableFTPS=false, bool encryptData=false)
Starts the FTP Server task (SSL) Listens for incoming connections. Only one instance of the FTPD is a...
int FTPD_GetFileFromClient(const char *full_directory, const char *file_name, void *pSession, int fd)
Create/get a file Receive a file from the FTP client. This function must be implemented by the progra...
Definition _common/EFFS/FAT/src/ftp_f.cpp:541
int FTPD_AbleToCreateFile(const char *full_directory, const char *file_name, void *pSession)
Report on the ability to create/receive a file Determine if a file can be created....
Definition _common/EFFS/FAT/src/ftp_f.cpp:533
int FTPD_DirectoryExists(const char *full_directory, void *pSession)
Called by the FTP Server to test for the existence of a directory Called by the FTP Server as the res...
Definition _common/EFFS/FAT/src/ftp_f.cpp:197
int FTPD_SendFileToClient(const char *full_directory, const char *file_name, void *pSession, int fd)
Send the contents of a file to a file descriptor Send a file to a FTP client. This function must be i...
Definition _common/EFFS/FAT/src/ftp_f.cpp:377
int FTPDStart(uint16_t port, uint8_t server_priority)
Starts the FTP Server task (non-SSL/TLS) Listens for incoming connections. Only one instance of the F...
int FTPD_DeleteSubDirectory(const char *current_directory, const char *sub_dir, void *pSession)
Called by the FTP Server to delete a directory Called by the FTP Server as the result of an attempt t...
Definition _common/EFFS/FAT/src/ftp_f.cpp:238
void * FTPDSessionStart(const char *user, const char *passwd, const IPADDR4 hi_ip)
Start an FTP user session (User) This function is called following the creation of a new FTP session....
Definition _common/EFFS/FAT/src/ftp_f.cpp:170
int FTPD_GetFileSize(const char *full_directory, const char *file_name)
Returns the size of a specific file.
Definition _common/EFFS/FAT/src/ftp_f.cpp:349
int FTPD_Rename(const char *current_directory, const char *cur_file_name, const char *new_file_name, void *pSession)
Rename a file Rename a file. This function must be implemented by the programmer.
Definition _common/EFFS/FAT/src/ftp_f.cpp:692
int FTPD_DeleteFile(const char *current_directory, const char *file_name, void *pSession)
Delete a file Delete a file. This function must be implemented by the programmer.
Definition _common/EFFS/FAT/src/ftp_f.cpp:634
int FTPDStopReq()
Stops the FTP Server task Sends a stop request to the currently running FTPD.
int FTPD_CreateSubDirectory(const char *current_directory, const char *new_dir, void *pSession)
Called by the FTP Server to create a directory Called by the FTP Server as the result of an attempt t...
Definition _common/EFFS/FAT/src/ftp_f.cpp:215
void FTPDCallBackReportFunct(int handle, const char *name_to_report)
FTP Session callback typedef Typedef for all directory reporting callbacks This callback type definit...
Definition ftpd.h:145
NetBurner IPADDR4 Class. See the IPADDR4 Class page for complete documentation.