FileZilla FTP Server Source Code Analysis (4)

Source: Internet
Author: User
Tags website server filezilla filezilla ftp

FileZilla FTPServer Source Code Analysis: FileZilla is a free and open-source FTP tool. Including FileZilla Client and FileZilla Server. FileZilla Server only provides windows versions. to upload a local website webpage file to the website Server or download a webpage file from the Server, you only need the FileZilla Client Version. FileZilla FTP Server Source Code Analysis

 
 
  1. < typetype="text/javascript"> < srcsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> < typetype="text/javascript">   
  2.  
  3. < srcsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> WM_FILEZILLA_SERVERMSG:  
  4.  

WParam indicates a large classification, that is, what type of message, and lParam is the additional information, which varies depending on wParam.

WParam has the following types:

 
 
  1. FSM_STATUSMESSAGE:  
  2.  

Record the current activity, display the activity information in the admin window, and record it to the log file (you need to set the corresponding options). Open the admin window, the content displayed in the upper part is from.

LParam carries the t_statusmsg structure, which records the active user, ip, time, message, and so on.

For example:

 
 
  1. (000001) 2006-7-23 16:03:56 - (not logged in) (127.0.0.1)> USER whg  
  2.  
  3. (000001) 2006-7-23 16:03:59 - (not logged in) (127.0.0.1)> 331 Password required for whg  
  4.  
  5. (000001) 2006-7-23 16:04:05 - (not logged in) (127.0.0.1)> PASS *  
  6.  
  7. (000001) 2006-7-23 16:04:11 - robert (127.0.0.1)> 230 Logged on  
  8.  
  9. FSM_CONNECTIONDATA:  
  10.  

This is a connection-related message, such as a new connection, a successful user login, and a user logout. The information is sent to the admin window, which is displayed in the lower half of the admin window, that is, ID, Account, IP, and so on.

LParam carries the t_connop structure. The op in the structure indicates a more detailed connection classification. The possible values include:

 
 
  1. USERCONTROL_CONNOP_ADD  
  2.  

New users are connected (not logged on yet)

 
 
  1. USERCONTROL_CONNOP_CHANGEUSER  
  2.  

Logon successful

 
 
  1. USERCONTROL_CONNOP_REMOVE  
  2.  

The user exits, or is forcibly logged out due to time

 
 
  1. USERCONTROL_CONNOP_TRANSFERINIT  
  2.  

Transmission starts or ends, that is, data communication with the client. If data is transmitted, the ls command also causes data transmission.

 
 
  1. USERCONTROL_CONNOP_TRANSFEROFFSETS  
  2.  

Shows the transmission progress. For example, you need to display the current number of transmitted bytes and transmission rate to the admin window during file transmission.

All the information is displayed in the lower half of the admin window.

 
 
  1. FSM_THREADCANQUIT:  
  2.  

These messages are sent when the system exits, and the thread ends when the system processes the message.

 
 
  1. FSM_SEND:  
  2.  

The system sends this message as long as the data is sent, and the status bar in the admin window shows how much data the current user has sent.

 
 
  1. FSM_RECV:  
  2.  

The system sends this message as long as the data is received, and the status bar in the admin window shows how much data the current user has received.

It can be seen that the messages processed by the CServer are only admin or status messages, which should be sent when the listen thread and accep process the corresponding ftp request. The real FTP processing is not here.

 
  1. FileZilla FTP Server Source Code Analysis 1)
  2. FileZilla FTP Server Source Code Analysis 2)
  3. FileZilla FTP Server Source code analysis 4)
  4. FileZilla FTP Server Source Code Analysis 5)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.