Upstream tarball 20080304
[amule.git] / src / include / protocol / kad / Client2Client / UDP.h
blob96c4e53c4d9ec753d6a474aff338e57629899470
1 //
2 // This file is part of the aMule Project.
3 //
4 // Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org )
5 // Copyright (c) 2002 Merkur ( devs@emule-project.net / http://www.emule-project.net )
6 //
7 // Any parts of this program derived from the xMule, lMule or eMule project,
8 // or contributed by third-party developers are copyrighted by their
9 // respective authors.
11 // This program is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation; either version 2 of the License, or
14 // (at your option) any later version.
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program; if not, write to the Free Software
23 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 #ifndef KADC2CUDP_H
27 #define KADC2CUDP_H
29 enum KademliaV1OPcodes {
30 KADEMLIA_BOOTSTRAP_REQ = 0x00, // <PEER (sender) [25]>
31 KADEMLIA_BOOTSTRAP_RES = 0x08, // <CNT [2]> <PEER [25]>*(CNT)
33 KADEMLIA_HELLO_REQ = 0x10, // <PEER (sender) [25]>
34 KADEMLIA_HELLO_RES = 0x18, // <PEER (receiver) [25]>
36 KADEMLIA_REQ = 0x20, // <TYPE [1]> <HASH (target) [16]> <HASH (receiver) 16>
37 KADEMLIA_RES = 0x28, // <HASH (target) [16]> <CNT> <PEER [25]>*(CNT)
39 KADEMLIA_SEARCH_REQ = 0x30, // <HASH (key) [16]> <ext 0/1 [1]> <SEARCH_TREE>[ext]
40 // UNUSED = 0x31, // Old Opcode, don't use.
41 KADEMLIA_SRC_NOTES_REQ = 0x32, // <HASH (key) [16]>
42 KADEMLIA_SEARCH_RES = 0x38, // <HASH (key) [16]> <CNT1 [2]> (<HASH (answer) [16]> <CNT2 [2]> <META>*(CNT2))*(CNT1)
43 // UNUSED = 0x39, // Old Opcode, don't use.
44 KADEMLIA_SRC_NOTES_RES = 0x3A, // <HASH (key) [16]> <CNT1 [2]> (<HASH (answer) [16]> <CNT2 [2]> <META>*(CNT2))*(CNT1)
46 KADEMLIA_PUBLISH_REQ = 0x40, // <HASH (key) [16]> <CNT1 [2]> (<HASH (target) [16]> <CNT2 [2]> <META>*(CNT2))*(CNT1)
47 // UNUSED = 0x41, // Old Opcode, don't use.
48 KADEMLIA_PUB_NOTES_REQ = 0x42, // <HASH (key) [16]> <HASH (target) [16]> <CNT2 [2]> <META>*(CNT2))*(CNT1)
49 KADEMLIA_PUBLISH_RES = 0x48, // <HASH (key) [16]>
50 // UNUSED = 0x49, // Old Opcode, don't use.
51 KADEMLIA_PUB_NOTES_RES = 0x4A, // <HASH (key) [16]>
53 KADEMLIA_FIREWALLED_REQ = 0x50, // <TCPPORT (sender) [2]>
54 KADEMLIA_FINDBUDDY_REQ = 0x51, // <TCPPORT (sender) [2]>
55 KADEMLIA_CALLBACK_REQ = 0x52, // <TCPPORT (sender) [2]>
56 KADEMLIA_FIREWALLED_RES = 0x58, // <IP (sender) [4]>
57 KADEMLIA_FIREWALLED_ACK = 0x59, // (null)
58 KADEMLIA_FINDBUDDY_RES = 0x5A // <TCPPORT (sender) [2]>
61 #endif // KADC2CUDP_H