Hi Everyone, I have a task to write an application that would take an encoded RRC (3GPP protocol) message, translate it to some human readable format(text, xml, etc) and store it in the database. The question is can Wireshark be used by a 3rd party application as a protocol decoder? Does it have any kind of API that can be used by external application? If that is possible can you please direct me to the right source of information? /Alex asked 10 Jan '15, 09:56 Alexander |
One Answer:
Yes you can use text2pcap + tshark to achieve this. Look at this thread for details. For RRC protocol, here is the list of applicable payload protocols:
answered 10 Jan '15, 10:17 Pascal Quantin showing 5 of 7 show 2 more comments |
Hi Pascal,
Thanks for the idea. It looks like an option but I assume it will have performance problems for a large amount of messages since at least two intermediate files need to be created. Is there any library that would provide the functionality you described above in the form of API functions calls?
Thanks
A
No there is no official API. You will need to link directly libwireshark.dll (meaning that your program will now be GPL) and dive in the source code to find the entry points are they are not documented (other than the comments).
One more question. How to find the right protocol decoder(you listed above) having the RRC message type name (e.g. RRCConnectionRequest)? Can wireshark some how help with such mapping?
Thanks!
The mapping is given in 3GPP 25.331 ASN.1 definition. For example a RRC Connection Request is a rrc.ul.ccch message. You can also find a copy of the ASN.1 description used by Wireshark here: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob;f=asn1/rrc/Class-definitions.asn;hb=refs/heads/master
By the way, you are referring to the 3G RRC right? Not the LTE version? Because if it's the LTE version you are interested in, the payload protocols are different.
LTE for now, 3G I will need as well but a bit later. So need both.
Then the protocol payloads are: lte-rrc.bcch.bch, lte-rrc.bcch.dl.sch, lte-rrc.pcch, lte-rrc.dl.ccch, lte-rrc.dl.dcch, lte-rrc.ul.ccch, lte-rrc.ul.dcch, lte-rrc.mcch. Those are the top levels PDUs as found in the ASN.1 description.
The ASN.1 description can be found in 3GPP 36.331. The one used by Wireshark development builds is: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob;f=asn1/lte-rrc/EUTRA-RRC-Definitions.asn;hb=refs/heads/master
Pascal, Thanks a lot!