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

Get Packet Length

0

I was able to retrieve my packet data as an unsigned char* with

gCharArray = tvb_get_string(tvb, 0, length);

but I have no idea how to determine what 'length' SHOULD be. My message type does not include any size information unfortunately. I want to grab the data from position 0 to the end of the data. How can I accomplish this?

Thank you for your time,
Brandon

asked 26 Jul '11, 12:28

officialhopsof's gravatar image

officialhopsof
318812
accept rate: 100%


One Answer:

1

I am going to answer my own question,

length = tvb_length(tvb);

Sorry about that!
Brandon

answered 26 Jul '11, 12:47

officialhopsof's gravatar image

officialhopsof
318812
accept rate: 100%