摘 要: 异构网络(Heterogeneous Network)中包含多种使用不同网络协议的设备,因此设计一种可定制化的网络协议解析器是解决各设备之间信息交互,降低硬件设备更新和替换成本的重要课题。本文提出使用XML(可扩展性标记语言)作为网络协议解析器的协议描述文件,利用XML文件的可扩展性、异构性和标签之间的父子层级关系,实现该网络协议解析器的通用性,达到更新或更换网络协议时无须重新编写代码,只需更改或替换XML文件即可;同时,支持用户可选当前解析器解析的最小颗粒度为bit或byte,满足更多设备协议的数据要求。通过实验表明,本文提出的网络协议解析器满足协议解析的要求。 |
关键词: 网络协议解析器;XML文件;异构网络 |
中图分类号: TP311.5
文献标识码: A
|
|
A Design of a Customizable Heterogeneous Network Protocol Parser |
JIANG Keyuan, LI Xiaoming
|
(Faculty of Mechanical Engineering and Automation, Zhejiang Sci-Tech University, Hangzhou 310000, China )
1393621017@qq.com; lxmzist@zstu.edu.cn
|
Abstract: Heterogeneous Network contains a variety of devices that use different network protocols. Therefore, designing a customizable network protocol parser is an important issue to realize information interaction between devices and reduce the cost of hardware equipment update and replacement. This paper proposes to use XML (Extensible Markup Language) as the protocol description file of the network protocol parser. Based on its scalability, heterogeneity, and parentchild hierarchy between nodes, the XML file can be used to achieve the generality of the network protocol parser, so that there is no need to rewrite the code when updating or replacing the network protocol, just change or replace the XML file. At the same time, the minimum granularity of the current parser users can choose is bit or byte, which can meet the data requirements of more device protocols. Experiments show that the network protocol parser proposed in this paper meets the requirements of protocol parsing. |
Keywords: network protocol parser; XML file; heterogeneous network |