描述 SMPP 或 CIMD2 等电信协议的良好机器可读形式方式是什么?

发布于 2024-09-04 09:42:45 字数 241 浏览 13 评论 0原文

在我的职业生涯中,我已经用各种语言根据人类可读的规范实现了多种电信协议,坦率地说,我不再很喜欢它了。

相反,我想将人类可读的协议规范转换为机器可读的协议规范,并自动生成各种语言的协议处理程序。

我对 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

朦胧时间 2024-09-11 09:42:45

ABNF,尽管它没有被广泛使用。这是 CIMD PDU 的例子。

 cimd-frame     = start-of-text op-code COLON packet-number TAB parameter-list end-of-text
 parameter-list = *(parameter)
 parameter      = code COLON value TAB
 start-of-text  = %x02
 end-of-text    = %x03
 TAB            = %x09
 COLON          = %x3A
 …

有解析器生成器可以读取 ABNF 语法并生成解析器。

There's ABNF, though it's not widely used. Here's CIMD PDU for example

 cimd-frame     = start-of-text op-code COLON packet-number TAB parameter-list end-of-text
 parameter-list = *(parameter)
 parameter      = code COLON value TAB
 start-of-text  = %x02
 end-of-text    = %x03
 TAB            = %x09
 COLON          = %x3A
 …

There are parser generators out there that can read ABNF grammar and produce parser.

瀞厅☆埖开 2024-09-11 09:42:45

您的意思是像协议分析器所做的那样吗?他们获取数据流并将其解析为正确的字段并将每个字段显示给用户。听起来您想对解析的数据做一些不同的事情。您仍然需要编写协议解码,但之后您可以对数据执行任何您想要的操作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文