MSNP2P
This protocol is sort of documented here, but because the understanding of the protocol there is fundamentally flawed we will document it from scratch here and merge back to msnpiki as soon as it's done.
MSNP2P is a multi-layer protocol where you have a transport layer taking care of reliably delivering arbitrarily sized blobs of data back and forth, and a SIP-like protocol on top of that.
Transport
The transport layer provides reliable transport of arbitrarily sized blobs. Each blob is transferred in one or more chunks. One or more transport bridges are responsible for transferring these chunks, and the current transport bridge can be changed mid-transfer of a blob if a more suitable bridge becomes available (for example if the client succeeds in opening ports in a router using uPnP shortly after starting a file transfer). There are two kinds of blobs, control blobs and bulk blobs. All bulk blobs must be acknowledged, and each chunk too if the bridge doesn't provide a reliable transport mechanism. All blobs have a 48 byte header that we'll call TLPHEADER.
TLPHEADER |
|||
Name |
Description |
Offset |
Size |
SessionID |
The Session ID. |
0 |
DWORD |
BlobID |
Identifier of the blob. |
4 |
DWORD |
Offset in the current blob. |
8 |
QWORD |
|
Size of the blob. |
16 |
QWORD |
|
Size of this chunk. |
24 |
DWORD |
|
Flags |
Flags. |
28 |
WORD |
Unknown |
Padding? |
30 |
WORD |
DW1 |
Depends on blob. |
32 |
DWORD |
DW2 |
Depends on blob. |
36 |
DWORD |
QW1 |
Depends on blob. |
40 |
QWORD |
Flags |
||||||||||||||||
16 |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
Description |
- |
- |
- |
- |
- |
- |
- |
X |
- |
- |
- |
- |
- |
- |
- |
- |
First blob on this bridge, or after migrating bridge (not yet known). |
- |
- |
- |
- |
- |
- |
X |
- |
- |
- |
- |
- |
- |
- |
- |
- |
Encrypted. |
General Overview
- Avoid online documentations, they are incorrect
- Two way for file transfer : MSNFTP and MSNP2P. MSNP2P is the new way.
- MSNP2P is a stack of three layers.
- The bottom layer is Transport layer implemented by TLP.
- It is responsible for sending blob of data (up to 2GB)
- Sort of dumbed down version of TCP
Blob are divised in BlobChunk whose size depend on the transport
- Three implementations
- SB Based
- TCP Based
- UDP Based
- turnUDP
- SB Based is the only one currently implemented in Pymsn
Data transmitted the same way as messages -> IBB
- The second layer is Session, implemented
- Session management protocol
- Looks like SIP
- The third and final layer is applications
- MSNObject is the application used for avatars, custom smileys, background sharing, ....
- FT is the filetransfer application
- Webcam is one of the webcam implementations
- Sharing is the file sharing stuff in the newest wlm
- many others
- Tubes could be implemented as an application too
- The bottom layer is Transport layer implemented by TLP.

