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

Reg COBS and Wireshark dissectors

0

Hi,

I am developing a dissector for a proprietary protocol. I would like to know how to handle packets that are encoded with COBS - Consistent Overhead Byte Stuffing. Are there any APIs available?

Thanks in Advance

Regards, Laser

asked 18 Jan '11, 19:23

Neo%20Laser's gravatar image

Neo Laser
1111
accept rate: 0%


One Answer:

0

Direct COBS support isn't available.

What you should look into is using tvb_*_real_data functions found in tvbuff.h

/** Attach a TVBUFF_REAL_DATA tvbuff to a parent tvbuff. This connection
 * is used during a tvb_free_chain()... the "child" TVBUFF_REAL_DATA acts
 * as if is part of the chain-of-creation of the parent tvbuff, although it
 * isn't. This is useful if you need to take the data from some tvbuff,
 * run some operation on it, like decryption or decompression, and make a new
 * tvbuff from it, yet want the new tvbuff to be part of the chain. The reality
 * is that the new tvbuff *is* part of the "chain of creation", but in a way
 * that these tvbuff routines is ignorant of. Use this function to make
 * the tvbuff routines knowledgable of this fact. */

answered 19 Jan '11, 00:01

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%