Protocols/OSCAR/SNAC/ICBM CHANNEL MSG TO HOST: Difference between revisions

From NINA Wiki
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by the same user not shown)
Line 65: Line 65:
| ''[Class: [[Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_TAGS|ICBM__TAGS]]]'' Message data and parameters; it must contain either the IM or DATA tag
| ''[Class: [[Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_TAGS|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 ===
<table width=640 cellSpacing=0 cellPadding=0 border=0>
<tr>
<td>
<br>
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.<br><br>
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.<br><br>
This snac contain one fixed part (target uin, channel, msg-id cookie)
and <b>channel-dependend</b> tlv-chain.<br><br>
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).<br><br>
<table width=640 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td  bgcolor=#E9E9E9 >
<table width=100% cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td width=169>&nbsp;00 04</td>
<td width=5>&nbsp;</td>
<td>word</td>
<td width=5>&nbsp;</td>
<td width=55%>SNAC family</td>
</tr>
<tr>
<td>&nbsp;00 06</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>SNAC subtype</td>
</tr>
<tr>
<td>&nbsp;00 00</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>SNAC flags</td>
</tr>
<tr>
<td>&nbsp;xx xx xx xx</td>
<td>&nbsp;</td>
<td>dword</td>
<td>&nbsp;</td>
<td>SNAC request-id</td>
</tr>
</table>
</td></tr>
<tr><td bgcolor=#E9E9E9>
<table width=100% cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td width=20>&nbsp;</td>
<td width=147>&nbsp;xx xx xx xx<br>&nbsp;xx xx xx xx</td>
<td>&nbsp;</td>
<td valign=top>qword</td>
<td>&nbsp;</td>
<td width=55% valign=top>msg-id cookie</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;xx xx</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>message channel (see table below)</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;xx</td>
<td>&nbsp;</td>
<td>byte</td>
<td>&nbsp;</td>
<td>screenname string length</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;xx ..</td>
<td>&nbsp;</td>
<td>string</td>
<td>&nbsp;</td>
<td>screenname string</td>
</tr>
</table>
<!-- TLV 0xXX -->
<table width=630 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=20> </td>
<td>
<table width=600 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0><tr><td bgcolor=#f9f9f9>
  <table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=147>&nbsp;xx xx</td>
  <td width=5>&nbsp;</td>
  <td>word</td>
  <td width=5>&nbsp;</td>
  <td width=55%>TLV.Type(0xXX) - icbm info</td>
  </tr>
  <tr>
  <td>&nbsp;xx xx</td>
  <td>&nbsp;</td>
  <td>word</td>
  <td>&nbsp;</td>
  <td>TLV.Length</td>
  </tr>
  </table>
  </td></tr>
  <tr><td bgcolor=#f9f9f9>
  <table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=147>&nbsp;....</td>
  <td width=5>&nbsp;</td>
  <td width=17%>....</td>
  <td width=5>&nbsp;</td>
  <td width=55%>....</td>
  </tr>
  </table>
  </td></tr>
  </table>
</td></tr></table>
</td><td width=5> </td></tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
<table width=630 cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td width=147>&nbsp;</td>
<td width=23%>....</td>
<td width=17% valign=top>&nbsp;....</td>
<td valign=top>....</td>
</tr>
</table>
<!-- TLV 0xXX -->
<table width=630 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=20> </td>
<td>
<table width=600 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0><tr><td bgcolor=#f9f9f9>
  <table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=147>&nbsp;xx xx</td>
  <td width=5>&nbsp;</td>
  <td>word</td>
  <td width=5>&nbsp;</td>
  <td width=55%>TLV.Type(0xXX) - icbm info</td>
  </tr>
  <tr>
  <td>&nbsp;xx xx</td>
  <td>&nbsp;</td>
  <td>word</td>
  <td>&nbsp;</td>
  <td>TLV.Length</td>
  </tr>
  </table>
  </td></tr>
  <tr><td bgcolor=#f9f9f9>
  <table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=147>&nbsp;....</td>
  <td width=5>&nbsp;</td>
  <td>....</td>
  <td width=5>&nbsp;</td>
  <td width=55%>....</td>
  </tr>
  </table>
  </td></tr>
  </table>
</td></tr></table>
</td><td width=5> </td></tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
</td></tr></table>
</td></tr></table>
</td></tr></table>
<br>
<table width=640 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td bgcolor=white>
<table width=100% cellSpacing=1 cellPadding=1 align=center border=0>
<tr>
<td bgcolor=#f0f0f0 valign=top width=15%><b>&nbsp;<font size=2>[[Protocols/OSCAR/SNAC/ICBM_CHANNEL_MSG_TO_HOST#Channel_1_Example|Channel 1]]&nbsp;&nbsp;</b></font></td>
<td bgcolor=#f0f0f0 valign=top>&nbsp;Channel 1 message format (plain-text messages)</td>
</tr>
<tr>
<td bgcolor=#f0f0f0 valign=top><b>&nbsp;<font size=2>[[Protocols/OSCAR/SNAC/ICBM_CHANNEL_MSG_TO_HOST#Channel_2_Example|Channel 2]]&nbsp;&nbsp;</b></font></td>
<td bgcolor=#f0f0f0 valign=top>&nbsp;Channel 2 message format (rtf messages, rendezvous)</td>
</tr>
<tr>
<td bgcolor=#f0f0f0 valign=top><b>&nbsp;<font size=2>[[Protocols/OSCAR/SNAC/ICBM_CHANNEL_MSG_TO_HOST#Channel_4_Example|Channel 4]]&nbsp;&nbsp;</b></font></td>
<td bgcolor=#f0f0f0 valign=top>&nbsp;Channel 4 message format (typed old-style messages)</td>
</tr>
</table>
</td></tr></table>
</td></tr></table>
== Examples ==
=== Channel 1 Example ===
=== From Aleksandr Shutko: SNAC(04,06)/CH1 ICBM__CHANNEL_MSG_TOHOST/CH1 ===
<table width=640 cellSpacing=0 cellPadding=0 border=0>
<tr>
<td>
<br>
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.
<br><br>
<table width=640 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td  bgcolor=#E9E9E9 >
<table width=640 cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td width=169>&nbsp;00 04</td>
<td width=5>&nbsp;</td>
<td>word</td>
<td width=5>&nbsp;</td>
<td width=55%>SNAC family</td>
</tr>
<tr>
<td>&nbsp;00 06</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>SNAC subtype</td>
</tr>
<tr>
<td>&nbsp;00 00</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>SNAC flags</td>
</tr>
<tr>
<td>&nbsp;xx xx xx xx</td>
<td>&nbsp;</td>
<td>dword</td>
<td>&nbsp;</td>
<td>SNAC request-id</td>
</tr>
</table>
</td></tr>
<tr><td bgcolor=#E9E9E9>
<table width=640 cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td width=169>&nbsp;xx xx xx xx<br>&nbsp;xx xx xx xx</td>
<td valign=top>qword</td>
<td>&nbsp;</td>
<td width=55% valign=top>msg-id cookie</td>
</tr>
<tr>
<td>&nbsp;00 01</td>
<td>word</td>
<td>&nbsp;</td>
<td>message channel</td>
</tr>
<tr>
<td>&nbsp;xx</td>
<td>byte</td>
<td>&nbsp;</td>
<td>screenname string length</td>
</tr>
<tr>
<td>&nbsp;xx ..</td>
<td>string</td>
<td>&nbsp;</td>
<td>screenname string</td>
</tr>
</table>
<!-- TLV 0xXX -->
<table width=640 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=20> </td>
<td>
<table width=610 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=147>&nbsp;00 02</td>
  <td width=5>&nbsp;</td>
  <td>word</td>
  <td width=5>&nbsp;</td>
  <td width=55%>TLV.Type(0x02) - message data</td>
  </tr>
  <tr>
  <td>&nbsp;xx xx</td>
  <td>&nbsp;</td>
  <td>word</td>
  <td>&nbsp;</td>
  <td>TLV.Length</td>
  </tr>
  </table>
  </td></tr>
  <tr><td bgcolor=#f9f9f9>
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td colspan=5>
<table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=20> </td>
<td>
<table width=580 bgcolor=darkred cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0>
<tr><td bgcolor=#E9E9E9>
<table width=580 cellSpacing=0 cellPadding=0 align=center border=0 >
<tr>
<td width=125>&nbsp;05</td>
<td width=5>&nbsp;</td>
<td>byte</td>
<td width=5>&nbsp;</td>
<td width=55%>fragment identifier (array of required capabilities)</td>
</tr>
<tr>
<td>&nbsp;01</td>
<td>&nbsp;</td>
<td>byte</td>
<td>&nbsp;</td>
<td>fragment version</td>
</tr>
<tr>
<td>&nbsp;xx xx</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>Length of rest data</td>
</tr>
</table>
</td></tr>
<tr><td bgcolor=#E9E9E9>
<table width=580 cellSpacing=0 cellPadding=0 align=center border=0 >
<tr>
<td width=125>&nbsp;xx ...</td>
<td width=5>&nbsp;</td>
<td>array</td>
<td width=5>&nbsp;</td>
<td width=55%>byte array of required capabilities (1 - text)</td>
</tr>
</table>
</td></tr>
</table>
</td></tr></table>
</td><td width=5> </td>
</tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
<table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=20> </td>
<td>
<table width=580 bgcolor=darkred cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0><tr><td  bgcolor=#E9E9E9 >
<table width=580 cellSpacing=0 cellPadding=0 align=center border=0 >
<tr>
<td width=125>&nbsp;01</td>
<td width=5>&nbsp;</td>
<td>byte</td>
<td width=5>&nbsp;</td>
<td width=55%>fragment identifier (text message)</td>
</tr>
<tr>
<td>&nbsp;01</td>
<td>&nbsp;</td>
<td>byte</td>
<td>&nbsp;</td>
<td>fragment version</td>
</tr>
<tr>
<td>&nbsp;xx xx</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>Length of rest data</td>
</tr>
</table>
</td></tr>
<tr><td bgcolor=#E9E9E9>
<table width=580 cellSpacing=0 cellPadding=0 align=center border=0 >
<tr>
<td width=125>&nbsp;00 00</td>
<td width=5>&nbsp;</td>
<td>word</td>
<td width=5>&nbsp;</td>
<td width=55%>Message charset number</td>
</tr>
<tr>
<td>&nbsp;ff ff</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td >Message language number</td>
</tr>
<tr>
<td>&nbsp;xx ..</td>
<td>&nbsp;</td>
<td>string (ascii)</td>
<td>&nbsp;</td>
<td>Message text string</td>
</tr>
</table>
</td></tr>
</table>
</td></tr></table>
</td><td width=5> </td>
</tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
  </td>
  </tr>
  </table>
  </td></tr>
  </table>
</td></tr></table>
</td><td width=5> </td></tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
<!-- TLV 0x03 -->
<table width=640 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=20> </td>
<td>
<table width=610 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=147>&nbsp;00 03</td>
  <td width=5>&nbsp;</td>
  <td>word</td>
  <td width=5>&nbsp;</td>
  <td width=55%>TLV.Type(0x03) - request an ack from server</td>
  </tr>
  <tr>
  <td>&nbsp;00 00</td>
  <td>&nbsp;</td>
  <td>word</td>
  <td>&nbsp;</td>
  <td>TLV.Length</td>
  </tr>
  </table>
  </td></tr>
  <tr><td bgcolor=#f9f9f9>
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td colspan=5>&nbsp;empty</td>
  </tr>
  </table>
  </td></tr>
  </table>
</td></tr></table>
</td><td width=5> </td></tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
<!-- TLV 0x06 -->
<table width=640 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=20> </td>
<td>
<table width=610 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=147>&nbsp;00 06</td>
  <td width=5>&nbsp;</td>
  <td>word</td>
  <td width=5>&nbsp;</td>
  <td width=55%>TLV.Type(0x06) - store message if recipient offline</td>
  </tr>
  <tr>
  <td>&nbsp;00 00</td>
  <td>&nbsp;</td>
  <td>word</td>
  <td>&nbsp;</td>
  <td>TLV.Length</td>
  </tr>
  </table>
  </td></tr>
  <tr><td bgcolor=#f9f9f9>
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td colspan=5>&nbsp;empty</td>
  </tr>
  </table>
  </td></tr>
  </table>
</td></tr></table>
</td><td width=5> </td></tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
</td></tr></table>
</td></tr></table>
</td></tr></table>
<br>Example SNAC dumps with flap header:
<table width=640 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr>
<td bgcolor=#E9E9E9>
<font size=3><pre style="font-size: 13px">
  2a 02 23 6c 00 47 00 04  00 06 00 00 00 01 00 06  *.#l.G..........
  67 c3 15 01 3d 3a 00 00  00 01 07 31 30 30 30 30  g...=:.....10000
  30 30 00 02 00 23 05 01  00 01 01 01 01 00 1a 00  00...#..........
  00 ff ff 74 65 73 74 20  63 68 61 6e 6e 65 6c 20  ...test channel
  31 20 6d 65 73 73 61 67  65 00 06 00 00          1 message....
</pre></font>
</td></tr></table>
</td></tr></table>
=== Channel 2 Example ===
=== From Aleksandr Shutko: SNAC(04,06)/CH2 ICBM__CHANNEL_MSG_TOHOST/CH2 ===
<table width=640 cellSpacing=0 cellPadding=0 border=0>
<tr>
<td>
<br>Client use this snac to send message thru server on channel 2.<br><br>
<table width=640 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td  bgcolor=#E9E9E9 >
<table width=640 cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td width=169>&nbsp;00 04</td>
<td width=5>&nbsp;</td>
<td>word</td>
<td width=5>&nbsp;</td>
<td width=55%>SNAC family</td>
</tr>
<tr>
<td>&nbsp;00 06</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>SNAC subtype</td>
</tr>
<tr>
<td>&nbsp;00 00</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>SNAC flags</td>
</tr>
<tr>
<td>&nbsp;xx xx xx xx</td>
<td>&nbsp;</td>
<td>dword</td>
<td>&nbsp;</td>
<td>SNAC request-id</td>
</tr>
</table>
</td></tr>
<tr><td bgcolor=#E9E9E9>
<table width=640 cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td width=169>&nbsp;xx xx xx xx<br>&nbsp;xx xx xx xx</td>
<td valign=top>qword</td>
<td>&nbsp;</td>
<td width=55% valign=top>msg-id cookie</td>
</tr>
<tr>
<td>&nbsp;00 02</td>
<td>word</td>
<td>&nbsp;</td>
<td>message channel</td>
</tr>
<tr>
<td>&nbsp;xx</td>
<td>byte</td>
<td>&nbsp;</td>
<td>screenname string length</td>
</tr>
<tr>
<td>&nbsp;xx ..</td>
<td>string</td>
<td>&nbsp;</td>
<td>screenname string</td>
</tr>
</table>
<!-- TLV 0x05 -->
<table width=640 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=20> </td>
<td>
<table width=610 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0>
  <tr><td  bgcolor=#f9f9f9 >
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=147>&nbsp;00 05</td>
  <td width=5>&nbsp;</td>
  <td>word</td>
  <td width=5>&nbsp;</td>
  <td width=55%>TLV.Type(0x05) - rendezvous message data</td>
  </tr>
  <tr>
  <td>&nbsp;xx xx</td>
  <td>&nbsp;</td>
  <td>word</td>
  <td>&nbsp;</td>
  <td>TLV.Length</td>
  </tr>
  </table>
  </td></tr>
  <tr><td bgcolor=#f9f9f9>
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=147>&nbsp;xx xx</td>
  <td width=5>&nbsp;</td>
  <td>word</td>
  <td width=5>&nbsp;</td>
  <td width=55%>message type (0 - request, 1 - cancel, 2 - accept)</td>
  </tr>
  <tr>
  <td>&nbsp;xx xx xx xx<br>&nbsp;xx xx xx xx</td>
  <td>&nbsp;</td>
  <td valign=top>qword</td>
  <td>&nbsp;</td>
  <td valign=top>msg-id cookie (same as above)</td>
  </tr>
  <tr valign=top>
  <td>&nbsp;xx .. xx</td>
  <td>&nbsp;</td>
  <td>guid</td>
  <td>&nbsp;</td>
  <td>[[Protocols/OSCAR/UUIDs|capability]] (determines format
    of message data in "extention data" below)</td>
  </tr>
  </table>
  </td></tr>
  <tr><td bgcolor=#f9f9f9>
  <!-- TLV 0x03 -->
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr><td height=8 colspan=3></td></tr>
  <tr><td width=20> </td>
  <td>
    <table width=580 bgcolor=darkred cellSpacing=0 cellPadding=0 border=0><tr><td>
    <table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr>
    <td width=147>&nbsp;00 03</td>
    <td width=5>&nbsp;</td>
    <td>word</td>
    <td width=5>&nbsp;</td>
    <td width=55%>TLV.Type(0x03) - internal ip</td>
    </tr>
    <tr>
    <td>&nbsp;xx xx</td>
    <td>&nbsp;</td>
    <td>word</td>
    <td>&nbsp;</td>
    <td>TLV.Length</td>
    </tr>
    </table>
    </td></tr>
    <tr><td bgcolor=#f9f9f9>
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr>
    <td width=147>&nbsp;xx xx xx xx</td>
    <td width=5>&nbsp;</td>
    <td>dword</td>
    <td width=5>&nbsp;</td>
    <td width=55%>internal ip</td>
    </tr>
    </table>
    </td></tr>
    </table>
    </td></tr></table>
  </td><td width=5> </td></tr>
  <tr><td height=5 colspan=3> </td></tr>
  </table>
  <!-- TLV 0x05 -->
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr><td height=8 colspan=3></td></tr>
  <tr><td width=20> </td>
  <td>
    <table width=580 bgcolor=darkred cellSpacing=0 cellPadding=0 border=0><tr><td>
    <table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr>
    <td width=147>&nbsp;00 05</td>
    <td width=5>&nbsp;</td>
    <td>word</td>
    <td width=5>&nbsp;</td>
    <td width=55%>TLV.Type(0x05) - listening port</td>
    </tr>
    <tr>
    <td>&nbsp;xx xx</td>
    <td>&nbsp;</td>
    <td>word</td>
    <td>&nbsp;</td>
    <td>TLV.Length</td>
    </tr>
    </table>
    </td></tr>
    <tr><td bgcolor=#f9f9f9>
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr>
    <td width=147>&nbsp;xx xx</td>
    <td width=5>&nbsp;</td>
    <td>word</td>
    <td width=5>&nbsp;</td>
    <td width=55%>listening port</td>
    </tr>
    </table>
    </td></tr>
    </table>
    </td></tr></table>
  </td><td width=5> </td></tr>
  <tr><td height=5 colspan=3> </td></tr>
  </table>
  <!-- TLV 0x0A -->
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr><td height=8 colspan=3></td></tr>
  <tr><td width=20> </td>
  <td>
    <table width=580 bgcolor=darkred cellSpacing=0 cellPadding=0 border=0><tr><td>
    <table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr>
    <td width=147>&nbsp;00 0A</td>
    <td width=5>&nbsp;</td>
    <td>word</td>
    <td width=5>&nbsp;</td>
    <td width=55%>TLV.Type(0x0A) - unknown</td>
    </tr>
    <tr>
    <td>&nbsp;xx xx</td>
    <td>&nbsp;</td>
    <td>word</td>
    <td>&nbsp;</td>
    <td>TLV.Length</td>
    </tr>
    </table>
    </td></tr>
    <tr><td bgcolor=#f9f9f9>
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr>
    <td width=147>&nbsp;xx xx</td>
    <td width=5>&nbsp;</td>
    <td>word</td>
    <td width=5>&nbsp;</td>
    <td width=55%>unknown (usually 1)</td>
    </tr>
    </table>
    </td></tr>
    </table>
    </td></tr></table>
  </td><td width=5> </td></tr>
  <tr><td height=5 colspan=3> </td></tr>
  </table>
  <!-- TLV 0x0B -->
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr><td height=8 colspan=3></td></tr>
  <tr><td width=20> </td>
  <td>
    <table width=580 bgcolor=darkred cellSpacing=0 cellPadding=0 border=0><tr><td>
    <table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr>
    <td width=147>&nbsp;00 0B</td>
    <td width=5>&nbsp;</td>
    <td>word</td>
    <td width=5>&nbsp;</td>
    <td width=55%>TLV.Type(0x0B) - unknown</td>
    </tr>
    <tr>
    <td>&nbsp;xx xx</td>
    <td>&nbsp;</td>
    <td>word</td>
    <td>&nbsp;</td>
    <td>TLV.Length</td>
    </tr>
    </table>
    </td></tr>
    <tr><td bgcolor=#f9f9f9>
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr>
    <td width=147>&nbsp;xx xx</td>
    <td width=5>&nbsp;</td>
    <td>word</td>
    <td width=5>&nbsp;</td>
    <td width=55%>unknown</td>
    </tr>
    </table>
    </td></tr>
    </table>
    </td></tr></table>
  </td><td width=5> </td></tr>
  <tr><td height=5 colspan=3> </td></tr>
  </table>
  <!-- TLV 0x0F -->
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr><td height=8 colspan=3></td></tr>
  <tr><td width=20> </td>
  <td>
    <table width=580 bgcolor=darkred cellSpacing=0 cellPadding=0 border=0><tr><td>
    <table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr>
    <td width=147>&nbsp;00 0F</td>
    <td width=5>&nbsp;</td>
    <td>word</td>
    <td width=5>&nbsp;</td>
    <td width=55%>TLV.Type(0x0F) - unknown</td>
    </tr>
    <tr>
    <td>&nbsp;00 00</td>
    <td>&nbsp;</td>
    <td>word</td>
    <td>&nbsp;</td>
    <td>TLV.Length</td>
    </tr>
    </table>
    </td></tr>
    <tr><td bgcolor=#f9f9f9>
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr>
    <td colspan=5>&nbsp;empty</td>
    </tr>
    </table>
    </td></tr>
    </table>
    </td></tr></table>
  </td><td width=5> </td></tr>
  <tr><td height=5 colspan=3> </td></tr>
  </table>
  <!-- TLV 0x2711 -->
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr><td height=8 colspan=3></td></tr>
  <tr><td width=20> </td>
  <td>
    <table width=580 bgcolor=darkred cellSpacing=0 cellPadding=0 border=0><tr><td>
    <table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr>
    <td width=147>&nbsp;11 27</td>
    <td width=5>&nbsp;</td>
    <td>word</td>
    <td width=5>&nbsp;</td>
    <td width=55%>TLV.Type(0x2711) - extention data</td>
    </tr>
    <tr>
    <td>&nbsp;xx xx</td>
    <td>&nbsp;</td>
    <td>word</td>
    <td>&nbsp;</td>
    <td>TLV.Length</td>
    </tr>
    </table>
    </td></tr>
    <tr><td bgcolor=#c9c9e9>&nbsp;Following contents is capability-specific.</td></tr>
    <tr><td bgcolor=#f9f9f9>
    <table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
    <tr><td height=8 colspan=3></td></tr>
    <tr><td width=20></td>
    <td>
      <table width=550 bgcolor=darkred cellSpacing=0 cellPadding=0 border=0><tr><td>
      <table width=100% cellSpacing=2 cellPadding=0 align=center border=0>
      <tr><td bgcolor=#c9c9e9 style="font-size: 13px;">&nbsp;
        Data format description for capability <b><font face="Courier New">
        {09461349-4C7F-11D1-8222-444553540000}</font></b>
      </td></tr>
      <tr><td bgcolor=#f9f9f9>
      <table width=550 cellSpacing=0 cellPadding=0 align=center border=0>
      <tr>
      <td>&nbsp;xx xx</td>
      <td>&nbsp;</td>
      <td>word (LE)</td>
      <td>&nbsp;</td>
      <td>length of following data</td>
      </tr>
      <tr>
      <td width=147>&nbsp;xx xx</td>
      <td width=5>&nbsp;</td>
      <td>word (LE)</td>
      <td width=5>&nbsp;</td>
      <td width=55%>protocol version</td>
      </tr>
      <tr>
      <td>&nbsp;xx .. xx</td>
      <td>&nbsp;</td>
      <td>guid (LE)</td>
      <td>&nbsp;</td>
      <td>[[Protocols/OSCAR/UUIDs#ICQ_Message_Extensions|plugin]] or zero bytes</td>
      </tr>
      <tr>
      <td>&nbsp;xx xx</td>
      <td>&nbsp;</td>
      <td>word</td>
      <td>&nbsp;</td>
      <td>unknown</td>
      </tr>
      <tr>
      <td>&nbsp;xx xx xx xx</td>
      <td>&nbsp;</td>
      <td>dword (LE)</td>
      <td>&nbsp;</td>
      <td>client capabilities flags</td>
      </tr>
      <tr>
      <td>&nbsp;xx</td>
      <td>&nbsp;</td>
      <td>byte</td>
      <td>&nbsp;</td>
      <td>unknown</td>
      </tr>
      <tr>
      <td>&nbsp;xx xx</td>
      <td>&nbsp;</td>
      <td>word (LE)</td>
      <td>&nbsp;</td>
      <td>seems to be a downcounter</td>
      </tr>
      </table>
      </td></tr>
      <tr><td bgcolor=#f9f9f9>
      <table width=550 cellSpacing=0 cellPadding=0 align=center border=0>
      <tr>
      <td width=147>&nbsp;xx xx</td>
      <td width=5>&nbsp;</td>
      <td>word (LE)</td>
      <td width=5>&nbsp;</td>
      <td width=55%>length of following data</td>
      </tr>
      <tr>
      <td>&nbsp;xx xx</td>
      <td>&nbsp;</td>
      <td>word (LE)</td>
      <td>&nbsp;</td>
      <td>seems to be a downcounter as in first chunk above</td>
      </tr>
      <tr>
      <td>&nbsp;xx ..</td>
      <td>&nbsp;</td>
      <td></td>
      <td>&nbsp;</td>
      <td>unknown, usually zeros</td>
      </tr>
      </table>
      </td></tr>
      <tr><td bgcolor=#f9f9f9>
      <table width=550 cellSpacing=0 cellPadding=2 align=center border=0>
      <tr>
      <td>if plugin field in first chunk above is zero, here is
        [[Protocols/OSCAR/Messages#Message|message]], overwise here is
        plugin-specific data.
      </td></tr></table>
      </td></tr></table>
      </td></tr></table>
    </td><td width=5> </td></tr>
    <tr><td height=5 colspan=3> </td></tr>
    </table>
    </td></tr></table>
    </td></tr></table>
  </td><td width=5> </td></tr>
  <tr><td height=5 colspan=3> </td></tr>
  </table>
  </td></tr></table>
  </td></tr></table>
</td><td width=5> </td></tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
<!-- TLV 0x03 -->
<table width=640 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=20> </td>
<td>
<table width=610 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=147>&nbsp;00 03</td>
  <td width=5>&nbsp;</td>
  <td>word</td>
  <td width=5>&nbsp;</td>
  <td width=55%>TLV.Type(0x03) - request an ack from server</td>
  </tr>
  <tr>
  <td>&nbsp;00 00</td>
  <td>&nbsp;</td>
  <td>word</td>
  <td>&nbsp;</td>
  <td>TLV.Length</td>
  </tr>
  </table>
  </td></tr>
  <tr><td bgcolor=#f9f9f9>
  <table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td colspan=5>&nbsp;empty</td>
  </tr>
  </table>
  </td></tr>
  </table>
</td></tr></table>
</td><td width=5> </td></tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
</td></tr></table>
</td></tr></table>
</td></tr></table>
<br>Example SNAC dumps with flap header:
<table width=640 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr>
<td bgcolor=#E9E9E9>
<font size=3><pre style="font-size: 13px">
  2A 02 36 87 00 99 00 04 00 06 00 00 00 0F 00 06  *.6???.???..........
  CC EB 54 00 F7 07 00 00 00 02 09 31 32 33 34 35  ??????T.???......12345
  36 37 38 39 00 05 00 73 00 00 CC EB 54 00 F7 07  6789...s..??????T.???.
  00 00 09 46 13 49 4C 7F 11 D1 82 22 44 45 53 54  ...F.IL.T???"DEST
  00 00 00 0A 00 02 00 01 00 0F 00 00 27 11 00 4B  ............'..K
  1B 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  00 00 00 00 00 00 03 00 00 00 00 FB FF 0E 00 FB  ...........v???..v
  FF 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00  ???...............
  00 21 00 0E 00 54 65 73 74 20 6D 65 73 73 61 67  .!...Test messag
  65 2E 00 00 00 00 00 FF FF FF 00 00 03 00 00    e......?????????.....
</pre></font>
</td></tr></table>
</td></tr></table>
=== Channel 4 Example ===
=== From Aleksandr Shutko: SNAC(04,06)/CH4 ICBM__CHANNEL_MSG_TOHOST/CH4 ===
<table width=640 cellSpacing=0 cellPadding=0 border=0>
<tr>
<td>
<br>
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.
<br><br>
<table width=640 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td bgcolor=#E9E9E9>
<table width=100% cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td width=169>&nbsp;00 04</td>
<td width=5>&nbsp;</td>
<td>word</td>
<td width=5>&nbsp;</td>
<td width=55%>SNAC family</td>
</tr>
<tr>
<td>&nbsp;00 06</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>SNAC subtype</td>
</tr>
<tr>
<td>&nbsp;00 00</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>SNAC flags</td>
</tr>
<tr>
<td>&nbsp;xx xx xx xx</td>
<td>&nbsp;</td>
<td>dword</td>
<td>&nbsp;</td>
<td>SNAC request-id</td>
</tr>
</table>
</td></tr>
<tr><td bgcolor=#E9E9E9>
<table width=100% cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td width=169>&nbsp;xx xx xx xx<br>&nbsp;xx xx xx xx</td>
<td width=5>&nbsp;</td>
<td valign=top>qword</td>
<td width=5>&nbsp;</td>
<td width=55% valign=top>msg-id cookie</td>
</tr>
<tr>
<td>&nbsp;00 04</td>
<td>&nbsp;</td>
<td>word</td>
<td>&nbsp;</td>
<td>message channel</td>
</tr>
<tr>
<td>&nbsp;xx</td>
<td>&nbsp;</td>
<td>byte</td>
<td>&nbsp;</td>
<td>screenname string length</td>
</tr>
<tr>
<td>&nbsp;xx ..</td>
<td>&nbsp;</td>
<td>string</td>
<td>&nbsp;</td>
<td>screenname string</td>
</tr>
</table>
<!-- TLV 0x05 -->
<table width=630 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=20> </td>
<td>
<table width=600 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
  <table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=25%>&nbsp;00 05</td>
  <td width=5>&nbsp;</td>
  <td width=17%>word</td>
  <td width=5>&nbsp;</td>
  <td width=60%>TLV.Type(0x05) - message data</td>
  </tr>
  <tr>
  <td>&nbsp;xx xx</td>
  <td>&nbsp;</td>
  <td>word</td>
  <td>&nbsp;</td>
  <td>TLV.Length</td>
  </tr>
  </table>
  </td></tr>
  <tr><td bgcolor=#f9f9f9>
  <table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=25%>&nbsp;xx xx xx xx</td>
  <td width=5>&nbsp;</td>
  <td width=17%>dword (LE)</td>
  <td width=5>&nbsp;</td>
  <td width=60%>Sender uin</td>
  </tr>
  <tr>
  <td>&nbsp;xx</td>
  <td>&nbsp;</td>
  <td>byte</td>
  <td>&nbsp;</td>
  <td>[[Protocols/OSCAR/Messages#Message_Types|Message type]]</td>
  </tr>
  <tr>
  <td>&nbsp;xx</td>
  <td>&nbsp;</td>
  <td>byte</td>
  <td>&nbsp;</td>
  <td>[[Protocols/OSCAR/Messages#Message_Flags|Message flags]]</td>
  </tr>
  <tr>
  <td>&nbsp;xx xx</td>
  <td>&nbsp;</td>
  <td>word (LE)</td>
  <td>&nbsp;</td>
  <td>Message string length</td>
  </tr>
  <tr>
  <td>&nbsp;xx .. 00</td>
  <td>&nbsp;</td>
  <td>string (asciiz)</td>
  <td>&nbsp;</td>
  <td>Message string</td>
  </tr>
  </table>
  </td></tr>
  </table>
</td></tr></table>
</td><td width=5> </td></tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
<!-- TLV 0xXX -->
<table width=630 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=20> </td>
<td>
<table width=600 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
  <table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=25%>&nbsp;00 03</td>
  <td width=5>&nbsp;</td>
  <td width=17%>word</td>
  <td width=5>&nbsp;</td>
  <td width=60%>TLV.Type(0x03) - request an ack from server</td>
  </tr>
  <tr>
  <td>&nbsp;00 00</td>
  <td width=5>&nbsp;</td>
  <td>word</td>
  <td width=5>&nbsp;</td>
  <td>TLV.Length</td>
  </tr>
  </table>
  </td></tr>
  <tr><td bgcolor=#f9f9f9>
  <table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td colspan=5>&nbsp;empty</td>
  </tr>
  </table>
  </td></tr>
  </table>
</td></tr></table>
</td><td width=5> </td></tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
<!-- TLV 0x06 -->
<table width=640 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=30> </td>
<td>
<table width=600 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0>  <tr><td  bgcolor=#f9f9f9 >
  <table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td width=25%>&nbsp;00 06</td>
  <td width=5>&nbsp;</td>
  <td width=17%>word</td>
  <td width=5>&nbsp;</td>
  <td width=60%>TLV.Type(0x06) - store message if recipient offline</td>
  </tr>
  <tr>
  <td>&nbsp;00 00</td>
  <td width=5>&nbsp;</td>
  <td>word</td>
  <td width=5>&nbsp;</td>
  <td>TLV.Length</td>
  </tr>
  </table>
  </td></tr>
  <tr><td bgcolor=#f9f9f9>
  <table width=600 cellSpacing=0 cellPadding=0 align=center border=0>
  <tr>
  <td colspan=5>&nbsp;empty</td>
  </tr>
  </table>
  </td></tr>
  </table>
</td></tr></table>
</td><td width=5> </td></tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
</td></tr></table>
</td></tr></table>
</td></tr></table>
<br>Example SNAC dumps with flap header:
<table width=640 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr>
<td bgcolor=#E9E9E9>
<font size=3><pre style="font-size: 13px">
  2a 02 56 1e 00 6f 00 04-00 06 00 00 00 0b 00 06  *.V..o..........
  4e b5 6c 01 33 28 00 00-00 04 07 31 30 30 30 30  N.l.3(.....10000
  30 30 00 05 00 4b 8f e4-5e 00 04 00 43 00 54 68  00...K..^...C.Th
  69 73 20 69 73 20 74 68-65 20 74 65 73 74 20 75  is is the test u
  72 6c 20 6d 65 73 73 61-67 65 20 74 6f 20 61 6e  rl message to an
  20 6f 6c 64 20 63 6c 69-65 6e 74 fe 68 74 74 70    old client.http
  3a 2f 2f 68 74 74 70 2e-74 65 73 74 2e 75 72 6c  ://http.test.url
  00 00 06 00 00                                    .....
</pre></font>
</td></tr></table>
</td></tr></table>


=== ICBM SNACs ===
=== ICBM SNACs ===
{{Protocols/OSCAR/Foodgroups/ICBM/SNACs/Simple}}
{{Protocols/OSCAR/Foodgroups/ICBM/SNACs/Simple}}


[[Category:With_Contrib]]
[[Category:Stub]]
[[Category:Stub]]
[[Category:AOL]]
[[Category:AOL]]

Latest revision as of 11:46, 14 February 2021

OSCAR Protocol
IntroductionTermsClients
Basic
DatatypesFLAPSNACTLV
UUIDsErrorsTool IDs
Host Interaction
Rate LimitsMigrationMessages
Other Services
ADMINADVERTALERT
BARTBOSBUCPCHAT
CHAT_NAV
Tutorials
Sign OnBARTRendezvous
ICBMLocateBuddies
Foodgroups
OSERVICE (0x0001)
LOCATE (0x0002)
BUDDY (0x0003)
ICBM (0x0004)
ADVERT (0x0005)
INVITE (0x0006)
ADMIN (0x0007)
POPUP (0x0008)
PD (0x0009)
USER_LOOKUP (0x000A)
STATS (0x000B)
TRANSLATE (0x000C)
CHAT_NAV (0x000D)
CHAT (0x000E)
ODIR (0x000F)
BART (0x0010)
FEEDBAG (0x0013)
ICQ (0x0015)
BUCP (0x0017)
ALERT (0x0018)
PLUGIN (0x0022)
UNNAMED_FG_24 (0x0024)
MDIR (0x0025)
ARS (0x044A)
ID Origin Name Foodgroup Service Status Version
0x0004, 0x0006 Client ICBM__CHANNEL_MSG_TOHOST Unspecified BOS Active 1.25

This is the basic inter-client message after which the group was named (Inter-Client Basic Messages).

SNAC Header

Foodgroup uint16 (word) 00 04
Subgroup uint16 (word) 00 06
Flags uint16 (word) 00 00
Request ID uint32 (dword) 00 00 00 00

SNAC Data

Length Description
8 bytes Random message cookie
2 bytes

Channel ID. Can be one of the following:

  • 0x0001 - Basic instant messages
  • 0x0002 - Rendevous (chat inviation, file transfer negotation, send icon, etc.)
1 byte Length L of the following
L bytes The destination AIM screen name or ICQ number (in ASCII) of this ICBM
X bytes TLVs


Once at the server, the SNAC is reformatted into a ICBM__CHANNEL_MSG_TOCLIENT before it is sent to the destination user.

Name Type Notes
cookie ICBM Cookie Opaque data generated by conversation initiator and used to link up the conversation and errors
channel uint16 (word) [Class: ICBM__CHANNELS] Channel the message is on
dest username string08 Destination username, who should receive the message
icbmTlvs Rest of SNAC array of TLV [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).


 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
   xx xx   word   message channel (see table below)
   xx   byte   screenname string length
   xx ..   string   screenname string
 xx xx   word   TLV.Type(0xXX) - icbm info
 xx xx   word   TLV.Length
 ....   ....   ....
  ....  .... ....
 xx xx   word   TLV.Type(0xXX) - icbm info
 xx xx   word   TLV.Length
 ....   ....   ....


 Channel 1    Channel 1 message format (plain-text messages)
 Channel 2    Channel 2 message format (rtf messages, rendezvous)
 Channel 4    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
 00 00   word   TLV.Length
 empty



Example SNAC dumps with flap header:


  2a 02 23 6c 00 47 00 04  00 06 00 00 00 01 00 06  *.#l.G..........
  67 c3 15 01 3d 3a 00 00  00 01 07 31 30 30 30 30  g...=:.....10000
  30 30 00 02 00 23 05 01  00 01 01 01 01 00 1a 00  00...#..........
  00 ff ff 74 65 73 74 20  63 68 61 6e 6e 65 6c 20  ...test channel
  31 20 6d 65 73 73 61 67  65 00 06 00 00           1 message....


Channel 2 Example

From Aleksandr Shutko: SNAC(04,06)/CH2 ICBM__CHANNEL_MSG_TOHOST/CH2


Client use this snac to send message thru server on channel 2.

 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 02 word   message channel
 xx byte   screenname string length
 xx .. string   screenname string
 00 05   word   TLV.Type(0x05) - rendezvous message data
 xx xx   word   TLV.Length
 xx xx   word   message type (0 - request, 1 - cancel, 2 - accept)
 xx xx xx xx
 xx xx xx xx
  qword   msg-id cookie (same as above)
 xx .. xx   guid   capability (determines format of message data in "extention data" below)
 00 03   word   TLV.Type(0x03) - internal ip
 xx xx   word   TLV.Length
 xx xx xx xx   dword   internal ip
 00 05   word   TLV.Type(0x05) - listening port
 xx xx   word   TLV.Length
 xx xx   word   listening port
 00 0A   word   TLV.Type(0x0A) - unknown
 xx xx   word   TLV.Length
 xx xx   word   unknown (usually 1)
 00 0B   word   TLV.Type(0x0B) - unknown
 xx xx   word   TLV.Length
 xx xx   word   unknown
 00 0F   word   TLV.Type(0x0F) - unknown
 00 00   word   TLV.Length
 empty
 11 27   word   TLV.Type(0x2711) - extention data
 xx xx   word   TLV.Length
 Following contents is capability-specific.
 
       Data format description for capability 
        {09461349-4C7F-11D1-8222-444553540000}
 xx xx   word (LE)   length of following data
 xx xx   word (LE)   protocol version
 xx .. xx   guid (LE)   plugin or zero bytes
 xx xx   word   unknown
 xx xx xx xx   dword (LE)   client capabilities flags
 xx   byte   unknown
 xx xx   word (LE)   seems to be a downcounter
 xx xx   word (LE)   length of following data
 xx xx   word (LE)   seems to be a downcounter as in first chunk above
 xx ..     unknown, usually zeros
if plugin field in first chunk above is zero, here is
        message, overwise here is
        plugin-specific data.
 00 03   word   TLV.Type(0x03) - request an ack from server
 00 00   word   TLV.Length
 empty


Example SNAC dumps with flap header:


  2A 02 36 87 00 99 00 04 00 06 00 00 00 0F 00 06  *.6???.???..........
  CC EB 54 00 F7 07 00 00 00 02 09 31 32 33 34 35  ??????T.???......12345
  36 37 38 39 00 05 00 73 00 00 CC EB 54 00 F7 07  6789...s..??????T.???.
  00 00 09 46 13 49 4C 7F 11 D1 82 22 44 45 53 54  ...F.IL?.T???"DEST
  00 00 00 0A 00 02 00 01 00 0F 00 00 27 11 00 4B  ............'..K
  1B 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  00 00 00 00 00 00 03 00 00 00 00 FB FF 0E 00 FB  ...........v???..v
  FF 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00  ???...............
  00 21 00 0E 00 54 65 73 74 20 6D 65 73 73 61 67  .!...Test messag
  65 2E 00 00 00 00 00 FF FF FF 00 00 03 00 00     e......?????????.....


Channel 4 Example

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.

 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 04   word   message channel
 xx   byte   screenname string length
 xx ..   string   screenname string
 00 05   word   TLV.Type(0x05) - message data
 xx xx   word   TLV.Length
 xx xx xx xx   dword (LE)   Sender uin
 xx   byte   Message type
 xx   byte   Message flags
 xx xx   word (LE)   Message string length
 xx .. 00   string (asciiz)   Message 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
 00 00   word   TLV.Length
 empty


Example SNAC dumps with flap header:


  2a 02 56 1e 00 6f 00 04-00 06 00 00 00 0b 00 06   *.V..o..........
  4e b5 6c 01 33 28 00 00-00 04 07 31 30 30 30 30   N.l.3(.....10000
  30 30 00 05 00 4b 8f e4-5e 00 04 00 43 00 54 68   00...K..^...C.Th
  69 73 20 69 73 20 74 68-65 20 74 65 73 74 20 75   is is the test u
  72 6c 20 6d 65 73 73 61-67 65 20 74 6f 20 61 6e   rl message to an
  20 6f 6c 64 20 63 6c 69-65 6e 74 fe 68 74 74 70    old client.http
  3a 2f 2f 68 74 74 70 2e-74 65 73 74 2e 75 72 6c   ://http.test.url
  00 00 06 00 00                                    .....


ICBM SNACs

SNAC List
Subgroup Origin Name
0x0001 Any ICBM__ERR
This is the error SNAC for the ICBM foodgroup.
0x0002 Client ICBM__ADD_PARAMETERS
This SNAC is typically sent prior to sending the OSERVICE__CLIENT_ONLINE so that the host is properly initialized with the clients' preferences.
0x0003 Client ICBM__DEL_PARAMETERS
These are the delete all parameters for a given channel.
0x0004 Client ICBM__PARAMETER_QUERY
This SNAC requests ICBM parameters from the host.
0x0005 Host ICBM__PARAMETER_REPLY
This SNAC is sent by the host in response to a ICBM__PARAMETER_QUERY.
0x0006 Client ICBM__CHANNEL_MSG_TOHOST
This is the basic inter-client message after which the group was named (Inter-Client Basic Messages).
0x0007 Host ICBM__CHANNEL_MSG_TOCLIENT
This is the ICBM__CHANNEL_MSG_TOHOST after it has been reformatted by the host and sent to the destination client.
0x0008 Client ICBM__EVIL_REQUEST
This requests that the specified user is sent an EVIL notification.
0x0009 Host ICBM__EVIL_REPLY
The reply tells the requester, the sender of an ICBM__EVIL_REQUEST SNAC, how much EVIL, if any, was applied to the recipient.
0x000A Host ICBM__MISSED_CALLS
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").
0x000B Any ICBM__CLIENT_ERR
This error notice is one of the few SNACs that can be sent to the host and received by a client.
0x000C Host ICBM__HOST_ACK
This SNAC is sent by the host upon receipt of any ICBM__CHANNEL_MSG_TOHOST which includes the optional ICBM__TLV_TAGS_REQUEST_HOST_ACK TLV.
0x000D NCD ICBM__SIN_STORED
This is not currently documented. Want to contribute?
0x000E NCD ICBM__SIN_LIST_QUERY
This is not currently documented. Want to contribute?
0x000F NCD ICBM__SIN_LIST_REPLY
This is not currently documented. Want to contribute?
0x0010 Client ICBM__SIN_RETRIEVE
This requests ICBM__CHANNEL_MSG_TOCLIENT messages be generated for each of the stored ICBMs. Any message retrieved is deleted.
0x0011 NCD ICBM__SIN_DELETE
This is not currently documented. Want to contribute?
0x0012 NCD ICBM__NOTIFY_REQUEST
This is not currently documented. Want to contribute?
0x0013 NCD ICBM__NOTIFY_REPLY
This is not currently documented. Want to contribute?
0x0014 Any ICBM__CLIENT_EVENT
This SNAC is sent as a control message, sent by a client to inform the recipient of an event, or by the host informing of an event.
0x0017 Host ICBM__SIN_REPLY
The host successfully processed the request to retrieve all the offline messages.