[go: up one dir, main page]

CN104426873B - A kind of IP packet generation, sending method and system based on user demand - Google Patents

A kind of IP packet generation, sending method and system based on user demand Download PDF

Info

Publication number
CN104426873B
CN104426873B CN201310389215.2A CN201310389215A CN104426873B CN 104426873 B CN104426873 B CN 104426873B CN 201310389215 A CN201310389215 A CN 201310389215A CN 104426873 B CN104426873 B CN 104426873B
Authority
CN
China
Prior art keywords
application
layer
message
mapping table
requirement
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.)
Active
Application number
CN201310389215.2A
Other languages
Chinese (zh)
Other versions
CN104426873A (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.)
Zhengzhou Xinrand Network Technology Co ltd
Original Assignee
Institute of Acoustics CAS
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 Institute of Acoustics CAS filed Critical Institute of Acoustics CAS
Priority to CN201310389215.2A priority Critical patent/CN104426873B/en
Publication of CN104426873A publication Critical patent/CN104426873A/en
Application granted granted Critical
Publication of CN104426873B publication Critical patent/CN104426873B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明提出了一种基于用户需求的IP报文生成、发送方法及系统,该方法基于OSI网络模型的三层IP层和二层驱动,所述方法包含:用于基于用户特定的业务应用需求修改应用‑需求映射表;读取最新修改的应用‑需求映射表,并接收三层IP层发送的IP报文,依据最新修改的应用‑需求映射表设置接收的IP报文包含的服务类型字段的值;将设置的IP报文发送至二层驱动进行处理;其中,所述应用‑需求映射表包含:应用名称、协议版本、协议类型、端口号和应用需求值。本发明公开的一种用户设置IP报文的应用需求方法,解决业务使用过程中动态修改IP报文的应用需求问题,同时解决了传统socket编程中多数应用没有设置应用需求的问题,本方法具有适应用户个体需求的特点。

The present invention proposes a method and system for generating and sending IP messages based on user requirements. The method is based on the three-layer IP layer and the two-layer driver of the OSI network model. The method includes: for user-specific service application requirements Modify the application-requirement mapping table; read the latest modified application-requirement mapping table, and receive the IP message sent by the three-layer IP layer, and set the service type field contained in the received IP message according to the newly modified application-requirement mapping table The set IP packet is sent to the two-layer driver for processing; wherein, the application-requirement mapping table includes: application name, protocol version, protocol type, port number and application requirement value. The invention discloses a method for users to set the application requirements of IP messages, which solves the problem of dynamically modifying the application requirements of IP messages in the process of business use, and at the same time solves the problem that most applications do not set application requirements in traditional socket programming. The method has the advantages of Adapt to the characteristics of individual needs of users.

Description

一种基于用户需求的IP报文生成、发送方法及系统A method and system for generating and sending IP packets based on user requirements

技术领域technical field

本发明涉及网络技术领域,特别涉及到单主机上用户设置IP报文的应用需求方法,具体涉及一种基于用户需求的IP报文生成、发送方法及系统。The invention relates to the field of network technology, in particular to a method for setting application requirements of IP messages by users on a single host, and in particular to a method and system for generating and sending IP messages based on user requirements.

背景技术Background technique

无论在IPv4还是IPv6中,其数据报文内均有相应的字段描述该报文的处理需求,例如IPv4报文首部中的8位的服务类型(Type of Service,TOS)字段,用来获得更好的服务,其中前3位表示报文的优先级,后面的几位分别表示要求更低时延、更高的吞吐量、更高的可靠性、更低的路由代价等,对应位为1即有相应要求,为0则不要求。No matter in IPv4 or IPv6, there are corresponding fields in the data message to describe the processing requirements of the message, such as the 8-bit Type of Service (TOS) field in the header of the IPv4 message, which is used to obtain more For good service, the first 3 digits represent the priority of the message, and the latter digits respectively represent requirements for lower delay, higher throughput, higher reliability, and lower routing cost, etc., and the corresponding digit is 1 That is, there is a corresponding requirement, and if it is 0, it is not required.

传统应用编程中,很少有人员直接操作IP报文的,通常的做法是使用socket编程,socket编程中规定了相应的函数,如bind、connect、sendto、sendmsg等。我们发现在所有socket函数及相应参数、数据结构中,没有设置服务类型的手段或方法。如果在应用编程时,直接操作IP报文首部,那么通常TOS字段就在应用使用过程中是固定的、不能改变的。另外,人们使用不同应用时,其体验需求是不同的,所以存在动态修改TOS等字段的需求。In traditional application programming, very few people operate IP packets directly. The usual method is to use socket programming, which specifies corresponding functions, such as bind, connect, sendto, sendmsg, etc. We found that in all socket functions and corresponding parameters and data structures, there is no means or method to set the service type. If the IP packet header is directly manipulated during application programming, the TOS field is usually fixed and cannot be changed during application use. In addition, when people use different applications, their experience requirements are different, so there is a need to dynamically modify fields such as TOS.

随着网络技术的飞速发展,网络设备的功能日渐强大,其对QoS的支持能力越来越强。因此要求未来网络设备支持TOS等方式应用需求设置的区分处理。With the rapid development of network technology, the function of network equipment is becoming more and more powerful, and its ability to support QoS is getting stronger and stronger. Therefore, future network devices are required to support differentiated processing of application requirement settings in methods such as TOS.

发明内容Contents of the invention

本发明的目的在于,为解决用户动态设置IP报文的应用需求问题,本发明提出一种基于用户需求的IP报文生成、发送方法及系统,从而用户在使用应用业务时可动态设置其IP报文的TOS等字段,满足业务体验。The purpose of the present invention is to solve the problem of application requirements for users to dynamically set IP packets. The present invention proposes a method and system for generating and sending IP packets based on user requirements, so that users can dynamically set their IP packets when using application services. The TOS and other fields of the packet meet the service experience.

为了实现上述目的,本发明提供了一种基于用户需求的IP报文生成、发送方法,该方法基于OSI网络模型的三层IP层和二层驱动,所述方法包含:In order to achieve the above object, the present invention provides a method for generating and sending IP messages based on user needs, the method is based on three layers of IP layers and two-layer drivers of the OSI network model, and the method includes:

步骤101)用于基于用户特定的业务应用需求修改应用-需求映射表;Step 101) is used to modify the application-requirement mapping table based on user-specific business application requirements;

步骤102)读取最新修改的应用-需求映射表,并接收三层IP层发送的IP报文,依据最新修改的应用-需求映射表设置接收的IP报文包含的服务类型字段的值;Step 102) Read the newly modified application-requirement mapping table, and receive the IP message sent by the three-layer IP layer, and set the value of the service type field contained in the received IP message according to the newly modified application-requirement mapping table;

步骤103)将设置的IP报文发送至二层驱动进行处理;Step 103) Send the set IP packet to the layer-2 driver for processing;

其中,所述应用-需求映射表包含:应用名称、协议版本、协议类型、端口号和应用需求值。Wherein, the application-requirement mapping table includes: application name, protocol version, protocol type, port number and application requirement value.

上述步骤101)进一步包含:The above step 101) further comprises:

步骤101-1)用于设置应用-需求映射表,即在应用-需求映射表中添加一个表项;Step 101-1) is used to set the application-requirement mapping table, that is, add an entry in the application-requirement mapping table;

步骤101-2)用于清除应用-需求映射表中的一个已存在表项,即用户不再需要对应用的特定处理,而采取IP报文的缺省处理方式;Step 101-2) is used to clear an existing entry in the application-requirement mapping table, that is, the user no longer needs specific processing of the application, and adopts the default processing method of IP packets;

步骤101-3)用户设置特定的应用-需求项后,通知业务应用IP报文的应用需求报文实时操作驱动,由该业务应用IP报文的应用需求报文实时操作驱动读入最新的应用-需求映射表。Step 101-3) After the user sets a specific application-requirement item, notify the business application of the real-time operation driver of the application requirement message of the IP message, and read the latest application by the real-time operation driver of the application requirement message of the IP message of the service application - Requirements Mapping Table.

上述步骤102)进一步包含:The above step 102) further includes:

步骤102-1)接收三层IP层向下层发送的IP报文,利用应用-需求映射表判定所接收IP报文是否有匹配表项,如有进入下一个步骤;否则将IP报文直接发给二层驱动;Step 102-1) Receive the IP message sent by the three-layer IP layer to the lower layer, and use the application-requirement mapping table to determine whether the received IP message has a matching entry, and if so, enter the next step; otherwise, send the IP message directly For the second layer driver;

步骤102-2)利用匹配表项中的服务类型字段与接收的IP报文首部中的相应字段进行异或运算得到待插入的服务类型字段,将得到待插入的服务类型字段替换接收的IP报文首部中的相应字段,得到基于用户需求的IP报文。Step 102-2) Use the service type field in the matching entry and the corresponding field in the received IP message header to perform XOR operation to obtain the service type field to be inserted, and replace the received IP message with the service type field to be inserted Corresponding fields in the header of the file to obtain IP packets based on user requirements.

为了实现上述方法,本发明还提供一种基于用户需求的IP报文生成、发送系统,该方法基于OSI网络模型的三层IP层和二层驱动,其特征在于,所述的系统还包含:In order to realize the above method, the present invention also provides a system for generating and sending IP messages based on user needs, the method is based on the three-layer IP layer and the two-layer driver of the OSI network model, and it is characterized in that the system also includes:

设置于应用层的IP报文应用需求输入模块,该模块用于完成用户对特定的业务应用的具体设置,即用户通过修改应用-需求映射表输入用户对某应用的特定需求;和An IP packet application requirement input module set at the application layer, which is used to complete the user's specific setting of a specific business application, that is, the user inputs the user's specific requirement for a certain application by modifying the application-requirement mapping table; and

设置于三层IP层和二层驱动之间的业务应用IP报文的应用需求实时操作驱动层,且所述业务应用IP报文的应用需求实时操作驱动层用于:The application requirements real-time operation driver layer of the service application IP message set between the three-layer IP layer and the two-layer driver, and the application requirement real-time operation drive layer of the service application IP message is used for:

读取最新修改的应用-需求映射表,并接收三层IP层发送的IP报文,依据最新修改的应用-需求映射表设置接收的IP报文包含的服务类型字段的值;将设置的IP报文发送至二层驱动进行处理。Read the newly modified application-requirement mapping table, and receive the IP message sent by the three-layer IP layer, and set the value of the service type field contained in the received IP message according to the newly modified application-requirement mapping table; the set IP The message is sent to the Layer 2 driver for processing.

上述业务应用IP报文的应用需求实时操作驱动层进一步包含如下功能模块:The real-time operation driver layer of the application requirements of the above-mentioned service application IP message further includes the following functional modules:

接收判断模块,用于接收三层IP层向下层发送的IP报文,利用应用-需求映射表判定所接收IP报文是否有匹配表项,如有进入下一个步骤;否则直接将IP报文发给二层驱动;The receiving judgment module is used to receive the IP message sent by the three-layer IP layer to the lower layer, and use the application-requirement mapping table to determine whether the received IP message has a matching entry, and if so, enter the next step; otherwise, directly send the IP message Send to the second layer driver;

IP报文重新生成模块,用于利用匹配表项中的服务类型字段与接收的IP报文首部中的相应字段进行异或运算得到待插入的服务类型字段,将得到待插入的服务类型字段替换接收的IP报文首部中的相应字段,得到基于用户需求的IP报文;和The IP message regeneration module is used to use the service type field in the matching table item and the corresponding field in the received IP message header to perform XOR operation to obtain the service type field to be inserted, and replace it with the service type field to be inserted corresponding fields in the header of the received IP message to obtain an IP message based on user requirements; and

发送模块,用于将IP报文重新生成模块生成的IP报文发送至二层驱动进行处理。The sending module is configured to send the IP packet generated by the IP packet regeneration module to the layer-2 driver for processing.

总之,本发明提供的一种用户设置IP报文的应用需求方法,包括:用户设置IP报文应用需求程序、业务应用IP报文的应用需求实时操作驱动,其特征在于,具体方法包括:通过用户设置IP报文应用需求程序设置应用-需求映射表;触发业务应用IP报文的应用需求实时操作驱动读取最新的应用-需求映射表;业务应用IP报文的应用需求实时操作驱动接收到IP报文时,依据应用-需求映射表,实施相应的IP报文服务类型(TOS)等字段的设置。用户设置IP报文应用需求程序如下:人类用户利用人机界面手段设置业务应用所对应的IP报文的TOS等字段,设置完毕后,将TOS等字段配置到应用需求实时操作驱动(下文描述)的应用-需求映射表,并通知应用需求实时操作驱动读取最新映射表。业务应用IP报文的应用需求实时操作驱动如下:指接收IP层的报文,利用应用-需求映射表判定所接收IP报文是否有匹配表项,如有匹配表项,则利用匹配表项中的TOS等字段与IP报文首部中的相应字段进行异或,得到的结果替换IP报文首部中的相应字段,同时计算并改写校验和;将修改后的报文发送到二层驱动,其后的过程由二层驱动处理。In a word, a kind of method that the user sets the application demand of IP message provided by the present invention, comprises: the user sets the application demand program of IP message, the application demand real-time operation driving of service application IP message, it is characterized in that, the specific method comprises: through The user sets the application requirement program of the IP packet and sets the application-requirement mapping table; triggers the real-time operation driver of the application requirement of the IP packet of the business application to read the latest application-requirement mapping table; the real-time operation driver of the application requirement of the IP packet of the business application receives it For IP packets, according to the application-requirement mapping table, implement the setting of the corresponding IP packet type of service (TOS) and other fields. The procedure for setting the application requirements of IP packets by the user is as follows: Human users use the man-machine interface to set the TOS and other fields of the IP packets corresponding to the business application. After setting, configure the TOS and other fields to the real-time operation driver of the application requirements (described below) The application-requirement mapping table, and notify the application of the real-time operation driver to read the latest mapping table. The real-time operation of the application requirements of business application IP packets is driven as follows: it refers to receiving packets at the IP layer, using the application-requirement mapping table to determine whether the received IP packets have matching entries, and if there are matching entries, use the matching entries The TOS and other fields in the IP packet are XORed with the corresponding fields in the IP packet header, and the result obtained replaces the corresponding fields in the IP packet header, and the checksum is calculated and rewritten at the same time; the modified packet is sent to the second-layer driver , and the subsequent process is handled by the two-layer driver.

与现有技术相比,本发明具有下列优点:Compared with the prior art, the present invention has the following advantages:

(1)用户可动态修改IP报文的应用需求;(1) Users can dynamically modify the application requirements of IP packets;

(2)解决传统socket编程中多数应用没有设置应用需求的问题;(2) Solve the problem that most applications do not set application requirements in traditional socket programming;

(3)可适应用户个体需求。(3) It can adapt to the individual needs of users.

附图说明Description of drawings

图1本发明提供的用户设置IP报文的应用需求方法组成图;Fig. 1 composition diagram of the application requirement method of user setting IP message provided by the present invention;

图2本发明提供的用户设置IP报文应用需求程序示意图;Fig. 2 schematic diagram of user setting IP message application requirement program provided by the present invention;

图3本发明提供的业务应用IP报文的应用需求实时操作驱动位置图。Fig. 3 is a real-time operation driving position diagram of application requirements of service application IP packets provided by the present invention.

具体实施方式Detailed ways

下面结合附图对本发明的技术方案进行详细阐述。The technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings.

本发明提供一种用户设置IP报文的应用需求方法,解决业务使用过程中不同动态修改IP报文的应用需求问题,同时解决了传统socket编程中多数应用没有设置应用需求的问题,本方法具有适应用户个体需求的特点。The present invention provides a method for users to set application requirements for IP messages, which solves the problem of different application requirements for dynamically modifying IP messages in the course of business use, and at the same time solves the problem that most applications do not set application requirements in traditional socket programming. The method has the advantages of Adapt to the characteristics of individual needs of users.

为达到上述发明目的,本发明的一种用户设置IP报文的应用需求方法,包括:用户设置IP报文应用需求程序、业务应用IP报文的应用需求实时操作驱动。本方法的假定前提是网络设备支持IP报文的TOS等字段的分类处理,如果不支持的话,则IP报文应用需求设置是不起作用的。In order to achieve the purpose of the above invention, a method for setting the application requirements of IP packets by users in the present invention includes: a program for setting application requirements of IP packets by users, and a real-time operation driver for application requirements of IP packets for business applications. The assumption of this method is that the network equipment supports the classification processing of fields such as TOS of the IP message. If it does not support it, the IP message application requirement setting is ineffective.

其中,用户设置IP报文应用需求程序指人类用户利用人机界面手段设置业务应用所对应的IP报文的TOS等字段,设置完毕后,将TOS等字段配置到应用需求实时操作驱动的应用-需求映射表,并通知应用需求实时操作驱动读取最新映射表。Among them, the user setting IP packet application requirements program refers to the human user using the man-machine interface to set the TOS and other fields of the IP packet corresponding to the business application. demand mapping table, and notify the application of the demand real-time operation driver to read the latest mapping table.

其中,业务应用IP报文的应用需求实时操作驱动指接收IP层的报文,利用应用-需求映射表判定所接收IP报文是否有匹配表项,如有匹配表项,则利用匹配表项中的TOS等字段与IP报文首部中的相应字段进行异或,得到的结果替换IP报文首部中的相应字段,同时计算并改写校验和;将修改后的报文发送到二层驱动,其后的过程由二层驱动处理。Among them, the application demand real-time operation driver of business application IP message refers to receiving the message of IP layer, using the application-requirement mapping table to determine whether the received IP message has a matching entry, and if there is a matching entry, use the matching entry The TOS and other fields in the IP packet are XORed with the corresponding fields in the IP packet header, and the result obtained replaces the corresponding fields in the IP packet header, and the checksum is calculated and rewritten at the same time; the modified packet is sent to the second-layer driver , and the subsequent process is handled by the two-layer driver.

其中,业务应用IP报文的应用需求实时操作驱动位于IP层和二层之间,在主机上IP层看到的是一个二层驱动,而对于实际的网络适配器看来该驱动是三层的程序。Among them, the real-time operation driver for the application requirements of business application IP packets is located between the IP layer and the second layer. On the host, the IP layer sees a layer-2 driver, but for the actual network adapter, the driver is a layer-3 driver. program.

下面结合附图和具体实施例,对本发明所提供的一种用户设置IP报文的应用需求方法作进一步阐述。A method for user setting application requirements of IP packets provided by the present invention will be further elaborated below in conjunction with the accompanying drawings and specific embodiments.

实施例Example

下面结合附图1、附图2、附图3说明一种用户设置IP报文的应用需求方法。如图1所示,是用户设置IP报文的应用需求方法组成图,由用户设置IP报文应用需求程序、应用-需求映射表和业务应用IP报文的应用需求实时操作驱动组成,应用-需求映射表是用户设置IP报文应用需求程序和业务应用IP报文的应用需求实时操作驱动之间的共享数据结构,它存储应用需求的映射表,其中映射表的每个表项可包括:应用名称、协议版本、协议类型、端口号、应用需求值(依据IP的不同版本而有所不同)。如附图3所示,业务应用IP报文的应用需求实时操作驱动使用正常网络编程方法,首先将原二层驱动和IP层程序之间的链接断开,将该实时操作驱动插入到IP层程序和二层驱动之间,IP层程序原调用二层驱动的地方改成调用业务应用IP报文的应用需求实时操作驱动,在该实时操作驱动发送报文时调用二层驱动,我们仅修改报文外发的链接关系,对于进来的链接关系,保持不变。在用户开始设置时,需触发启动用户设置IP报文应用需求程序,该程序弹出界面示意图如附图2所示,针对具体应用进行设置或清除,除应用需求值外的其他值可通过正常的编程方法得到,可不需用户输入;在用户填入相关值后,点击设置/清除按钮即可进行设置,根据具体情况,也可清除;其中设置是在应用-需求映射表中添加一个表项,清除是将应用-需求映射表中的一个已存在表项清除掉,即用户不再需要对应用做特定处理,而采取IP报文的缺省处理方式。A method for setting application requirements of IP packets by a user will be described below in conjunction with accompanying drawings 1 , 2 and 3 . As shown in Figure 1, it is a composition diagram of the method for setting the application requirements of IP packets by the user. It is composed of the application requirements program for setting the IP packets by the user, the application-requirement mapping table, and the real-time operation drive of the application requirements of the IP packets for business applications. The demand mapping table is a shared data structure between the user setting IP message application demand program and the application demand real-time operation driver of the business application IP message, which stores the mapping table of application requirements, wherein each entry of the mapping table may include: Application name, protocol version, protocol type, port number, application requirement value (different according to different versions of IP). As shown in Figure 3, the real-time operation driver of the business application IP message uses the normal network programming method. First, the link between the original two-layer driver and the IP layer program is disconnected, and the real-time operation driver is inserted into the IP layer. Between the program and the second-layer driver, the place where the IP layer program originally calls the second-layer driver is changed to call the application-required real-time operation driver of the IP message of the business application. When the real-time operation driver calls the second-layer driver when sending a message, we only modify The outgoing link relationship of the message remains unchanged for the incoming link relationship. When the user starts setting, it is necessary to trigger the start of the user setting IP packet application requirement program. The schematic diagram of the pop-up interface of the program is shown in Figure 2, which can be set or cleared for specific applications. Other values except the application requirement value can be set through the normal The programming method is obtained without user input; after the user fills in the relevant values, click the Set/Clear button to set, and it can also be cleared according to the specific situation; the setting is to add an item in the application-requirement mapping table, Clearing is to clear an existing entry in the application-requirement mapping table, that is, the user no longer needs to perform specific processing on the application, and adopts the default processing mode of IP packets.

用户设置特定的应用-需求项后,程序即刻通知业务应用IP报文的应用需求报文实时操作驱动,由其读入最新的应用-需求映射表,这样可采用前述的IP报文匹配方法设置服务类型(TOS)等字段,并调用二层驱动完成报文的发送。After the user sets a specific application-requirement item, the program immediately notifies the business application of the application-requirement packet real-time operation driver of the IP packet, which reads the latest application-requirement mapping table, so that the aforementioned IP packet matching method can be used to set Type of service (TOS) and other fields, and call the second-layer driver to complete the sending of the message.

说明文档中的其他内容针对本专业领域内的普通技术人员,均可进行技术实现,这里不再赘述。Other content in the documentation can be technically implemented by ordinary technical personnel in this professional field, and will not be repeated here.

最后所应说明的是,以上实施例仅用以说明本发明的技术方案而非限制。尽管参照实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,对本发明的技术方案进行修改或者等同替换,都不脱离本发明技术方案的精神和范围,其均应涵盖在本发明的权利要求范围当中。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than limit them. Although the present invention has been described in detail with reference to the embodiments, those skilled in the art should understand that modifications or equivalent replacements to the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention, and all of them should be included in the scope of the present invention. within the scope of the claims.

Claims (5)

1.一种基于用户需求的IP报文生成、发送方法,该方法基于OSI网络模型的三层IP层和二层驱动,所述方法包含:1. a kind of IP message generation based on user demand, sending method, this method is based on the three-layer IP layer of OSI network model and two-layer drive, and described method comprises: 步骤101)用于基于用户特定的业务应用需求修改应用-需求映射表;Step 101) is used to modify the application-requirement mapping table based on user-specific business application requirements; 步骤102)读取最新修改的应用-需求映射表,并接收三层IP层发送的IP报文,依据最新修改的应用-需求映射表设置接收的IP报文包含的服务类型字段的值;Step 102) read the latest modified application-demand mapping table, and receive the IP message sent by the three-layer IP layer, and set the value of the service type field contained in the received IP message according to the newly modified application-demand mapping table; 步骤103)将设置的IP报文发送至二层驱动进行处理;Step 103) send the set IP message to the two-layer driver for processing; 其中,所述应用-需求映射表包含:应用名称、协议版本、协议类型、端口号和应用需求值。Wherein, the application-requirement mapping table includes: application name, protocol version, protocol type, port number and application requirement value. 2.根据权利要求1所述的基于用户需求的IP报文生成、发送方法,其特征在于,所述步骤101)进一步包含:2. the IP message generation based on user demand according to claim 1, sending method, it is characterized in that, described step 101) further comprises: 步骤101-1)用于设置应用-需求映射表,即在应用-需求映射表中添加一个表项;Step 101-1) is used to set the application-requirement mapping table, that is, add an entry in the application-requirement mapping table; 步骤101-2)用于清除应用-需求映射表中的一个已存在表项,即用户不再需要对应用的特定处理,而采取IP报文的缺省处理方式;Step 101-2) is used to clear an existing entry in the application-requirement mapping table, that is, the user no longer needs specific processing of the application, and adopts the default processing method of IP packets; 步骤101-3)用户设置特定的应用-需求项后,通知业务应用IP报文的应用需求报文实时操作驱动,由该业务应用IP报文的应用需求报文实时操作驱动读入最新的应用-需求映射表。Step 101-3) After the user sets a specific application-requirement item, notify the service application of the application demand message real-time operation driver of the IP message, and read the latest application by the real-time operation drive of the application demand message of the service application IP message - Requirements Mapping Table. 3.根据权利要求1或2所述的基于用户需求的IP报文生成、发送方法,其特征在于,所述步骤102)进一步包含:3. according to claim 1 and 2 described IP message generation based on user demand, sending method, it is characterized in that, described step 102) further comprises: 步骤102-1)接收三层IP层向下层发送的IP报文,利用应用-需求映射表判定所接收IP报文是否有匹配表项,如有进入下一个步骤;否则将IP报文直接发给二层驱动;Step 102-1) receive the IP message that the three-layer IP layer sends to the lower layer, and use the application-requirement mapping table to determine whether the received IP message has a matching entry, and enter the next step if there is; otherwise, the IP message is directly sent For the second layer driver; 步骤102-2)利用匹配表项中的服务类型字段与接收的IP报文首部中的相应字段进行异或运算得到待插入的服务类型字段,将得到待插入的服务类型字段替换接收的IP报文首部中的相应字段,得到基于用户需求的IP报文。Step 102-2) use the service type field in the matching table entry and the corresponding field in the received IP message header to perform XOR operation to obtain the service type field to be inserted, and replace the received IP message with the service type field to be inserted. Corresponding fields in the header of the file to obtain IP packets based on user requirements. 4.一种基于用户需求的IP报文生成、发送系统,该系统基于OSI网络模型的三层IP层和二层驱动,其特征在于,所述的系统还包含:4. a kind of IP message generation based on user demand, sending system, this system is based on three-layer IP layer and two-layer drive of OSI network model, it is characterized in that, described system also comprises: 设置于应用层的IP报文应用需求输入模块,该模块用于完成用户对特定的业务应用的具体设置,即用户通过修改应用-需求映射表输入用户对某应用的特定需求;和An IP packet application requirement input module set at the application layer, which is used to complete the user's specific setting of a specific business application, that is, the user inputs the user's specific requirement for a certain application by modifying the application-requirement mapping table; and 设置于三层IP层和二层驱动之间的业务应用IP报文的应用需求实时操作驱动层,且所述业务应用IP报文的应用需求实时操作驱动层用于:The application requirements real-time operation driver layer of the service application IP message set between the three-layer IP layer and the two-layer driver, and the application requirement real-time operation drive layer of the service application IP message is used for: 读取最新修改的应用-需求映射表,并接收三层IP层发送的IP报文,依据最新修改的应用-需求映射表设置接收的IP报文包含的服务类型字段的值;将设置的IP报文发送至二层驱动进行处理。Read the newly modified application-requirement mapping table, and receive the IP message sent by the three-layer IP layer, and set the value of the service type field contained in the received IP message according to the newly modified application-requirement mapping table; the set IP The message is sent to the Layer 2 driver for processing. 5.根据权利要求4所述的基于用户需求的IP报文生成、发送系统,其特征在于,所述业务应用IP报文的应用需求实时操作驱动层进一步包含如下功能模块:5. the IP message generation based on user demand according to claim 4, sending system, it is characterized in that, the application demand real-time operation driving layer of described service application IP message further comprises following function module: 接收判断模块,用于接收三层IP层向下层发送的IP报文,利用应用-需求映射表判定所接收IP报文是否有匹配表项,如有进入下一个步骤;否则直接将IP报文发给二层驱动;The receiving judgment module is used to receive the IP message sent by the three-layer IP layer to the lower layer, and use the application-requirement mapping table to determine whether the received IP message has a matching entry, and if so, enter the next step; otherwise, directly send the IP message Send to the second layer driver; IP报文重新生成模块,用于利用匹配表项中的服务类型字段与接收的IP报文首部中的相应字段进行异或运算得到待插入的服务类型字段,将得到待插入的服务类型字段替换接收的IP报文首部中的相应字段,得到基于用户需求的IP报文;和The IP message regeneration module is used to use the service type field in the matching table item and the corresponding field in the received IP message header to perform XOR operation to obtain the service type field to be inserted, and replace it with the service type field to be inserted corresponding fields in the header of the received IP message to obtain an IP message based on user requirements; and 发送模块,用于将IP报文重新生成模块生成的IP报文发送至二层驱动进行处理。The sending module is configured to send the IP packet generated by the IP packet regeneration module to the layer-2 driver for processing.
CN201310389215.2A 2013-08-30 2013-08-30 A kind of IP packet generation, sending method and system based on user demand Active CN104426873B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310389215.2A CN104426873B (en) 2013-08-30 2013-08-30 A kind of IP packet generation, sending method and system based on user demand

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310389215.2A CN104426873B (en) 2013-08-30 2013-08-30 A kind of IP packet generation, sending method and system based on user demand

Publications (2)

Publication Number Publication Date
CN104426873A CN104426873A (en) 2015-03-18
CN104426873B true CN104426873B (en) 2018-07-03

Family

ID=52974825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310389215.2A Active CN104426873B (en) 2013-08-30 2013-08-30 A kind of IP packet generation, sending method and system based on user demand

Country Status (1)

Country Link
CN (1) CN104426873B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114553350B (en) * 2020-11-24 2023-09-05 中国科学院沈阳自动化研究所 Deterministic low-delay message processing method
CN114979303B (en) * 2022-04-29 2024-04-05 京东科技信息技术有限公司 Method, device, equipment and readable medium for processing service quality of network data packet

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771627A (en) * 2009-01-05 2010-07-07 武汉烽火网络有限责任公司 Equipment and method for analyzing and controlling node real-time deep packet on internet
CN102143035A (en) * 2010-06-04 2011-08-03 华为技术有限公司 Data traffic processing method, network device and network system
CN102891810A (en) * 2012-09-14 2013-01-23 四川省电力公司信息通信公司 Method for dynamically distributing satellite channels by modifying Internet protocol (IP) message header

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7636362B2 (en) * 2004-02-26 2009-12-22 Oracle International Corp. System and method of dynamically providing priority for network communications
US8331369B2 (en) * 2008-07-10 2012-12-11 At&T Intellectual Property I, L.P. Methods and apparatus to distribute network IP traffic

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771627A (en) * 2009-01-05 2010-07-07 武汉烽火网络有限责任公司 Equipment and method for analyzing and controlling node real-time deep packet on internet
CN102143035A (en) * 2010-06-04 2011-08-03 华为技术有限公司 Data traffic processing method, network device and network system
CN102891810A (en) * 2012-09-14 2013-01-23 四川省电力公司信息通信公司 Method for dynamically distributing satellite channels by modifying Internet protocol (IP) message header

Also Published As

Publication number Publication date
CN104426873A (en) 2015-03-18

Similar Documents

Publication Publication Date Title
US6938179B2 (en) Socket extensions for redundancy
US11637665B2 (en) Forwarding table generation method and forwarding device
WO2017162089A1 (en) Service configuration method and device for network service
CN104135446B (en) System and methods of the IPv4 to IPv6 transition is realized based on SDN
WO2015143802A1 (en) Service function chaining processing method and device
CN101119290A (en) Method and system for Ethernet supporting source-specific multicast forwarding
CN107465613B (en) Link aggregation interface communication state switching method and device
JP6480452B2 (en) Packet processing method and apparatus
WO2010145091A1 (en) Method for implementing virtual network port and embedded device for implementing virtual network port
CN101557342B (en) Multicast packet forwarding method and routing device
JP2016524412A (en) Method and forwarder for processing packets
CN114556894A (en) Method, apparatus and computer program product for packet forwarding control protocol message bundling
WO2015196923A1 (en) Method for sending information and network device
JP5941887B2 (en) Edge router switching method and system, edge router and redundancy management device
CN102904813A (en) Method and corresponding device for message forwarding
CN104426873B (en) A kind of IP packet generation, sending method and system based on user demand
CN107005536A (en) A kind of method of data transfer, relevant device and system
WO2019137242A1 (en) Method and device for establishing bearer, and processor and storage medium
CN104683130A (en) Method and device for configuring stack ports
CN102036304A (en) Method for providing maximum transmission unit length for terminal and packet switch gateway
WO2021218627A1 (en) Communication method and related device
WO2011079563A1 (en) Method for establishing and releasing data connection, data transmission method and wireless data card
CN107483369A (en) A message processing method and a virtual switch
CN105519049B (en) A kind of message transmitting method, apparatus and system
CN103905302B (en) A kind of method that source IP is bound on Windows main frames using Microsoft Loopback Adapter

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210804

Address after: Room 1601, 16th floor, East Tower, Ximei building, No. 6, Changchun Road, high tech Industrial Development Zone, Zhengzhou, Henan 450001

Patentee after: Zhengzhou xinrand Network Technology Co.,Ltd.

Address before: 100190, No. 21 West Fourth Ring Road, Beijing, Haidian District

Patentee before: INSTITUTE OF ACOUSTICS, CHINESE ACADEMY OF SCIENCES