I’m using tcp_dissect_pdus() to
dissect a TCP protocol that doesn’t include a message length field. The
messages are terminated by “\r\n”.
The function to return the message length is as follows:
static guint get_myproto_message_len(packet_info
*pinfo, tvbuff_t *tvb, int
offset)
{
int msg_len, term_offset;
term_offset =
tvb_find_guint8(tvb, offset, -1, '\r')
+2;
if (term_offset == -1)
return 0;
msg_len = term_offset
- offset;
return msg_len;
}
The problem is if the message stretched over 2 (or more)
pdus, the function fails and I get “Malformed Packet:” in
Wireshark.
How to I tell tcp_dissect_pdus() to read
more data and try again?
Thanks.
Kwan
Ng
Development Integration Specialist
P Please consider the environment before printing this email or any
attachments therein.