Difference between revisions of "Protocols/OSCAR/SNAC/ICQ DB REPLY"

From NINA Wiki
Jump to navigation Jump to search
 
Line 89: Line 89:
 
| The actual message
 
| The actual message
 
|}
 
|}
 +
 +
=== From Aleksandr Shutko: SNAC(15,03) meta information reply SNAC(15,03) ICQ__DB_REPLY  ===
 +
 +
<table width=640 cellSpacing=0 cellPadding=0 border=0>
 +
<tr>
 +
<td>
 +
<br>
 +
This is the server response to client meta request [[Protocols/OSCAR/SNAC_15_02|SNAC(15,02)]].
 +
<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>&nbsp;00 15</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 03</td>
 +
<td width=5>&nbsp;</td>
 +
<td>word</td>
 +
<td width=5>&nbsp;</td>
 +
<td width=55%>SNAC subtype</td>
 +
</tr>
 +
<tr>
 +
<td>&nbsp;xx xx</td>
 +
<td width=5>&nbsp;</td>
 +
<td>word</td>
 +
<td width=5>&nbsp;</td>
 +
<td width=55%>SNAC flags</td>
 +
</tr>
 +
<tr>
 +
<td>&nbsp;xx xx xx xx</td>
 +
<td width=5>&nbsp;</td>
 +
<td>dword</td>
 +
<td width=5>&nbsp;</td>
 +
<td width=55%>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 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=#E9E9E9 >
 +
 +
<table width=610 cellSpacing=0 cellPadding=0 align=center border=0>
 +
<tr>
 +
<td>&nbsp;00 01</td>
 +
<td width=5>&nbsp;</td>
 +
<td>word</td>
 +
<td width=5>&nbsp;</td>
 +
<td width=55%>TLV.Type(1) - encapsulated META_DATA</td>
 +
</tr>
 +
<tr>
 +
<td>&nbsp;xx xx</td>
 +
<td width=5>&nbsp;</td>
 +
<td>word</td>
 +
<td width=5>&nbsp;</td>
 +
<td width=55%>TLV.Length</td>
 +
</tr>
 +
</table>
 +
 +
</td></tr>
 +
<tr><td  bgcolor=#E9E9E9 >
 +
 +
<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=#E9E9E9 >
 +
 +
<table width=580 cellSpacing=0 cellPadding=0 align=center border=0>
 +
<tr>
 +
<td>&nbsp;xx xx</td>
 +
<td width=5>&nbsp;</td>
 +
<td>word (LE)</td>
 +
<td width=5>&nbsp;</td>
 +
<td width=55%>data chunk size (TLV.Length-2)</td>
 +
</tr>
 +
<tr>
 +
<td>&nbsp;xx xx xx xx</td>
 +
<td width=5>&nbsp;</td>
 +
<td>dword (LE)</td>
 +
<td width=5>&nbsp;</td>
 +
<td width=55%>requester uin</td>
 +
</tr>
 +
<tr>
 +
<td>&nbsp;xx xx</td>
 +
<td width=5>&nbsp;</td>
 +
<td>word (LE)</td>
 +
<td width=5>&nbsp;</td>
 +
<td width=55%>request type (see table bellow)</td>
 +
</tr>
 +
<tr>
 +
<td>&nbsp;xx xx</td>
 +
<td width=5>&nbsp;</td>
 +
<td>word (LE)</td>
 +
<td width=5>&nbsp;</td>
 +
<td width=55%>request sequence number</td>
 +
</tr>
 +
<tr>
 +
<td colspan=5>&nbsp;</td>
 +
</tr>
 +
<tr>
 +
<td>&nbsp;......</td>
 +
<td width=5>&nbsp;</td>
 +
<td>......</td>
 +
<td width=5>&nbsp;</td>
 +
<td width=55%>data (depending on request type)</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>
 +
 +
<br>
 +
 +
Response types list:
 +
<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=25%><b>&nbsp;<font size=2>[[Protocols/OSCAR/SNAC/ICQ_DB_REPLY/MSG_RESPONSE|SNAC(15,03)/0041]]&nbsp;&nbsp;</b></font></td>
 +
<td bgcolor=#f0f0f0 valign=top colspan=3>&nbsp;Offline message response</td>
 +
</tr>
 +
<tr>
 +
<td bgcolor=#f0f0f0 valign=top><b>&nbsp;<font size=2>[[Protocols/OSCAR/SNAC/ICQ_DB_REPLY/INFO_MESSAGES_EOF|SNAC(15,03)/0042]]&nbsp;&nbsp;</b></font></td>
 +
<td bgcolor=#f0f0f0 valign=top colspan=3>&nbsp;End-of-offline messages reply</td>
 +
</tr>
 +
<tr>
 +
<td bgcolor=#f0f0f0 valign=top><b>&nbsp;<font size=2>[[Protocols/OSCAR/SNAC/ICQ_DB_REPLY/RESP_INFORMATION|SNAC(15,03)/07DA]]&nbsp;&nbsp;</b></font></td>
 +
<td bgcolor=#f0f0f0 valign=top colspan=3>&nbsp;Meta information response</td>
 +
</tr>
 +
</table>
 +
 +
</td></tr></table>
 +
</td></tr></table>
 +
</td></tr></table>
 +
 +
<br>Example SNAC dump 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 5A 97 00 A6 00 15 00 03 00 01 00 1B 00 02 *.Z.............
 +
  00 01 00 98 96 00 8F E4 5E 00 DA 07 2A 00 D2 00 ........^...*...
 +
  0A 06 00 77 43 69 74 79 00 03 00 53 74 00 12 00 ...wCity...St...
 +
  2B 37 20 28 34 32 31 32 29 20 34 34 34 34 34 34 +7 (4212) 444444
 +
  34 00 12 00 2B 37 20 28 34 32 31 32 29 20 35 35 4...+7 (4212) 55
 +
  35 35 35 35 35 00 14 00 57 6F 72 6B 20 73 74 72 55555...Work str
 +
  65 65 74 20 61 64 64 72 65 73 73 00 06 00 32 32 eet address...22
 +
  32 32 32 00 07 00 08 00 43 6F 6D 70 61 6E 79 00 222.....Company.
 +
  0B 00 44 65 70 61 72 74 6D 65 6E 74 00 09 00 50 ..Department...P
 +
  6F 73 69 74 69 6F 6E 00 05 00 10 00 68 74 74 70 osition.....http
 +
  3A 2F 2F 77 6F 72 6B 2E 6F 72 67 00            ://work.org.
 +
 +
</pre></font>
 +
</td></tr></table>
 +
</td></tr></table>
 +
 +
 +
 +
[[Category:With_Contrib]]
 +
  
 
=== ICQ SNACs ===
 
=== ICQ SNACs ===

Latest revision as of 06:33, 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
0x0015, 0x0003 Host ICQ__DB_REPLY ICQ BOS Active 1.2

Host information response to ICQ__DB_QUERY.

SNAC Header

Foodgroup uint16 (word) 00 15
Subgroup uint16 (word) 00 03
Flags uint16 (word) 00 00
Request ID uint32 (dword) 00 00 00 00

SNAC Data

Unconfirmed: This SNAC contains no data

Length Description
2 bytes Type - 0x0001
2 bytes Length L of the following
L bytes DATA

DATA

All information for this SNAC is in the value of this TLV, and the information is given in network byte order.

Length Description
2 bytes Command length. This is L-2
4 bytes The destination UIN (us)
2 bytes Command. This actually tells what the rest of the SNAC contains. You decide how to read in the rest of it based on what command it is.
2 bytes Request ID

If command is 0x0041, then this is an offline message.

Length Description
4 bytes The originating UIN (them)
2 bytes The year the message was sent
1 byte The month the message was sent
1 byte The day the message was sent
1 byte The hour the message was sent
1 byte The minute the message was sent
2 bytes The type of message
2 bytes Length L of the following
L bytes The actual message

From Aleksandr Shutko: SNAC(15,03) meta information reply SNAC(15,03) ICQ__DB_REPLY


This is the server response to client meta request SNAC(15,02).

 00 15   word   SNAC family
 00 03   word   SNAC subtype
 xx xx   word   SNAC flags
 xx xx xx xx   dword   SNAC request-id
 00 01   word   TLV.Type(1) - encapsulated META_DATA
 xx xx   word   TLV.Length
 xx xx   word (LE)   data chunk size (TLV.Length-2)
 xx xx xx xx   dword (LE)   requester uin
 xx xx   word (LE)   request type (see table bellow)
 xx xx   word (LE)   request sequence number
 
 ......   ......   data (depending on request type)


Response types list:

 SNAC(15,03)/0041    Offline message response
 SNAC(15,03)/0042    End-of-offline messages reply
 SNAC(15,03)/07DA    Meta information response


Example SNAC dump with flap header:


  2A 02 5A 97 00 A6 00 15 00 03 00 01 00 1B 00 02 *.Z.............
  00 01 00 98 96 00 8F E4 5E 00 DA 07 2A 00 D2 00 ........^...*...
  0A 06 00 77 43 69 74 79 00 03 00 53 74 00 12 00 ...wCity...St...
  2B 37 20 28 34 32 31 32 29 20 34 34 34 34 34 34 +7 (4212) 444444
  34 00 12 00 2B 37 20 28 34 32 31 32 29 20 35 35 4...+7 (4212) 55
  35 35 35 35 35 00 14 00 57 6F 72 6B 20 73 74 72 55555...Work str
  65 65 74 20 61 64 64 72 65 73 73 00 06 00 32 32 eet address...22
  32 32 32 00 07 00 08 00 43 6F 6D 70 61 6E 79 00 222.....Company.
  0B 00 44 65 70 61 72 74 6D 65 6E 74 00 09 00 50 ..Department...P
  6F 73 69 74 69 6F 6E 00 05 00 10 00 68 74 74 70 osition.....http
  3A 2F 2F 77 6F 72 6B 2E 6F 72 67 00             ://work.org.


ICQ SNACs

SNAC List
Subgroup Origin Name
0x0001 Any ICQ__ERR
This is the error SNAC for the ICQ foodgroup.
0x0002 Client ICQ__DB_QUERY
Information request used by legacy ICQ clients.
0x0003 Host ICQ__DB_REPLY
Host information response to ICQ__DB_QUERY.