CN105721356B - Store the method and the network equipment of protocol header - Google Patents
Store the method and the network equipment of protocol header Download PDFInfo
- Publication number
- CN105721356B CN105721356B CN201610076153.3A CN201610076153A CN105721356B CN 105721356 B CN105721356 B CN 105721356B CN 201610076153 A CN201610076153 A CN 201610076153A CN 105721356 B CN105721356 B CN 105721356B
- Authority
- CN
- China
- Prior art keywords
- protocol
- instruction
- protocol header
- network
- network equipment
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 230000006870 function Effects 0.000 description 15
- RTZKZFJDLAIYFH-UHFFFAOYSA-N Diethyl ether Chemical compound CCOCC RTZKZFJDLAIYFH-UHFFFAOYSA-N 0.000 description 12
- 230000008569 process Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 7
- 238000004458 analytical method Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 125000001033 ether group Chemical group 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000010485 coping Effects 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 238000002224 dissection Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 230000035800 maturation Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/10—Packet switching elements characterised by the switching fabric construction
- H04L49/103—Packet switching elements characterised by the switching fabric construction using a shared central buffer; using a shared memory
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/18—Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Communication Control (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
This application discloses a kind of methods and the network equipment for storing protocol header, this method comprises: the set that one or more the first protocol header example that in-degree in first network protocol figure is 0 forms is determined as the first protocol header example collection of memory space to be allocated by the network equipment;Determine first communal space, first communal space is for storing each of the first protocol header example collection the first protocol header example;Generate each first protocol header example first analyzes the instruction;By each of the first protocol header example collection, the first protocol header example is deleted from the first network protocol figure, and the oriented edge contract that will be connect in the first network protocol figure with each first protocol header example, obtains the second network protocol figure.Multiple protocol header examples can be shared and be stored in the same communal space, therefore, reduce the occupancy to memory space by the method and the network equipment of the storage protocol header of the embodiment of the present application.
Description
Technical field
This application involves information technology fields, and set more particularly, to a kind of method for storing protocol header and network
It is standby.
Background technique
The prior art is in a manner of data structure diagram, to describe the relationship between network protocol, referred to as network protocol figure.Net
It is discribed according to the business of required support that network protocol figure can be network equipment vendor, is also possible to user according to customized
What network protocol relationship was described.In network protocol figure, including multiple protocol header examples, in forwarding surface, network equipment needs are
All protocol header examples occurred in network protocol figure open up exclusive memory space, no matter currently processed message whether include
The protocol header example.And message may only include a few protocol header example in actual scene, and forwarding surface there is still a need for
A large amount of memory space is reserved for all protocol header examples, causes great space waste.Network protocol level is not poor, additional
The appearance of software defined network (full name in English: Software Define Network, abbreviation: SDN), user can voluntarily determine
Adopted network protocol header and network protocol figure cause limited register resources on the network equipment that can not support slightly complicated agreement
Figure.
Summary of the invention
The embodiment of the present application provides a kind of method and the network equipment for storing protocol header, can reduce storage protocol header example
To the occupancy of memory space.
In a first aspect, a kind of method for storing protocol header is provided, this method comprises: the network equipment is by first network agreement
The set that one or more the first protocol header example that in-degree is 0 in figure forms is determined as the first agreement of memory space to be allocated
Head example collection;The network equipment determines first communal space, and first communal space is for storing first agreement
Each of head example collection the first protocol header example;The network equipment generates each first protocol header example
First analyzes the instruction, wherein described first analyze the instruction be used to indicate the network equipment receive including it is described first association
When discussing the message of head example, by the first protocol header example storage to first communal space;The network equipment is by institute
It states each of first protocol header example collection the first protocol header example to delete from the first network protocol figure, and will
The oriented edge contract connecting in the first network protocol figure with each first protocol header example, obtains the second network protocol
Figure.
In this implementation, which can be one or more protocol header one communal space of example allocation,
It, can be by the association when in order to receive the message including a protocol header example in said one or multiple protocol header examples
It discusses the storage of head example and arrives the communal space, therefore, the method for the storage protocol header of the embodiment of the present application, it is not necessary to be each protocol header
Example all distributes memory space, therefore, reduces storage protocol header example to the occupancy of memory space.
With reference to first aspect, in the first implementation of first aspect, the method also includes: the network equipment
The set that one or more second protocol head examples that in-degree in the second network protocol figure is 0 form is determined as to be allocated
The second protocol head example collection of memory space;;The network equipment determines that second communal space, second communal space are used
In each of the storage second protocol head example collection second protocol head example;The network equipment generates each institute
State second protocol head example second analyzes the instruction, wherein described second analyzes the instruction to be used to indicate and connect in the network equipment
When receiving the message including the second protocol head example, by second protocol head example storage to the described second shared sky
Between;The network equipment is by each of the second protocol head example collection second protocol head example from second net
It is deleted in network protocol figure, and the directed edge connecting in the second network protocol figure with each second protocol head example is deleted
It removes.
In this implementation, if obtained after the first protocol header example collection is deleted from first network protocol figure
The second network protocol figure in further include protocol header example, then the network equipment can use it is similar to first network protocol figure
Processing mode the second network protocol figure is handled, so as to be the second protocol head in the second network protocol figure
Example collection is distributed second communal space and is generated and analyzes the instruction accordingly, in order to which the network equipment is received including the second association
When discussing the message of the second protocol head example in head example collection, by second protocol head example storage to the second shared sky
Between, storage protocol header example is further reduced to the occupancy of memory space.
With reference to first aspect and its above-mentioned implementation, in second of implementation of first aspect, the network is set
Standby to receive message, the message includes the first protocol header example and the second protocol head example;The network equipment obtains
It takes described first to analyze the instruction to analyze the instruction with described second, and analyzes the instruction according to described first and analyzed the instruction with described second
Instruction, by the first protocol header example store to first communal space, the second protocol head example storage is arrived
Second communal space.
In this implementation, which can be analyzed the instruction accordingly by generating for each protocol header example,
By analyzing the instruction, by protocol header example storage to the corresponding communal space.
With reference to first aspect and its above-mentioned implementation, in the third implementation of first aspect, the network is set
Standby acquisition described first is analyzed the instruction to be analyzed the instruction with described second, and specifically include: the network equipment is according to the institute pre-seted
The first storage address analyzed the instruction is stated, described first is obtained and analyzes the instruction, or according to upper the one of the first protocol header example
Layer protocol head example analyzes the instruction, and obtains the described first storage address analyzed the instruction, analyzes the instruction according to described first
Storage address obtains described first and analyzes the instruction;The network equipment is parsed according to described the first of the first protocol header example
Instruction obtains the described second storage address for analyzing the instruction, and the storage address analyzed the instruction according to described second obtains described the
Two analyze the instruction.
In this implementation, which can obtain according to the storage address that the first of pre-configuration analyzes the instruction and be somebody's turn to do
First analyzes the instruction, or the upper layer protocol head example that analyzes the instruction according to first analyzes the instruction, and obtains first parsing
Then the storage address of instruction obtains this according to first storage address analyzed the instruction and first analyzes the instruction.In the network equipment
In received message, which is upper one layer of protocol header example of the second protocol head example, therefore can be with
According to the second storage address analyzed the instruction for analyzing the instruction the acquisition second protocol head example of the first protocol header example, so
The storage address analyzed the instruction afterwards according to second obtains this and second analyzes the instruction.
Therefore, each layer protocol head example analyzes the instruction, can according to upper one layer of the agreement of the protocol header example
Head example analyzes the instruction acquisition, that is to say, that the network equipment can analyzing the instruction according to upper one layer of protocol header example,
Analyzing the instruction for next layer of protocol header example is successively obtained, to obtain the parsing of all protocol header examples in entire message
Instruction, then can analyzing the instruction according to each protocol header example, by the protocol header example storage in the message to corresponding
Memory space.
With reference to first aspect and its above-mentioned implementation, in the 4th kind of implementation of first aspect, if described first
Protocol header example collection only includes the first protocol header example, and the size of first communal space is the first protocol header example
The size of the space occupied, or fixed bit wide;If or the first protocol header example collection include at least two protocol header examples,
The size of first communal space is longest protocol header example the space occupied in at least two protocol headers example
Size, or fixed bit wide.
In this implementation, the size of the communal space can be according to protocol header example the space occupied to be stored
Size determines, or the bit wide of the offset of protocol header example in messages, that is to say, that the communal space can be used for
Store the offset of protocol header example in messages.
Second aspect provides a kind of network equipment, which, which has, realizes above-mentioned first aspect or first aspect
Any implementation method in for storing the function of protocol header.The function can be by hardware realization, can also be with
Corresponding software realization is executed by hardware.The hardware or software include one or more moulds corresponding with above-mentioned function
Block.
The third aspect, provides a kind of network equipment, including memory and processor, which includes journey for storing
The information of sequence, instruction or code, the processor are used to execute program, instruction or the code of memory storage, complete first party
Method in any implementation of face or first aspect.
Specifically, the processor and the memory can be communicated by bus system, and the processor and the memory pass through
Bus system communication, the bus system can also include power bus, control bus and state in addition to including data/address bus
Signal bus etc., the processor and the memory can also be communicated by other kinds of bus, for example, optical fiber or light wave
It leads.
Fourth aspect provides a kind of computer readable storage medium, executes above-mentioned first aspect or for being stored as
Computer software instructions used in the function of any implementation of one side, it includes for execute above-mentioned first aspect or
Program designed by the method for any implementation of first aspect.
Based on the above-mentioned technical proposal, the method and the network equipment of the storage protocol header of the embodiment of the present application, by will be multiple
Protocol header example is shared to be stored in the same communal space, therefore, is reduced storage protocol header example and is accounted for memory space
With.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application will make below to required in the embodiment of the present application
Attached drawing is briefly described, it should be apparent that, drawings described below is only some embodiments of the present application, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is a kind of abstract Internet protocol figure;
Fig. 2 is three kinds of heading form schematic diagrams based on network protocol figure shown in FIG. 1;
Fig. 3 is the schematic flow chart according to the method for the storage protocol header of the embodiment of the present application;
Fig. 4 is the schematic flow chart according to the method for the storage protocol header of another embodiment of the application;
Fig. 5 a to Fig. 5 d is several networks association in the method implementation procedure according to the storage protocol header of the embodiment of the present application
Discuss the schematic diagram of figure;
Fig. 6 is the schematic diagram of the method for salary distribution of two kinds of communal spaces.
Fig. 7 is the schematic block diagram according to the network equipment of the embodiment of the present application.
Fig. 8 is the schematic block diagram according to the network equipment of another embodiment of the application.
Specific embodiment
In order to facilitate the embodiment of the present application is understood, several wanting of introducing in the embodiment of the present application description is introduced herein first
Element:
Network protocol figure:
Network protocol figure describes the layer between the type and network protocol for the network protocol that the network equipment needs support
Secondary relationship, it is discribed according to the business of required support that network protocol figure can be network equipment vendor, be also possible to user by
Describe according to customized network protocol relationship, which is used for when the network equipment receives message, according to the net
Hierarchical relationship between the network protocol of network protocol figure description carries out dissection process to message.Fig. 1 shows a kind of abstract net
Network protocol figure, H1 to H8 respectively represent a kind of protocol header of network protocol, for example, the H1 can indicate the agreement of Ether protocoll
Head, in network protocol figure shown in Fig. 1, protocol header example H1 is the protocol header of the network protocol of top, each agreement
The protocol type of next layer protocol, depending on the certain field inside the agreement, for example, if the agreement is Ether protocoll, it can
The protocol type of next layer protocol is determined with the ethType field (ethernet.ethType) according to the Ether protocoll, or
If the agreement is Internet protocol fourth edition (full name in English: Internet Protocol version 4, abbreviation: IPv4),
The protocol type etc. of next layer protocol can be determined according to the protocol field (Ipv4.protocol) of the IPv4 agreement.From
Network protocol figure in Fig. 1, which can be seen that the heading format that can be identified, three kinds of formats shown in Fig. 2.
In-degree:
A directed edge<vi in digraph, vj>, we this when being referred to as that one of vi goes out, one for vj enters
Side;The side abutment points out that vj is vi, vi enter side abutment points for vj's.One vertex enters side number, the referred to as in-degree of the point;One
A vertex goes out side number, the referred to as out-degree of the point.Network protocol figure shown in FIG. 1 may be considered a kind of digraph, in Fig. 1
In, the side number that enters of protocol header example H1 is 0, it is believed that the in-degree of protocol header example H1 is 0.
When the embodiment of the present application refers to the ordinal numbers such as " first ", " second ", " third ", " the 4th ", unless according to upper and lower
The meaning of its literary certain order of representation, it should be understood that only play differentiation, this is not restricted.
Fig. 3 is the schematic flow chart of the method 300 of the storage protocol header of the application one embodiment.The method of Fig. 3 by
The network equipment executes.Specifically, which may include that router, interchanger, Packet Transport Network equipment, base station etc. can be with
The equipment for receiving or sending message.As shown in figure 3, this method 300 includes:
S310, the network equipment form one or more the first protocol header example that in-degree in first network protocol figure is 0
Set be determined as the first protocol header example collection of memory space to be allocated;
The network equipment obtains original network protocol figure first, and original network protocol figure indicates that the network equipment can be known
Hierarchical relationship between other network protocol and the network protocol, optionally, original network protocol figure can be opened for equipment
Hair personnel are loaded into the network equipment by way of configuration file, can also be (English complete by software defined network by user
Claim: Software Defined Network, referred to as: SDN) it is sent to the network equipment, or may be to use its other party
Formula storage to the network equipment, the embodiment of the present application to this with no restriction.
Optionally, first network protocol figure can be original network protocol figure, or be assisted by the original network
The network protocol figure that view figure generates, for example, if the original network protocol figure is network protocol figure shown in FIG. 1, first net
Network protocol figure can be network protocol figure shown in FIG. 1, or may be any network protocol figure shown in Fig. 5 a to Fig. 5 d,
The embodiment of the present invention to this with no restriction.
After the network equipment obtains first network protocol figure, the first network protocol figure is analyzed, determines that the first network is assisted
The protocol header example that in-degree is 0 in view figure is the first protocol header example collection of memory space to be allocated, and first protocol header is real
Example set may include a protocol header example or multiple protocol header examples, and with no restriction to this, first assists the embodiment of the present application
Discussing head example is any protocol header example in the first protocol header example collection.
For example, if the first network protocol figure is network protocol figure described in Fig. 1, the first protocol header example collection packet
Include protocol header example H1.
S320, the network equipment determine first communal space, and first communal space is for storing first protocol header reality
Each of example set the first protocol header example;
After determining the first protocol header example collection, which can determine for the first protocol header example collection
One communal space, first communal space is for storing each of the first protocol header example collection first protocol header reality
Example.That is, if the first protocol header example collection only includes a first protocol header example, which can be with
For storing this first protocol header example, if the first protocol header example collection includes that multiple first protocol headers are real
Example, first communal space can be used for storing the first protocol header example of each of the first protocol header example collection.
It should be noted that first communal space is for storing the association of each of the first protocol header example collection first
Head example is discussed, refers to that first communal space can be used to store each first protocol header example, is not the network equipment
Each first protocol header example is once stored, which is once only used for storing the first protocol header example set
A first protocol header example in conjunction, this is because only including first protocol header reality in the received message of the network equipment
One of example set protocol header example, that is to say, that each protocol header example in the first protocol header example collection will not be same
When appear in a message, therefore, it is empty that the protocol header example in the first protocol header example collection can share one section of storage
Between.
It should be understood that first communal space can be one section of memory space in the on piece register in the network equipment,
Or may be one section of memory space in other storage equipment in the network equipment, the embodiment of the present invention do not limit this
System.
S330, the first of each first protocol header example of network equipment generation analyze the instruction, wherein first parsing
Instruction is used to indicate when the network equipment receives the message including the first protocol header example, by the first protocol header example
Store first communal space;
Optionally, after the network equipment determines first communal space, which is respectively first protocol header reality
The the first protocol header example generation of each of example set analyzes the instruction accordingly, and the first of the first protocol header example analyzes the instruction
It, can be according to the first protocol header example when being used to indicate the network equipment and receiving the message including the first protocol header example
Analyze the instruction, by the first protocol header example storage to first first communal space for analyzing the instruction instruction.
For example, which includes protocol header example H1, which is that the protocol header is real
What example H1 was generated analyzes the instruction to analyze the instruction B1.This, which analyzes the instruction B1 and is used to indicate the network equipment, receives including protocol header
When the message of example H1, by protocol header example H1 storage to first communal space.
Specifically, analyzing the instruction for each protocol header example may include duplicate instructions, the operation object of the duplicate instructions
The location information of the memory space of content and the protocol header example including the protocol header example, that is to say, that multiple by this
The content of the protocol header example can be copied to the memory space of the protocol header example by system instruction;
Optionally, it can also include table-look-up instruction that this, which is analyzed the instruction, and the operation object of the table-look-up instruction includes needing to look into
The location parameter of the mark and lookup key of the protocol header example of table in messages, for example, if the protocol header example be with
Too agreement, which can be ethType field, then the operation object of the table-look-up instruction may include ether association
The location parameter of the mark and ethType field of view in messages.Pass through available agreement of tabling look-up according to above- mentioned information
The information of next layer protocol head example of head example, may include next layer protocol head in the information of next layer protocol head example
The corresponding storage address analyzed the instruction of example.
Optionally, it can also include jump instruction that this, which is analyzed the instruction, for jumping to after having stored the protocol header example
The corresponding storage address analyzed the instruction of next layer protocol head example.
S340, the network equipment by each of the first protocol header example collection the first protocol header example from this first
It is deleted in network protocol figure, and the directed edge connecting in the first network protocol figure with each first protocol header example is deleted
It removes, obtains the second network protocol figure.
It is the first protocol header example collection first communal space of distribution in the first network protocol figure in the network equipment,
And after generating corresponding analyze the instruction, which can be by the first protocol header of each of the first protocol header example collection
Example is deleted from the first network protocol figure, and will be in the first network protocol figure and in the first protocol header example collection
The oriented edge contract of each first protocol header example connection, to obtain the second network protocol figure.Then the network equipment can be with
The protocol header example that in-degree in the second network protocol figure is 0 is determined as to the second protocol head of next group of memory space to be allocated
Example collection, so that the network equipment can be according to using to the first protocol header example of each of first protocol header example collection
Processing mode each second protocol head example in the second protocol head example collection is handled, for the second protocol head
Example collection distributes second communal space, and generates the solution of each second protocol head example in the second protocol head example collection
Analysis instruction, is below described in detail above-mentioned treatment process.
Optionally, as another embodiment, this method 300 can also include:
The network equipment forms one or more second protocol head examples that in-degree in the second network protocol figure is 0
Set is determined as the second protocol head example collection of memory space to be allocated;
Specifically, the network equipment determines to be allocated in the second network protocol figure deposit after obtaining the second network protocol figure
The second protocol head example collection in space is stored up, which may include that one or more in-degrees are 0
Two protocol header examples, which is any protocol header example in the second protocol head set, in first net
In network protocol figure, which is next layer of agreement of some protocol header example in the first protocol header example
Head example.
For example, if the first Internet protocol figure as shown in Figure 1, the second network protocol figure can be as shown in Figure 5 a, root
According to network protocol figure shown in Fig. 5 a, which may include protocol header example H2, protocol header example H3
With protocol header example H4, that is, the second protocol head example can be protocol header example H2, protocol header example H3 and agreement
Any protocol header example in head example H4.In first network protocol figure, protocol header example H2, protocol header example H3 and association
Discuss next layer of the protocol header example that head example H4 is the protocol header example H1 in the first protocol header set.
The network equipment determines second communal space, and second communal space is for storing the second protocol head example collection
Each of the second protocol head example;
After determining the second protocol head example collection, which is determined using processing method similar in S320
Second communal space, second communal space are used to store each second protocol head example in the second protocol head set.
For example, for the second network protocol figure shown in Fig. 5 a, the network equipment is protocol header example H2, protocol header is real
The second protocol head example collection of example H3 and protocol header example H4 composition determines second communal space.
What the network equipment generated each second protocol head example second analyzes the instruction, wherein this second is analyzed the instruction
It is used to indicate when the network equipment receives the message including the second protocol head example, which is stored
To second communal space;
After second communal space for determining the second protocol head example collection, the network equipment is using similar in S330
Processing method, generate each second protocol head example second analyze the instruction, this second analyzes the instruction and be used to indicate in the net
When network equipment receives the message including the second protocol head example, by second protocol head example storage to the second shared sky
Between.
For example, the second protocol head example collection includes protocol header example H2, protocol header example H3 and protocol header example H4,
So when the received message of the network equipment includes protocol header example H2, which can be stored the protocol header example H2
To second communal space, or when received message includes protocol header example H3 (at this point, can not include association in the message
Discuss head example H2 and protocol header example H4), which can store the protocol header example H3 and arrive second communal space,
Protocol header example H3 storage can be arrived second communal space by the way of cover type storage by the network equipment, that is,
Using by the way of being stored before rear storage is covered on, or this second can also be shared before storing protocol header example H3
Then clear space stores the protocol header for example, the corresponding register of second communal space can first be initialized again
Example H3, the storage mode that the embodiment of the present application uses protocol header example is with no restriction.
It should be understood that the first protocol header example is any protocol header example in the first protocol header example collection, this
One analyzes the instruction analyzing the instruction for the first protocol header example in the first protocol header example collection, that is to say, that first solution
Analysis instruction can serve to indicate that analyzing the instruction for any one protocol header example in the first protocol header example collection;Equally
Ground, for the second protocol head example and this second to analyze the instruction also be such.
The network equipment is by each of second protocol head example collection second protocol head example from second network
The oriented edge contract deleted, and will connect in the second network protocol figure with each second protocol head example in protocol figure.
It should be understood that the layer for the network protocol figure that the execution number of step S310~S340 can be supported according to the network equipment
Number determines that, if the number of plies of the network protocol figure is N, step S310~S340 can recycle execution n times, in the n times
In implementation procedure, N-1 new network protocol figures can be generated, for example, if network protocol figure such as Fig. 1 that the network equipment is supported
Shown, i.e. the maximum number of plies of the network protocol of network equipment support is 5 layers, then step S310~S340 can be recycled and be held
Row 5 times, in this 5 implementation procedures, four kinds of network protocol figures as shown in Fig. 5 a to Fig. 5 d can be generated.
Optionally, if this deletes each second protocol head example in the second network protocol figure, and by the second network
After the oriented edge contract connecting in protocol figure with each second protocol head example, there are also do not locate in the second network protocol figure
The protocol header example of reason, the network equipment can be real to untreated protocol header using processing method similar in S310~S340
Example is handled, and until all distributing the corresponding communal space for all protocol header examples in network protocol figure, and generates phase
That answers analyzes the instruction.So when the network equipment receives the message including the protocol header example in network protocol figure, the network
Equipment can analyzing the instruction according to the protocol header example, by the protocol header example storage to it is allocated be used to store the association
Discuss the communal space of head example.
Optionally, as one embodiment, if the first protocol header example collection only includes a first protocol header example,
The size of first communal space is the size of the first protocol header example the space occupied, or fixed bit wide;Or
If the first protocol header example collection includes at least two first protocol header examples, the size of first communal space
For the size of longest protocol header example the space occupied in at least two first protocol header example, or fixed bit wide.
Specifically, if only including a first protocol header example in the first protocol header example collection, the first shared sky
Between size can according to the size of the first protocol header example the space occupied determine, for example, first communal space is big
Small can be the size of the first protocol header example the space occupied, or the first protocol header example the space occupied
Size adds a regular length, or may be the integral multiple etc. of the size of the first protocol header example the space occupied;
Or the size of first communal space may be fixed bit wide, for example, the size of first communal space can for this
The bit wide that the offset of one protocol header example in messages occupies, or the integral multiple for the bit wide that the offset occupies, or
Person may be the bit wide that occupies of the offset plus a regular length etc., the embodiment of the present application to this with no restriction.
If in the first protocol header example collection include at least two first protocol header examples, first communal space it is big
It is small can be true according to the size of longest first protocol header example the space occupied in at least two first protocol header example
It is fixed, for example, the size of first communal space can be the size of the longest first protocol header example the space occupied, it can also
Think the size of the longest first protocol header example the space occupied plus regular length etc.;It or may be one
Fixed bit wide, for example, what the size of first communal space can occupy for the offset of a protocol header example in messages
Bit wide (bit wide that the offset of each protocol header example in messages occupies is identical), or the bit wide that the offset occupies
Integral multiple, or may be the bit wide that occupies of the offset plus a regular length etc., the embodiment of the present application to this not
It is restricted.
Optionally, as one embodiment, this method 300 can also include:
The network equipment receives message, which includes the first protocol header example and the second protocol head example;
The network equipment obtains this and first analyzes the instruction and this second is analyzed the instruction, and first analyzes the instruction and be somebody's turn to do according to this
First protocol header example storage is arrived first communal space, by the second protocol head example by the second instruction analyzed the instruction
Store second communal space.
Specifically, the operation in S310~S340 is executed by circulation, the protocol header example in original network protocol figure
All there is the corresponding communal space and analyzed the instruction, then when the network equipment receives message, the available message
Heading in include multiple protocol header examples in each protocol header example analyze the instruction, then according to each agreement
Head example analyzes the instruction, and each protocol header example is respectively stored into the corresponding communal space of each protocol header example.It can
Selection of land, the received message of the network equipment includes the first protocol header example and second protocol head example, after receiving the message,
What the network equipment obtained the first protocol header example first analyzes the instruction and the second protocol head example second analyzes the instruction,
Then it first is analyzed the instruction and second instruction analyzed the instruction according to this, the first protocol header example storage first is total to this
Space is enjoyed, second communal space is arrived into second protocol head example storage.
For example, if the heading format of the received message of the network equipment is second of format in Fig. 2, that is to say, that should
The received message of the network equipment includes protocol header example H1, protocol header example H2, protocol header example H7 and protocol header example H8, is somebody's turn to do
The network equipment obtain protocol header example H1 it is corresponding analyze the instruction B1, protocol header example H2 to analyze the instruction B2, protocol header real
Example H7 analyze the instruction B7 and protocol header example H8 analyze the instruction B8, then according to B1 is analyzed the instruction, analyze the instruction B2, parse
Instruction B7 (wherein, analyzes the instruction B1 instruction for protocol header example H1 storage to first communal space, parsing refers to B8 is analyzed the instruction
It enables B2 instruction by protocol header example H2 storage to second communal space, analyzes the instruction B7 instruction for protocol header example H7 storage to the
Three communal spaces analyze the instruction B8 instruction for protocol header example H8 storage to the 4th communal space) instruction, by protocol header reality
The information storage of example H1 to first communal space, by the information of protocol header example H2 storage to second communal space, will
The information storage of protocol header example H7 is stored to the third communal space and by the information of protocol header example H8 to the 4th
The communal space.
Optionally, as another embodiment, which obtains this and first analyzes the instruction and this second is analyzed the instruction,
Specifically include: the network equipment obtains this and first analyzes the instruction according to first storage address analyzed the instruction pre-seted, or
According to analyzing the instruction for the upper layer protocol head example of the first protocol header example, with obtaining first storage analyzed the instruction
Location obtains this according to first storage address analyzed the instruction and first analyzes the instruction;
The network equipment first is analyzed the instruction according to this of the first protocol header example, obtain this second analyze the instruction deposit
Address is stored up, this is obtained according to second storage address analyzed the instruction and second is analyzed the instruction.
It in a specific embodiment, can when the network equipment receives the message including multiple protocol header examples
It is analyzed the instruction with obtaining the protocol header example of the top in the message first, optionally, the protocol header example of the top
Analyze the instruction, can store the storage address pre-seted at one, for example, can indicate the storage address with a pointer,
So when the network equipment receives message, can according to the pointer obtain top protocol header example analyze the instruction deposit
Store up address.If the first protocol header example is the protocol header example of the top in message, which receives this and includes
It, can according to the storage analyzed the instruction of the protocol header example of the top pre-seted after the message of the first protocol header example
Location, obtain the first protocol header example first analyze the instruction.For example, if the received message of the network equipment is from ether end
The message that port transmission is come in, then the top-level protocol of the heading of the message is Ether protocoll, then the network equipment can be first
First according to the storage address of the protocol header example of the Ether protocoll pre-seted analyzed the instruction, obtains corresponding first parsing and refer to
It enables.The network equipment first can also be analyzed the instruction according to this, and next layer of protocol header for obtaining the first protocol header example is real
Example is the second storage address analyzed the instruction of second protocol head example, to be obtained according to second storage address analyzed the instruction
This is taken second to analyze the instruction.And so on, so as to obtain analyzing the instruction for each protocol header example in the message.
Optionally, if the first protocol header example is not the protocol header example of the top in original network protocol figure,
Can analyzing the instruction according to the upper layer protocol head example of the first protocol header example, obtain first storage analyzed the instruction
Then address obtains this according to first storage address analyzed the instruction and first analyzes the instruction.
It generally speaking, can include under being used to indicate the protocol header example in the analyzing the instruction of each protocol header example
The instruction information for the storage address of one layer protocol head example analyzed the instruction.The protocol header of top is so obtained in the network equipment
After the storage address of example analyzed the instruction, so that it may according to this analyze the instruction in instruction information successively obtain next layer of association
The address of head example analyzed the instruction is discussed, so as to obtain analyzing the instruction for each protocol header example in the message, then
Can analyzing the instruction according to each protocol header example, by each protocol header example storage arrive each protocol header example solution
The communal space of analysis instruction instruction.
Fig. 4 shows the schematic flow chart of the method 400 of the storage protocol header according to the embodiment of the present application, below with reference to
The method 400 of the storage protocol header of the embodiment of the present application is discussed in detail in network protocol figure shown in Fig. 1, Fig. 5 a~Fig. 5 d.
S401, the network equipment determine the protocol header example collection for the memory space to be allocated that in-degree is 0 in network protocol figure;
Optionally, it may be multiple that the number for the protocol header example that in-degree is 0, which can be 1,.
For example, the number for the protocol header example that in-degree is 0 is 1 for network protocol figure shown in FIG. 1, that is, it is located at described
The protocol header example H1 of network protocol figure top;Therefore, the protocol header example collection of the memory space to be allocated only includes
The protocol header example H1.And for network protocol figure shown in Fig. 5 a, the number for the protocol header example that in-degree is 0 is 3, respectively
It is protocol header example H2, protocol header example H3 and protocol header example H4;Therefore, the protocol header example of the memory space to be allocated
Collection is combined into the set of the protocol header example H2, protocol header example H3 and protocol header example H4.
S402, the network equipment are that the protocol header example collection determines the communal space;
Optionally, if the number for the protocol header example that in-degree is 0 is 1, the size of the communal space can be the protocol header
The size of example or fixed bit wide.By taking network protocol figure shown in FIG. 1 is first network protocol figure as an example, which is
Protocol header example H1 distributes the first communal space R1.Optionally, the size of first communal space can be the protocol header example
The size (for example, 16 bits or 32 are than top grade) of the space occupied, or the offset of protocol header example in messages
Bit wide (for example, being fixed as 4 bits or 5 than top grade), the embodiment of the present application to this with no restriction.For example, if the protocol header is real
Example H1 the space occupied is 64 bits, and the offset of protocol header example H1 in messages is 16 bits, then this is first shared
The size of space R1 can be 64 bits or 16 bits.
Optionally, if the number for the protocol header example that in-degree is 0 is greater than 1, the size of the communal space can be multiple
The size of longest protocol header example the space occupied in protocol header example, or may be protocol header example in messages
Offset bit wide, the embodiment of the present application to this with no restriction.
For the network protocol figure shown in Fig. 5 a is the second network protocol figure, which is the protocol header example
The set of H2, protocol header example H3 and protocol header example H4 distribute the second communal space R2, and the size of the second communal space R2 can
Think the size of the longest protocol header example in protocol header example H2, protocol header example H3 and protocol header example H4, or
Or the bit wide of a fixed offset, the embodiment of the present application to this with no restriction.
Although should be understood that each protocol header example offset in messages it is different (for example, for 16 bits, 32 bits or
64 bits), but the bit wide of the offset of each protocol header example in messages is a fixed value, for example, the offset
Bit wide can compare top grade for 7 bits or 8.
It should also be understood why can be by protocol header example H2, protocol header example H3 and these three associations of protocol header example H4
View head example is shared to be stored in second communal space, is because these three protocol header examples will not be same in a message
When exist, that is to say, that if the heading format of message is second in Fig. 2 there are protocol header example H2 in message
Format, i.e., the protocol header example for including in the message are protocol header example H1, protocol header example H2, protocol header example H7 and agreement
Head example H8, therefore protocol header example H3 and protocol header example H4 is not present, similarly, for protocol header example H3 and protocol header
Example H4 is also such.
Fig. 6 shows network protocol figure shown in FIG. 1 under the method for salary distribution of above-mentioned two communal space, and the communal space is big
Small example.Wherein, the memory space of protocol header example H1 is the first communal space R1.Protocol header example H2, protocol header
The memory space of example H3 and protocol header example H4 are the second communal space R2.The protocol header example H5's and protocol header example H6
Memory space is third communal space R3.The memory space of protocol header example H7 is the 4th communal space R4.The protocol header example
The memory space of H8 is the 5th communal space R5.As shown in fig. 6, the size of each communal space is same in the method for salary distribution one
The size of longest protocol header example the space occupied in one protocol header example collection, for example, protocol header example H2, protocol header is real
The size of the second communal space R2 of example H3 and protocol header example H4 is the size of protocol header example H3 the space occupied, protocol header
The size of the third communal space R3 of example H5 and protocol header example H6 is the size of protocol header example H5 the space occupied.Dividing
With in mode two, equal in magnitude, the bit wide of the offset all for protocol header example in messages of each communal space.
The method of the storage protocol header of the embodiment of the present application, by the way that different protocol header example allocations is shared empty to one
Between store, to reduce occupancy of the protocol header example to memory space of storage, improve the memory space of the network equipment
Service efficiency can store more protocol header examples for an equal amount of memory space, therefore, can support more complicated net
Network protocol figure.
It is to be flowed after the protocol header example collection that the in-degree in network protocol figure is 0 determines the communal space in the network equipment
Journey proceeds to S403;
S403, the network equipment are that each protocol header example generation in protocol header example collection analyzes the instruction accordingly;
For example, being the shared sky of protocol header example H1 distribution first in the network equipment for network protocol figure shown in FIG. 1
Between after R1, what which generated protocol header example H1 analyzes the instruction B1, this, which analyzes the instruction B1 and is used to indicate the network, sets
For after receiving the message including protocol header example H1, which is stored to the first communal space R1.
Alternatively, for network protocol figure shown in Fig. 5 a, for protocol header example H2, protocol header example H3 and protocol header
After example H4 distributes the second communal space R2, the network equipment generate protocol header example H2 to analyze the instruction B2, protocol header real
Example H3 analyze the instruction B3 and protocol header example H4 analyze the instruction B4.The network equipment is being received including protocol header example
It, can be according to the instruction for analyzing the instruction B2, by the protocol header example H2 storage in the message to the second shared sky when the message of H2
Between R2 or the network equipment when receiving the message including protocol header example H3, can be according to the instruction for analyzing the instruction B3, will
Protocol header example H3 storage in the message is being received to the second communal space R2 or the network equipment including protocol header example
When the message of H4, according to the instruction for analyzing the instruction B4, by the protocol header example H4 storage in the message to the second communal space R2.
S404, the network equipment delete each protocol header example in the protocol header example collection in network protocol figure, and
The directed edge being connect in network protocol figure with each protocol header example.
For example, the network equipment analyzes the instruction B1 generation protocol header example H1's for network protocol figure shown in FIG. 1
Afterwards, protocol header example H1 is deleted, and with directed edge (including < protocol header example H1, the protocol header of the H1 connection of protocol header example
Example H2>,<protocol header example H1, protocol header example H3>and<protocol header example H1, protocol header example H4>), generate at this time
New network protocol figure is network protocol figure shown in Fig. 5 a.
Alternatively, the network equipment is generating protocol header example H2, protocol header example for network protocol figure shown in Fig. 5 a
After the analyzing the instruction of H3 and protocol header example H4, delete protocol header example H2, protocol header example H3 in network protocol figure and
Protocol header example H4, and connect with protocol header example H2, protocol header example H3 and protocol header example H4 directed edge (including
<protocol header example H2, protocol header example H7>,<protocol header example H3, protocol header example H5>and<protocol header example H4, protocol header
Example H6 >), the new network protocol figure generated at this time is network protocol figure shown in Fig. 5 b.
S405 judges whether there is also protocol header examples in network protocol figure, and if it exists, process proceeds to S401, otherwise,
Process terminates.
For example, there is also the protocol header examples of unallocated memory space in protocol figure for the network protocol figure in Fig. 5 a
(protocol header example H2~protocol header example H8), at this point, process re-starts S401.It is executed in S401~S405 by circulation
Operation, sequentially generate Fig. 5 b, Fig. 5 c, the network protocol figure in Fig. 5 d, so far, no-protocol head example in network protocol figure,
Process terminates.
After having executed above-mentioned steps, each protocol header example in the network protocol figure in Fig. 1 is assigned with memory space,
And it generates and analyzes the instruction accordingly.Specifically, the memory space of protocol header example H1 is the first communal space R1, the agreement
The memory space of head example H2, protocol header example H3 and protocol header example H4 are the second communal space R2, protocol header example H5
Memory space with protocol header example H6 is third communal space R3, and the memory space of protocol header example H7 is the 4th communal space
The memory space of R4, protocol header example H8 are the 5th communal space R5, protocol header example H1~protocol header example H8 parsing
Instruction is respectively to analyze the instruction B1~analyze the instruction B8.
Therefore, the method for the storage protocol header of the embodiment of the present application is stored in together by sharing multiple protocol header examples
In one communal space, therefore reduce storage protocol header example to the occupancy of memory space, hence for same storage sky
Between, more protocol header examples can be stored, and then can support more complicated network protocol figure.
Fig. 7 shows the schematic block diagram of the network equipment 700 according to the embodiment of the present application, which is to use
In the hardware device for executing methodological function of the Fig. 3 into embodiment illustrated in fig. 4.As shown in fig. 7, the network equipment 700 includes:
Determining module 710, for one or more the first protocol header example set for being 0 by in-degree in first network protocol figure
At set be determined as the first protocol header example collection of memory space to be allocated;
The determining module 710 is also used to determine first communal space, and first communal space is for storing first agreement
Each of head example collection the first protocol header example;
Generation module 720, first for generating each first protocol header example analyzes the instruction, wherein first solution
Analysis instruction is used to indicate when the network equipment receives the message including the first protocol header example, by first protocol header reality
First communal space is arrived in example storage;
Processing module 730, for by each of the first protocol header example collection the first protocol header example from this
It is deleted in one network protocol figure, and the directed edge connecting in the first network protocol figure with each first protocol header example is deleted
It removes, obtains the second network protocol figure.
The network equipment of the embodiment of the present application is stored in the same communal space by sharing multiple protocol header examples
On, thus reduce storage protocol header example the occupancy of memory space can be stored more hence for same memory space
More protocol header examples, and then can support more complicated network protocol figure.
Optionally, as one embodiment, which is also used to:
The set that one or more second protocol head examples that in-degree in the second network protocol figure is 0 form is determined as
The second protocol head example collection of memory space to be allocated;
Determine second communal space, which should for storing each of the second protocol head example collection
Second protocol head example;
The generation module 720 is also used to:
Generate each second protocol head example second analyzes the instruction, wherein this second analyzes the instruction and be used to indicate
When the network equipment receives the message including the second protocol head example, second protocol head example storage second is total to this
Enjoy space;
The processing module 730 is also used to:
Each of second protocol head example collection second protocol head example is deleted from the second network protocol figure
The oriented edge contract that removes, and will be connect in the second network protocol figure with each second protocol head example.
Optionally, as one embodiment, which can also include:
Transceiver module, for receiving message, which includes the first protocol header example and the second protocol head example;
Module is obtained, first is analyzed the instruction and this second is analyzed the instruction for obtaining this;And it first is analyzed the instruction according to this
With second instruction analyzed the instruction, first communal space is arrived into the first protocol header example storage, by the second protocol head
Second communal space is arrived in example storage.
Memory module, for first being analyzed the instruction and second instruction analyzed the instruction according to this, by first protocol header
First communal space is arrived in example storage, and second communal space is arrived in second protocol head example storage.
Optionally, as one embodiment, which is specifically used for:
According to first storage address analyzed the instruction pre-seted, obtain this and first analyze the instruction, or according to this first
The upper layer protocol head example of protocol header example analyzes the instruction, and obtains first storage address analyzed the instruction, according to this
One storage address analyzed the instruction obtains this and first analyzes the instruction;
It first is analyzed the instruction according to this of the first protocol header example, obtains second storage address analyzed the instruction, root
This is obtained according to second storage address analyzed the instruction second to analyze the instruction.
It can correspond to the side of the storage protocol header according to the embodiment of the present application according to the network equipment 700 of the embodiment of the present application
Executing subject in method 300 or 400, and above and other operation and/or function of the modules in the network equipment 700 point
Not for the corresponding process for realizing aforementioned each method, for sake of simplicity, details are not described herein.
As shown in figure 8, the network equipment 800 is for executing the embodiment of the present application also provides a kind of network equipment 800
The hardware device of methodological function of the Fig. 3 into embodiment illustrated in fig. 4.
The network equipment 800 includes processor 810, memory 820.The processor 810 and the memory 820 can pass through
Bus system 830 communicates;The processor 810 can also pass through transceiver 840 and other network device communications.
The memory 820 is for storing the information including program, instruction or code;
The processor 810 is used to execute program, instruction or the code in the memory 820, completes in embodiment illustrated in fig. 3
The operation of S310-S340, or complete the operation of S401-S405 in embodiment illustrated in fig. 4.
Wherein, the first protocol header of one or more that it is 0 by in-degree in first network protocol figure which, which is used for, is real
The set of example composition is determined as the first protocol header example collection of memory space to be allocated;And determining first communal space, this
One communal space for storing each of the first protocol header example collection the first protocol header example, generate it is each this first
The first of protocol header example analyzes the instruction, wherein this first analyzes the instruction to be used to indicate and receive in the network equipment including this
When the message of the first protocol header example, first communal space is arrived into the first protocol header example storage;The processor 810 is also used
It is deleted from the first network protocol figure in the first protocol header example by each of the first protocol header example collection, and will
The oriented edge contract connecting in the first network protocol figure with each first protocol header example, obtains the second network protocol figure.
It should be understood that in a specific embodiment, determining module 710, generation module 720, processing module in the network equipment 700
730, the function of obtaining module and memory module can use the realization of processor 810 in the network equipment 800, the function of transceiver module
It can be realized with transceiver 840.
Optionally, as one embodiment, which is also used to:
The set that one or more second protocol head examples that in-degree in the second network protocol figure is 0 form is determined as
The second protocol head example collection of memory space to be allocated;
Determine second communal space, which should for storing each of the second protocol head example collection
Second protocol head example;The second of each second protocol head example of network equipment generation analyzes the instruction, wherein second solution
Analysis instruction is used to indicate when the network equipment receives the message including the second protocol head example, and the second protocol head is real
Second communal space is arrived in example storage;
Each of second protocol head example collection second protocol head example is deleted from the second network protocol figure
The oriented edge contract that removes, and will be connect in the second network protocol figure with each second protocol head example.
Optionally, as one embodiment, which is used for:
Message is received, which includes the first protocol header example and the second protocol head example;
The processor 810 is also used to:
It obtains this first to analyze the instruction and this second is analyzed the instruction, and first is analyzed the instruction and second parsing refers to according to this
First protocol header example storage is arrived first communal space by the instruction of order, by second protocol head example storage to this
Two communal spaces.
Optionally, as one embodiment, which is also used to:
The network equipment obtains this and first analyzes the instruction according to first storage address analyzed the instruction pre-seted, or
According to analyzing the instruction for the upper layer protocol head example of the first protocol header example, with obtaining first storage analyzed the instruction
Location obtains this according to first storage address analyzed the instruction and first analyzes the instruction;
It first is analyzed the instruction according to this of the first protocol header example, obtains second storage address analyzed the instruction, root
This is obtained according to second storage address analyzed the instruction second to analyze the instruction.
It should be understood that in the embodiment of the present application, which can be central processing unit (Central
Processing Unit, referred to as " CPU "), which can also be other general processors, digital signal processor
(full name in English: Digital Signal Processor, abbreviation: DSP), specific integrated circuit (full name in English:
Application Specific Integrated Circuit, referred to as: ASIC), ready-made programmable gate array (full name in English:
Field Programmable Gate Array, referred to as: FPGA) either other programmable logic device, discrete gate or crystal
Pipe logical device, discrete hardware components etc..General processor can be microprocessor or the processor be also possible to it is any often
The processor etc. of rule.
The memory 820 may include read-only memory and random access memory, and to processor 810 provide instruction and
Data.The a part of of memory 820 can also include nonvolatile RAM.For example, memory 820 can also be deposited
Store up the information of device type.
The processor 810 and the memory 820 can be communicated by bus system 830, and it includes number which, which removes,
Can also include power bus, control bus and status signal bus in addition etc. except bus, this 810 and the memory 820 may be used also
To be communicated by other kinds of bus, for example, optical fiber or optical waveguide etc., but for the sake of clear explanation, in figure
Various buses are all designated as bus system 830.
During realization, each step of the above method can pass through the integrated logic circuit of the hardware in processor 810
Or the instruction of software form is completed.The step of method in conjunction with disclosed in the embodiment of the present application, can be embodied directly at hardware
Reason device executes completion, or in processor hardware and software module combine and execute completion.Software module can be located at random
Memory, flash memory, read-only memory, the abilities such as programmable read only memory or electrically erasable programmable memory, register
In the storage medium of domain maturation.The storage medium is located at memory 820, and processor 810 reads the information in memory 820, knot
Close the step of its hardware completes the above method.To avoid repeating, it is not detailed herein.
Therefore, multiple protocol header examples can be shared and be stored in same share by the network equipment of the embodiment of the present application
Spatially, therefore reduce storage protocol header example to the occupancy of memory space, hence for same memory space, Neng Goucun
More protocol header examples are stored up, therefore, while can support more complicated network protocol figure.
It can correspond to the side of the storage protocol header according to the embodiment of the present application according to the network equipment 800 of the embodiment of the present application
Executing subject in method 300 or 400, and above and other operation and/or function of the modules in the network equipment 800 point
Not for the corresponding process for realizing aforementioned each method, for sake of simplicity, details are not described herein.
It should be understood that the terms "and/or", only a kind of incidence relation for describing affiliated partner, expression can deposit
In three kinds of relationships, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.
In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
It should be understood that magnitude of the sequence numbers of the above procedures are not meant to execute suitable in the various embodiments of the application
Sequence it is successive, the execution of each process sequence should be determined by its function and internal logic, the implementation without coping with the embodiment of the present application
Process constitutes any restriction.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
Scope of the present application.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.If the function
It is realized in the form of SFU software functional unit and when sold or used as an independent product, can store computer-readable at one
It takes in storage medium.Based on this understanding, the technical solution of the application substantially in other words contributes to the prior art
Part or the part of the technical solution can be embodied in the form of software products, which is stored in one
In a storage medium, including some instructions are used so that computer equipment (it can be personal computer, server, or
Network equipment etc.) execute each embodiment the method for the application all or part of the steps.And storage medium above-mentioned includes:
USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random
Access Memory), the various media that can store program code such as magnetic or disk.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any
Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain
Lid is within the scope of protection of this application.Therefore, the protection scope of the application should be based on the protection scope of the described claims.
Claims (10)
1. a kind of method for storing protocol header characterized by comprising
The network equipment determines the set that one or more the first protocol header example that in-degree in first network protocol figure is 0 forms
For the first protocol header example collection of memory space to be allocated;
The network equipment determines first communal space, and first communal space is for storing the first protocol header example set
Each of conjunction the first protocol header example;
What the network equipment generated each first protocol header example first analyzes the instruction, wherein first parsing refers to
Order is used to indicate the network equipment when receiving the message including the first protocol header example, by first protocol header
Example is stored to first communal space;
The network equipment is by each of the first protocol header example collection the first protocol header example from described first
The directed edge deleted, and will connect in the first network protocol figure with each first protocol header example in network protocol figure
It deletes, obtains the second network protocol figure.
2. the method according to claim 1, wherein the method also includes:
The network equipment forms one or more second protocol head examples that in-degree in the second network protocol figure is 0
Set is determined as the second protocol head example collection of memory space to be allocated;
The network equipment determines second communal space, and second communal space is for storing the second protocol head example set
Each of conjunction second protocol head example;
What the network equipment generated each second protocol head example second analyzes the instruction, wherein second parsing refers to
Order is used to indicate the network equipment when receiving the message including the second protocol head example, by the second protocol head
Example is stored to second communal space;
The network equipment is by each of the second protocol head example collection second protocol head example from described second
The directed edge deleted, and will connect in the second network protocol figure with each second protocol head example in network protocol figure
It deletes.
3. according to the method described in claim 2, it is characterized by: the method also includes:
The network equipment receives message, and the message includes the first protocol header example and the second protocol head example;
The network equipment acquisition described first is analyzed the instruction to be analyzed the instruction with described second, and is analyzed the instruction according to described first
The instruction analyzed the instruction with described second, by the first protocol header example storage to first communal space, by described the
Two protocol header examples are stored to second communal space.
4. according to the method described in claim 3, it is characterized by: network equipment acquisition described first analyzes the instruction and institute
It states second to analyze the instruction, specifically include:
The network equipment obtains described first and analyzes the instruction according to the described first storage address analyzed the instruction pre-seted,
Or analyzing the instruction according to the upper layer protocol head example of the first protocol header example, obtain described first analyze the instruction deposit
Address is stored up, the storage address analyzed the instruction according to described first obtains described first and analyzes the instruction;The network equipment is according to institute
State the first protocol header example described first analyzes the instruction, and obtains the described second storage address for analyzing the instruction, according to described the
Two storage address analyzed the instruction obtain described second and analyze the instruction.
5. a kind of network equipment characterized by comprising
Determining module, the collection for one or more the first protocol header example composition for being 0 by in-degree in first network protocol figure
Close the first protocol header example collection for being determined as memory space to be allocated;
The determining module is also used to determine first communal space, and first communal space is for storing first protocol header
Each of example collection the first protocol header example;
Generation module, first for generating each first protocol header example analyzes the instruction, wherein first parsing refers to
Order is used to indicate when the network equipment receives the message including the first protocol header example, by first protocol header
Example is stored to first communal space;
Processing module, for by each of the first protocol header example collection the first protocol header example from described first
The directed edge deleted, and will connect in the first network protocol figure with each first protocol header example in network protocol figure
It deletes, obtains the second network protocol figure.
6. the network equipment according to claim 5, which is characterized in that the determining module is also used to:
By in-degree in the second network protocol figure be 0 one or more second protocol head examples form set be determined as to
Distribute the second protocol head example collection of memory space;
Determine that second communal space, second communal space are used to store each institute in the second protocol head example collection
State second protocol head example;
The generation module is also used to:
Generate each second protocol head example second analyzes the instruction, wherein described second analyzes the instruction and be used to indicate
When the network equipment receives the message including the second protocol head example, by second protocol head example storage to institute
State second communal space;
The processing module is also used to:
By each of the second protocol head example collection second protocol head example from the second network protocol figure
It deletes, and the oriented edge contract that will be connect in the second network protocol figure with each second protocol head example.
7. the network equipment according to claim 6, which is characterized in that further include:
Transceiver module, for receiving message, the message includes the first protocol header example and the second protocol head example;
Module is obtained, analyzes the instruction for obtaining described first and is analyzed the instruction with described second;And referred to according to first parsing
It enables and the described second instruction analyzed the instruction will be described by the first protocol header example storage to first communal space
Second protocol head example is stored to second communal space;
Memory module, for analyzing the instruction the instruction analyzed the instruction with described second according to described first, by first agreement
The storage of head example is to first communal space, by second protocol head example storage to second communal space.
8. the network equipment according to claim 7, which is characterized in that the acquisition module is specifically used for:
It according to the described first storage address analyzed the instruction pre-seted, obtains described first and analyzes the instruction, or according to described the
The upper layer protocol head example of one protocol header example analyzes the instruction, and obtains the described first storage address analyzed the instruction, according to
Described first storage address analyzed the instruction obtains described first and analyzes the instruction;
It is analyzed the instruction according to described the first of the first protocol header example, obtains the described second storage address analyzed the instruction,
The storage address analyzed the instruction according to described second obtains described second and analyzes the instruction.
9. a kind of network equipment characterized by comprising memory and processor;The memory includes journey for storing
The information of sequence, instruction or code;
The processor, for executing described program, instruction or code in the memory;
Wherein, the processor is also used to:
The set that one or more the first protocol header example that in-degree in first network protocol figure is 0 forms is determined as to be allocated
First protocol header example collection of memory space;
Determine that first communal space, first communal space are used to store each institute in the first protocol header example collection
State the first protocol header example;
Generate each first protocol header example first analyzes the instruction, wherein described first analyzes the instruction and be used to indicate institute
The network equipment is stated when receiving the message including the first protocol header example, by the first protocol header example storage to institute
State first communal space;
By each of the first protocol header example collection the first protocol header example from the first network protocol figure
It deletes, and the oriented edge contract that will be connect in the first network protocol figure with each first protocol header example, obtains the
Two network protocol figures.
10. the network equipment according to claim 9, which is characterized in that the processor is also used to:
By in-degree in the second network protocol figure be 0 one or more second protocol head examples form set be determined as to
Distribute the second protocol head example collection of memory space;
Determine that second communal space, second communal space are used to store each institute in the second protocol head example collection
State second protocol head example;
Generate each second protocol head example second analyzes the instruction, wherein described second analyzes the instruction and be used to indicate institute
The network equipment is stated when receiving the message including the second protocol head example, by second protocol head example storage to institute
State second communal space;
By each of the second protocol head example collection second protocol head example from the second network protocol figure
It deletes, and the oriented edge contract that will be connect in the second network protocol figure with each second protocol head example.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610076153.3A CN105721356B (en) | 2016-02-03 | 2016-02-03 | Store the method and the network equipment of protocol header |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610076153.3A CN105721356B (en) | 2016-02-03 | 2016-02-03 | Store the method and the network equipment of protocol header |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105721356A CN105721356A (en) | 2016-06-29 |
CN105721356B true CN105721356B (en) | 2019-05-10 |
Family
ID=56155612
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610076153.3A Active CN105721356B (en) | 2016-02-03 | 2016-02-03 | Store the method and the network equipment of protocol header |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105721356B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114567688B (en) * | 2022-03-11 | 2023-01-24 | 之江实验室 | FPGA-based collaborative network protocol analysis method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102104541A (en) * | 2009-12-21 | 2011-06-22 | 索乐弗莱尔通讯公司 | Header processing engine |
CN103312720A (en) * | 2013-07-01 | 2013-09-18 | 华为技术有限公司 | Data transmission method, equipment and system |
CN103873464A (en) * | 2014-02-27 | 2014-06-18 | 华为技术有限公司 | Message processing method and forwarding equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9148368B2 (en) * | 2012-02-14 | 2015-09-29 | International Business Machines Corporation | Packet routing with analysis assist for embedded applications sharing a single network interface over multiple virtual networks |
-
2016
- 2016-02-03 CN CN201610076153.3A patent/CN105721356B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102104541A (en) * | 2009-12-21 | 2011-06-22 | 索乐弗莱尔通讯公司 | Header processing engine |
CN103312720A (en) * | 2013-07-01 | 2013-09-18 | 华为技术有限公司 | Data transmission method, equipment and system |
CN103873464A (en) * | 2014-02-27 | 2014-06-18 | 华为技术有限公司 | Message processing method and forwarding equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105721356A (en) | 2016-06-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109743199A (en) | Containerization management system based on micro services | |
CN104468219B (en) | Virtual networking method for discovering network topology and equipment | |
CN104954221B (en) | PCI Express architecture for fully connected network LF Topology structure route | |
CN105407140A (en) | Calculation resource virtualization system of networked test system and method thereof | |
CN102158498B (en) | Implementation method for network node structure supporting service customization and expansion | |
CN105245301B (en) | A kind of airborne optical-fiber network analogue system based on time triggered | |
CN109600768A (en) | Management method, equipment and the system of network slice | |
CN105786460B (en) | A kind of software development methodology and device based on Services Composition | |
JP2011504047A (en) | Various route server systems and devices | |
CN109889546B (en) | Rapid fine-grained multi-domain network interconnection security control method | |
CN113938426A (en) | Message processing method and network equipment | |
CN108768667B (en) | Method for inter-chip network communication of multi-core processor | |
CN110365536A (en) | A kind of the fault cues method and relevant apparatus of internet of things equipment | |
CN110247849A (en) | The update method and device of URSP | |
CN106453139B (en) | The method and device of data packet dispatching | |
CN101471880B (en) | Method, system and routing device for processing data | |
CN1973282A (en) | System and method for managing a change to a cluster configuration | |
CN103207813B (en) | The method and apparatus for managing resource | |
CN109905321A (en) | A kind of route control system interacted for customized high-speed interface with Ethernet | |
CN106713010B (en) | A kind of communication means and system of avionics network system | |
CN105721356B (en) | Store the method and the network equipment of protocol header | |
CN107368334A (en) | A kind of business plug-in unit interactive system and method | |
TW519822B (en) | Information processing device, information processing method and bridge using the same | |
CN103297312A (en) | MPLS VPN (Multi-Protocol Label Switching Virtual Private Network) access method and device | |
CN103888481B (en) | A kind of LAN DHCP packet filtering 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20211222 Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province Patentee after: xFusion Digital Technologies Co., Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |
|
TR01 | Transfer of patent right |