描述 SMPP 或 CIMD2 等电信协议的良好机器可读形式方式是什么?
在我的职业生涯中,我已经用各种语言根据人类可读的规范实现了多种电信协议,坦率地说,我不再很喜欢它了。
相反,我想将人类可读的协议规范转换为机器可读的协议规范,并自动生成各种语言的协议处理程序。
我对 SMPP/CIMD2/EMI 协议、自动生成协议数据单元串行器/解串器以及状态机、测试用例和其他基础设施执行此操作特别感兴趣。
有人已经这样做了吗?
如果没有,您会推荐哪些语言、库和符号来完成这样的任务?
I've implemented several telecom protocols from human-readable specs in various languages during my career, and frankly, I'm not enjoying it very much anymore.
Instead, I'd like to translate the human-readable protocol specs into machine-readable protocol specs, and automatically generate protocol handlers in various languages.
I'm specifically interested in doing this to SMPP/CIMD2/EMI protocols, and autogenerating protocol data unit serializers/deserializers, as well as state machines, test cases, and other infrastructure.
Has someone done this already?
If not, which languages, libraries, and notations would you recommend for such a task?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有 ABNF,尽管它没有被广泛使用。这是 CIMD PDU 的例子。
有解析器生成器可以读取 ABNF 语法并生成解析器。
There's ABNF, though it's not widely used. Here's CIMD PDU for example
There are parser generators out there that can read ABNF grammar and produce parser.
您的意思是像协议分析器所做的那样吗?他们获取数据流并将其解析为正确的字段并将每个字段显示给用户。听起来您想对解析的数据做一些不同的事情。您仍然需要编写协议解码,但之后您可以对数据执行任何您想要的操作。
Wireshark 是开源且免费的,并且已经有许多协议解码,包括 SMPP。也有商业选择。
Do you mean something like what protocol analyzers do? They take a stream of data and parse it out into the correct fields and display each field to a user. It sounds like you'd want to do something different with the parsed data. You'd still have to write the protocol decodes but after that you could do whatever you wanted with the data.
Wireshark is open-source and free and has lots of protocol decodes already, including SMPP. There are commercial options also.