First time here? Check out the FAQ!

Ask Your Question
0

Related packet symbols in Lua dissector

asked May 21 '1

Glupsch21 gravatar image

updated May 21 '1

cmaynard gravatar image

Hi, I am developing a dissector in Lua for our own protocol. I was wondering if it is possible to tell Wireshark which packets are related to which in a Lua dissector, so that it marks them with the different related packet symbols. For example, signal that a packet is a request and another one is a response or something like that. Is that possible?

I am thinking about the packet symbols as shown here: https://www.wireshark.org/docs/wsug_h...

Thank you

Preview: (hide)

3 Answers

Sort by » oldest newest most voted
0

answered May 21 '1

cmaynard gravatar image

As far as I'm aware, this isn't possible yet, but Issue 15396 - Add Lua support for tracking conversations. is tracking it.

Preview: (hide)
link
0

answered May 21 '1

grahamb gravatar image

For C-based dissectors, track the requests and responses (usually via conversations which I don't know how to do in Lua), and then add fields to the tree to say how the current frame is tied to the other, e.g.

  • For the request, add a field indicating the response is in frame x with the field type set to FT_FRAMENUM, and the FRAME_NUM type set to T_FRAMENUM_RESPONSE
  • For the response, add a field indicating the request is in frame x with the field type set to FT_FRAMENUM, and the FRAME_NUM type set to T_FRAMENUM_REQUEST

Some details are in README.request_response_tracking.

For Lua, create the ProtoField with type ftypes.FRAMENUM and the value string one of frametype.REQUEST or frametype.RESPONSE, see here for more info on the Protofield options

Preview: (hide)
link
0

answered May 21 '1

Roddyp gravatar image

I haven't tried this, but ProtoField.framenum() is probably a good place to start.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: May 21 '1

Seen: 1,083 times

Last updated: May 21 '21