Protocols/OSCAR/SNAC/BUDDY ARRIVED: Difference between revisions
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 20: | Line 20: | ||
=== SNAC Data === | === SNAC Data === | ||
One of the main AIM features is this function called the "Buddy List". It's analogous to the "Contacts" in ICQ terminology. Basically, at login, you send a list of screen names (supposedly, they're suppose to be the names of your friends, but that's certainly not a requirement) to the message server. These names get watched for login/logoff events, and you will get notified when these things happen. | |||
The client has no requirements on how it needs to handle these things. You could easily send up an empty buddy list and ignore the feature entirely, but it's there, so you might as well use it. The AIM client has it's own client-side divisions of "groups". You classify your buddies into groups and it lists them on the buddy list window in that order. If they're on the list, they're online. If they're not, they're not. These divisions are truely client-side and the server only sees one unified list, that the AIM client sorts out when it gets notifications. | |||
You get notified only on enter (oncoming) and exit (offgoing) of buddies, plus the initial "who's on" list after you send up your buddy list. | |||
The "oncoming buddy" command can occur at three different times during the lifecycle of an AIM session. The first, is at the end of the login process, just after the AIM message server is notified of the contents of your buddy list (Phase 3D, Command HI). The second is if/when one of the buddies in that list comes online who wasnt' before, and the third occurs at a regular interval while the connection is otherwise idle. This third case is used for updating your buddy list to make sure you didn't miss anything before. The command syntax for all three cases is exactly the same: | |||
{| border="1" | |||
| Position | |||
| Length | |||
| Data | |||
|- | |||
| 1 | |||
| Word | |||
| 0x0003 | |||
|- | |||
| 3 | |||
| Word | |||
| 0x000b | |||
|- | |||
| 5 | |||
| Word | |||
| 0x0000 | |||
|- | |||
| 7 | |||
| DWord | |||
| 32-bits of seeminly gibberish | |||
|- | |||
| 11 | |||
| Byte | |||
| Oncoming Screen Name Length | |||
|- | |||
| 12 | |||
| ASCII String | |||
| Oncoming Screen Name (NOT null terminated) | |||
|- | |||
| 13 | |||
| Word | |||
| Unsigned Int containing current Warning Level of Oncoming SN | |||
|- | |||
| 15 | |||
| Word | |||
| Class (0x0004 for Free, 0x0003 for AOL) | |||
|- | |||
| 17 | |||
| Word | |||
| 0x0001 | |||
|- | |||
| 19 | |||
| Word | |||
| 0x0002 | |||
|- | |||
| 21 | |||
| Word | |||
| Class Part Two (0x0010 for Free, 0x0004 for AOL) | |||
|- | |||
| 23 | |||
| Word | |||
| 0x0002 | |||
|- | |||
| 25 | |||
| Word | |||
| 0x0004 | |||
|- | |||
| 27 | |||
| DWord | |||
| Unsigned Long (32bit) containing "Member Since" date | |||
|- | |||
| 31 | |||
| Word | |||
| 0x0003 | |||
|- | |||
| 33 | |||
| Word | |||
| 0x0004 | |||
|- | |||
| 35 | |||
| DWord | |||
| Unsigned Long (32bit) containing "On Since" date | |||
|- | |||
| 39* | |||
| Word | |||
| 0x0004 | |||
|- | |||
| 41* | |||
| Word | |||
| 0x0002 | |||
|- | |||
| 43* | |||
| Word | |||
| 0x0000 | |||
|- | |||
| colspan="3" | <nowiki>*Only existant for members of the "Free" or "Trial" classes</nowiki> | |||
|} | |||
A note about classes: Every AIM Screen Name is associated with a class. AOL members (who are really just using the AOLIM?AIM Bridge) are in the "AOL" class. Members who are using the AIM-only service are under the "Free" class. And, "Free" members who have had thier account less than thirty days or so, are in the "Trial" class. | |||
For those who don't know what "UNIX time_t format" is, it's the format used to represent times as unsigned long's in UNIX and some DOS-based libc's. I't simply the number of seconds elapsed from the 01 January 1970 00:00:00 UTC. (This is often referred to as "the UNIX epoch".) Both of the times in this command (at positions 27 and 35) are stored in this format (and yes, these will fail because of the y2.048k bug). | |||
Note, that there's also an "Idle for" field in this command somewhere. It may very well be the last word of the command (since I don't think you can get the idle time of an AOL member anyway). Since I've found no good way to "be idle", I can't really figure out exactly where it is. | |||
{| class="wikitable" | {| class="wikitable" | ||
! Name | ! Name | ||
Line 29: | Line 131: | ||
| User's state being updated | | User's state being updated | ||
|} | |} | ||
=== From Aleksandr Shutko: SNAC(03,0B) user moved online === | |||
<table width=645 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td> | |||
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td bgcolor=#4040FF > | |||
<table width=100% cellSpacing=0 cellPadding=0 border=0> | |||
<tr> | |||
<td><b><font color="white">SNAC(03,0B) </font></b></td> | |||
<td width=70% align=right><b><font color="white">BUDDY__ARRIVED </font></b></td> | |||
</tr> | |||
</table> | |||
</td></tr> | |||
</table> | |||
</td></tr></table> | |||
<table width=640 cellSpacing=0 cellPadding=0 border=0> | |||
<tr> | |||
<td> | |||
<br> | |||
Server sends this snac when user from your contact list goes online. | |||
Also you'll receive this snac on user status change (in this case snac doesn't | |||
contain TLV(0xC)). See also [[Protocols/OSCAR/Foodgroups/OSERVICE/Datatypes/USERINFO#Datatype:_OSERVICE_USERINFO|additional information]] about online userinfo block.<br><br> | |||
For those who don't know what "UNIX time_t" format is, it's the format used to | |||
represent times as unsigned long's in UNIX and some DOS-based libc's. It's simply | |||
the number of seconds elapsed from the 01 January 1970 00:00:00 UTC. (This is often | |||
referred to as "the UNIX epoch".) Both of the times in this command (at positions | |||
27 and 35) are stored in this format (and yes, these will fail because of the | |||
y2.048k bug). | |||
<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=635 cellSpacing=0 cellPadding=0 align=center border=0> | |||
<tr> | |||
<td width=169> 00 03</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=58%>SNAC family</td> | |||
</tr> | |||
<tr> | |||
<td> 00 0B</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </td> | |||
<td>SNAC subtype</td> | |||
</tr> | |||
<tr> | |||
<td> 00 00</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </td> | |||
<td>SNAC flags</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx xx xx</td> | |||
<td> </td> | |||
<td>dword</td> | |||
<td> </td> | |||
<td>SNAC request-id</td> | |||
</tr> | |||
</table> | |||
</td></tr> | |||
<tr><td bgcolor=#E9E9E9> | |||
<table width=635 cellSpacing=2 cellPadding=0 align=center border=0> | |||
<tr><td> | |||
<table width=630 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td> | |||
<table width=100% cellSpacing=2 cellPadding=0 border=0> | |||
<tr><td bgcolor=#C9C9E9> | |||
Following user info may be repeated more then once | |||
</td></tr> | |||
<tr><td bgcolor=#E9E9E9> | |||
<table width=625 cellSpacing=0 cellPadding=0 align=center border=0> | |||
<tr> | |||
<td width=169> xx</td> | |||
<td width=5> </td> | |||
<td>char</td> | |||
<td width=5> </td> | |||
<td width=58%>uin string length</td> | |||
</tr> | |||
<tr> | |||
<td> xx ..</td> | |||
<td> </td> | |||
<td>string</td> | |||
<td> </td> | |||
<td>uin string</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </td> | |||
<td>warning level (unused in ICQ)</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </td> | |||
<td>Number of TLV in info-tlvlist</td> | |||
</tr> | |||
</table> | |||
<!-- TLV 0x01 --> | |||
<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> 00 01</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>TLV.Type(0x01) - user class</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </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> xx xx</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>[[Protocols/OSCAR/Foodgroups/OSERVICE/Datatypes/USERINFO#Class:_OSERVICE_USER_FLAGS|User class]]</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 0x0C --> | |||
<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> 00 0C</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>TLV.Type(0x0C) - dc info (optional)</td> | |||
</tr> | |||
<tr> | |||
<td> 00 25</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </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> xx xx xx xx</td> | |||
<td width=5> </td> | |||
<td>dword</td> | |||
<td width=5> </td> | |||
<td width=60%>DC internal ip address</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx xx xx</td> | |||
<td> </td> | |||
<td>dword</td> | |||
<td> </td> | |||
<td>DC tcp port</td> | |||
</tr> | |||
<tr> | |||
<td> xx</td> | |||
<td> </td> | |||
<td>byte</td> | |||
<td> </td> | |||
<td>[[Protocols/OSCAR/Foodgroups/ICQ#Types|DC type]]</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </td> | |||
<td>DC protocol version</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx xx xx</td> | |||
<td> </td> | |||
<td>dword</td> | |||
<td> </td> | |||
<td>DC auth cookie</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx xx xx</td> | |||
<td> </td> | |||
<td>dword</td> | |||
<td> </td> | |||
<td>Web front port</td> | |||
</tr> | |||
<tr> | |||
<td> 00 00 00 03</td> | |||
<td> </td> | |||
<td>dword</td> | |||
<td> </td> | |||
<td>Client futures</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx xx xx</td> | |||
<td> </td> | |||
<td>dword</td> | |||
<td> </td> | |||
<td>(id=1) last info update time (unix time_t)</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx xx xx</td> | |||
<td> </td> | |||
<td>dword</td> | |||
<td> </td> | |||
<td>(id=2) last ext info update time (i.e. icqphone status)</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx xx xx</td> | |||
<td> </td> | |||
<td>dword</td> | |||
<td> </td> | |||
<td>(id=3) last ext status update time (i.e. phonebook)</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </td> | |||
<td>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 0x0A --> | |||
<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> 00 0A</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>TLV.Type(0x0A) - external ip address</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </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> xx xx xx xx</td> | |||
<td width=5> </td> | |||
<td>dword</td> | |||
<td width=5> </td> | |||
<td width=60%>External client ip address</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=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> 00 06</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>TLV.Type(0x06) - user status</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </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> xx xx xx xx</td> | |||
<td width=5> </td> | |||
<td>dword</td> | |||
<td width=5> </td> | |||
<td width=60%>[[Protocols/OSCAR/Foodgroups/OSERVICE/Datatypes/USERINFO#Class:_OSERVICE_USER_STATUS|User status]]</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 0x0D --> | |||
<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> 00 0D</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>TLV.Type(0x0D) - user capabilities</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </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> xx ..... xx</td> | |||
<td width=5> </td> | |||
<td>CLSIDs</td> | |||
<td width=5> </td> | |||
<td width=60%>Client [[Protocols/OSCAR/UUIDs|capabilities]] list</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=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> 00 0F</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>TLV.Type(0x0F) - <span>online time</span></td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </td> | |||
<td width=60%>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> xx xx xx xx</td> | |||
<td width=5> </td> | |||
<td>dword</td> | |||
<td width=5> </td> | |||
<td width=60%>Client online time (in seconds)</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=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> 00 03</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>TLV.Type(0x03) - signon time</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </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> xx xx xx xx</td> | |||
<td width=5> </td> | |||
<td>dword</td> | |||
<td width=5> </td> | |||
<td width=60%>Time when client gone online (unix time_t)</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=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> 00 05</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>TLV.Type(0x05) - member since</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </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> xx xx xx xx</td> | |||
<td width=5> </td> | |||
<td>dword</td> | |||
<td width=5> </td> | |||
<td width=60%>Time when this account was registered</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 0x011 --> | |||
<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> 00 11</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>TLV.Type(0x11) - times updated</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </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> xx</td> | |||
<td width=5> </td> | |||
<td>byte</td> | |||
<td width=5> </td> | |||
<td width=60%>updated time id (1,2,3) - see above in TLV(0xC)</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx xx xx</td> | |||
<td> </td> | |||
<td>dword</td> | |||
<td> </td> | |||
<td>updated time value</td> | |||
</tr> | |||
<tr> | |||
<td> ...</td> | |||
<td> </td> | |||
<td>...</td> | |||
<td> </td> | |||
<td>...</td> | |||
</tr> | |||
<tr> | |||
<td> xx</td> | |||
<td> </td> | |||
<td>byte</td> | |||
<td> </td> | |||
<td>updated time id (1,2,3)</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx xx xx</td> | |||
<td> </td> | |||
<td>dword</td> | |||
<td> </td> | |||
<td>updated time value</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 0x019 --> | |||
<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> 00 19</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>TLV.Type(0x19) - new-style capabilities list</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </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> New AIM clients replacement for TLV(0x0D). [[Protocols/OSCAR/UUIDs|Here is format description]]</td> | |||
</tr> | |||
</table> | |||
</td></tr> | |||
</table> | |||
</td></tr></table> | |||
</td><td width=5> </td> | |||
</tr> | |||
<tr><td height=5 colspan=3> </td></tr> | |||
</table> | |||
<!-- end of TLV 0x19 --> | |||
<!-- TLV 0x01D --> | |||
<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> 00 1D</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>TLV.Type(0x1D) - user icon id & hash</td> | |||
</tr> | |||
<tr> | |||
<td> xx xx</td> | |||
<td> </td> | |||
<td>word</td> | |||
<td> </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> xx xx</td> | |||
<td width=5> </td> | |||
<td>word</td> | |||
<td width=5> </td> | |||
<td width=60%>User icon (avatar) id</td> | |||
</tr> | |||
<tr> | |||
<td> xx</td> | |||
<td> </td> | |||
<td>byte</td> | |||
<td> </td> | |||
<td>User icon (avatar) flags</td> | |||
</tr> | |||
<tr> | |||
<td> xx</td> | |||
<td> </td> | |||
<td>byte</td> | |||
<td> </td> | |||
<td>User icon hash length (allways 16)</td> | |||
</tr> | |||
<tr> | |||
<td> xx .. xx</td> | |||
<td> </td> | |||
<td>array</td> | |||
<td> </td> | |||
<td>User icon md5 hash</td> | |||
</tr> | |||
</table> | |||
</td></tr></table> | |||
</td></tr></table> | |||
</td><td width=5></td></tr> | |||
<tr><td height=5 colspan=3> | |||
</td></tr></table> | |||
<!-- end of TLV 0x1D --> | |||
</td></tr></table> | |||
</td></tr></table> | |||
</td></tr></table> | |||
</td></tr></table> | |||
</td></tr></table> | |||
</td></tr></table> | |||
<br>Example SNAC dumps with flap header: | |||
<table width=645 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 3E 17 00 A9 00 03 00 0B 00 00 82 95 E9 1B *.>............. | |||
07 33 34 31 33 39 35 30 00 00 00 07 00 01 00 02 .3413950........ | |||
00 50 00 0C 00 25 3E 4C CF 2D 00 00 4A 68 04 00 .P...%>L.-..Jh.. | |||
08 70 7B D5 5B 00 00 00 50 00 00 00 03 3B FF E8 .p..[...P....;.. | |||
8A 3D CF 01 51 3D CE F8 61 00 00 00 0A 00 04 3E .=..Q=..a......> | |||
4C CF 2D 00 06 00 04 20 12 00 00 00 0D 00 40 09 L.-.... ......@. | |||
46 13 49 4C 7F 11 D1 82 22 44 45 53 54 00 00 09 F.IL...."DEST... | |||
46 13 4E 4C 7F 11 D1 82 22 44 45 53 54 00 00 97 F.NL...."DEST... | |||
B1 27 51 24 3C 43 34 AD 22 D6 AB F7 3F 14 92 09 .'Q$.C4."...?... | |||
46 13 44 4C 7F 11 D1 82 22 44 45 53 54 00 00 00 F.DL...."DEST... | |||
0F 00 04 00 00 88 B4 00 03 00 04 3D D4 42 7F ...........=.B. | |||
And one more packet with TLV(0x1D) | |||
2A 02 26 12 00 7F 00 03 00 0B 00 00 C8 4D E4 6F *.&..........M.o | |||
09 33 34 38 39 33 34 37 37 34 00 00 00 07 00 01 .348934774...... | |||
00 02 00 50 00 0C 00 25 00 00 00 00 00 00 00 00 ...P...%........ | |||
04 00 09 CD A9 3C 4C 00 00 7C 0F 00 00 00 01 00 .....<L..|...... | |||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 0A 00 ................ | |||
04 00 00 00 00 00 06 00 04 10 00 00 00 00 0F 00 ................ | |||
04 00 00 03 F6 00 1D 00 14 00 01 01 10 51 BD 67 .............Q.g | |||
50 54 3B D5 CE 72 88 14 1D A9 05 0D 70 00 03 00 PT;..r......p... | |||
04 41 EC 78 5A .A.xZ | |||
</pre></font> | |||
</td></tr></table> | |||
</td></tr></table> | |||
[[Category:With_Contrib]] | |||
=== BUDDY SNACs === | === BUDDY SNACs === |
Latest revision as of 11:01, 14 February 2021
OSCAR Protocol |
Introduction • Terms • Clients |
Basic |
Datatypes • FLAP • SNAC • TLV |
UUIDs • Errors • Tool IDs |
Host Interaction |
Rate Limits • Migration • Messages |
Other Services |
ADMIN • ADVERT • ALERT |
BART • BOS • BUCP • CHAT |
CHAT_NAV |
Tutorials |
Sign On • BART • Rendezvous |
ICBM • Locate • Buddies |
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 |
---|---|---|---|---|---|---|
0x0003, 0x000B | Host | BUDDY__ARRIVED | Unspecified | BOS | Active | 1.10 |
This notification, potentially batched, indicates that one or more users on the client's Buddy List has signed on or updated their information.
Due to nature of the host architecture, expect redundant arrived notifications for a given user which may, or may not contain updated information. Also, offline users with status messages or BART items may be sent as "arrived", so always check the USER_FLAGS to see if the user is online; USER_FLAGS will be zero if offline.
SNAC Header
Foodgroup | uint16 (word) | 00 03 |
Subgroup | uint16 (word) | 00 0B |
Flags | uint16 (word) | 00 00 |
Request ID | uint32 (dword) | 00 00 00 00 |
SNAC Data
One of the main AIM features is this function called the "Buddy List". It's analogous to the "Contacts" in ICQ terminology. Basically, at login, you send a list of screen names (supposedly, they're suppose to be the names of your friends, but that's certainly not a requirement) to the message server. These names get watched for login/logoff events, and you will get notified when these things happen.
The client has no requirements on how it needs to handle these things. You could easily send up an empty buddy list and ignore the feature entirely, but it's there, so you might as well use it. The AIM client has it's own client-side divisions of "groups". You classify your buddies into groups and it lists them on the buddy list window in that order. If they're on the list, they're online. If they're not, they're not. These divisions are truely client-side and the server only sees one unified list, that the AIM client sorts out when it gets notifications.
You get notified only on enter (oncoming) and exit (offgoing) of buddies, plus the initial "who's on" list after you send up your buddy list.
The "oncoming buddy" command can occur at three different times during the lifecycle of an AIM session. The first, is at the end of the login process, just after the AIM message server is notified of the contents of your buddy list (Phase 3D, Command HI). The second is if/when one of the buddies in that list comes online who wasnt' before, and the third occurs at a regular interval while the connection is otherwise idle. This third case is used for updating your buddy list to make sure you didn't miss anything before. The command syntax for all three cases is exactly the same:
Position | Length | Data |
1 | Word | 0x0003 |
3 | Word | 0x000b |
5 | Word | 0x0000 |
7 | DWord | 32-bits of seeminly gibberish |
11 | Byte | Oncoming Screen Name Length |
12 | ASCII String | Oncoming Screen Name (NOT null terminated) |
13 | Word | Unsigned Int containing current Warning Level of Oncoming SN |
15 | Word | Class (0x0004 for Free, 0x0003 for AOL) |
17 | Word | 0x0001 |
19 | Word | 0x0002 |
21 | Word | Class Part Two (0x0010 for Free, 0x0004 for AOL) |
23 | Word | 0x0002 |
25 | Word | 0x0004 |
27 | DWord | Unsigned Long (32bit) containing "Member Since" date |
31 | Word | 0x0003 |
33 | Word | 0x0004 |
35 | DWord | Unsigned Long (32bit) containing "On Since" date |
39* | Word | 0x0004 |
41* | Word | 0x0002 |
43* | Word | 0x0000 |
*Only existant for members of the "Free" or "Trial" classes |
A note about classes: Every AIM Screen Name is associated with a class. AOL members (who are really just using the AOLIM?AIM Bridge) are in the "AOL" class. Members who are using the AIM-only service are under the "Free" class. And, "Free" members who have had thier account less than thirty days or so, are in the "Trial" class.
For those who don't know what "UNIX time_t format" is, it's the format used to represent times as unsigned long's in UNIX and some DOS-based libc's. I't simply the number of seconds elapsed from the 01 January 1970 00:00:00 UTC. (This is often referred to as "the UNIX epoch".) Both of the times in this command (at positions 27 and 35) are stored in this format (and yes, these will fail because of the y2.048k bug).
Note, that there's also an "Idle for" field in this command somewhere. It may very well be the last word of the command (since I don't think you can get the idle time of an AOL member anyway). Since I've found no good way to "be idle", I can't really figure out exactly where it is.
Name | Type | Notes |
---|---|---|
arrivedInfos | Rest of SNAC array of OSERVICE__USERINFO | User's state being updated |
From Aleksandr Shutko: SNAC(03,0B) user moved online
|
For those who don't know what "UNIX time_t" format is, it's the format used to
represent times as unsigned long's in UNIX and some DOS-based libc's. It's simply
the number of seconds elapsed from the 01 January 1970 00:00:00 UTC. (This is often
referred to as "the UNIX epoch".) Both of the times in this command (at positions
27 and 35) are stored in this format (and yes, these will fail because of the
y2.048k bug).
|
Example SNAC dumps with flap header:
|
BUDDY SNACs
|