A kind of parsing method and system for l2tp protocol
A parsing method and protocol technology, which are applied in the field of parsing methods and systems for L2TP protocols, and can solve the problems of inability to complete auditing, inability to obtain accurate audit results of L2TP packets, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0031] The embodiment of the present invention provides a method for parsing the L2TP protocol, and its flowchart is as follows: figure 1 As shown, the analysis method for the L2TP protocol includes the following steps:
[0032] Step S1, obtain the L2TP message, judge whether the L2TP message is a control message or a data message, if it is a control message, then perform step S5, if it is a data message, then perform step S2;
[0033] Step S2, judging whether the PPP packet header load of the L2TP message is an IP packet, if so, then judging whether the IP packet is legal, if the load of the PPP packet header is an IP packet and the IP packet is legal, then in When the session has been established and there is no blocking flag or the session is not established, extract the inner layer message from the L2TP message to form a new message, and perform step S3. If the PPP message header load is not an IP message or an IP The message (the PPP message header load is an IP message)...
Embodiment 2
[0049] The embodiment of the present invention also provides a method for parsing the L2TP protocol, including the following steps:
[0050] Step S01, check whether the message is an L2TP message (a UDP message whose source / destination port is 1701), if not, perform step S14;
[0051] Step S02, if the checked message is an L2TP message, then analyze the L2TP message header, check whether the L2TP message is a control message, if so, perform step S14, and the L2TP message is a data message;
[0052] Step S03, shifting the pointer originally pointing to the L2TP packet header to the PPP packet header, parsing the PPP packet header, checking whether the PPP packet header load is an IP packet, if the PPP packet header load is not an IP packet , then execute step S14, otherwise, execute step S04;
[0053] Step S04, shifting the pointer to the IP packet header, and then performing a legality check on the IP packet (inner layer), if the legality check is successful, execute step S05...
Embodiment 3
[0068] The embodiment of the present invention provides an analysis system for the L2TP protocol, including an L2TP message type discrimination module, a new message module, a new message association module, a new message processing module, a packet sending module and a blocking marking module.
[0069] The L2TP message type discrimination module is used to obtain the L2TP message and determine whether the L2TP message is a control message or a data message;
[0070] The new message module is used to judge whether the PPP message header load of the L2TP message is an IP message, and if so, judge whether the IP message is legal. If the load of the PPP message header is an IP message and the IP If the message is legal, if the session has been established and there is no blocking flag or the session is not established, the inner layer message is extracted from the L2TP message to form a new message;
[0071] The new message association module is used to associate the new message ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 

