Protocols::Kad::Packets Namespace Reference


Classes

class  Packet
 Base class of all Kad packets. More...
class  PeerInfoPacket
 A packet which contains information of a peer. More...
class  TcpPortPacket
 A packet which contains only a 2 byte TCP port. More...

Typedefs

typedef PeerInfoPacket< BootstrapReqPacket > BootstrapReq
 Implements the Kad packet BootstrapReq.
typedef TcpPortPacket< CallbackReqPacket > CallbackReq
 Implements the Kad packet CallbackReq.
typedef TcpPortPacket< FindBuddyReqPacket > FindBuddyReq
 Implements the Kad packet FindBuddyReq.
typedef TcpPortPacket< FindBuddyResPacket > FindBuddyRes
 Implements the Kad packet FindBuddyRes.
typedef TcpPortPacket< FirewalledReqPacket > FirewalledReq
 Implements the Kad packet FirewalledReq.

Enumerations

enum  Protocol {
  KadProtocol = 0xE4,
  KadPackedProtocol = 0xE5
}
 Supported Kad protocols. More...
enum  PacketType {
  BootstrapReqPacket = 0x00,
  BootstrapResPacket = 0x08,
  HelloReqPacket = 0x10,
  HelloResPacket = 0x18,
  ReqPacket = 0x20,
  ResPacket = 0x28,
  SearchReqPacket = 0x30,
  SearchNotesReqPacket = 0x32,
  SearchResPacket = 0x38,
  SearchNotesResPacket = 0x3A,
  PublishReqPacket = 0x40,
  PublishNotesReqPacket = 0x42,
  PublishResPacket = 0x48,
  PublishNotesResPacket = 0x4A,
  FirewalledReqPacket = 0x50,
  FindBuddyReqPacket = 0x51,
  CallbackReqPacket = 0x52,
  FirewalledResPacket = 0x58,
  FirewalledAckPacket = 0x59,
  FindBuddyResPacket = 0x5A
}
 Known Kad 1.0 packet types. More...


Typedef Documentation

typedef PeerInfoPacket<BootstrapReqPacket> Protocols::Kad::Packets::BootstrapReq
 

Implements the Kad packet BootstrapReq.

This is a typedef of the template instantiation PeerInfoPacket <BootstrapReqPacket>.

Utilization: This packet is used when a client wants to join the Kad net- work. This is the first packet sent. This packet must be sent to a known peer inside the network.

Format: PEER (sender) [25]

Note:
should I include some copyright about this format format? It belongs to eMule's Opcodes.h

Definition at line 49 of file BootstrapReq.h.

typedef TcpPortPacket<CallbackReqPacket> Protocols::Kad::Packets::CallbackReq
 

Implements the Kad packet CallbackReq.

This is a typedef of the template instantiation TcpPortPacket <CallbackReqPacket>.

Utilization:

Format: TCPPORT (sender) [2]

Definition at line 45 of file CallbackReq.h.

typedef TcpPortPacket<FindBuddyReqPacket> Protocols::Kad::Packets::FindBuddyReq
 

Implements the Kad packet FindBuddyReq.

This is a typedef of the template instantiation TcpPortPacket <FindBuddyReqPacket>.

Utilization:

Format: TCPPORT (sender) [2]

Definition at line 45 of file FindBuddyReq.h.

typedef TcpPortPacket<FindBuddyResPacket> Protocols::Kad::Packets::FindBuddyRes
 

Implements the Kad packet FindBuddyRes.

This is a typedef of the template instantiation TcpPortPacket <FindBuddyResPacket>.

Utilization:

Format: TCPPORT (sender) [2]

Definition at line 45 of file FindBuddyRes.h.

typedef TcpPortPacket<FirewalledReqPacket> Protocols::Kad::Packets::FirewalledReq
 

Implements the Kad packet FirewalledReq.

This is a typedef of the template instantiation TcpPortPacket <FirewalledReqPacket>.

Utilization:

Format: TCPPORT (sender) [2]

Definition at line 45 of file FirewalledReq.h.


Enumeration Type Documentation

enum Protocols::Kad::Packets::PacketType
 

Known Kad 1.0 packet types.

Enumerator:
BootstrapReqPacket 
BootstrapResPacket 
HelloReqPacket 
HelloResPacket 
ReqPacket 
ResPacket 
SearchReqPacket 
SearchNotesReqPacket 
SearchResPacket 
SearchNotesResPacket 
PublishReqPacket 
PublishNotesReqPacket 
PublishResPacket 
PublishNotesResPacket 
FirewalledReqPacket 
FindBuddyReqPacket 
CallbackReqPacket 
FirewalledResPacket 
FirewalledAckPacket 
FindBuddyResPacket 

Definition at line 39 of file Packet.h.

enum Protocols::Kad::Packets::Protocol
 

Supported Kad protocols.

Enumerator:
KadProtocol  For Unpacked packets (<= 200 bytes).
KadPackedProtocol  For Packed packets (> 200 bytes).

Definition at line 33 of file Packet.h.