SRV_RECVMSGTYPE2 Channel: 2 SNAC(4,7) This will describe the more common Type 2 message format which represents messages sent from newer clients. There are several different varients of the Type 2 message, only a real message is layed out here. Parameters Length/TLV Content (If Fixed) Designations Description 4 xx xx xx xx TIME Seems to be a time stamp in 1/1500 sec since 8am of that Sunday. ((time(NULL) - (8*60*60)) + DayOfWeek*60*60*24)) * 1500 2 xx xx RANDOM A seemingly random ID generated for each message. 4 00 00 00 02 MSGFORMAT This differentiates between messages from newer clients and older clients. This will be 0x00000002, Type 2, for new clients. 1 xx STRLEN The length of the following UIN in ASCII format. Varies xx .. UIN The sender's UIN in ASCII format. 2 xx xx WARNING A warning level? Usually 00 00. Seen: 2d eb from away auto-response. 2 xx xx COUNT A count of the number of following TLVs not including the Message TLV. The following TLVs have been seen but may not always be present. TLV(01) 00 01 00 02 00 50 UNKNOWN Unknown TLV(04) 00 04 00 02 00 00 UNKNOWN Unknown, Not present in File Request, File OK, or Auto Message Request messages. TLV(06) 00 06 00 04 xx xx xx xx STATUS The sender's online status. TLV(0F) 00 0F 00 04 xx xx xx xx TIME Seems to be a number of seconds since a recent event. TLV(02) 00 02 00 04 xx xx xx xx TIME The member since time(NULL). TLV(03) 00 03 00 04 xx xx xx xx TIME The online since time(NULL). TLV(05) 00 05 xx xx MESSAGE TLV(05) contains many seperate fields including the message itself, as follows: 2 xx xx ACKTYPE 0x0000 - This is a normal message 0x0001 - This is an Abort Request 0x0002 - This is a File Ack 4 xx xx xx xx TIME A copy of the very first time in this packet. 2 xx xx RANDOM A copy of the random message ID from the beginning of this packet. 2 00 00 UNKNOWN Unknown TLV(0B) 00 0B 00 02 00 01 UNKNOWN Only when the ACKTYPE is 0x0001 will this TLV be present and the last field in the packet. Otherwise: 16 xx .. xx CAPABILITY1 One of the capabilities sent in SNAC(2,4) CLI_SETUSERINFO: 09 46 13 49 4C 7F 11 D1 82 22 44 45 53 54 00 00 TLV(0A) 00 0A 00 02 xx xx ACKTYPE2 0x0001 - This is a normal message 0x0002 - File ACK or File OK TLV(05) 00 05 00 02 xx xx PORT Only present in File Request or File ACK packets, this contains the associated listening port with which to connect. TLV(03) 00 03 00 04 xx xx xx xx IP Only present in File Request or File ACK packets, this is the sender's LAN Internal IP. TLV(0F) 00 0F 00 00 UNKNOWN Unknown, always empty. TLV(2711) 27 11 xx xx MESSAGE This is yet another message TLV that adds yet another layer of complexity as follows: 1 1B MSGFLAG If this value is not present, this is not a message packet. Also, ICQ2001b does not send an ACK, SNAC(4,B), if this is not 0x1B. 2 xx xx TCPVER This is the version of the TCP protocol that the sending client uses. 1 00 UNKNOWN Unknown 16 xx .. xx INFO All 0x00 in normal messages. Seen in information requests: a0 e9 3f 37 4f e9 d3 11 bc d2 00 04 ac 96 dd 96 10 cf 40 d1 4f e9 d3 11 bc d2 00 04 ac 96 dd 96 1 00 UNKNOWN Unknown 2 00 03 UNKNOWN Unknown 4 00 00 00 xx UNKNOWN 0x00000000 on Normal messages or information requests, 0x00000004 on File Ok, File Request. 2 xx xx SEQ1 A sequence that starts at 0xffff. I'm not sure yet when this decrements, most likely on each message send. 2 xx xx UNKNOWN Unknown, seen 0x1200 and 0x0e00. 2 xx xx SEQ2 This is a copy of SEQ1. 12 00 .. 00 UNKNOWN Unknown, always 0x00. 1 xx MSGTYPE What type of message is this: 01 - Plain ol' message 02 - Chat request 03 - File request 04 - URL There may be more. 1 xx MSGFLAGS 00 - Normal message 80 - Multiple recipients 03 - Auto-reply message request 2 xx xx UNKNOWN Usually 0x0000, seen 0x2000. 2 xx xx PRIORITY Usually 0x0000, seen 0x0002 in information request messages. 2 xx xx MSGLEN This is the length of the message, including the ending 0x00 in little-endian byte order. Varies .. 00 MESSAGE This is the actual message text. In information request messages, this will simply be 0x00. 4 xx xx xx xx FOREGROUND Only present in actual real messages, this will be the text color of the message in RGB0 format. 4 xx xx xx xx BACKGROUND Only present in actual real messages, this will be the background color of the text box in RGB0 format. 4 xx xx xx xx GUIDLEN This is a little-endian string length of the following GUID. This is only present in real messages sent by the latest 2001b client build 3659. Varies .. GUID This GUID seems to indicate that the client is capable of handling Multibyte Wide Character Strings as messages. Only present in real messages sent by build 3659 2001b clients.