aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-aim-generic.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-09-22 08:04:40 +0000
committerGuy Harris <guy@alum.mit.edu>2004-09-22 08:04:40 +0000
commit8dedbeed1cd700846478d9de90e0d3b2e364d684 (patch)
treeb7eea02b640b90ba06f02d8699f52480ce810446 /epan/dissectors/packet-aim-generic.c
parentcc6754d659239dc7a1265351be5ee5c4a30171a2 (diff)
From Jelmer Vernooij:
- Dissect the DC (Direct Connection) info structure - Dissect the complete buddy icon family (you can now save buddy icons as .JPG's/.PNG's directly from the capture using the "Export selected bytes..." option!) - Add a function that dissects a sequence of TLV's instead of having while() loops all over the place. svn path=/trunk/; revision=12063
Diffstat (limited to 'epan/dissectors/packet-aim-generic.c')
-rw-r--r--epan/dissectors/packet-aim-generic.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/epan/dissectors/packet-aim-generic.c b/epan/dissectors/packet-aim-generic.c
index 766abffdb2..c3b990fbc7 100644
--- a/epan/dissectors/packet-aim-generic.c
+++ b/epan/dissectors/packet-aim-generic.c
@@ -272,11 +272,7 @@ static int dissect_aim_generic_service_req(tvbuff_t *tvb, packet_info *pinfo _U_
static int dissect_aim_generic_redirect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *gen_tree)
{
- int offset = 0;
- while(tvb_length_remaining(tvb, offset) > 0) {
- offset = dissect_aim_tlv(tvb, pinfo, offset, gen_tree, client_tlvs);
- }
- return offset;
+ return dissect_aim_tlv_sequence(tvb, pinfo, 0, gen_tree, client_tlvs);
}
static int dissect_aim_generic_capabilities(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree)
@@ -315,10 +311,7 @@ static int dissect_aim_generic_motd(tvbuff_t *tvb, packet_info *pinfo, proto_tre
proto_tree_add_item(gen_tree, hf_generic_motd_motdtype, tvb, offset,
2, tvb_get_ntohs(tvb, offset));
offset+=2;
- while(tvb_length_remaining(tvb, offset) > 0) {
- offset = dissect_aim_tlv(tvb, pinfo, offset, gen_tree, motd_tlvs);
- }
- return offset;
+ return dissect_aim_tlv_sequence(tvb, pinfo, offset, gen_tree, motd_tlvs);
}
static int dissect_aim_generic_rateinfoack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree)
@@ -371,11 +364,7 @@ static int dissect_aim_generic_migration_req(tvbuff_t *tvb, packet_info *pinfo,
offset += 2;
}
- while(tvb_length_remaining(tvb, offset) > 0) {
- offset = dissect_aim_tlv(tvb, pinfo, offset, gen_tree, client_tlvs);
- }
-
- return offset;
+ return dissect_aim_tlv_sequence(tvb, pinfo, offset, gen_tree, client_tlvs);
}
static int dissect_aim_generic_setprivflags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree)
@@ -416,11 +405,7 @@ static int dissect_aim_generic_setidle(tvbuff_t *tvb, packet_info *pinfo _U_, pr
static int dissect_aim_generic_ext_status_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *gen_tree)
{
- int offset = 0;
- while(tvb_length_remaining(tvb, offset) > 0) {
- offset = dissect_aim_tlv(tvb, pinfo, offset, gen_tree, onlinebuddy_tlvs);
- }
- return offset;
+ return dissect_aim_tlv_sequence(tvb, pinfo, 0, gen_tree, onlinebuddy_tlvs);
}
static int dissect_aim_generic_clientver_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree)