[go: up one dir, main page]

CN100481760C - Check value operation system and operation method of network packet - Google Patents

Check value operation system and operation method of network packet Download PDF

Info

Publication number
CN100481760C
CN100481760C CNB2004101035095A CN200410103509A CN100481760C CN 100481760 C CN100481760 C CN 100481760C CN B2004101035095 A CNB2004101035095 A CN B2004101035095A CN 200410103509 A CN200410103509 A CN 200410103509A CN 100481760 C CN100481760 C CN 100481760C
Authority
CN
China
Prior art keywords
check value
network packet
value calculation
check
received
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2004101035095A
Other languages
Chinese (zh)
Other versions
CN1798015A (en
Inventor
宋建福
刘文涵
崔佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Corp
Original Assignee
Inventec Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to CNB2004101035095A priority Critical patent/CN100481760C/en
Publication of CN1798015A publication Critical patent/CN1798015A/en
Application granted granted Critical
Publication of CN100481760C publication Critical patent/CN100481760C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a check value operation system of network packets, which uses a check value operation module composed of hardware devices to perform check value operation on transmission network packets or reception network packets in a computer system, and the computer system independently performs check value operation by the check value operation module; when the network packet is transmitted, the check value operation module also operates the transmission network packet according to a specific calculation rule so as to generate a first check value corresponding to the transmission network packet; and when the network packet is received, the check value operation module also operates the received network packet according to the specific calculation rule to generate a second check value corresponding to the received network packet, and compares the first check value with the second check value to generate a comparison result for processing the received network packet. The invention can reduce the workload of the central processing unit, relatively accelerate the network packet processing speed, increase the network flow in unit time and further achieve the purpose of improving the network transmission quality.

Description

一种网络封包的校验值运算系统及其运算方法 A network packet check value calculation system and its calculation method

技术领域 technical field

本发明涉及一种检查码运算系统,特别是涉及一种以硬件装置运算网络封包的校验值(Checksum)运算系统及其运算方法。The invention relates to a checksum calculation system, in particular to a hardware device to calculate a network packet checksum (Checksum) calculation system and a calculation method thereof.

背景技术 Background technique

随着网络时代的来临,使用者通过网络可获取所需的信息,为了确认数据在网络传送过程中是否有遭破坏或数据遗失等导致改变原数据内容的因素发生,校验值(Checksum)机制为目前常使用的网络封包数据传输验证方式。With the advent of the Internet era, users can obtain the required information through the network. In order to confirm whether the data is damaged or lost during the network transmission, factors that change the content of the original data occur, the Checksum mechanism It is a commonly used verification method for network packet data transmission at present.

为了确保网络封包数据在传输过程中的完整性,需要在传送前运算出对应网络封包数据的校验值,并填入网络封包中的特定位置,以传送网络封包,而接收端在接收到网络封包后,先获取出网络封包中的校验值,并对网络封包数据再次进行相同的运算,以取得其对应的校验值,接着,比较两校验值是否相同,以判断网络封包数据是否完整,而上述过程只是利用校验值验证网络封包数据的基本原理,在许多已有的网络通信协议(TCP/IP)中,其校验值比较次数可能需要数次以上,例如,TCP层需要计算一次,IP层也需要再计算一次等,而这些运算及比较过程均通过计算机系统中的中央处理器来负责执行相关的运算与比较工作,因此需消耗大量的中央处理器资源,由于中央处理器为计算机系统中的核心模块,若占用过多的系统资源,将使计算机系统的效率下降。In order to ensure the integrity of the network packet data during transmission, it is necessary to calculate the check value of the corresponding network packet data before transmission, and fill in a specific position in the network packet to transmit the network packet, and the receiving end receives the network packet After packaging, first obtain the check value in the network packet, and perform the same operation on the network packet data again to obtain its corresponding check value, and then compare whether the two check values are the same to determine whether the network packet data is Complete, and the above process is only the basic principle of using the check value to verify the network packet data. In many existing network communication protocols (TCP/IP), the number of comparisons of the check value may need more than several times. For example, the TCP layer needs Once calculated, the IP layer also needs to be calculated again, etc., and these calculations and comparisons are performed by the central processing unit in the computer system to perform related calculations and comparisons, so a large amount of central processing unit resources are consumed. The processor is the core module in the computer system, if it occupies too many system resources, the efficiency of the computer system will be reduced.

因此,如何提供一种网络封包的校验值运算系统,以加速网络封包处理速度,相对减低中央处理器的负担,成为研究人员待解决问题之一。Therefore, how to provide a network packet check value calculation system to speed up the network packet processing speed and relatively reduce the burden on the central processing unit has become one of the problems to be solved by researchers.

发明内容 Contents of the invention

本发明所要解决的技术问题在于提供一种网络封包的校验值运算系统及其运算方法,通过校验值运算模块对网络封包进行校验值运算,并比较校验值是否在传送过程中改变,而中央处理器只需根据运算与比较结果决定是否继续对接收的网络封包进行后续处理,大大降低中央处理器的负担,从而达到加速网络封包处理速度的目的。The technical problem to be solved by the present invention is to provide a network packet check value calculation system and its calculation method, through which the check value calculation module performs check value calculations on network packets, and compares whether the check value changes during transmission , and the central processing unit only needs to decide whether to continue to perform subsequent processing on the received network packet according to the calculation and comparison results, which greatly reduces the burden on the central processing unit, thereby achieving the purpose of accelerating the processing speed of the network packet.

为了实现上述目的,本发明提供了一种网络封包的校验值运算系统,在一计算机系统中以一硬件装置组成的校验值运算模块对一传送网络封包或一接收网络封包进行一校验值运算,其特点在于,该计算机系统由该校验值运算模块独立进行该校验值运算;其中,该校验值运算模块在该网络封包传送时,还根据一检验值演算规则运算该传送网络封包,以产生对应该传送网络封包的第一校验值;及其中,该校验值运算模块在该网络封包接收时,还根据该检验值演算规则运算该接收网络封包,以产生对应该接收网络封包的第二校验值,并比较该第一与该第二校验值,以产生一比较结果供处理该接收网络封包。In order to achieve the above object, the present invention provides a check value calculation system for network packets, in which a check value calculation module composed of a hardware device is used to check a transmission network packet or a reception network packet in a computer system Value calculation, which is characterized in that the computer system independently performs the check value calculation by the check value calculation module; wherein, when the network packet is transmitted, the check value calculation module also calculates the transmitted value according to a check value calculation rule network packet to generate a first check value corresponding to the transmitted network packet; and wherein, when the network packet is received, the check value calculation module also operates the received network packet according to the check value calculation rule to generate the corresponding The second check value of the received network packet is received, and the first check value is compared with the second check value to generate a comparison result for processing the received network packet.

上述校验值运算系统,其特点在于,该校验值运算模块还包含有:一第一校验值运算单元,通过该检验值演算规则运算该传送网络封包,以产生对应该传送网络封包的数据区块的该第一校验值;一校验值附加单元,附加该第一校验值至该传送网络封包中;一第二校验值运算单元,通过该检验值演算规则运算该接收网络封包,以产生对应该接收网络封包的数据区块的该第二校验值;一校验值获取单元,获取该接收网络封包中附加的该第一校验值;及一校验值比较单元,比较该第一与该第二校验值,并产生该比较结果。The above check value calculation system is characterized in that the check value calculation module also includes: a first check value calculation unit, which calculates the transmission network packet through the check value calculation rule to generate the corresponding transmission network packet The first check value of the data block; a check value adding unit, which adds the first check value to the transmission network packet; a second check value calculation unit, which calculates the received check value through the check value calculation rule Network packet, to generate the second check value corresponding to the data block of the received network packet; a check value acquisition unit, to obtain the first check value added in the received network packet; and a check value comparison A unit compares the first check value with the second check value, and generates the comparison result.

上述校验值运算系统,其特点在于,该校验值演算规则为MD5单向杂序函数算法。The above check value calculation system is characterized in that the check value calculation rule is the MD5 one-way disorder function algorithm.

上述校验值运算系统,其特点在于,该校验值附加单元附加该第一校验值至该传送网络封包的校验值放置区块中。The above check value calculation system is characterized in that the check value adding unit adds the first check value to the check value placement block of the transmission network packet.

上述校验值运算系统,其特点在于,该校验值获取单元至该接收网络封包的校验值放置区块中获取该第一校验值。The above check value calculation system is characterized in that the check value acquisition unit acquires the first check value from the check value placement block of the received network packet.

上述校验值运算系统,其特点在于,该校验值运算模块为一特殊应用集成电路单芯片所组成。The above check value calculation system is characterized in that the check value calculation module is composed of a special application integrated circuit single chip.

上述校验值运算系统,其特点在于,该校验值运算模块为一现场式可编程栅极列单芯片所组成。The above-mentioned verification value calculation system is characterized in that the verification value calculation module is composed of a field-type programmable grid array single chip.

上述校验值运算系统,其特点在于,该比较结果为该第一与该第二校验值不相同时,则丢弃该接收网络封包。The above-mentioned check value calculation system is characterized in that, when the comparison result is that the first check value and the second check value are not the same, the receiving network packet is discarded.

本发明还提供一种网络封包的校验值运算方法,在一计算机系统中对一传送网络封包或一接收网络封包进行一校验值运算,其特点在于,包含有:设置一校验值运算模块于该计算机系统中,用以独立进行该校验值运算;在该网络封包传送时,该校验值运算模块还依据一检验值演算规则运算该传送网络封包,以产生对应该传送网络封包的第一校验值;附加该第一校验值至该传送网络封包中,以传递该传送网络封包;在该网络封包接收时,该校验值运算模块还依据该检验值演算规则运算该接收网络封包,以产生对应该接收网络封包的第二校验值;及比较该第一与该第二校验值,以产生一比对结果供处理该接收网络封包。The present invention also provides a method for computing a check value of a network packet, which performs a check value operation on a transmitted network packet or a received network packet in a computer system, and is characterized in that it includes: setting a check value operation The module is used in the computer system to independently perform the check value calculation; when the network packet is transmitted, the check value calculation module also calculates the transmission network packet according to a check value calculation rule to generate a corresponding transmission network packet The first check value; add the first check value to the transmission network packet to transmit the transmission network packet; when the network packet is received, the check value calculation module also calculates the check value according to the check value calculation rule receiving a network packet to generate a second check value corresponding to the received network packet; and comparing the first check value with the second check value to generate a comparison result for processing the received network packet.

上述校验值运算方法,其特点在于,该校验值演算规则为MD5单向杂序函数算法。The above check value calculation method is characterized in that the check value calculation rule is the MD5 one-way disorder function algorithm.

上述校验值运算方法,其特点在于,该校验值运算模块还包含有:一第一校验值运算单元,通过该检验值演算规则运算该传送网络封包,以产生对应该传送网络封包的数据区块的该第一校验值;一校验值附加单元,附加该第一校验值至该传送网络封包中;一第二校验值运算单元,通过该检验值演算规则运算该接收网络封包,以产生对应该接收网络封包的数据区块的该第二校验值;一校验值获取单元,获取该接收网络封包中附加的该第一校验值;及一校验值比较单元,比较该第一与该第二校验值,并产生该比较结果。The above-mentioned check value calculation method is characterized in that the check value calculation module also includes: a first check value calculation unit, which calculates the transmission network packet through the check value calculation rule to generate the corresponding transmission network packet The first check value of the data block; a check value adding unit, which adds the first check value to the transmission network packet; a second check value calculation unit, which calculates the received check value through the check value calculation rule Network packet, to generate the second check value corresponding to the data block of the received network packet; a check value acquisition unit, to obtain the first check value added in the received network packet; and a check value comparison A unit compares the first check value with the second check value, and generates the comparison result.

上述校验值运算方法,其特点在于,该校验值附加单元附加该第一校验值至该传送网络封包的校验值放置区块中。The above check value calculation method is characterized in that the check value adding unit adds the first check value to the check value placement block of the transmission network packet.

上述校验值运算方法,其特点在于,该校验值获取单元至该接收网络封包的校验值放置区块中获取该第一校验值。The above-mentioned check value calculation method is characterized in that the check value acquisition unit acquires the first check value from the check value placement block of the receiving network packet.

上述校验值运算方法,其特点在于,该校验值运算模块为一特殊应用集成电路单芯片所组成。The above-mentioned checking value computing method is characterized in that the checking value computing module is composed of a special application integrated circuit single chip.

上述校验值运算方法,其特点在于,该校验值运算模块为一现场式可编程栅极列单芯片所组成。The above-mentioned verification value calculation method is characterized in that the verification value calculation module is composed of a field-type programmable grid array single chip.

上述校验值运算方法,其特点在于,该比较结果为该第一与该第二校验值不相同时,则丢弃该接收网络封包。The feature of the above check value calculation method is that if the comparison result is that the first check value is different from the second check value, then the receiving network packet is discarded.

本发明的功效,通过这种网络封包的校验值运算系统及其运算方法,利用校验值运算模块运算并产生对应网络封包的校验值,并对接收的网络封包进行校验值比较程序,而中央处理器只需根据运算与比较结果处理接收的网络封包,达到加速网络封包处理速度的目的。并且,通过校验值运算模块对传送封包或接收封包独立进行校验值运算与比较,以提供中央处理器决定网络封包处理的判断依据,从而降低中央处理器的工作负担,相对加快网络封包处理速度,使单位时间内的网络流量增大,进一步达到提高网络传输品质的目的。Effect of the present invention, through the verification value operation system and operation method thereof of the network packet, utilize the verification value operation module to calculate and generate the verification value of the corresponding network packet, and perform the verification value comparison program on the received network packet , and the central processing unit only needs to process the received network packets according to the calculation and comparison results, so as to accelerate the processing speed of the network packets. In addition, through the check value calculation module, the check value calculation and comparison are independently performed on the transmitted packet or the received packet, so as to provide the judgment basis for the central processor to determine the network packet processing, thereby reducing the workload of the central processor and relatively speeding up the network packet processing. Speed increases the network traffic per unit time and further achieves the purpose of improving the quality of network transmission.

以下结合附图和具体实施例对本发明进行详细描述,但不作为对本发明的限定。The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments, but not as a limitation of the present invention.

附图说明 Description of drawings

图1为本发明所提的校验值运算模块的系统方块图;Fig. 1 is the system block diagram of the check value calculation module proposed by the present invention;

图2A为本发明所提的封包传送的系统方块示意图;FIG. 2A is a schematic block diagram of a system for packet transmission proposed by the present invention;

图2B为本发明所提的封包接收的系统方块示意图;FIG. 2B is a schematic block diagram of a system for receiving packets according to the present invention;

图3A为本发明所提的封包传送的校验值运算步骤流程图;及FIG. 3A is a flow chart of the check value calculation steps of the packet transmission proposed by the present invention; and

图3B为本发明所提的封包接收的校验值运算步骤流程图。FIG. 3B is a flow chart of the calculation steps of the verification value for packet reception proposed by the present invention.

其中,幅图标记:Among them, the picture mark:

10-校验值运算模块,11-校验值获取单元10-check value operation module, 11-check value acquisition unit

12-第一校验值运算单元,13-第二校验值运算单元12-the first check value operation unit, 13-the second check value operation unit

14-校验值附加单元,15-校验值比较单元14- check value additional unit, 15- check value comparison unit

20-网络封包,20a-校验值放置区块20-network packet, 20a- check value placement block

40-中央处理器模块40-CPU module

步骤100-运算网络封包的数据区块,以产生第一校验值Step 100—calculate the data block of the network packet to generate a first check value

步骤101-根据网络协议传输格式决定校验值放置区块Step 101 - Determine the check value and place the block according to the transmission format of the network protocol

步骤102-附加第一校验值至网络封包的校验值放置区块中Step 102 - appending the first check value to the check value placement block of the network packet

步骤103-传送附加第一校验值的网络封包Step 103—transmit the network packet with the first check value attached

步骤200-取出校验值放置区块中的第一校验值Step 200 - take out the first check value in the check value placement block

步骤201-运算网络封包的数据区块,以产生第二校验值Step 201 - calculate the data block of the network packet to generate a second check value

步骤202-比较第一校验值与第二校验值是否相同Step 202 - compare whether the first check value is the same as the second check value

步骤203-对收的网络封包进行后续处理Step 203 - carry out subsequent processing on the received network packet

步骤204-丢弃接收的网络封包Step 204 - Discard received network packets

具体实施方式 Detailed ways

请参照图1,为本发明的校验值(Checksum)运算模块的系统方块图,包含有:校验值获取单元11、第一校验值运算单元12、第二校验值运算单元13、校验值附加单元14及校验值比较单元15。Please refer to Fig. 1, it is a system block diagram of a checksum (Checksum) calculation module of the present invention, including: a checksum acquisition unit 11, a first checksum calculation unit 12, a second checksum calculation unit 13, A check value adding unit 14 and a check value comparing unit 15 .

校验值运算模块10,由一硬件装置所组成,根据检验值演算规则独立对待传送或已接收的网络封包进行运算,以产生第一校验值或第二校验值,而校验值演算规则可通过MD5单向杂序函数算法建立并进行运算,以产生一组32位的数字(例如,d1363f529163ccc7ca540c2f895dcc90),其中校验值运算模块10可为特殊应用集成电路(Application-Specific Integrated Circuit,ASIC)单芯片或现场式可编程栅极列(Field-Programmable Gate Array,FPGA)单芯片所组成。The check value calculation module 10 is composed of a hardware device, and independently performs calculations on the network packets to be transmitted or received according to the check value calculation rules to generate the first check value or the second check value, and the check value calculation The rules can be established and operated by the MD5 one-way random function algorithm to generate a group of 32-bit numbers (for example, d1363f529163ccc7ca540c2f895dcc90), wherein the check value calculation module 10 can be an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC ) single chip or Field-Programmable Gate Array (FPGA) single chip.

校验值获取单元11,用以获取出网络封包中的校验值放置区块所附加的第一校验值。The check value obtaining unit 11 is configured to obtain the first check value attached to the check value placement block in the network packet.

第一校验值运算单元12,与校验值获取单元11连接,通过一检验值演算规则运算无校验值的网络封包(例,待传送封包)的数据区块大小,以产生第一校验值。The first verification value calculation unit 12 is connected with the verification value acquisition unit 11, and calculates the data block size of a network packet (for example, a packet to be transmitted) without a verification value by a verification value calculation rule to generate the first verification value. check value.

第二校验值运算单元13,与校验值获取单元11连接,通过一检验值演算规则运算无校验值的网络封包(例,已接收封包)的数据区块大小,以产生第二校验值。The second verification value operation unit 13 is connected with the verification value acquisition unit 11, and calculates the data block size of the network packet (for example, received packet) without a verification value by a verification value calculation rule to generate the second verification value. check value.

校验值附加单元14,分别与第一校验值运算单元12及第二校验值运算单元13连接,用以附加第一校验值至网络封包中的校验值放置区块,或传送第二校验值至校验值比较单元15,以进行校验值比较作业。The check value adding unit 14 is connected with the first check value operation unit 12 and the second check value operation unit 13 respectively, and is used to add the first check value to the check value placement block in the network packet, or transmit The second check value is sent to the check value comparison unit 15 for the check value comparison operation.

校验值比较单元15比较第一校验值与第二校验值是否相同,以提供中央处理器模块40(参照图2B)决定丢弃或继续处理接收网络封包(例,转送、取样、流量统计或流量等级区分等)的判断依据,若校验值比较结果为相同,即表示接收网络封包内的数据正确,并对其进行后续处理,若校验值比较结果为不相同,即表示接收网络封包内的数据不正确,则丢弃接收网络封包。Check value comparison unit 15 compares whether the first check value is the same as the second check value, so as to provide the CPU module 40 (referring to FIG. or traffic level distinction, etc.), if the verification value comparison results are the same, it means that the data in the receiving network packet is correct, and subsequent processing will be performed on it; if the verification value comparison results are not the same, it means that the receiving network If the data in the packet is incorrect, the received network packet is discarded.

接下来,请参照图2A,为本发明的封包传送的系统方块示意图,首先,待传送的网络封包20中包含有数据区块与校验值放置区块,将网络封包20送至校验值运算模块10中进行校验值运算,接着,第一校验值运算单元12根据检验值演算规则运算网络封包20的数据区块大小,并产生出第一校验值20a,再通过校验值附加单元14将第一校验值20a附加至网络封包20中的校验值放置区块,以继续网络封包传送程序,而校验值演算规则可通过MD5单向杂序函数算法建立并进行运算,以产生一组32位的数字(例如,d1363f529163ccc7ca540c2f895dcc90)。Next, please refer to FIG. 2A, which is a schematic block diagram of the packet transmission system of the present invention. First, the network packet 20 to be transmitted contains a data block and a check value placement block, and the network packet 20 is sent to the check value. The check value calculation is performed in the calculation module 10, and then, the first check value calculation unit 12 calculates the data block size of the network packet 20 according to the check value calculation rule, and generates the first check value 20a, and then passes the check value The appending unit 14 appends the first check value 20a to the check value placement block in the network packet 20 to continue the network packet transmission procedure, and the check value calculation rule can be established and operated through the MD5 one-way hash function algorithm , to produce a set of 32-bit numbers (for example, d1363f529163ccc7ca540c2f895dcc90).

另外,请参照图2B,为本发明的封包接收的系统方块示意图,首先,已接收的网络封包20中包含有数据区块与校验值放置区块20a,将网络封包20送至校验值运算模块10中进行校验值运算,接着,通过校验值获取单元11至校验值放置区块20a中取出网络封包20中的第一校验值,而第二校验值运算单元13根据检验值演算规则运算网络封包20的数据区块大小,并产生出第二校验值(图中未示),再通过校验值附加单元14将第二校验值传送至校验值比较单元15中,以进行校验值比较作业。In addition, please refer to FIG. 2B, which is a schematic block diagram of the packet receiving system of the present invention. First, the received network packet 20 includes a data block and a check value placement block 20a, and the network packet 20 is sent to the check value Carry out the verification value calculation in the operation module 10, then, take out the first verification value in the network packet 20 through the verification value acquisition unit 11 to the verification value placement block 20a, and the second verification value operation unit 13 according to The check value calculation rule calculates the data block size of the network packet 20, and generates a second check value (not shown in the figure), and then sends the second check value to the check value comparison unit through the check value adding unit 14 15, to perform check value comparison operations.

中央处理器模块40,与校验值运算模块10连接,为计算机系统中的核心模块,负责各模块的信号处理作业,并根据校验值比较单元15的比较结果,决定丢弃或继续处理网络封包20,其中若校验值运算模块10的第一校验值运算单元12或第二校验值运算单元13发生故障时,中央处理器模块40仍然可通过校验值获取单元11或校验值附加单元14继续执行校验值运算工作。The central processing unit module 40 is connected with the check value calculation module 10, is the core module in the computer system, is responsible for the signal processing operation of each module, and according to the comparison result of the check value comparison unit 15, decides to discard or continue to process the network packet 20, wherein if the first check value calculation unit 12 or the second check value calculation unit 13 of the check value calculation module 10 breaks down, the central processing unit module 40 can still pass the check value acquisition unit 11 or check value The additional unit 14 continues to perform check value calculation work.

请参照图3A,为本发明封包传送的校验值运算步骤流程图,首先,设置校验值运算模块10于计算机系统中,用以独立进行校验值运算,在网络封包传送端:Please refer to FIG. 3A, which is a flow chart of the check value calculation steps of the packet transmission of the present invention. At first, the check value calculation module 10 is set in the computer system to independently perform the check value calculation. At the network packet transmission end:

步骤100,第一校验值运算单元12根据检验值演算规则运算网络封包的数据区块,以产生对应网络封包的第一校验值;步骤101,根据网络协议(TCP/IP)传输格式,决定网络封包中校验值放置区块;步骤102,接下来,通过校验值附加单元14附加第一校验值至校验值放置区块中;步骤103,传送附加第一校验值的网络封包。Step 100, the first check value operation unit 12 calculates the data block of the network packet according to the check value calculation rule to generate the first check value of the corresponding network packet; Step 101, according to the network protocol (TCP/IP) transmission format, Determine the check value placement block in the network packet; step 102, next, add the first check value to the check value placement block by the check value adding unit 14; step 103, transmit the first check value added network packet.

接着,请参照图3B,为本发明的封包接收的校验值运算步骤流程图,首先,设置校验值运算模块10于计算机系统中,用以独立进行校验值运算,在网络封包接收端:Then, please refer to FIG. 3B, which is a flow chart of the check value calculation steps received by the packet of the present invention. At first, the check value calculation module 10 is set in the computer system to independently perform the check value calculation. At the network packet receiving end :

步骤200,校验值获取单元11获取出校验值放置区块20a中的第一校验值;步骤201,第二校验值运算单元13根据检验值演算规则运算网络封包的数据区块,以产生第二校验值;步骤202,校验值比较模块30比较第一与第二校验值是否相同;步骤203,在比较结果为相同时,则通知中央处理器模块40继续处理网络封包,并继续校验值运算作业;步骤204,若比较结果为不相同时,则通知中央处理器模块40丢弃此网络封包。Step 200, the verification value acquisition unit 11 obtains the first verification value in the verification value placement block 20a; Step 201, the second verification value calculation unit 13 calculates the data block of the network packet according to the verification value calculation rule, To generate the second check value; step 202, whether the check value comparison module 30 compares the first check value with the second check value is the same; step 203, when the comparison result is the same, then notify the central processing unit module 40 to continue processing the network packet , and continue the verification value calculation operation; step 204, if the comparison result is not the same, then notify the central processing unit 40 to discard the network packet.

通过这种网络封包的校验值运算系统及其运算方法,通过校验值运算模块对传送封包或接收封包独立进行校验值运算与比较,以提供中央处理器决定网络封包处理的判断依据,从而降低中央处理器的工作负担,相对加快网络封包处理速度,使单位时间内的网络流量增大,进一步达到提高网络传输品质的目的。Through the check value calculation system and calculation method of the network packet, the check value calculation module independently performs check value calculation and comparison on the transmitted packet or the received packet, so as to provide the judgment basis for the central processing unit to determine the network packet processing, Thereby reducing the workload of the central processing unit, relatively speeding up the processing speed of network packets, increasing the network traffic per unit time, and further achieving the purpose of improving the quality of network transmission.

当然,本发明还可有其他多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明权利要求的保护范围。Certainly, the present invention also can have other multiple embodiments, without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and deformations according to the present invention, but these corresponding changes All changes and modifications should belong to the protection scope of the claims of the present invention.

Claims (14)

1、一种网络封包的校验值运算系统,设置于一计算机系统中以一硬件装置组成的校验值运算模块对一传送网络封包或一接收网络封包进行一校验值运算,其特征在于,该校验值运算模块独立于该计算机系统中的中央处理器进行该校验值运算,该中央处理器与该校验值运算模块连接;1. A check value calculation system for a network packet, which is installed in a computer system with a check value calculation module composed of a hardware device to perform a check value calculation on a transmission network packet or a reception network packet, characterized in that , the check value calculation module is independent of the central processor in the computer system to perform the check value calculation, and the central processor is connected to the check value calculation module; 其中,该校验值运算模块在该网络封包传送时,还根据一检验值演算规则运算该传送网络封包,以产生对应该传送网络封包的数据区块的第一校验值;及Wherein, when the network packet is transmitted, the check value calculation module also calculates the transmitted network packet according to a check value calculation rule to generate a first check value corresponding to the data block of the transmitted network packet; and 其中,该校验值运算模块在该网络封包接收时,还根据该检验值演算规则运算该接收网络封包,以产生对应该接收网络封包的数据区块的第二校验值,并比较该第一与该第二校验值,以产生一比较结果供该中央处理器处理该接收网络封包;Wherein, when the network packet is received, the verification value operation module also operates the received network packet according to the verification value calculation rule to generate a second verification value corresponding to the data block of the received network packet, and compares the first one and the second check value, so as to generate a comparison result for the central processing unit to process the received network packet; 该校验值运算模块还包含有:The verification value calculation module also includes: 一第一校验值运算单元,通过该检验值演算规则运算该传送网络封包,以产生该第一校验值;A first check value calculation unit, which operates the transmission network packet through the check value calculation rule to generate the first check value; 一校验值附加单元,附加该第一校验值至该传送网络封包中;A check value adding unit, which adds the first check value to the transmission network packet; 一第二校验值运算单元,通过该检验值演算规则运算该接收网络封包,以产生该第二校验值;A second check value calculation unit, which operates the received network packet through the check value calculation rule to generate the second check value; 一校验值获取单元,获取该接收网络封包中附加的该第一校验值;及A check value acquisition unit, which acquires the first check value attached to the received network packet; and 一校验值比较单元,比较该第一与该第二校验值,并产生该比较结果。A verification value comparison unit compares the first verification value with the second verification value and generates the comparison result. 2、根据权利要求1所述的校验值运算系统,其特征在于,该校验值演算规则为MD5单向杂序函数算法。2. The check value calculation system according to claim 1, characterized in that the check value calculation rule is MD5 one-way hash function algorithm. 3、根据权利要求2所述的校验值运算系统,其特征在于,该校验值附加单元附加该第一校验值至该传送网络封包的校验值放置区块中。3. The check value calculation system according to claim 2, wherein the check value adding unit adds the first check value to the check value placement block of the transmission network packet. 4、根据权利要求2所述的校验值运算系统,其特征在于,该校验值获取单元从该接收网络封包的校验值放置区块中获取该第一校验值。4. The check value calculation system according to claim 2, wherein the check value acquisition unit acquires the first check value from the check value placement block of the received network packet. 5、根据权利要求1所述的校验值运算系统,其特征在于,该校验值运算模块为一专用集成电路单芯片。5. The check value calculation system according to claim 1, wherein the check value calculation module is an ASIC single chip. 6、根据权利要求1所述的校验值运算系统,其特征在于,该校验值运算模块为一现场式可编程栅极列单芯片。6. The check value calculation system according to claim 1, wherein the check value calculation module is a field-type programmable gate row single chip. 7、根据权利要求1所述的校验值运算系统,其特征在于,该比较结果为该第一与该第二校验值不相同时,则丢弃该接收网络封包。7. The check value calculation system according to claim 1, wherein when the comparison result is that the first check value is different from the second check value, the receiving network packet is discarded. 8、一种网络封包的校验值运算方法,在一计算机系统中对一传送网络封包或一接收网络封包进行一校验值运算,其特征在于,包含有:8. A method for calculating a check value of a network packet, performing a check value calculation on a transmitting network packet or a receiving network packet in a computer system, characterized in that it includes: 设置一校验值运算模块于该计算机系统中,用以独立于中央处理器进行该校验值运算;setting a check value calculation module in the computer system to perform the check value calculation independently of the central processing unit; 在该网络封包传送时,该校验值运算模块的第一校验值运算单元,依据一检验值演算规则运算该传送网络封包,以产生对应该传送网络封包的第一校验值;When the network packet is transmitted, the first check value operation unit of the check value calculation module operates the transmitted network packet according to a check value calculation rule to generate a first check value corresponding to the transmitted network packet; 该校验值运算模块的校验值附加单元附加该第一校验值至该传送网络封包中,以传递该传送网络封包;The check value adding unit of the check value operation module adds the first check value to the transmission network packet to transmit the transmission network packet; 在该网络封包接收时,该校验值运算模块的第二校验值运算单元依据该检验值演算规则运算该接收网络封包,以产生对应该接收网络封包的第二校验值;及When the network packet is received, the second check value computing unit of the check value calculation module operates the received network packet according to the check value calculation rule to generate a second check value corresponding to the received network packet; and 该校验值运算模块的校验值获取单元获取该接收网络封包中附加的该第一校验值;The check value acquisition unit of the check value calculation module acquires the first check value added in the received network packet; 该校验值运算模块的校验值比较单元比较该第一与该第二校验值,以产生一比对结果供该中央处理器处理该接收网络封包。The check value comparison unit of the check value calculation module compares the first check value with the second check value to generate a comparison result for the central processing unit to process the receiving network packet. 9、根据权利要求8所述的校验值运算方法,其特征在于,该校验值演算规则为MD5单向杂序函数算法。9. The check value calculation method according to claim 8, characterized in that the check value calculation rule is the MD5 one-way hash function algorithm. 10、根据权利要求9所述的校验值运算方法,其特征在于,该校验值附加单元附加该第一校验值至该传送网络封包的校验值放置区块中。10. The check value calculation method according to claim 9, wherein the check value adding unit adds the first check value to the check value placement block of the transmission network packet. 11、根据权利要求9所述的校验值运算方法,其特征在于,该校验值获取单元从该接收网络封包的校验值放置区块中获取该第一校验值。11. The check value calculation method according to claim 9, wherein the check value acquisition unit acquires the first check value from the check value placement block of the received network packet. 12、根据权利要求9所述的校验值运算方法,其特征在于,该校验值运算模块为一专用集成电路单芯片。12. The check value calculation method according to claim 9, wherein the check value calculation module is an ASIC single chip. 13、根据权利要求9所述的校验值运算方法,其特征在于,该校验值运算模块为一现场式可编程栅极列单芯片。13. The check value calculation method according to claim 9, wherein the check value calculation module is a field-type programmable gate row single chip. 14、根据权利要求9所述的校验值运算方法,其特征在于,该比较结果为该第一与该第二校验值不相同时,则丢弃该接收网络封包。14. The check value calculation method according to claim 9, wherein when the comparison result is that the first check value is different from the second check value, the receiving network packet is discarded.
CNB2004101035095A 2004-12-29 2004-12-29 Check value operation system and operation method of network packet Expired - Fee Related CN100481760C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004101035095A CN100481760C (en) 2004-12-29 2004-12-29 Check value operation system and operation method of network packet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004101035095A CN100481760C (en) 2004-12-29 2004-12-29 Check value operation system and operation method of network packet

Publications (2)

Publication Number Publication Date
CN1798015A CN1798015A (en) 2006-07-05
CN100481760C true CN100481760C (en) 2009-04-22

Family

ID=36818821

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004101035095A Expired - Fee Related CN100481760C (en) 2004-12-29 2004-12-29 Check value operation system and operation method of network packet

Country Status (1)

Country Link
CN (1) CN100481760C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093130B (en) * 2013-01-09 2016-05-11 杭州华三通信技术有限公司 A kind of hardware binding information ciphering method and the network equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN87101838A (en) * 1986-03-12 1987-12-02 西门子公司 The method of operating of the multiprocessor central control unit of the high-efficiency fail-safe of exchange system
US5146459A (en) * 1986-11-28 1992-09-08 Canon Kabushiki Kaisha Electronic equipment with check-sum function
CN1278124A (en) * 1999-06-15 2000-12-27 皇家菲利浦电子有限公司 Transmission system, receiving device, transmitter and interface device
CN1434941A (en) * 1999-12-21 2003-08-06 英特尔公司 Firmware mechanism for correcting soft errors

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN87101838A (en) * 1986-03-12 1987-12-02 西门子公司 The method of operating of the multiprocessor central control unit of the high-efficiency fail-safe of exchange system
US5146459A (en) * 1986-11-28 1992-09-08 Canon Kabushiki Kaisha Electronic equipment with check-sum function
CN1278124A (en) * 1999-06-15 2000-12-27 皇家菲利浦电子有限公司 Transmission system, receiving device, transmitter and interface device
CN1434941A (en) * 1999-12-21 2003-08-06 英特尔公司 Firmware mechanism for correcting soft errors

Also Published As

Publication number Publication date
CN1798015A (en) 2006-07-05

Similar Documents

Publication Publication Date Title
CN100479437C (en) Method of parsing a packet header and computer system
EP3603001A1 (en) Hardware-accelerated payload filtering in secure communication
CN111327603B (en) Data transmission method, device and system
EP3068093A1 (en) Security authentication method and bidirectional forwarding detection method
CN101601256A (en) Network interface card transmission control protocol acceleration offload fault detect and Restoration Mechanism
CN101651709A (en) Method for calibrating integrity of P2P download files
WO2021134418A1 (en) Data checking method and apparatus
CN110138635B (en) Protocol conversion function verification device and method supporting FC and Ethernet
CN100481760C (en) Check value operation system and operation method of network packet
WO2014075427A1 (en) Method, apparatus and system for obtaining object
CN117579725A (en) Message segmented transmission methods, devices, equipment and media
CN103501251B (en) Method and device for processing data packet under offline condition
CN117729022A (en) Software and hardware combined virtual machine anti-attack protection method and device
US6779054B2 (en) Method and apparatus for operating a network controller
CN113225348B (en) Request anti-replay verification method and device
CN111190831B (en) Robustness analysis method of block chain consensus algorithm and block chain system
CN112714466B (en) Service quality measuring method, device and user plane function
CN113986578A (en) Message checking method and first equipment
CN114157716A (en) Data processing method and device based on block chain and electronic equipment
CN114979172B (en) Data transmission method, device, equipment and storage medium
CN114124754A (en) Method for processing media data packets in a multimedia network and related product
CN108881258A (en) A kind of intelligence system for network file safe transmission
EP4503800A1 (en) Data processing method and apparatus, and computer-readable medium and electronic device
CN115883226B (en) Vehicle network attack analysis method, device, equipment and storage medium
JP2012049883A (en) Communication device and packet processing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090422

Termination date: 20101229