| Line No. | Rev | Author | Line |
|---|---|---|---|
| 1 | 32 | kaklik | /********************************************************************* |
| 2 | * |
||
| 3 | * FTP Server Defs for Microchip TCP/IP Stack |
||
| 4 | * |
||
| 5 | ********************************************************************* |
||
| 6 | * FileName: FTP.h |
||
| 7 | * Dependencies: StackTsk.h |
||
| 8 | * TCP.h |
||
| 9 | * Processor: PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F, PIC32 |
||
| 10 | * Compiler: Microchip C32 v1.05 or higher |
||
| 11 | * Microchip C30 v3.12 or higher |
||
| 12 | * Microchip C18 v3.30 or higher |
||
| 13 | * HI-TECH PICC-18 PRO 9.63PL2 or higher |
||
| 14 | * Company: Microchip Technology, Inc. |
||
| 15 | * |
||
| 16 | * Software License Agreement |
||
| 17 | * |
||
| 18 | * Copyright (C) 2002-2009 Microchip Technology Inc. All rights |
||
| 19 | * reserved. |
||
| 20 | * |
||
| 21 | * Microchip licenses to you the right to use, modify, copy, and |
||
| 22 | * distribute: |
||
| 23 | * (i) the Software when embedded on a Microchip microcontroller or |
||
| 24 | * digital signal controller product ("Device") which is |
||
| 25 | * integrated into Licensee's product; or |
||
| 26 | * (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h, |
||
| 27 | * ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device |
||
| 28 | * used in conjunction with a Microchip ethernet controller for |
||
| 29 | * the sole purpose of interfacing with the ethernet controller. |
||
| 30 | * |
||
| 31 | * You should refer to the license agreement accompanying this |
||
| 32 | * Software for additional information regarding your rights and |
||
| 33 | * obligations. |
||
| 34 | * |
||
| 35 | * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT |
||
| 36 | * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT |
||
| 37 | * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A |
||
| 38 | * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL |
||
| 39 | * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR |
||
| 40 | * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF |
||
| 41 | * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS |
||
| 42 | * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE |
||
| 43 | * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER |
||
| 44 | * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT |
||
| 45 | * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE. |
||
| 46 | * |
||
| 47 | * |
||
| 48 | * Author Date Comment |
||
| 49 | *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
||
| 50 | * Nilesh Rajbharti 4/23/01 Original (Rev 1.0) |
||
| 51 | ********************************************************************/ |
||
| 52 | #ifndef __FTP_H |
||
| 53 | #define __FTP_H |
||
| 54 | |||
| 55 | |||
| 56 | #define FTP_USER_NAME_LEN (10) |
||
| 57 | |||
| 58 | |||
| 59 | /********************************************************************* |
||
| 60 | * Function: BOOL FTPVerify(char *login, char *password) |
||
| 61 | * |
||
| 62 | * PreCondition: None |
||
| 63 | * |
||
| 64 | * Input: login - Telnet User login name |
||
| 65 | * password - Telnet User password |
||
| 66 | * |
||
| 67 | * Output: TRUE if login and password verfies |
||
| 68 | * FALSE if login and password does not match. |
||
| 69 | * |
||
| 70 | * Side Effects: None |
||
| 71 | * |
||
| 72 | * Overview: Compare given login and password with internal |
||
| 73 | * values and return TRUE or FALSE. |
||
| 74 | * |
||
| 75 | * Note: This is a callback from Telnet Server to |
||
| 76 | * user application. User application must |
||
| 77 | * implement this function in his/her source file |
||
| 78 | * return correct response based on internal |
||
| 79 | * login and password information. |
||
| 80 | ********************************************************************/ |
||
| 81 | #ifdef __FTP_C |
||
| 82 | extern BOOL FTPVerify(BYTE *login, BYTE *password); |
||
| 83 | #endif |
||
| 84 | |||
| 85 | |||
| 86 | /********************************************************************* |
||
| 87 | * Function: void FTPInit(void) |
||
| 88 | * |
||
| 89 | * PreCondition: TCP module is already initialized. |
||
| 90 | * |
||
| 91 | * Input: None |
||
| 92 | * |
||
| 93 | * Output: None |
||
| 94 | * |
||
| 95 | * Side Effects: None |
||
| 96 | * |
||
| 97 | * Overview: Initializes internal variables of Telnet |
||
| 98 | * |
||
| 99 | * Note: |
||
| 100 | ********************************************************************/ |
||
| 101 | void FTPInit(void); |
||
| 102 | |||
| 103 | |||
| 104 | /********************************************************************* |
||
| 105 | * Function: void FTPServer(void) |
||
| 106 | * |
||
| 107 | * PreCondition: FTPInit() must already be called. |
||
| 108 | * |
||
| 109 | * Input: None |
||
| 110 | * |
||
| 111 | * Output: Opened Telnet connections are served. |
||
| 112 | * |
||
| 113 | * Side Effects: None |
||
| 114 | * |
||
| 115 | * Overview: |
||
| 116 | * |
||
| 117 | * Note: This function acts as a task (similar to one in |
||
| 118 | * RTOS). This function performs its task in |
||
| 119 | * co-operative manner. Main application must call |
||
| 120 | * this function repeatdly to ensure all open |
||
| 121 | * or new connections are served on time. |
||
| 122 | ********************************************************************/ |
||
| 123 | BOOL FTPServer(void); |
||
| 124 | |||
| 125 | |||
| 126 | #endif |
Powered by WebSVN v2.8.3