[Class: ICBM__TAGS] Message data and parameters; it must contain either the IM or DATA tag
From Aleksandr Shutko: SNAC(04,06) ICBM__CHANNEL_MSG_TOHOST
Client use this snac to send message thru server. Within the ICBM
(Inter-Client Basic Message) types (family 4), a channel is defined.
Each channel represents a different kind of message.
Channel 1 is used for what would commonly be called an "instant message" (plain
text messages). Channel 2 is used for complex messages (rtf, utf8) and
negotiating "rendezvous". These transactions end in something more
complex happening, such as a chat invitation, or a file transfer.
Channel 3 is used for chat messages (not in the same family as
these channels). Channel 4 is used for various ICQ messages.
Examples are normal messages, URLs, and old-style
authorization.
This snac contain one fixed part (target uin, channel, msg-id cookie)
and channel-dependend tlv-chain.
First dword in msg-id cookies is actually the computer uptime in milliseconds
(ie GetTickCount(), at least this is what the ICQ Lite and the other official
clients I have tested uses).
Channel 4 message format (typed old-style messages)
Examples
Channel 1 Example
From Aleksandr Shutko: SNAC(04,06)/CH1 ICBM__CHANNEL_MSG_TOHOST/CH1
Client use this snac to send message thru server on channel 1.
All clients use this snac to send plain-text messages to an old
clients and to clients that doesn't support channel 2 messages. TLV(0x03)
and TLV(0x06) is optional.
00 04
word
SNAC family
00 06
word
SNAC subtype
00 00
word
SNAC flags
xx xx xx xx
dword
SNAC request-id
xx xx xx xx xx xx xx xx
qword
msg-id cookie
00 01
word
message channel
xx
byte
screenname string length
xx ..
string
screenname string
00 02
word
TLV.Type(0x02) - message data
xx xx
word
TLV.Length
05
byte
fragment identifier (array of required capabilities)
01
byte
fragment version
xx xx
word
Length of rest data
xx ...
array
byte array of required capabilities (1 - text)
01
byte
fragment identifier (text message)
01
byte
fragment version
xx xx
word
Length of rest data
00 00
word
Message charset number
ff ff
word
Message language number
xx ..
string (ascii)
Message text string
00 03
word
TLV.Type(0x03) - request an ack from server
00 00
word
TLV.Length
empty
00 06
word
TLV.Type(0x06) - store message if recipient offline
From Aleksandr Shutko: SNAC(04,06)/CH4 ICBM__CHANNEL_MSG_TOHOST/CH4
ICQ clients use this snac to send messages to an old/offline/invisible
clients if message type != 1 or message flags != 0 (for example plain-text
multi-recipient message to an offline client) but this doesn't mean that you
can't send usual plain-text message on channel 4. TLV(0x03) and TLV(0x06)
is optional.
When the host is unable to send one or more messages to the client, the host sends this SNAC to the client to let it know that it missed some messages ("calls").