Subversion Repositories HomeAutomation

Rev

Rev 363 | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. /*********************************************************************
  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
  10.  * Complier:        Microchip C18 v3.02 or higher
  11.  *                  Microchip C30 v2.01 or higher
  12.  * Company:         Microchip Technology, Inc.
  13.  *
  14.  * Software License Agreement
  15.  *
  16.  * This software is owned by Microchip Technology Inc. ("Microchip")
  17.  * and is supplied to you for use exclusively as described in the
  18.  * associated software agreement.  This software is protected by
  19.  * software and other intellectual property laws.  Any use in
  20.  * violation of the software license may subject the user to criminal
  21.  * sanctions as well as civil liability.  Copyright 2006 Microchip
  22.  * Technology Inc.  All rights reserved.
  23.  *
  24.  * This software is provided "AS IS."  MICROCHIP DISCLAIMS ALL
  25.  * WARRANTIES, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, NOT LIMITED
  26.  * TO MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
  27.  * INFRINGEMENT.  Microchip shall in no event be liable for special,
  28.  * incidental, or consequential damages.
  29.  *
  30.  *
  31.  * Author               Date    Comment
  32.  *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33.  * Nilesh Rajbharti     4/23/01  Original        (Rev 1.0)
  34.  ********************************************************************/
  35.  
  36. #ifndef FTP_H
  37. #define FTP_H
  38.  
  39.  
  40. #include "..\Include\StackTsk.h"
  41.  
  42. #define FTP_USER_NAME_LEN       (10)
  43.  
  44.  
  45. /*********************************************************************
  46.  * Function:        BOOL FTPVerify(char *login, char *password)
  47.  *
  48.  * PreCondition:    None
  49.  *
  50.  * Input:           login       - Telnet User login name
  51.  *                  password    - Telnet User password
  52.  *
  53.  * Output:          TRUE if login and password verfies
  54.  *                  FALSE if login and password does not match.
  55.  *
  56.  * Side Effects:    None
  57.  *
  58.  * Overview:        Compare given login and password with internal
  59.  *                  values and return TRUE or FALSE.
  60.  *
  61.  * Note:            This is a callback from Telnet Server to
  62.  *                  user application.  User application must
  63.  *                  implement this function in his/her source file
  64.  *                  return correct response based on internal
  65.  *                  login and password information.
  66.  ********************************************************************/
  67. #ifdef THIS_IS_FTP
  68. extern BOOL FTPVerify(char *login, char *password);
  69. #endif
  70.  
  71.  
  72. /*********************************************************************
  73.  * Function:        void FTPInit(void)
  74.  *
  75.  * PreCondition:    TCP module is already initialized.
  76.  *
  77.  * Input:           None
  78.  *
  79.  * Output:          None
  80.  *
  81.  * Side Effects:    None
  82.  *
  83.  * Overview:        Initializes internal variables of Telnet
  84.  *
  85.  * Note:
  86.  ********************************************************************/
  87. void FTPInit(void);
  88.  
  89.  
  90. /*********************************************************************
  91.  * Function:        void FTPServer(void)
  92.  *
  93.  * PreCondition:    FTPInit() must already be called.
  94.  *
  95.  * Input:           None
  96.  *
  97.  * Output:          Opened Telnet connections are served.
  98.  *
  99.  * Side Effects:    None
  100.  *
  101.  * Overview:
  102.  *
  103.  * Note:            This function acts as a task (similar to one in
  104.  *                  RTOS).  This function performs its task in
  105.  *                  co-operative manner.  Main application must call
  106.  *                  this function repeatdly to ensure all open
  107.  *                  or new connections are served on time.
  108.  ********************************************************************/
  109. BOOL FTPServer(void);
  110.  
  111.  
  112. #endif
  113.