These and other features, aspects and advantages of the invention will become apparent by reference to the following description and accompanying drawings which are given by way of illustration only, and thus are not limitative of the invention, and wherein:
FIGS, 3A-3E show screens of packet features detected by the packet monitoring program when Skype is executing the file transfer function; and
The present invention will be apparent from the following detailed description, which proceeds with reference to the accompanying drawings, wherein the same references relate to the same elements.
The Skype program is used in this specification as an explicit example of P2P application to illustrate the technical features of the invention. A person skilled in the art can readily understand that any application with the features mentioned in the specification should be construed as part of the invention.
The Skype P2P application has three important functions: voice talk, file transfer, and message transfer. To maintain quality of the network, it is often unable to effective restrict the use of some specific function of the P2P application. For example, one cannot forbid the use of file transfer in Skype. Based upon the features of various packets extracted when Skype tries to establish network connections, the invention analyzes to determine which function is being used by the application and blocks it.
In an embodiment of the invention, the invention continually monitors several network connections established by several clients. For example, the TCP or UDP connections established by individual clients are continually monitored.
Analysis of Packet Features when Executing a Specific Function
Based upon features in the packets, the invention finds their Correlations in order to determine which function is to be performed by the P2P application. For example, the invention can determine from the features of the packets whether Skype is performing the voice talk, file transfer, or message transfer function. According to
During the First Connection:
During the Non-First Connection;
In an embodiment of the invention, the packets mentioned in the above tables are extracted when one invites another party to use the voice talk, file transfer, or message transfer function. The transmissions in these functions are of two types: the first connection and the non-first connection. Throughout this specification, the first connection refers to the network connection established between one of the clients and another during the first communication. The non-first connection refers to the network connection between the above-mentioned two parties after their first connection. However, if the non-first connection is not active after a specific time, it is changed to the situation that requires the establishment of a first connection.
We here provide an embodiment for analyzing the above-mentioned three functions of Skype. In voice talk, the first connection is fixed to nine packets, whereas the non-first connection is fixed to three packets. In file transfer, the first connection is fixed to nine packets, whereas the non-first connection is fixed to the packets. However, the first packet changes with the length of the filename in a regular way. Suppose the length of the filename is five characters, then the length of the first packet is about 303 bytes. Each additional character increases the packet length by one byte. Each additional Chinese character increases the packet length by three bytes. In message transfer, the number of packets in the first connection is not fixed, but around seventeen. The features in the first six packets are similar to those for voice talk and file transfer. The number of packets in the non-first connection is fixed to three packets. Nonetheless, the length of the first packet varies with the size of the message in a regular way. For example, if the message length is 5 characters, then the length of the first packet is about 200 bytes. Each additional character increases the packet length by one byte. Each additional Chinese character increases the packet length by three bytes. How the length of the first packet is varied with the length of the transferred file or message during the first connection will be described below.
It is seen in the above analyses and tables that the first to the third packets can be used in a first connection to determine whether any function of Skype is being performed. The seventh and eighth packets are then used to determine the specific function of Skype. Although there is no fixed number of packets in the message transfer, the seventh and eighth packets in the first connection are still different from the others. Therefore, it can be recognized. In a non-first connection, the first to third packets can be used to determine the specific P2P application function to be performed by Skype. However, the length of the first packet has a regular variation in the message and file transfers. Therefore, the second packet can be used to distinguish between the voice talk function and the file and message transfer functions. Since the file transfer function and the message transfer function can only be distinguished using the first packet, the invention can determine which specific function of the P2P application is to be performed by checking specific function executing information received by the client in the case when it cannot be determined from the packet comparison. For example, as shown in Table 4, suppose the length of the first packet in the message transfer function of Skype is equal to 111 characters or 37 Chinese characters, it cannot be distinguished from the file transfer function. Therefore, the invention utilizes the information that Skype asks the communicating party to return a storage window during a file transfer to determine that it is using the file transfer function.
In the following embodiments, we use the case of blocking the file transfer function for discussions. It is obvious that blocking other functions can be similarly performed without departing from the spirit and scope of the invention.
In another embodiment of the invention, Skype uses UDP as the communication channel. Therefore, the invention also detects what the UDP port of Skype is at each client. For example, when the Skype program is started, it communicates with some specific nodes following the port settings therein. The invention also takes the opportunity to record its connection port. If the user wants to change the connection port, he/she has to restart Skype. Therefore, the new connection port is still recorded during the restart.
In one embodiment of the invention, Skype tries to resend using various achievable sessions after its file transfer function is blocked. Therefore, the invention blocks all Skype actions once it detects that the user is using Skype functions until Skype is restarted.
In step S41, the invention continually monitors several network connections (e.g., TCP and UDP connections) established by several clients. In step S42, when one of the clients establishes a network connection, the packets sent by a P2P application of the client are collected. In step S43, the lengths of the packets collected from the P2P application are compared. In step S44, the invention determines a specific function to be performed by the P2P application according to a comparison result of the packet lengths. In step S45, the invention determines whether it is possible to determine the specific P2P application function using the packet comparison. For example, it checks whether there is any exception to the comparison. If there is no exception, then the procedure continues to step S46. Otherwise, the procedure goes to step S47. In step S47 where the comparison does not help, the invention determines the specific P2P application function by receiving specific function executing information from the client. For example, a saving confirmation window information is used to determine the file transfer function in Skype. In step S46, the determined specific function of the P2P application is blocked. For example, the invention blocks the port for file transfers in Skype or all the network connections of Skype.
In accord with the invention, a system implemented with the above-mentioned method for blocking a specific function of a P2P application includes: a monitoring component, a collecting component, a packet comparing component, a determining component, and a blocking component. The monitoring component continually monitors several network connections established by several clients. When one of the Clients establishes the network connection, the collecting component collects all the packets sent out by a P2P application of the client. The packet comparing component compares the lengths, of the collected packets. The determining component determines a specific function of the P2P application to be performed by the P2P application according to a comparison result of the packet lengths. The blocking component blocks the determined specific function of the P2P application.
The invention being thus described, it will be obvious that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are intended to be included within the scope of the following claims.
| Number | Date | Country | Kind |
|---|---|---|---|
| 95125313 | Jul 2006 | TW | national |