This is our old Q&A Site. Please post any new questions and answers at

Hi Iam developing custom dissector. where in some part i need to pass the tvb to a externl function NAS message from the file packet-gsm_a_dtap.c.

SOme times im calculating remaining length by sustracting the step by step length used


        proto_tree_add_text(bm__subtree, next_tvb, offset_payload, 1 , "Instances : 0x%02x (%d)", instances, instances);


but when i call NAS message process Call dissector

            call_dissector(NAS_handle, NAS_tvb , pinfo, NASPDU_tree);

i copuld not get the correct figure of payload length . how can i get this? Any idea?

asked 20 Nov '14, 02:21

umar's gravatar image

accept rate: 0%


I'm not sure I understand the question. As I understand it the gsm_a_detap dissector is called with a NAS message, it's then distributed to the correct subdissector dependent on the Protocol Discriminator(PD). Are you calling your subdissector if one of the values of PD isn't handled by the dissector or replacing an existing call? Regardles I think that the tvb given to gsm_dtap should be the complete Layer 3 message so it should be enough to check the length of the tvb. But perhaps you should look at changing the dissector calling the DTAP one to call your dissector instead? That dissector should know the length of the layer3 message I would think.

(20 Nov '14, 04:02) Anders ♦
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 20 Nov '14, 02:21

question was seen: 1,278 times

last updated: 20 Nov '14, 04:02

p​o​w​e​r​e​d by O​S​Q​A