Is there a python library that abstracts IP based transport - TCP, UDP, SCTP, TLS, etc.?

I recently became interested in the DIAMETER protocol as defined by RFC 6733 . Since I am learning Python, I thought it would be interesting to know if I can use any Diameter Python library. I found one , but it doesn't seem to be supported anymore. So I got a very ambitious idea to try to build one, at least skeletal, that could be extended to have richer DIAMETER signaling capabilities.

Since I got stuck in a twisted matrix again, I tried to check its documentation to see if it supports all types of transport that the DIAMETER protocol can support, but other than TCP, UDP (as well as TLS), I don't find mention of rest. those. - SCTP / IP - SCTP / UDP - DTLS / SCTP

So I was wondering if there is any other library that could be used, or should I expect you to have to manually unwind it? The twisted expansion is beyond my scope at this point.

+3


source to share


2 answers


If you're going to roll on your own, you can do it with Twisted using the IFileDescriptor

(and related) interface (s). Create an SCTP socket, wrap around it IFileDescriptor

that returns it fileno

, then implement IReadDescriptor.doRead

for invocation sctp_sendmsg

and IWriteDescriptor.doWrite

for invocation sctp_recvmsg

. You now have SCTP transport. You can implement it to call methods on any SCTP interface that conforms to the protocol. I don't know enough about SCTP to say which methods the protocol should have, unfortunately.



+1


source


I don't know if this is still supported (last updated December 2014) http://sourceforge.net/projects/pyprotosim/

This is radius, diameter, dhcp, ldap, EAP calculation



You haven't chosen the simplest protocol. Many providers have their own AVPs, and sometimes they even use standard numbers for theirs.

You can also write your own lib to parse the DIAMETER, it's not that hard, you just need time (a lot) and good documentation (or experts). If the one I did was not developed during my work, I could share it, but I cannot.

+2


source







All Articles