CN101212479A - Method for implementing byte alignment on network platform - Google Patents
Method for implementing byte alignment on network platform Download PDFInfo
- Publication number
- CN101212479A CN101212479A CNA2007101257446A CN200710125744A CN101212479A CN 101212479 A CN101212479 A CN 101212479A CN A2007101257446 A CNA2007101257446 A CN A2007101257446A CN 200710125744 A CN200710125744 A CN 200710125744A CN 101212479 A CN101212479 A CN 101212479A
- Authority
- CN
- China
- Prior art keywords
- module
- byte
- protocol stack
- aligned
- network
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000012795 verification Methods 0.000 claims description 9
- 230000003139 buffering effect Effects 0.000 claims description 6
- 238000012545 processing Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000012467 final product Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005215 recombination Methods 0.000 description 1
- 230000006798 recombination Effects 0.000 description 1
Images
Landscapes
- Communication Control (AREA)
Abstract
The invention discloses a method used for realizing byte alignment in a network platform, which is used for a field of byte alignment. The method comprises the following steps: regions which have the alignment problem of all bytes in a network system are determined; a TCP/IP protocol stack in the network system is divided into a plurality of function modules; the regions with the problem of byte alignment are rectified by the function modules. The method used for realizing byte alignment in a network platform provided by the invention is applicable to diversified platforms with the problem of byte alignment, and can be transplanted promptly and conveniently among a plurality of platforms, also can be applied with an upper layer to realize seamless combination.
Description
Technical field
The present invention relates to a kind of method of adjusting byte-aligned, relate in particular to a kind of method that is used to realize network platform byte-aligned.
Background technology
In the network terminal, such as digital TV set-top box, carry out two-way interactives such as web page browsing, online game, information interaction, play-on-demand program when professional, must there be reliable, general communications protocol to support; And on some platform of 32 systems, when the data of depositing be in the internal memory can not by 4 divide exactly address space the time, all being in such as the purpose I address in the ARP agreement, source IP address in the IP agreement and purpose IP address can not be by 4 address of dividing exactly.If system when reading these data, will produce byte offset, the byte-aligned abnormal problem promptly appears.
At the platform that has the byte-aligned problem,, use the mode of getting the byte data recombination to obtain correct variable data according to unsigned char type when having data the variable of skew to occur; Its solution is: realize by the ICP/IP protocol stack; Implementation has hardware to solidify and software is realized; The hardware curing mode is meant the hardware chip that utilizes the ICP/IP protocol stack, realizes the conversion of agreement by it, thereby realizes corresponding network function; And software realization mode is with reference to RFC (Request ForComments, Request for Comment) software developed of document, by the standard of operating system, such as, the ICP/IP protocol stack of operating systems such as Sun OS, UNIX, Linux drives network interface and operates accordingly.
Yet, the shortcoming of the hardware curing mode of ICP/IP protocol stack is to have increased hardware cost, and the software mode of ICP/IP protocol stack combines with operating system closely, is not easy to multi-platform transplanting, and is not suitable for hardware or the software platform that the byte-aligned problem is arranged.
Therefore, prior art awaits improving and development.
Summary of the invention
Problem to be solved by this invention is to provide a kind of method that is used to realize network platform byte-aligned, and this method can solve cost of manufacture height, multi-platform problem that is difficult to transplant.
In order to solve the problems of the technologies described above, technical scheme of the present invention is as follows:
A kind of method that is used to realize network platform byte-aligned, it comprises the steps:
A, determine the zone of all byte-aligned problems in the network system;
B, the ICP/IP protocol stack in the network system is divided into a plurality of functional modules;
C, by each described functional module, the zone that the byte-aligned problem is arranged is proofreaied and correct.
Described method, wherein, among the step B, described ICP/IP protocol stack comprises address resolution protocol, IP, gateway control protocol, User Datagram Protoco (UDP), TCP, DHCP, adopts layer mode to divide between each agreement.
Described method, wherein, among the step B, described a plurality of functional modules comprise that agreement realizes module, buffering and memory management subsystem module, standard BSD Network Interface Module and verification and computing module;
Described agreement realizes that module is used to realize the basic agreement of protocol stack;
Described buffering and memory management subsystem module are used for the internal memory of management protocol stack, are responsible for the application release management of network data etc.;
Described standard BSD Network Interface Module is used to provide interface, keeps supplying a layer application call;
Described verification and computing module carry out verification when being used for data reception processing, guarantee the integrality of data and the data transaction of different byte orders.
Described method wherein, adopts layer mode to divide between described a plurality of functional modules.
Described method, wherein, the criteria for classifying of described ICP/IP protocol stack is the inventionthe open systems interconnection reference model.
A kind of method that is used to realize network platform byte-aligned provided by the invention adapts to the various platforms that have the byte-aligned problem, and can transplant quickly and easily between a plurality of platforms, and can realize seamless combination with upper layer application.
Description of drawings
Fig. 1 is the realization flow figure of the inventive method;
Fig. 2 is the inventionthe open systems interconnection reference model schematic diagram of prior art;
Fig. 3 is a plurality of functional module structure schematic diagrames of ICP/IP protocol stack in the inventive method.
Embodiment
Below in conjunction with accompanying drawing, preferred embodiment of the present invention is described in further detail.
As shown in Figure 1, the invention provides a kind of method that is used to realize network platform byte-aligned, its flow process performing step is as follows:
110, start embedded system, determine the zone of all byte-aligned problems in the network system;
120, the ICP/IP protocol stack in the network system is divided into a plurality of functional modules, adopts layer mode to divide between these a plurality of functional modules;
130, by each described functional module, find the zone that the byte-aligned problem is arranged, and these regional byte-aligned problems are proofreaied and correct.
In said method, support the agreement of ICP/IP protocol stack in the embedded system to have: ARP (Address Resolution Protocol, address resolution protocol), IP, ICMP (Internet ControlMessage Protocol, the Internet control protocol), UDP (User Datagram Protocol, User Datagram Protoco (UDP)), TCP, DHCP (Dynamic Host Configuration Protocol, DHCP) agreement such as, and these agreements adopt the layer mode design, each layer solves the part of communication problem respectively, adopt message queue to come communication between layer and the layer, each realize agreement the inventionthe open systems interconnection reference model (Open System Interconnection ReferenceModel, OSI) in residing hierarchical relationship as shown in Figure 2.
Wherein, in the described step 120, described a plurality of functions can module comprise that agreement realizes module, buffering and memory management subsystem module, standard BSD Network Interface Module and verification and computing module, as shown in Figure 3.
Described agreement realizes that module is used to realize the basic agreement of protocol stack; Described buffering and memory management subsystem module are used for the internal memory of management protocol stack, are responsible for the application release management of network data etc.; Described standard BSD Network Interface Module provides interface to keep supplying a layer application call, because BSD SocketAPI easy to understand, and used by a lot of Digital Television browsers,, realize seamless combination with upper layer application so encapsulate according to BSD Socket API in this protocol stack high-level interface; Verification when described verification and computing module are used to carry out the Data Receiving processing guarantees the integrality of data and the data transaction of different byte orders.
Said method, ICP/IP protocol stack can quick and convenient transplanting on a plurality of platforms, and constructor system simulation layer replaces the function and the data structure of operating system, and when transplanting, only need revise simulation layer at destination OS in principle and realize getting final product.
In sum, a kind of method that is used to realize network platform byte-aligned provided by the invention can adapt to the various platforms that have the byte-aligned problem, and can transplant quickly and easily between a plurality of platforms; Simultaneously, because the standard of employing BSD interface, so realized seamless combination with upper layer application.。
Should be understood that, for those of ordinary skills, can be improved according to the above description or conversion, and all these improvement and conversion all should belong to the protection range of claims of the present invention.
Claims (5)
1. method that is used to realize network platform byte-aligned, it comprises the steps:
A, determine the zone of all byte-aligned problems in the network system;
B, the ICP/IP protocol stack in the network system is divided into a plurality of functional modules;
C, by each described functional module, the zone that the byte-aligned problem is arranged is proofreaied and correct.
2. method according to claim 1, it is characterized in that, among the step B, described ICP/IP protocol stack comprises address resolution protocol, IP, gateway control protocol, User Datagram Protoco (UDP), TCP, DHCP, adopts layer mode to divide between each agreement.
3. method according to claim 1 and 2 is characterized in that, among the step B, described a plurality of functional modules comprise that agreement realizes module, buffering and memory management subsystem module, standard BSD Network Interface Module and verification and computing module;
Described agreement realizes that module is used to realize the basic agreement of protocol stack;
Described buffering and memory management subsystem module are used for the internal memory of management protocol stack, are responsible for the application release management of network data etc.;
Described standard BSD Network Interface Module is used to provide interface, keeps supplying a layer application call;
Described verification and computing module carry out verification when being used for data reception processing, guarantee the integrality of data and the data transaction of different byte orders.
4. method according to claim 3 is characterized in that, adopts layer mode to divide between described a plurality of functional modules.
5. method according to claim 3 is characterized in that, the criteria for classifying of described ICP/IP protocol stack is the inventionthe open systems interconnection reference model.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007101257446A CN101212479A (en) | 2007-12-25 | 2007-12-25 | Method for implementing byte alignment on network platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007101257446A CN101212479A (en) | 2007-12-25 | 2007-12-25 | Method for implementing byte alignment on network platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101212479A true CN101212479A (en) | 2008-07-02 |
Family
ID=39612145
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2007101257446A Pending CN101212479A (en) | 2007-12-25 | 2007-12-25 | Method for implementing byte alignment on network platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101212479A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101834881A (en) * | 2009-12-23 | 2010-09-15 | 福建新大陆通信科技有限公司 | Network communication method for embedded system |
CN103268305A (en) * | 2013-04-23 | 2013-08-28 | 上海斐讯数据通信技术有限公司 | OAM (operation administration and maintenance) protocol stack migrating method |
-
2007
- 2007-12-25 CN CNA2007101257446A patent/CN101212479A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101834881A (en) * | 2009-12-23 | 2010-09-15 | 福建新大陆通信科技有限公司 | Network communication method for embedded system |
CN103268305A (en) * | 2013-04-23 | 2013-08-28 | 上海斐讯数据通信技术有限公司 | OAM (operation administration and maintenance) protocol stack migrating method |
CN103268305B (en) * | 2013-04-23 | 2017-07-25 | 上海斐讯数据通信技术有限公司 | A kind of OAM protocol stacks implantation method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102402487B (en) | Zero copy message reception method and system | |
CN101207568B (en) | Multi protocol adapter and method for multi business to implement adapting treatment | |
US9137249B2 (en) | Local proxy system and method | |
CN102595208B (en) | Cloud terminal control networking video image processing streaming media service system and method | |
CN101067819A (en) | Web page resource issuing method and issuing system | |
EP4080898A1 (en) | Media stream distribution method, cdn node server, cdn system, and readable storage medium | |
CN108810581B (en) | Software menu updating method and device | |
US20240069977A1 (en) | Data transmission method and data transmission server | |
CN108958762A (en) | A kind of upgrade method and device of software | |
CN102984189A (en) | Wireless network and implementation method and terminal thereof | |
CN114124929A (en) | Cross-network data processing method and device | |
CN100543684C (en) | A kind of apparatus and method that realize transparent course migration | |
CN105072507A (en) | Method and system for transmitting multimedia data | |
CN102377792A (en) | Home network monitoring system based on WEB | |
CN101064715A (en) | Realization of embedded system based P2P technique | |
US7428730B2 (en) | Software development environment | |
CN114338832B (en) | Network protocol conversion method and system of container cloud platform | |
CN101083714A (en) | Household informatization system | |
CN105681343A (en) | Processing method and device for state control protocol based on ARM architecture | |
CN110737519A (en) | theme switching method and device | |
CN101212479A (en) | Method for implementing byte alignment on network platform | |
CN110351137B (en) | Method, system, electronic device and storage medium for automatically updating configuration information | |
CN105897653A (en) | High-performance mobile device framework | |
CN102902593A (en) | Protocol distribution processing system based on cache mechanism | |
CN101453485B (en) | Method for data transmission and writing using multicast data stream |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20080702 |