diff options
Diffstat (limited to 'epan/dissectors/packet-starteam.c')
-rw-r--r-- | epan/dissectors/packet-starteam.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/epan/dissectors/packet-starteam.c b/epan/dissectors/packet-starteam.c index 16fb5cca95..97e58cd5bb 100644 --- a/epan/dissectors/packet-starteam.c +++ b/epan/dissectors/packet-starteam.c @@ -499,18 +499,18 @@ dissect_starteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data } iPreviousFrameNumber = pinfo->fd->num; - if(tvb_length(tvb) >= 16){ + if(tvb_captured_length(tvb) >= 16){ guint32 iCommand = 0; gboolean bRequest = FALSE; if(tvb_get_ntohl(tvb, offset + 0) == STARTEAM_MAGIC){ /* This packet is a response */ bRequest = FALSE; - col_append_fstr(pinfo->cinfo, COL_INFO, "Reply: %d bytes", tvb_length(tvb)); + col_append_fstr(pinfo->cinfo, COL_INFO, "Reply: %d bytes", tvb_captured_length(tvb)); - } else if(tvb_length_remaining(tvb, offset) >= 28 && tvb_get_ntohl(tvb, offset + 20) == STARTEAM_MAGIC){ + } else if(tvb_captured_length_remaining(tvb, offset) >= 28 && tvb_get_ntohl(tvb, offset + 20) == STARTEAM_MAGIC){ /* This packet is a request */ bRequest = TRUE; - if(tvb_length_remaining(tvb, offset) >= 66){ + if(tvb_captured_length_remaining(tvb, offset) >= 66){ iCommand = tvb_get_letohl(tvb, offset + 62); } col_append_str(pinfo->cinfo, COL_INFO, @@ -528,7 +528,7 @@ dissect_starteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data starteamroot_tree = proto_item_add_subtree(ti, ett_starteam); if(bRequest){ - if(tvb_length_remaining(tvb, offset) >= 20){ + if(tvb_captured_length_remaining(tvb, offset) >= 20){ ti = proto_tree_add_text(starteamroot_tree, tvb, offset, 20, STARTEAM_TEXT_MDH); starteam_tree = proto_item_add_subtree(ti, ett_starteam_mdh); @@ -541,7 +541,7 @@ dissect_starteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data } } - if(tvb_length_remaining(tvb, offset) >= 16){ + if(tvb_captured_length_remaining(tvb, offset) >= 16){ ti = proto_tree_add_text(starteamroot_tree, tvb, offset, 16, STARTEAM_TEXT_PH); starteam_tree = proto_item_add_subtree(ti, ett_starteam_ph); @@ -552,7 +552,7 @@ dissect_starteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data offset += 16; if(bRequest){ - if(tvb_length_remaining(tvb, offset) >= 38){ + if(tvb_captured_length_remaining(tvb, offset) >= 38){ ti = proto_tree_add_text(starteamroot_tree, tvb, offset, 38, STARTEAM_TEXT_ID); starteam_tree = proto_item_add_subtree(ti, ett_starteam_id); @@ -566,26 +566,26 @@ dissect_starteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data offset += 38; } } - if(tvb_length_remaining(tvb, offset) > 0){ + if(tvb_captured_length_remaining(tvb, offset) > 0){ ti = proto_tree_add_text(starteamroot_tree, tvb, offset, -1, STARTEAM_TEXT_DATA); starteam_tree = proto_item_add_subtree(ti, ett_starteam_data); - proto_tree_add_item(starteam_tree, hf_starteam_data_data, tvb, offset, tvb_length_remaining(tvb, offset), ENC_ASCII|ENC_NA); + proto_tree_add_item(starteam_tree, hf_starteam_data_data, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_ASCII|ENC_NA); } } } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static guint get_starteam_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 iPDULength = 0; - if(tvb_length_remaining(tvb, offset) >= 8 && tvb_get_ntohl(tvb, offset + 0) == STARTEAM_MAGIC){ + if(tvb_captured_length_remaining(tvb, offset) >= 8 && tvb_get_ntohl(tvb, offset + 0) == STARTEAM_MAGIC){ /* Response */ iPDULength = tvb_get_letohl(tvb, offset + 4) + 16; - } else if(tvb_length_remaining(tvb, offset) >= 28 && tvb_get_ntohl(tvb, offset + 20) == STARTEAM_MAGIC){ + } else if(tvb_captured_length_remaining(tvb, offset) >= 28 && tvb_get_ntohl(tvb, offset + 20) == STARTEAM_MAGIC){ /* Request */ iPDULength = tvb_get_letohl(tvb, offset + 24) + 36; } @@ -596,14 +596,14 @@ static int dissect_starteam_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, starteam_desegment, 8, get_starteam_pdu_len, dissect_starteam, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static gboolean dissect_starteam_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { - if(tvb_length(tvb) >= 32){ + if(tvb_captured_length(tvb) >= 32){ gint iOffsetLengths = -1; if(tvb_get_ntohl(tvb, 0) == STARTEAM_MAGIC){ iOffsetLengths = 4; |