KingAnt.net This space left blank intentionally. 
Oscar Protocol Documentation | Random Pidgin Files

Oscar Protocol Specification: Family 0x0004, Subtype 0x0007

unfinished

This is the probably the most complicated SNAC that exists. It's used for instant messages, setting up file transfer, direct IM requests, chat invitations, ICQ authorization, getting ICQ status messages, and probably many other things. At some point I got a little carried away with all these tables, so there's a chance some of this is out of order, or really wiggity wack.

The bulk of this was documented using Adam Fritzler's libfaim as a guide. Thanks.

Source: Server

LengthDescription
2 bytesFamily (0x0004)
2 bytesSubtype (0x0007)
2 bytesFlags
4 bytesSnac Request ID
8 bytesRandom message cookie
2 bytesChannel ID. Can be one of the following:
  • 0x0001 - Basic instant messages
  • 0x0002 - Rendevous (chat inviation, file transfer negotation, send icon, etc.)
  • 0x0004 - ICQ authorization
x bytesStandard user info block.
LengthDescription
1 byteLength L of the following
L bytesThe AIM screen name or ICQ number (in ASCII) of the person who sent this ICBM
2 bytesWarning level, as an unsigned short
2 bytesNumber of TLVs that are a part of this user info block
blehRead in the TLVs that follow. XXX - This will move elsewhere soon.
L bytesThe rest of the ICBM (the part containing the message) is made up of various TLVs. Here is a brief description of each TLV, with more details for each type below:
  • 0x0002 - Normal instant message
  • 0x0003 - Server ack requested
  • 0x0004 - Message is an auto response
  • 0x0005 - Buddy icon, rich text format message, file transfer request, ICQ get status message
  • 0x0006 - Message is an offline message
  • 0x0008 - I have a really purty icon
  • 0x0009 - Request a buddy icon from the other person
  • 0x0017 - Extra data, or something?
LengthDescription
2 bytesType 0x0002 - Message Block (channel 1)
2 bytesLength L of the following
L bytes
LengthDescription
2 bytesUnknown. 0x0501 (type?)
2 bytesLength L of the following
L bytesFeatures
2 bytesUnknown. 0x0101 (type?)
2 bytesLength L of the following
Length L bytes4 bytes of character set info, then the message


LengthDescription
2 bytesType 0x0003 - Server ack requested (channels 1 and 2)
2 bytesLength L of the following
L bytesDoes not exist, length is always 0.


LengthDescription
2 bytesType 0x0004 - Message is an auto response
2 bytesLength L of the following
L bytesDoes not exist, length is always 0.


LengthDescription
2 bytesType 0x0005 - All kinds of neat stuff (channels 2 and 4)
2 bytesLength L of the following
L bytes
If channel 2:
LengthDescription
2 bytesThe status of the connection. 0 is a request, 1 is a deny (?), 2 is an accept
8 bytesSame random message cookie from the beginning of the message
16 bytesStandard client capability block. XXX - This will be documented elsewhere soon.
x bytesThe rest of this is made up of various TLVs. Some of the TLVs are:
LengthDescription
2 bytesType 0x0002 - IP address from the persepective of the client
2 bytesLength L of the following
L bytesLength should be 4 bytes.


LengthDescription
2 bytesType 0x0003 - Secondary IP address from the persepective of the client
2 bytesLength L of the following
L bytesLength should be 4 bytes.


LengthDescription
2 bytesType 0x0004 - Verified IP address from the persepective of the AIM servers
2 bytesLength L of the following
L bytesLength should be 4 bytes.


LengthDescription
2 bytesType 0x0005 - Port number for something
2 bytesLength L of the following
L bytesLength should be 2 bytes.


LengthDescription
2 bytesType 0x000b - Error code
2 bytesLength L of the following
L bytesLength should be 2 bytes.


LengthDescription
2 bytesType 0x000c - Invitation message/chat description
2 bytesLength L of the following
L bytesString.


LengthDescription
2 bytesType 0x000d - Character set
2 bytesLength L of the following
L bytesString.


LengthDescription
2 bytesType 0x000e - Language
2 bytesLength L of the following
L bytesString.




Channel 4:
This is for ICQ, so it's in network byte order.
LengthDescription
4 bytesThe source UIN
2 bytesThe type of message flag.
  • 0x0004 - Send URL
  • 0x0006 - Authorization request
  • 0x0007 - Authorization denied
  • 0x0008 - Authorization granted
  • 0x0013 - Send Contacts
  • 0x001a - Request Contacts
2 bytesLength L of the following
L bytesThe reason for denying the authorization request. For authorization requests, the first 6 bytes of this are "0xfefe fefe 30fe"




LengthDescription
2 bytesType 0x0006 - Message is an offline message (channel 1)
2 bytesLength L of the following
L bytesDoes not exist, length is always 0.


LengthDescription
2 bytesType 0x0008 - Sender has a real purty icon (channel 1)
2 bytesLength L of the following
L bytesDoes not exist, length is always 0.


LengthDescription
2 bytesType 0x0009 - Sender requested buddy icon (channel 1)
2 bytesLength L of the following
L bytesDoes not exist, length is always 0.


LengthDescription
2 bytesType 0x0017 - Extra data?
2 bytesLength L of the following
L bytesUnknown


All material Copyright © 2000-2014, All Rights Reserved
Linux is a registered trademark of Linus Torvalds.
AIM is a registered trademark of America Online, Inc.
ICQ is a registered trademark of ICQ Inc.
All other trademarks are property of their respective owners.