net/ftp.h File Reference

FTP Server Module for Modtronix TCP/IP Stack. More...


Defines

#define FTP_COMMAND_PORT   (21ul)
#define FTP_DATA_PORT   (20ul)
#define FTP_TIMEOUT   ((TICK16)180ul * (TICK16)TICKS_PER_SECOND)
#define FTP_USER_NAME_LEN   (9ul)
#define MAX_FTP_ARGS   (7ul)
#define MAX_FTP_CMD_STRING_LEN   (31ul)

Functions

void FTPInit (void)
BOOL FTPServer (void)
BOOL FTPVerify (char *login, char *password)


Detailed Description

FTP Server Module for Modtronix TCP/IP Stack.

Author:
Modtronix Engineering
Dependencies:
stacktsk.h, tcp.h
Compiler:
MPLAB C18 v2.10 or higher
HITECH PICC-18 V8.35PL3 or higher

Description

This module implements a basic FTP client.
For a detailed description, see the FTP section of this document - in [Modules] [TCP/IP Stack] [TCP/IP User Protocols].

Configuration

The following defines are used to configure this module, and should be placed in the projdefs.h (or similar) file. For details, see Project Configuration. To configure the module, the required defines should be uncommended, and the rest commented out.
 //*********************************************************************
 //-------------------- FTP  Configuration --------------------
 //*********************************************************************
 //General configuration data
 #define FTP_COMMAND_PORT                (21ul)
 #define FTP_DATA_PORT                   (20ul)
 #define FTP_TIMEOUT                     (TICK)((TICK)180 * TICK_SECOND)
 #define MAX_FTP_ARGS                    (7ul)
 #define MAX_FTP_CMD_STRING_LEN          (31ul)

 //Configure FTP mudule to have PUT
 #define FTP_PUT_ENABLED

Define Documentation

#define FTP_COMMAND_PORT   (21ul)

#define FTP_DATA_PORT   (20ul)

#define FTP_TIMEOUT   ((TICK16)180ul * (TICK16)TICKS_PER_SECOND)

#define FTP_USER_NAME_LEN   (9ul)

#define MAX_FTP_ARGS   (7ul)

#define MAX_FTP_CMD_STRING_LEN   (31ul)


Function Documentation

void FTPInit ( void   ) 

Initializes internal variables of Telnet

Pre-Condition:
TCP module is already initialized

BOOL FTPServer ( void   ) 

This function acts as a task (similar to one in RTOS). This function performs its task in co-operative manner. Main application must call this function repeatdly to ensure all open or new connections are served on time.

Pre-Condition:
FTPInit() must already be called.
Returns:
Opened Telnet connections are served.

BOOL FTPVerify ( char *  login,
char *  password 
)

Compare given login and password with internal values and return TRUE or FALSE. This is a callback from Telnet Server to user application. User application must implement this function in his/her source file return correct response based on internal login and password information.

Parameters:
login Telnet User login name
password Telnet User password
Returns:
TRUE if login and password verfies FALSE if login and password does not match


Generated on Wed Feb 3 12:45:34 2010 for SBC65EC Web Server by  doxygen 1.5.8