net/ftp.h File Reference


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                (21)
 #define FTP_DATA_PORT                   (20)
 #define FTP_TIMEOUT                     (TICK)((TICK)180 * TICK_SECOND)
 #define MAX_FTP_ARGS                    (7)
 #define MAX_FTP_CMD_STRING_LEN          (31)

 //Configure FTP mudule to have PUT
 #define FTP_PUT_ENABLED


Defines

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

Functions

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


Define Documentation

#define FTP_COMMAND_PORT   (21)

#define FTP_DATA_PORT   (20)

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

#define FTP_USER_NAME_LEN   (9)

#define MAX_FTP_ARGS   (7)

#define MAX_FTP_CMD_STRING_LEN   (31)


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 Mon Oct 9 13:22:07 2006 for SBC65EC Web Server by  doxygen 1.4.7