Mod Multi Packet

From EMule Wiki
(Difference between revisions)
Jump to: navigation, search
(Undo revision 3006 by Izegiwera (Talk))
 
Line 1: Line 1:
----
 
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 
----
 
=[http://ukusypumi.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
 
----
 
=[http://ukusypumi.co.cc CLICK HERE]=
 
----
 
</div>
 
 
= Mod Multi Packet Specifications =
 
= Mod Multi Packet Specifications =
 
The mod multi packet is designed as a default container for file Reask related data’s, like ICS or SCT. It can be sent over TCP as well as over UDP. It is in the new mod prot optional but it is strongly recommended to use it to save overhead and have a larger opcode pool available.
 
The mod multi packet is designed as a default container for file Reask related data’s, like ICS or SCT. It can be sent over TCP as well as over UDP. It is in the new mod prot optional but it is strongly recommended to use it to save overhead and have a larger opcode pool available.
  
 
The TCP multi Packet(Answer) have the following format:
 
The TCP multi Packet(Answer) have the following format:
&lt;pre&gt;
+
<pre>
 
[hash128 16]              // FileHash
 
[hash128 16]              // FileHash
 
Entries till data end:
 
Entries till data end:
Line 19: Line 11:
 
Next Entry:
 
Next Entry:
 
...
 
...
&lt;/pre&gt;
+
</pre>
  
 
The TCP packet is sent imminently after the normal eMule Multi Packet, the answer is sent when the mod multi packet is received.
 
The TCP packet is sent imminently after the normal eMule Multi Packet, the answer is sent when the mod multi packet is received.
  
The UDP packet have the exact same format, but it isn't sent together with the file reask ping but as an answer on the &quot;File Reask Ping Acknowledge&quot;.
+
The UDP packet have the exact same format, but it isn't sent together with the file reask ping but as an answer on the "File Reask Ping Acknowledge".
  
 
The Extended 4 way file reask ping looks like following:
 
The Extended 4 way file reask ping looks like following:
&lt;pre&gt;
+
<pre>
 
A                B
 
A                B
FR_PING    ---&gt;                   // this step may be done over a Kad buddy !!!
+
FR_PING    --->                   // this step may be done over a Kad buddy !!!
           &lt;---    FR_PING_ACK
+
           <---    FR_PING_ACK
MOD_MP    ---&gt;
+
MOD_MP    --->
           &lt;---    MOD_MP_ANS
+
           <---    MOD_MP_ANS
&lt;/pre&gt;
+
</pre>
  
 
This way was chosen because it allows sending the Mod Multi Packet also to Low ID clients without using the Kad Buddy.
 
This way was chosen because it allows sending the Mod Multi Packet also to Low ID clients without using the Kad Buddy.
  
Note: Support for the &quot;Extended 4 way file reask ping&quot; have to be announced separately in the Mod info tag FILE_STATUS_EXTENSIONS
+
Note: Support for the "Extended 4 way file reask ping" have to be announced separately in the Mod info tag FILE_STATUS_EXTENSIONS
  
 
= Mod Multi Packet Applications =
 
= Mod Multi Packet Applications =
Line 46: Line 38:
  
 
The mod multi packet entry for ICS and other Part based status informations shell have the following format:
 
The mod multi packet entry for ICS and other Part based status informations shell have the following format:
&lt;pre&gt;
+
<pre>
 
[uint16 2] count          // PartCount
 
[uint16 2] count          // PartCount
 
[bitField count/8]        // bit encoded status informations
 
[bitField count/8]        // bit encoded status informations
&lt;/pre&gt;
+
</pre>
  
 
The ICS version used for mod Prot is v2 and it sends the Status in request answers, as well as in the request itself.
 
The ICS version used for mod Prot is v2 and it sends the Status in request answers, as well as in the request itself.
Line 62: Line 54:
  
 
The mod multi packet entry for SCT have the following format:
 
The mod multi packet entry for SCT have the following format:
&lt;pre&gt;
+
<pre>
 
[uint8 1] opts  // [bits 1-3] // block divider how many blocks are represented by one bit (only 1, 2, 3, 4, 7 are valid)
 
[uint8 1] opts  // [bits 1-3] // block divider how many blocks are represented by one bit (only 1, 2, 3, 4, 7 are valid)
 
                 // [bits 4-8]  // reserved
 
                 // [bits 4-8]  // reserved
Line 71: Line 63:
 
[bitField 7/Div]        // what blocks are done
 
[bitField 7/Div]        // what blocks are done
 
// next map
 
// next map
&lt;/pre&gt;
+
</pre>
  
 
Please note that no more than 15 Maps should be sent at once due to the overhead, a recommended limit is min(15,max(5,PartCount/10)).
 
Please note that no more than 15 Maps should be sent at once due to the overhead, a recommended limit is min(15,max(5,PartCount/10)).
Line 92: Line 84:
  
 
== OpCodes ==
 
== OpCodes ==
{| style=&quot;font-size: 85%; text-align: Left;Border=&quot;1&quot;;
+
{| style="font-size: 85%; text-align: Left;Border="1";
 
! rowspan=2 | NAME  
 
! rowspan=2 | NAME  
 
! rowspan=2 | VALUE
 
! rowspan=2 | VALUE

Latest revision as of 10:06, 24 November 2010

Contents

[edit] Mod Multi Packet Specifications

The mod multi packet is designed as a default container for file Reask related data’s, like ICS or SCT. It can be sent over TCP as well as over UDP. It is in the new mod prot optional but it is strongly recommended to use it to save overhead and have a larger opcode pool available.

The TCP multi Packet(Answer) have the following format:

[hash128 16]               // FileHash
Entries till data end:
[uint8 1]                  // Sub Opcode
[uint16 2] len             // entry length
[data]                     // content
Next Entry:
...

The TCP packet is sent imminently after the normal eMule Multi Packet, the answer is sent when the mod multi packet is received.

The UDP packet have the exact same format, but it isn't sent together with the file reask ping but as an answer on the "File Reask Ping Acknowledge".

The Extended 4 way file reask ping looks like following:

A                 B
FR_PING    --->                   // this step may be done over a Kad buddy !!!
          <---    FR_PING_ACK
MOD_MP     --->
          <---    MOD_MP_ANS

This way was chosen because it allows sending the Mod Multi Packet also to Low ID clients without using the Kad Buddy.

Note: Support for the "Extended 4 way file reask ping" have to be announced separately in the Mod info tag FILE_STATUS_EXTENSIONS

[edit] Mod Multi Packet Applications

[edit] ICS

ICS (Version 2) Extends the regular chunk status with the status of incomplete chunks, it sends a separated status bit field listing chunks that are incomplete but not empty. This is use full for Intelligent_chunk_selection as well as for release related features.

The ICS informations should be accepted in every Multi Packet because all 4 variants should use the same parsing function.

The mod multi packet entry for ICS and other Part based status informations shell have the following format:

[uint16 2] count          // PartCount
[bitField count/8]        // bit encoded status informations

The ICS version used for mod Prot is v2 and it sends the Status in request answers, as well as in the request itself.

The purpose of sending the data in file request is to allow the releasing clients have a better overview witch parts are needed as well as don't apply part hiding for a particular client on parts that he have incomplete. As well as heaving the status for a4af sources as well in order to can better select the most needed chinks.

Note: the old v1 sends the informations only in file request answers over TCP, it don't sends them to the source in a file request.

[edit] SCT

The Sub Chunk Transfer feature is mainly only a block status exchange it is sent in file reask answers associated, mod multi packets, not in file requests associated ones, but it can be handled in booth.

The mod multi packet entry for SCT have the following format:

[uint8 1] opts  // [bits 1-3] // block divider how many blocks are represented by one bit (only 1, 2, 3, 4, 7 are valid)
                // [bits 4-8]  // reserved
[uint8 1] count         // Map Count
if count == 0xff [uint16 2] long count  // just in case
// block maps for selected parts
[uint16 2] part		// part number
[bitField 7/Div]        // what blocks are done
// next map

Please note that no more than 15 Maps should be sent at once due to the overhead, a recommended limit is min(15,max(5,PartCount/10)). The Maps are sent progressive, only when all have been sent they are resent from the begin and only on TCP, on UDP no resent is done after all maps are out.

[edit] RPS

Real Part Status is an additional extension of the part status informations, it contains the informations witch parts have been hidden/blocked by releasing client. The Mon Multi packet entry have the exact same format as ICS. It can be sent under 2 different opcodes indicating if the parts are only hidden and are downloadable or if they are completely blocked.

[edit] Appendix

[edit] UDP Handling

Whether the Extended mod file status informations are to be sent as well over UDP or not is determined by a separated flag (UDP Mod File Status). The flag tels us if the extended status informations enabled for TCP by mod flags are to be sent as well over UDP.

[edit] Status Handling

The client must be able to handle the situation when the remote client don't send the extended status informations on every reask(answer) (it must not drop the old status until new status is received).

Clients should only send the extended status over UDP when something in the status changed since the last time.

The extended status should Always be sent over TCP because we don't know if the remote client restarted in the mean time, and lost the old status, if he hadn't he should used a UDP reask.

[edit] OpCodes

NAME VALUE
OP_MODMULTIPACKET '0x11'
OP_MODMULTIPACKETANSWER '0x12'
SOP_FILEINCSTATUS '0x8E'
SOP_SUBCHUNKMAPS '0x53'
Personal tools