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


I´m developing a plugin for TUP, and to decode the CIC field i need to use the last byte from the previous dissector (MTP3 in my case), as it´s last four bits are part of the 12 bit CIC field from my TUP messages.. I need to , somehow, "share" this last byte between the dissectors How can i do that?


asked 17 May '13, 10:15

Renan's gravatar image

accept rate: 0%

A common way to solve this problem is to store the needed value in the "private_data" field of pinfo. For example the MTP3 dissector used to do this to pass the SI down to subdissectors:

/* Store the SI so that subidissectors know what SI this msg is */   
*pd_save = pinfo->private_data;      
pinfo->private_data = GUINT_TO_POINTER(sio & SERVICE_INDICATOR_MASK);

(A better solution to passing the SI was found and implemented in r45788. That means the private_data field could be used for passing the SLS to TUP.)

A newer (and probably better) way to solve this problem is to pass the data directly. This could be done by calling dissector_try_uint_new() in packet-mtp3.c (and passing the SLS as the 'data' argument) and then using the (now normally unused) 'data' parameter of new-style dissectors (new_dissector_t) and heuristic dissectors.

permanent link

answered 17 May '13, 11:23

JeffMorriss's gravatar image

JeffMorriss ♦
accept rate: 27%

[Original comment moved to the new question.]

Also: this is a Q&A site not a forum so if an answer answers your question, please mark the answer as accepted (by checking the checkbox next to the answer).

(21 May '13, 10:43) JeffMorriss ♦
Your answer
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: 17 May '13, 10:15

question was seen: 2,038 times

last updated: 21 May '13, 11:35

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