how to display gtp-teid as decimal format? s1ap.gTP-TEID: d7e29a65 asked 16 Oct '13, 16:01 ertsali edited 18 Oct '13, 03:13 Kurt Knochner ♦ |
2 Answers:
for that single value: 3621952101 In General: By adding a Lua post dissector that takes the original value and adds a new field for the decimal value. Here is a very simple (but working) sample code, based on the DnsCat Lua post dissector File: gtp_ext.lua
Place the file gtp_ext.lua (gtp_ext == extended GTP) in the Wireshark installation directory. Then edit init.lua. Add the following line:
Close Wireshark and open it again. Open a GTP pcap and filter for
All frames with a gtp.teid will have a new field called
You can also use the new field in a display filter, like this:
See the following screenshot Have fun! Regards answered 17 Oct ‘13, 07:41 Kurt Knochner ♦ edited 17 Oct ‘13, 09:23 showing 5 of 6 show 1 more comments |
By changing the code in packet-gtp.c, otherwise you have to bring out your calculator. answered 17 Oct '13, 07:27 Anders ♦ |
Thanks.. this is awesome but I would like to decode s1ap.gTP_TEID. Please help to modify the coding based on s1ap.gTP_TEID.
Basically: Just replace the string ‘gtp.teid’ in the code with ‘s1ap.gTP_TEID’. Unfortunately I don’t have pcap file with s1ap traffic to test it.
new code:
Cannot work. Please help and download the log via the link. https://skydrive.live.com/?cid=2d4afe2cec0bd503&id=2D4AFE2CEC0BD503%21666&action=Share
O.K. with s1ap it’s not that simple, as there can be several gtp_TEID fields in one frame. So, it’s unclear how the post dissector should show them? Just in the same order as they appeared in the original frame, one after the other?
I see. Thanks
Kind of speaking to Kurt’s last question, is there a specific end goal in mind here ertsali? Are you trying to correlate the trace file with MME queries, for example? Easy enough to use the above method to just display all the TEIDs, and if also bound to a procedure code I believe the order should always be predictable as well, unless the vendor is doing something odd like passing separate S1AP commands as data chunks in a single packet.
There’s probably easier ways depending on the end goal though. For example, converting the other way from a vendor’s stat file might just be a one-liner script as opposed to breaking out Lua to map Wireshark to the format of a stat or log file.