3

最近我对 [RFC 6733][1] 定义的 DIAMETER 协议产生了兴趣。由于我正在学习 Python,我认为看看我是否可以使用任何 DIAMETER Python 库可能会很有趣。我确实找到了 [one][2],但它似乎不再被维护。所以我有了一个雄心勃勃的想法,那就是尝试构建一个,至少是骨骼的东西,可以扩展为具有更丰富的 DIAMETER 信号功能。

由于不久前我也遇到过扭曲矩阵,因此我尝试检查它的文档以查看是否支持可以支持 DIAMETER 协议的所有类型的传输,但除了 TCP、UDP(以及 TLS)之外,我 din '找不到提及休息,即

  • SCTP/IP
  • SCTP/UDP
  • DTLS/SCTP

所以想知道是否有任何其他库可以使用,或者我应该期望手动滚动这个?延伸扭曲,这一步超出了我的范围。[1]:https ://www.rfc-editor.org/rfc/rfc6733 [2]:http: //i1.dk/PythonDiameter/

4

2 回答 2

2

我不知道这个仍然受支持(2014 年 12 月的最后一次更新) http://sourceforge.net/projects/pyprotosim/

它进行半径、直径、dhcp、ldap、EAP 计算

您没有选择最简单的协议。许多供应商都有自己的 AVP,有时他们甚至使用标准数字。

您也可以编写自己的库来解析 DIAMETER,这并不难,您只需要时间(很多)和良好的文档(或专家)。如果我做的那个不是在我的工作中开发出来的,我可以分享它,但我不能。

于 2015-04-20T11:53:05.427 回答
1

If you were going to roll your own, you can do this with Twisted by using the IFileDescriptor (and related) interface(s). Make an SCTP socket, wrap an IFileDescriptor around it that returns its fileno, then implement IReadDescriptor.doRead to call sctp_sendmsg and IWriteDescriptor.doWrite to call sctp_recvmsg. Now you have an SCTP transport. You can implement it to call methods on whatever SCTP protocol interface that is appropriate to the protocol. I don't know enough about SCTP to say what methods that protocol interface should have, unfortunately.

于 2015-04-22T03:40:19.077 回答