Unlock instant, AI-driven research and patent intelligence for your innovation.

A method for determining data packet checksum after data modification

A technology for modifying data and data packets, applied in the field of data verification, can solve problems such as low efficiency and waste of processor resources, and achieve the effects of improving work efficiency, saving processor resources, and outstanding effects

Inactive Publication Date: 2007-08-08
HUAWEI TECH CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0012] The disadvantage of the above method is: when the data in the TCP data packet is changed, the change includes the modification of the source and destination IP addresses of the pseudo-header, and the checksum needs to be re-determined according to the above method. It is necessary to recalculate the checksum based on all the data according to the above method, thus wasting processor resources and resulting in low efficiency. This shortcoming is more obvious when the TCP data packet is long

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method for determining data packet checksum after data modification

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0033] In this embodiment, the method described in the present invention is described by taking TCP data packets as an example, as shown in Figure 2, the method described in this embodiment includes:

[0034] A. After the TCP data packet is modified, add the data before modification corresponding to all data segments involved in modification in the data packet to obtain a sum value x, and the data segment is to determine the checksum before the modification of the data packet The 16-bit data segment divided into;

[0035] B. Add the modified data corresponding to all data segments involved in modification in the data packet to obtain a sum value y;

[0036] C. Read the checksum Z before modification from the checksum field;

[0037] D, utilize formula (1) to get checksum and determine the checksum Z1 after this TCP packet modificati...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

This invention discloses a method of method of determining the packet check-sum of the modified data, the method includes: (A) Add all the data before being modified corresponding to the related modified data segments in the packet, and obtain a sum value x; (B) Add all the modified data corresponding to the related modified data segments in the packet, and obtain a sum value y; (C) Obtain the check-sum Z of the packet before being modified; (D) Obtain the check-sum after being modified based on the value of the equation: (M<<k)+(Z-M)-x+y, wherein, (M<<k) means that moving left the M for k bits, k is the number of the bits of the data segments, the M is the number of the related modified data segments. The usage of this invention can simplify the priority method of determining the packet check-sum of the modified data, and it can save the resource of the processor, improve the efficiency of working.

Description

technical field [0001] The invention relates to data check technology, in particular to a method for determining the check sum of data packets after data modification. Background technique [0002] The checksum is used to verify the consistency of data from the source host to the destination host. The 16-bit checksum is used in the TCP / IP protocol suite, and the checksum of each part has its own meaning. In the prior art, the basic algorithm for determining the 16-bit checksum includes the following steps: [0003] a. Divide all the data to be used to determine the checksum into N segments of 16 bits. If the number of bytes is not an even number, add a byte of all 0 padding. This padding is only to determine the checksum. Discard it when it is determined; [0004] b. Sum the N data segments to obtain a sum value that may be greater than 16 bits; [0005] c. Add the carry value greater than 16 bits to the lower 16 bits according to the above rules, if a carry is generated...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L1/00H04L29/06
CPCH04L69/16H04L69/161
Inventor 熊立群王亮古江春邹勇
Owner HUAWEI TECH CO LTD