diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-09-18 06:42:16 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-09-18 06:42:16 +0000 |
commit | 9a1ec8eb0bcd5797278a86e25eaa1f586520f77d (patch) | |
tree | b42c003d9dea691020425921785bb89c28848360 /epan/dissectors/packet-aim.c | |
parent | efbfdd9b730674b57a4059ff72eef59f43e9b309 (diff) |
From Jelmer Vernooij:
- Support client capabilities list
- Fix incorrect TLV usage
svn path=/trunk/; revision=12040
Diffstat (limited to 'epan/dissectors/packet-aim.c')
-rw-r--r-- | epan/dissectors/packet-aim.c | 159 |
1 files changed, 157 insertions, 2 deletions
diff --git a/epan/dissectors/packet-aim.c b/epan/dissectors/packet-aim.c index 44d2e94cc9..76eff4ade9 100644 --- a/epan/dissectors/packet-aim.c +++ b/epan/dissectors/packet-aim.c @@ -371,6 +371,7 @@ static gint ett_aim_fnac_flags = -1; static gint ett_aim_tlv = -1; static gint ett_aim_userclass = -1; static gint ett_aim_messageblock = -1; +static gint ett_aim_client_capabilities = -1; /* desegmentation of AIM over TCP */ static gboolean aim_desegment = TRUE; @@ -806,10 +807,163 @@ int dissect_aim_buddyname(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, return offset+buddyname_length; } +typedef struct _e_uuid_t { + guint32 Data1; + guint16 Data2; + guint16 Data3; + guint8 Data4[8]; +} e_uuid_t; + +typedef struct _aim_client_capabilities { + const char *description; + e_uuid_t clsid; +} aim_client_capabilities; + +static const aim_client_capabilities client_caps[] = { + { "iChat", + {0x09460000, 0x4c7f, 0x11d1, + { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Security", + {0x09460001, 0x4c7f, 0x11d1, + { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Video Chat", + {0x09460100, 0x4c7f, 0x11d1, + { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Live Video", + {0x09460101, 0x4c7f, 0x11d1, + { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Camera", + {0x09460102, 0x4c7f, 0x11d1, + { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "iChatAV info", + {0x09460105, 0x4c7f, 0x11d1, + { 0x82, 0x22, 0x44, 0x45, 0x45, 0x53, 0x54, 0x00}}}, + + { "Hiptop", + {0x09461323, 0x4c7f, 0x11d1, + { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Voice Chat", + {0x09461341, 0x4c7f, 0x11d1, + { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Send File", + {0x09461343, 0x4c7f, 0x11d1, + { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Receive File", + {0x09461348, 0x4c7f, 0x11d1, + { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + + { "Direct ICQ Communication", + {0x09461344, 0x4c7f, 0x11d1, + {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Direct Instant Messaging", + {0x09461345, 0x4c7f, 0x11d1, + {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Buddy Icon", + {0x09461346, 0x4c7f, 0x11d1, + {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Add-Ins", + {0x09461347, 0x4c7f, 0x11d1, + {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + + { "ICQ Server Relaying", + {0x09461349, 0x4c7f, 0x11d1, + {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Games", + {0x0946134a, 0x4c7f, 0x11d1, + {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Games", + {0x0946134a, 0x4c7f, 0x11d1, + {0x22, 0x82, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Send Buddy List", + {0x0946134b, 0x4c7f, 0x11d1, + {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "AIM/ICQ Interoperability", + {0x0946134d, 0x4c7f, 0x11d1, + {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "ICQ UTF8 Support", + {0x0946134e, 0x4c7f, 0x11d1, + {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "Old ICQ UTF8 Support", + {0x2e7a6475, 0xfadf, 0x4dc8, + {0x88, 0x6f, 0xea, 0x35, 0x95, 0xfd, 0xb6, 0xdf}}}, + + { "Chat", + {0x748f2420, 0x6287, 0x11d1, + {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, + + { "ICQ Rich Text Format Messages", + {0x97b12751, 0x243c, 0x4334, + {0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x92}}}, + + { "AP User", + {0xaa4a32b5, 0xf884, 0x48c6, + {0xa3, 0xd7, 0x8c, 0x50, 0x97, 0x19, 0xfd, 0x5b}}}, + + { "Trillian Encryption", + {0xf2e7c7f4, 0xfead, 0x4dfb, + {0xb2, 0x35, 0x36, 0x79, 0x8b, 0xdf, 0x00, 0x00}}}, + + { "Unknown", {0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } } +}; + int dissect_aim_tlv_value_client_capabilities(proto_item *ti _U_, guint16 valueid _U_, tvbuff_t *tvb) { - /* FIXME */ + int offset = 0; + proto_tree *entry; + + proto_item_set_text(ti, "Client Capabilities List"); + + entry = proto_item_add_subtree(ti, ett_aim_client_capabilities); + + while (tvb_length_remaining(tvb, offset) > 0) { + int i; + const aim_client_capabilities *caps; + guint32 Data1 = tvb_get_ntoh24(tvb, offset); + guint16 Data2 = tvb_get_ntohs(tvb, offset+4); + guint16 Data3 = tvb_get_ntohs(tvb, offset+6); + guint8 Data4[8]; + tvb_memcpy(tvb, Data4, offset+8, 8); + + caps = &client_caps[0]; + + for(i = 0; !strcmp(client_caps[i].description, "Unknown"); i++) { + caps = &client_caps[i]; + + if(Data1 == caps->clsid.Data1 && Data2 == caps->clsid.Data2 && + Data3 == caps->clsid.Data3 && !memcmp(caps->clsid.Data4, Data4, 8)) + break; + } + + proto_tree_add_text(entry, tvb, offset, 16, + "%s {%06x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + caps->description, Data1, Data2, + Data3, Data4[0], Data4[1], Data4[2], Data4[3], Data4[4], + Data4[5], Data4[6], Data4[7] + ); + + offset+=16; + } + return tvb_length(tvb); } @@ -1181,7 +1335,8 @@ proto_register_aim(void) &ett_aim_tlv, &ett_aim_buddyname, &ett_aim_userclass, - &ett_aim_messageblock + &ett_aim_messageblock, + &ett_aim_client_capabilities }; module_t *aim_module; |