Internet protocol version 4 (IPv4) packet header variation rule detection method and system
A detection method and technology of changing laws, applied in the field of detecting changes of IPv4 packet headers, can solve problems such as low data compression efficiency, and achieve the effect of solving low compression efficiency and improving compression efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0053] See figure 1 As shown, the method for detecting the change rule of the IPv4 packet header provided by the embodiment of the present invention may include the following steps:
[0054] Step A: Calculate the difference between the curr_ip_id_offset of the current data packet and the prev_ip_id_offset of the previous data packet of the current data packet.
[0055] Record the serial number sn of the current data packet and the previous data packet of the current data packet, marked as curr_sn and prev_sn respectively; record the value ip-id of the current data packet and the previous data packet IP-ID of the current data packet, respectively marked as curr_ip_id and prev_ip_id. Then according to the recorded serial number and IP-ID value, calculate the ip_id_offset value of the current packet and the previous packet of the current packet, and mark them as curr_ip_id_offset and prev_ip_id_offset respectively, and then make a difference to get their difference.
[0056] Among them...
Embodiment 2
[0071] See figure 2 As shown, the method for detecting the change rule of the IPv4 packet header provided by the present invention further includes the following steps:
[0072] Step B1: When the difference is greater than the preset value, the endianness of the IP-ID field of the IPv4 packet header is reversed, and the difference between the curr_ip_id_offset of the current data packet and the prev_ip_id_offset of the previous data packet of the current data packet is recalculated.
[0073] Step B2, and when the difference is less than or equal to the preset value, set the current data packet NBO to 0, and return to step C.
[0074] The specific implementation of this embodiment will be described below in conjunction with a specific example.
[0075] Suppose sn in the context is 0x0004, ip-id is 0x0004, RND=0, NBO=0. In the subsequent data packets, according to the network sequence, the sn of the first packet is 0x0500 and the ip-id is 0x0500; the sn of the second packet is 0x0600, ...
Embodiment 3
[0090] See image 3 As shown, the method for detecting the change rule of the IPv4 packet header provided by the present invention further includes the following steps:
[0091] Step C1: After the endianness of the IP-ID field of the current data packet is reversed, the difference between the curr_ip_id_offset of the current data packet obtained by recalculation and the prev_ip_id_offset of the previous data packet of the current data packet is greater than the preset value. The stability index of the current packet NBO is increased by 1.
[0092] Step D1, when the stability index of the NBO of the current data packet reaches the preset threshold, set the current data packet RND to 1 to determine that the current data packet cannot be compressed, and select the next data packet of the current data packet as the current data packet And return to the step A.
[0093] The preset threshold value in this step is a value that can be flexibly selected according to specific data compression...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 