This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

dissect custom data with encrypted part

0

Hello,

I'm developing a custom packet dissector. Lets say we have a 64 byte packet to dissect and bytes 16 to 32 are encrypted, what is the right way to display this data ?

Today I have something working like that but I want to have a clean code

proto_tree_add_item( //the encrypted data displayed as is 
offset += 16
dec_buffer = decryptData() //decrypted data are in a buffer 
payload_tvb = tvb_new_child_real_data(tvb, dec_buffer, 16, 16);
add_new_data_source(pinfo, payload_tvb, "Decrypted Data");

What protocol dissector may I use as example ?

asked 02 Sep '16, 04:41

atsju2's gravatar image

atsju2
11347
accept rate: 0%

edited 02 Sep '16, 04:42