diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-09-22 08:04:40 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-09-22 08:04:40 +0000 |
commit | 8e9bc7e20069294a84f7ca202d8ece58b85b7d1f (patch) | |
tree | b7eea02b640b90ba06f02d8699f52480ce810446 /epan/dissectors/packet-aim-generic.c | |
parent | dc2aa7178b809b4f67c5ed0560438e663b19e20c (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12063 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-aim-generic.c')
-rw-r--r-- | epan/dissectors/packet-aim-generic.c | 23 |
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) |