*Unofficial* eDonkey Protocol Specification v0.6.1 Copyright (c) 2003 Alexey Klimkin "klimkin at cpan.org" http://sourceforge.net/projects/pdonkey/ ====================================================================== Used the following sources in time order: http://hitech.dk/donkeyprotocol.html http://www.schrevel.com/edonkey/ (dead since 21.04.2003) eMule: http://www.emule-project.net/ MLDonkey: http://www.nongnu.org/mldonkey/ http://sourceforge.net/projects/ed2k-gtk-gui/ Thanks for updates to: 1. Thomas Lussnig (http://cDonkey.suche.org/) 2. Qi-Hong Chen 3. Stéphane Loeuillet 3. eKwak Team "unmap at hotmail.com" (http://savannah.nongnu.org/projects/ekwak/) Table of Content ====================================================================== 1. Network protocol 1.1. Client <-> Server 1.2. Client <-> Client 2. Packet format 2.1. Client <-> Server 2.2. Client <-> Client 2.3. UDP 2.4. GUI <-> CORE 2.5. eMule extensions 3. Met files format 3.1. server.met 3.2. part.met 3.3. known.met 3.4. pref.met 4. Basic data format 5. HighID and LowID 6. Changes 1. Network protocol ====================================================================== 1.1. Client <-> Server ------------------------- Login 0x01 -> 0x40 <- 0x15 -> 0x38 <- 0x14 -> 0x32 <- 0x41 <- 0x34 <- Search file 0x16 -> 0x33 <- 0x21 -> Search user 0x1a -> 0x43 <- Get sources 0x19 -> 0x42 <- Callback 0x1c -> 0x35 <- 0x36 <- ID change 0x4d <- 1.2. Client <-> Client ------------------------- Login 0x01 -> 0x4c <- File request 0x58 -> 0x59 <- 0x48 <- File status 0x4f -> 0x50 <- 0x51 -> 0x52 <- Slot operation 0x54 -> 0x55 <- 0x57 <- 0x56 -> Data operation 0x47 -> 0x46 <- 0x49 -> Utility 0x4a -> 0x4b <- 0x4e -> 0x4e <- This is how chat could be (mldonkey) The chat was part of the eDonkey protocol, but not longer supported by the official server or client, also eMule do not support it. The chat currently used is IRC based. ------------------------------------------- 0x1d -> 0x39 <- 0x1f -> 0x1e -> 0x3a <- 0x3b <- 0x3c <- 0x3d <- ------------------------------------------- ::= 0x1d ? ::= 0x1e ? ::= 0x1f ? ::= 0x39 BYTE ( DWORD)* ::= 0x3a ? ::= 0x3b ? ::= 0x3c ? ::= 0x3d ? 2. Packet format ====================================================================== Every packet comes in form: Header Data ::= ::= 0xe3 // eDonkey ||= 0xc5 // eMule extensions ||= 0xd4 // eMule compessed (data is zlib compressed) ::= DWORD 2.1. Client <-> Server ------------------------- ::= 0x01 ::= 0x05 // wrong packet, too heavy load, wrong client version ::= 0x14 ::= 0x15 ::= 0x16 ::= 0x18 ::= 0x19 ::= 0x1a ::= 0x1b ? ::= 0x1c ::= 0x20 ? // # Exception in Connection::doTask 25 for 16.39 ::= 0x21 ::= 0x32
::= 0x33 ::= 0x34 ::= 0x35 ::= 0x36 ::= 0x38 ::= 0x40 ::= 0x41 ::= 0x42
// ID list actually ::= 0x43 2.2. Client <-> Client ------------------------- ::= 0x01 0x10 ::= 0x46 DATA ::= 0x47 ::= 0x48 ::= 0x49 ::= 0x4a ::= 0x4b ::= 0x4c ::= 0x4d // change low id to high ::= 0x4e ::= 0x4f ::= 0x50 ::= 0x51 // select file for download by offical core ::= 0x52 ::= 0x53 ? ::= 0x54 // Request to start upload ::= 0x55 // Accept upload request ::= 0x56 // Cancel transfer ::= 0x57 // Out of parts ::= 0x58 // File name Requrest (select file for download by eMule) ::= 0x59 // File name Answer ::= 0x5b ::= 0x5d // Request shared directories ::= 0x5e // Request shared files from directory ::= 0x5f ::= 0x60 ::= 0x61 2.3. UDP ------------------------- ::= 0x96 DWORD ||= 0x96 BYTE BYTE 0xaa 0x5a // extension ::= 0x97 DWORD // DWORD is the same value as passed in request ||= 0x97 BYTE BYTE 0xaa 0x5a ::= 0x98 ::= 0x99 ::= 0x9a ::= 0x9b
::= 0x9c
::= 0x9e ::= 0xa0 ? ::= 0xa1
::= 0xa2 ::= 0xa3 // name description ::= 0xa4 2.4. GUI <-> CORE ------------------------- ::= 0x64 // user pass ::= 0x65 ::= 0x66 ::= 0xaa ::= 0xab ::= 0xac WORD * ::= 0xad ::= 0xae ::= 0xaf ::= 0xb4 ::= 0xb5 ::= 0xb6 ::= 0xb7 ::= 0xb8 ::= 0xb9 ::= 0xba ::= 0xbb ::= 0xbc ::= 0xbd ::= 0xbe ::= 0xbf ::= 0xc0 DWORD? ::= 0xc1 DWORD? ::= 0xc2 ? ::= 0xc3 ::= 0xc4 ? ::= 0xc5 ::= 0xc6 ::= 0xc7