Protocols/MSNP/MSNP13/SDrive

From NINA Wiki
Revision as of 18:23, 3 October 2009 by AD (talk | contribs) (Future)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
MSN Protocol Version 13

WLM 8.0 introduces a new feature called Sharing Folders.

The Client ID

In order to show to others client that yours supports Sharing Folders, you have to OR its Protocols/MSNP/Client ID with 0x400000 (4194304) :

ClientID |= 4194304

XML messages

They are exchanged through the notification server. Warning : you CANNOT use this method to exchange plain-text messages.

Sending

This is done via the notification server, with the UUN command, what is a payload command:

UUN (TrId) destination@email.addr.ess 1 7\r\n
message

Receiving

When someone sends you a XML message, the notification server sends :

UBN source@email.addr.ess 1 7\r\n
message

The SNM tag

It takes these attributes :

  • opcode : The operation code
  • csid : A GUID that identifies the operation
  • priority : Still unknown (sent only when the opcode is set to SNM)
  • reason : A HResult that gives more information (sent only when the opcode is set to NAK or INFO)

Synchronization requests

They are done with a SNM tag having its opcode set to SNM. Example :

<SNM opcode="SNM" csid="{aaaaaaaa-bbbb-cccc-ddee-ffgghhiijjkk}" priority="n" />

Accepting a request

This is done with a SNM tag having its opcode set to ACK.

Rejecting a request

This is done with a SNM tag having its opcode set to NAK. Example :

<SNM opcode="NAK" csid="{aaaaaaaa-bbbb-cccc-ddee-ffgghhiijjkk}" reason="0x80070000" />

Information ??

The opcode has been observed to be set to INFO. The meaning of this opcode is still unknown. Example :

<SNM opcode="INFO" csid="{aaaaaaaa-bbbb-cccc-ddee-ffgghhiijjkk}" reason="0x8F450005" />

Generating HResults

Some expressions

Logical (OR/AND/LSH) expression :

HResult = (Severity << 30) | ((Facility & 0x3FFF) << 16) | (Code & 0xFFFF)

"Graphical" expression :

+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|Sever|                Facility                 |                     Code                      |
| ity |                                         |                                               |
+-----+-----------------------------------------+-----------------------------------------------+

Successes

Severity = 0 (0 << 30 = 0x00000000)

Warnings

Severity = 1 (1 << 30 = 0x40000000)

Errors

Severity = 2 (2 << 30 = 0x80000000)

When an operation raises a Windows error

Facility = 7
Code     = WindowsErrorCode

You can get an error description for most of the Windows errors with the command-line utility Net.exe (case-insensitive) :

Net HelpMsg WindowsErrorCode

When Sharing Folders are unavailable

Facility = 0x0F45

Values of Code :

  • 0x0001 : Sharing Folders are disabled
  • 0x0002 : unknown, discovered by sniffing
  • 0x0005 : Sharing Folders are suspended

Critical errors

Severity = 3 (3 << 30 = 0xC0000000)

Examples

  • 0x80070002 : File not found
    • Severity =      2
    • Facility = 0x0007
    • Code  = 0x0002
  • 0x8F450001 : Sharing Folders are disabled
    • Severity =      2
    • Facility = 0x0F45
    • Code  = 0x0001

Future

According to wikipedia, "The Sharing Folder feature has been discontinued in the latest version of Windows Live Messenger (2009), and replaced with access to Protocols/MSNP/Windows Live SkyDrive instead."