From Gregor Jasny:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 20 Nov 2008 07:02:34 +0000 (07:02 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 20 Nov 2008 07:02:34 +0000 (07:02 +0000)
I've extended the AIM dissector with the information available from http://dev.aol.com/aim/oscar .
I've verified most of the additions by sniffing my iChat (OSX 10.4) data traffic.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26813 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-aim-messaging.c
epan/dissectors/packet-aim.c
epan/dissectors/packet-aim.h

index 9c3cdff307af1738bea1f3c1e862f51cb6277ad5..cd43e7c4dc5176f861d3308d4c85e4b28e5870c3 100644 (file)
@@ -76,15 +76,57 @@ static const aim_tlv messaging_incoming_ch2_tlvs[] = {
   { 0, NULL, NULL },
 };
 
+#define RENDEZVOUS_TLV_CHANNEL                         0x0001
+#define RENDEZVOUS_TLV_IP_ADDR                         0x0002
 #define RENDEZVOUS_TLV_INT_IP                          0x0003
 #define RENDEZVOUS_TLV_EXT_IP                          0x0004
 #define RENDEZVOUS_TLV_EXT_PORT                                0x0005
+#define RENDEZVOUS_TLV_DOWNLOAD_URL                    0x0006
+#define RENDEZVOUS_TLV_VERIFIED_DOWNLOAD_URL           0x0008
+#define RENDEZVOUS_TLV_SEQ_NUM                         0x000A
+#define RENDEZVOUS_TLV_CANCEL_REASON                   0x000B
+#define RENDEZVOUS_TLV_INVITATION                      0x000C
+#define RENDEZVOUS_TLV_INVITE_MIME_CHARSET             0x000D
+#define RENDEZVOUS_TLV_INVITE_MIME_LANG                        0x000E
+#define RENDEZVOUS_TLV_REQ_HOST_CHECK                  0x000F
+#define RENDEZVOUS_TLV_REQ_USE_ARS                     0x0010
+#define RENDEZVOUS_TLV_REQ_SECURE                      0x0011
+#define RENDEZVOUS_TLV_MAX_PROTOCOL_VER                        0x0012
+#define RENDEZVOUS_TLV_MIN_PROTOCOL_VER                        0x0013
+#define RENDEZVOUS_TLV_COUNTER_REASON                  0x0014
+#define RENDEZVOUS_TLV_INVITE_MIME_TYPE                        0x0015
+#define RENDEZVOUS_TLV_IP_ADDR_XOR                     0x0016
+#define RENDEZVOUS_TLV_PORT_XOR                                0x0017
+#define RENDEZVOUS_TLV_ADDR_LIST                       0x0018
+#define RENDEZVOUS_TLV_SESSION_ID                      0x0019
+#define RENDEZVOUS_TLV_ROLLOVER_ID                     0x001A
 #define RENDEZVOUS_TLV_EXTENDED_DATA                   0x2711
 
 static const aim_tlv rendezvous_tlvs[] = {
+       { RENDEZVOUS_TLV_CHANNEL, "Rendezvous ICBM Channel", dissect_aim_tlv_value_uint16 },
+       { RENDEZVOUS_TLV_IP_ADDR, "Rendezvous IP", dissect_aim_tlv_value_ipv4 },
        { RENDEZVOUS_TLV_INT_IP, "Internal IP", dissect_aim_tlv_value_ipv4 },
        { RENDEZVOUS_TLV_EXT_IP, "External IP", dissect_aim_tlv_value_ipv4 },
        { RENDEZVOUS_TLV_EXT_PORT, "External Port", dissect_aim_tlv_value_uint16 },
+       { RENDEZVOUS_TLV_DOWNLOAD_URL, "Service Support Download URL", dissect_aim_tlv_value_string },
+       { RENDEZVOUS_TLV_VERIFIED_DOWNLOAD_URL, "Verified Service Support Download URL", dissect_aim_tlv_value_string },
+       { RENDEZVOUS_TLV_SEQ_NUM, "Sequence Number", dissect_aim_tlv_value_uint16 },
+       { RENDEZVOUS_TLV_CANCEL_REASON, "Cancel Reason", dissect_aim_tlv_value_uint16 },
+       { RENDEZVOUS_TLV_INVITATION, "Invitation Text", dissect_aim_tlv_value_string },
+       { RENDEZVOUS_TLV_INVITE_MIME_CHARSET, "Data MIME Type", dissect_aim_tlv_value_string },
+       { RENDEZVOUS_TLV_INVITE_MIME_LANG, "Data Language", dissect_aim_tlv_value_string },
+       { RENDEZVOUS_TLV_REQ_HOST_CHECK, "Request Host Check", NULL },
+       { RENDEZVOUS_TLV_REQ_USE_ARS, "Request Data via Rendezvous Server", NULL },
+       { RENDEZVOUS_TLV_REQ_SECURE, "Request SSL Connection", NULL },
+       { RENDEZVOUS_TLV_MAX_PROTOCOL_VER, "Maximum Protocol Version", dissect_aim_tlv_value_uint16 },
+       { RENDEZVOUS_TLV_MIN_PROTOCOL_VER, "Minimum Protocol Version", dissect_aim_tlv_value_uint16 },
+       { RENDEZVOUS_TLV_COUNTER_REASON, "Counter Proposal Reason", dissect_aim_tlv_value_uint16 },
+       { RENDEZVOUS_TLV_INVITE_MIME_TYPE, "Data MIME Type", dissect_aim_tlv_value_string },
+       { RENDEZVOUS_TLV_IP_ADDR_XOR, "XORed Rendezvous IP", dissect_aim_tlv_value_ipv4 },
+       { RENDEZVOUS_TLV_PORT_XOR, "XORed Port", dissect_aim_tlv_value_uint16 },
+       { RENDEZVOUS_TLV_ADDR_LIST, "Address/Port List", dissect_aim_tlv_value_string08_array },
+       { RENDEZVOUS_TLV_SESSION_ID, "Session ID", dissect_aim_tlv_value_string },
+       { RENDEZVOUS_TLV_ROLLOVER_ID, "Rollover ID", dissect_aim_tlv_value_string },
        { RENDEZVOUS_TLV_EXTENDED_DATA, "Extended Data", dissect_aim_tlv_value_extended_data },
        { 0, NULL, NULL },
 };
index 746a7b1952f1ae4cfb9a250c5f1903c4d3616bae..5a7d53bd6bfe6f7577aff5850fa963229924c34d 100644 (file)
@@ -445,6 +445,7 @@ 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;
+static gint ett_aim_string08_array = -1;
 
 /* desegmentation of AIM over TCP */
 static gboolean aim_desegment = TRUE;
@@ -932,14 +933,18 @@ static const aim_client_capability known_client_caps[] = {
            { 0x09461348, 0x4c7f, 0x11d1,
                   { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
        
-       { "iChat",
+       { "Short Caps",
         {0x09460000, 0x4c7f, 0x11d1, 
           { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
 
-       { "Security",
+       { "Secure IM",
         {0x09460001, 0x4c7f, 0x11d1, 
           { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
 
+       { "XHTML IM",
+        {0x09460002, 0x4c7f, 0x11d1, 
+          { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
+
        { "Video Chat",
         {0x09460100, 0x4c7f, 0x11d1, 
           { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
@@ -952,10 +957,30 @@ static const aim_client_capability known_client_caps[] = {
         {0x09460102, 0x4c7f, 0x11d1, 
           { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
 
+       { "Microphone",
+        {0x09460103, 0x4c7f, 0x11d1, 
+          { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
+
+       { "Live Audio",
+        {0x09460104, 0x4c7f, 0x11d1, 
+          { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
+
        { "iChatAV info",
         {0x09460105, 0x4c7f, 0x11d1, 
           { 0x82, 0x22, 0x44, 0x45, 0x45, 0x53, 0x54, 0x00}}},
 
+       { "Host Status Text Aware",
+        {0x0946010A, 0x4c7f, 0x11d1, 
+          { 0x82, 0x22, 0x44, 0x45, 0x45, 0x53, 0x54, 0x00}}},
+
+       { "Realtime IM",
+        {0x0946010B, 0x4c7f, 0x11d1, 
+          { 0x82, 0x22, 0x44, 0x45, 0x45, 0x53, 0x54, 0x00}}},
+
+       { "Smart Caps",
+        {0x094601FF, 0x4c7f, 0x11d1, 
+          { 0x82, 0x22, 0x44, 0x45, 0x45, 0x53, 0x54, 0x00}}},
+
        { "Hiptop",
         {0x09461323, 0x4c7f, 0x11d1, 
           { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
@@ -964,11 +989,15 @@ static const aim_client_capability known_client_caps[] = {
         {0x09461341, 0x4c7f, 0x11d1, 
                 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
 
+       { "File Transfer",
+        {0x09461343, 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",
+       { "Direct ICBM",
         {0x09461345, 0x4c7f, 0x11d1, 
                 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
 
@@ -980,6 +1009,10 @@ static const aim_client_capability known_client_caps[] = {
         {0x09461347, 0x4c7f, 0x11d1,
                 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
 
+       { "File Sharing",
+        {0x09461348, 0x4c7f, 0x11d1,
+                {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
+
        { "ICQ Server Relaying",
         {0x09461349, 0x4c7f, 0x11d1,
                 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
@@ -1024,22 +1057,6 @@ static const aim_client_capability known_client_caps[] = {
         {0xf2e7c7f4, 0xfead, 0x4dfb,
                 {0xb2, 0x35, 0x36, 0x79, 0x8b, 0xdf, 0x00, 0x00}}},
 
-       { "Unknown 1", 
-        {0x0946f004, 0x4c7f, 0x11d1, 
-                {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
-
-       { "Unknown 2", 
-        {0x0946f004, 0x4c7f, 0x11d1, 
-                {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
-
-       { "Unknown 3",
-        {0x09460103, 0x4c7f, 0x11d1,
-                {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
-
-       { "Unknown 4",
-        {0x0946f003, 0x4c7f, 0x11d1,
-                {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
-
        { NULL, {0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } }
 };
 
@@ -1168,6 +1185,24 @@ int dissect_aim_tlv_value_string (proto_item *ti, guint16 valueid _U_, tvbuff_t
    return string_len;
 }
 
+int dissect_aim_tlv_value_string08_array (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_)
+{
+  proto_tree *entry;
+  gint offset=0;
+
+  entry = proto_item_add_subtree(ti, ett_aim_string08_array);
+
+  while (tvb_length_remaining(tvb, offset) > 1)
+  {
+    guint8 string_len = tvb_get_guint8(tvb, offset++);
+    guint8 *buf = tvb_get_ephemeral_string(tvb, offset, string_len);
+    proto_tree_add_text(entry, tvb, offset, string_len, "%s", format_text(buf, string_len));
+    offset += string_len;
+  }
+
+  return offset;
+}
+
 int dissect_aim_tlv_value_bytes (proto_item *ti _U_, guint16 valueid _U_, tvbuff_t *tvb _U_, packet_info *pinfo _U_)
 {
    return tvb_length(tvb);
@@ -1536,7 +1571,8 @@ proto_register_aim(void)
          &ett_aim_buddyname,
          &ett_aim_userclass,
          &ett_aim_messageblock,
-         &ett_aim_client_capabilities
+         &ett_aim_client_capabilities,
+         &ett_aim_string08_array
   };
   module_t *aim_module;
 
index bf988bf1579bba55e37ef5e8fa0fd1a204c6d417..2872cad4934455b08a57527081745729ab23a099 100644 (file)
@@ -76,6 +76,7 @@ const aim_family *aim_get_family( guint16 family );
 const aim_subtype *aim_get_subtype( guint16 family, guint16 subtype);
 
 int dissect_aim_tlv_value_string(proto_item *ti, guint16, tvbuff_t *, packet_info *);
+int dissect_aim_tlv_value_string08_array(proto_item *ti, guint16, tvbuff_t *, packet_info *);
 int dissect_aim_tlv_value_uint8(proto_item *ti, guint16, tvbuff_t *, packet_info *);
 int dissect_aim_tlv_value_uint16(proto_item *ti, guint16, tvbuff_t *, packet_info *);
 int dissect_aim_tlv_value_uint32(proto_item *ti, guint16, tvbuff_t *, packet_info *);