How to find problems with tree in custom c dissector?

asked 2021-03-16 09:10:54 +0000

Robin26689 gravatar image

Hi togehter, i'm writing an custom c dissector for iolink. I have the following problem and i don't know how to find out why i got this problem.

Problem: I have bytes sent over several frames. For example the 3rd byte of the first frame is the start byte, the 3rd byte of the second frame contains the length of how many bytes i will receive and the 3rd byte of the last frame i receive is the checksum. I created a tree item and a tree and put the bytes to the tree. Therefore i wrote several functions (depending on the fragmented message i receive). In general it works. So i display the tree with the data and also the colum info is filled with the correct data. All bytes are written as data to the tree expect of the last one, this is written as a checksum. I don't know why i have to click all the frames with the data byte to see the byte of the last frame as checksum byte. If i don't click the frames before it is also shown as data byte.

I hope you have some suggestions of how to figure out my problem.

Thanks and regards

Robin

edit retag flag offensive close merge delete

Comments

Is some of the code related to reassembly inside an if tree?

Anders gravatar imageAnders ( 2021-03-16 10:15:43 +0000 )edit

Not sure what you mean? I can post parts of my code tomorrow if this would help or i can describe it a bit more

Robin26689 gravatar imageRobin26689 ( 2021-03-16 10:20:26 +0000 )edit