diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-08-08 12:44:28 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-08-08 12:44:28 +0000 |
commit | 7badbc8eb6658219570a22b56df35344583a5f55 (patch) | |
tree | bf6d561e2b0bf2887b5bfff600d3a1cc5d4fca18 /epan/dissectors/packet-sigcomp.c | |
parent | cf95f5ccfd4eab7356b85564a7cd51397b971a4c (diff) |
From Daniel Rao:
Implement desegment for SIGCOMP over TCP, similar with HTTP desegment.
svn path=/trunk/; revision=22467
Diffstat (limited to 'epan/dissectors/packet-sigcomp.c')
-rw-r--r-- | epan/dissectors/packet-sigcomp.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/epan/dissectors/packet-sigcomp.c b/epan/dissectors/packet-sigcomp.c index 3e36e69244..5b8b515561 100644 --- a/epan/dissectors/packet-sigcomp.c +++ b/epan/dissectors/packet-sigcomp.c @@ -391,6 +391,25 @@ dissect_sigcomp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if ((octet & 0xf8) != 0xf8) return offset; + /* Search for delimiter 0xffff in the remain tvb buffer */ + length = tvb_ensure_length_remaining(tvb, offset); + for(i=0; i<(length-1); ++i){ + /* Loop end criteria is (length-1) because we take 2 bytes each loop */ + data = tvb_get_ntohs(tvb, offset+i); + if (0xffff == data) break; + } + if (i >= (length-1)){ + /* SIGCOMP may be subdissector of SIP, so we use + * pinfo->saved_can_desegment to determine whether do desegment + * as well as pinfo->can_desegment */ + if (pinfo->can_desegment || pinfo->saved_can_desegment){ + /* Delimiter oxffff was not found, not a complete SIGCOMP PDU */ + pinfo->desegment_offset = offset; + pinfo->desegment_len=DESEGMENT_ONE_MORE_SEGMENT; + return -1; + } + } + /* Make entries in Protocol column and Info column on summary display */ if (check_col(pinfo->cinfo, COL_PROTOCOL)) col_set_str(pinfo->cinfo, COL_PROTOCOL, "SIGCOMP"); |