<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.nina.chat/index.php?action=history&amp;feed=atom&amp;title=Protocols%2FMSNP%2FMSNC%2FP2Pv2_Headers</id>
	<title>Protocols/MSNP/MSNC/P2Pv2 Headers - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nina.chat/index.php?action=history&amp;feed=atom&amp;title=Protocols%2FMSNP%2FMSNC%2FP2Pv2_Headers"/>
	<link rel="alternate" type="text/html" href="https://wiki.nina.chat/index.php?title=Protocols/MSNP/MSNC/P2Pv2_Headers&amp;action=history"/>
	<updated>2026-06-26T13:19:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.nina.chat/index.php?title=Protocols/MSNP/MSNC/P2Pv2_Headers&amp;diff=4298&amp;oldid=prev</id>
		<title>Animadoria at 19:14, 11 May 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.nina.chat/index.php?title=Protocols/MSNP/MSNC/P2Pv2_Headers&amp;diff=4298&amp;oldid=prev"/>
		<updated>2022-05-11T19:14:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:14, 11 May 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Protocols/MSNP&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/MSNC_Navigation&lt;/del&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Protocols/MSNP&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|section=MSNC&lt;/ins&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=P2Pv2 Binary Headers (from MSNP16)=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=P2Pv2 Binary Headers (from MSNP16)=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_:diff:1.41:old-2537:rev-4298:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Animadoria</name></author>
	</entry>
	<entry>
		<id>https://wiki.nina.chat/index.php?title=Protocols/MSNP/MSNC/P2Pv2_Headers&amp;diff=2537&amp;oldid=prev</id>
		<title>AD: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.nina.chat/index.php?title=Protocols/MSNP/MSNC/P2Pv2_Headers&amp;diff=2537&amp;oldid=prev"/>
		<updated>2020-05-29T00:23:39Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:23, 29 May 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wiki-wiki_:diff:1.41:old-2536:rev-2537 --&gt;
&lt;/table&gt;</summary>
		<author><name>AD</name></author>
	</entry>
	<entry>
		<id>https://wiki.nina.chat/index.php?title=Protocols/MSNP/MSNC/P2Pv2_Headers&amp;diff=2536&amp;oldid=prev</id>
		<title>AD at 11:23, 8 December 2010</title>
		<link rel="alternate" type="text/html" href="https://wiki.nina.chat/index.php?title=Protocols/MSNP/MSNC/P2Pv2_Headers&amp;diff=2536&amp;oldid=prev"/>
		<updated>2010-12-08T11:23:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Protocols/MSNP/MSNC_Navigation}}&lt;br /&gt;
&lt;br /&gt;
=P2Pv2 Binary Headers (from MSNP16)=&lt;br /&gt;
&lt;br /&gt;
When the client Alice logs in using MSNP18, and starts a session to another WLM 2009 client Bob&lt;br /&gt;
(I believe Alice knows the client type of Bob by the GUID that is attached to the email in Bob's JOI command)&lt;br /&gt;
then the file transfer binary header is substantially changed.&lt;br /&gt;
&lt;br /&gt;
All data is Big Endian.&lt;br /&gt;
The binary header size is dynamic - It can be between 8(0x08) and 252(0xfc).&lt;br /&gt;
The new P2P protocol always has header and message part is optional. Ex: Ack packets haven't message part.&lt;br /&gt;
&lt;br /&gt;
 0                   1                   2                   3&lt;br /&gt;
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 |L|O|Len|Base ID|if L&amp;gt;8 then TLVs = read(L - 8) else skip  ....&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | if Len &amp;gt; 0 then Payload = (DH and D) else skip           ....&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
For all of them - (DWORD is a 32-bit, 4 byte, unsigned integer and QWORD is 64 bits, 8 bytes.)&lt;br /&gt;
{|&lt;br /&gt;
| '''1''' || BYTE || '''HL''' || '''L'''ength of header.&lt;br /&gt;
|-&lt;br /&gt;
| '''2''' || BYTE || '''OP''' || '''O'''peration code. 0: None, 2: Ack, 3: Init session.&lt;br /&gt;
|-&lt;br /&gt;
| '''3''' || WORD || '''ML''' || Message '''len'''gth without header length. (but included the header's message length)&lt;br /&gt;
|-&lt;br /&gt;
| '''4''' || DWORD || '''BaseID''' || Initially random (?) To get the next one add the payload length.&lt;br /&gt;
|-&lt;br /&gt;
| '''TLVs''' || BYTE[HL-8] || '''TLV Data''' || TLV list consists of TLV-encoded pairs (type, length, value). A whole TLV list is padded with zeros to fit 4-byte boundary. TLVs: T=0x1(1) L=0xc(12): IPv6 address of sender/receiver. T=0x2(2) L=0x4(4): ACK identifier.&lt;br /&gt;
|-&lt;br /&gt;
| '''DH''' || DHL || '''Data Header''' ||&lt;br /&gt;
&lt;br /&gt;
 BYTE DHL: Data header length&lt;br /&gt;
 BYTE TFCombination: 0x1=First, 0x4=Msn object (display picture, emoticon etc), 0x6=File transfer&lt;br /&gt;
 WORD PackageNumber: Package number&lt;br /&gt;
 DWORD SessionID: Session Identifier&lt;br /&gt;
 BYTE[DHL-8] Data packets TLVs: if (DHL&amp;gt;8) then read bytes(DHL - 8). T=0x1(1) L=0x8(8): Data remaining.&lt;br /&gt;
|-&lt;br /&gt;
| '''D''' || ML-DHL || '''Data Packet''' || SLP messsage or data packet&lt;br /&gt;
|-&lt;br /&gt;
| '''F''' || DWORD || '''Footer''' || The footer.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
==='''First P2P message'''===&lt;br /&gt;
&lt;br /&gt;
'''H''': 18 03 05 4e 13 63 d5 a0 01 0c 00 02 00 00 00 0e 76 2d 0f 01 00 00 00 00 '''DH''': 08 01 00 00 00 00 00 00 '''D''': SLPMessage&lt;br /&gt;
&lt;br /&gt;
All type of header has the follow fields:&lt;br /&gt;
{|&lt;br /&gt;
| '''1''' || 0x18 || '''Length of header''' || 24&lt;br /&gt;
|-&lt;br /&gt;
| '''2''' || 0x03 || '''Operation code''' || Initialize session.&lt;br /&gt;
|-&lt;br /&gt;
| '''3''' || 0x05 0x4e || '''Size of message''' || 1358 = 1350+8(0x08)&lt;br /&gt;
|-&lt;br /&gt;
| '''4''' || 0x13 0x63 0xd5 0xa0 || '''Base ID''' || The next Base ID += Size of message&lt;br /&gt;
|-&lt;br /&gt;
| '''TLVs''' || 01 0c 00020000 000e762d 0f010000 (00 00) || '''TLV data''' || TLV = 24 - 8 = 16 bytes. T=01,L=12,V=00020000 000e762d 0f010000. (00 00 = Padded with zeros to fit 4-byte boundary.)&lt;br /&gt;
|-&lt;br /&gt;
| '''DH''' || 08 01 00 00 00 00 00 00 || '''Data Header''' ||&lt;br /&gt;
 08=DataHeaderLength&lt;br /&gt;
 01=TFCombination&lt;br /&gt;
 00 00=PackageNumber&lt;br /&gt;
 00 00 00 00 = Session ID&lt;br /&gt;
 '''No TLV''' because DataHeaderLength - 8 = 0.&lt;br /&gt;
|-&lt;br /&gt;
| '''D''' || SLP || '''SLP''' || SLP Message&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''An acknowledgement'''===&lt;br /&gt;
&lt;br /&gt;
'''H''': 08 02 00 00 93 e7 20 56 '''DH''': (no data) '''D''': (no data) '''F''': 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| '''1''' || 0x08 || '''Length of header''' || 8&lt;br /&gt;
|-&lt;br /&gt;
| '''2''' || 0x02 || '''Operation code''' || Acknowledgement&lt;br /&gt;
|-&lt;br /&gt;
| '''3''' || 0x00 0x00 || '''Size of message''' || 0&lt;br /&gt;
|-&lt;br /&gt;
| '''4''' || 0x93 0xe7 0x20 0x56 || '''Base ID''' || AckIdentifier = Base ID + Size of Message&lt;br /&gt;
|-&lt;br /&gt;
| '''TLVs''' || (No tlv data) || '''TLVs''' || Length of header &amp;lt;= 8, so no TLVs in this sample package.&lt;br /&gt;
|-&lt;br /&gt;
| '''DH''' ||(no data) || '''Data Header''' || Size of message is 0.&lt;br /&gt;
|-&lt;br /&gt;
| '''D''' || (no data) || '''Data''' || Size of message is 0.&lt;br /&gt;
|-&lt;br /&gt;
| '''F''' || 0x00 0x00 0x00 0x00 || '''Footer''' || Footer is 0 (always).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''File Transfer'''===&lt;br /&gt;
&lt;br /&gt;
'''H''': 08 00 05 70 13 63 da ee '''DH''': 14 07 00 00 d1 c5 26 da 01 08 00 00 00 00 00 02 04 1c 00 00 '''D''': ...&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| '''1''' || 0x08 || '''Length of header''' || 8&lt;br /&gt;
|-&lt;br /&gt;
| '''2''' || 0x00 || '''Operation code''' || None&lt;br /&gt;
|-&lt;br /&gt;
| '''3''' || 0x05 0x70 || '''Size of message''' || 1392 = 1372+20(0x14)&lt;br /&gt;
|-&lt;br /&gt;
| '''4''' || 0x13 0x63 0xda 0xee || '''Base ID''' || The next Base ID += Size of message&lt;br /&gt;
|-&lt;br /&gt;
| '''TLVs''' || (No tlv data) || '''TLVs''' || Length of header &amp;lt;= 8, so no TLVs in this sample package.&lt;br /&gt;
|-&lt;br /&gt;
| '''DH''' || 14 07 0000 d1c526da 01 08 00000000 0002041c 0000 || '''Data Header''' ||&lt;br /&gt;
 0x14(20)=DataHeaderLength&lt;br /&gt;
 0x07=TFCombination(The first file transfer message. 0x06 is all other file transfer message)&lt;br /&gt;
 0x00 0x00=PackageNumber&lt;br /&gt;
 0xd1 0xc5 0x26 0xda = Session ID from SLP&lt;br /&gt;
 TLVs = 20-8=12 bytes. T(01) L(08) V(00 00 00 00 00 02 04 1c - data remaining) Padding(00 00)&lt;br /&gt;
|-&lt;br /&gt;
| '''D''' || Data || '''Data''' || File data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Display Picture'''===&lt;br /&gt;
&lt;br /&gt;
'''H''': 08 00 05 70 03 a3 da ee '''DH''': 14 05 00 00 d1 c5 26 dc 01 08 00 00 00 00 00 00 34 f5 00 00 '''D''': ...&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| '''1''' || 0x08 || '''Length of header''' || 8&lt;br /&gt;
|-&lt;br /&gt;
| '''2''' || 0x00 || '''Operation code''' || None&lt;br /&gt;
|-&lt;br /&gt;
| '''3''' || 0x05 0x70 || '''Size of message''' || 1392 = 1372+20(0x14)&lt;br /&gt;
|-&lt;br /&gt;
| '''4''' || 0x03 0xa3 0xda 0xee || '''Base ID''' || The next Base ID += Size of message&lt;br /&gt;
|-&lt;br /&gt;
| '''TLVs''' || (No tlv data) || '''TLVs''' || Length of header &amp;lt;= 8, so no TLVs in this sample package.&lt;br /&gt;
|-&lt;br /&gt;
| '''DH''' || 14 05 0000 d1c526da 01 08 00000000 000034f5 0000 || '''Data Header''' ||&lt;br /&gt;
 0x14(20)=DataHeaderLength&lt;br /&gt;
 0x5=TFCombination(The first display picture message. 0x04 is all other display picture message)&lt;br /&gt;
 0x0 0x0=PackageNumber&lt;br /&gt;
 0xd1 0xc5 0x26 0xda = Session ID from SLP&lt;br /&gt;
 TLVs = 20-8=12 bytes. T(01) L(08) V(00 00 00 00 00 00 34 f5 - data remaining) Padding(00 00)&lt;br /&gt;
|-&lt;br /&gt;
| '''D''' || Data || '''Data''' || Picture data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= For more information =&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/msnp-sharp/source/browse/branches/MSNPSHARP_31_STABLE/MSNPSharp/DataTransfer/P2PHeader.cs P2Pv1 and P2Pv2 Header Definitions]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/msnp-sharp/wiki/KB_MSNC12_BinaryHeader Binary header research on MSNC10 (The new P2P protocol used in WLM 2009 and MSNP18)]&lt;br /&gt;
&lt;br /&gt;
[[Category:MSN]]&lt;br /&gt;
[[Category:Protocols/MSNP]]&lt;br /&gt;
[[Category:Work_In_Progress]]&lt;/div&gt;</summary>
		<author><name>AD</name></author>
	</entry>
</feed>