Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ConnectionPacket Class Reference

Connection Packet contains, in addition to the feilds in NpPacket, the following info in the order specified:
Has Specified Destination : 1 bit Specified Destination is Ipv4 or IPv6 : 1 bit (zero for IPv4) Avoid Censored Nodes: 1 bit Fast routing: 1 bit Reserved for future use: 4 bits Port number for specified TP: 2 bytes IP address for specified TP: 16 bytes. More...

#include <ConnectionPacket.h>

Inheritance diagram for ConnectionPacket::

NpPacket Packet BasicObject List of all members.

Public Methods

 ConnectionPacket ()
virtual ~ConnectionPacket ()
 ConnectionPacket (unsigned char *rawData)
virtual unsigned char * getRawData ()
 Used to encode the packet right before sending data over the wire. More...

bool hasSpecifiedDestination ()
void setHasSpecifiedDestination (bool)
bool avoidCensoredNodes ()
void setAvoidCensoredNodes (bool)
bool doFastRouting ()
void setDoFastRouting (bool)
SocketAddress getSocketAddress ()
void setSocketAddress (SocketAddress *)
virtual void toStream (std::ostream &)
 Gets the length of the whole packet and makes sure the length makes sense. More...


Private Attributes

bool m_hasSpecifiedDestination
 true if there is a specified destination. More...

bool m_avoidCensoredNodes
 True if this connection desires to be routed only through non-firewalled nodes. More...

bool m_doFastRouting
 True if fast routing is desired. More...

IpAddress m_ip
 Specified Terminating Peer IP address. More...

unsigned short m_port
 Specified Terminating Peer port number. More...


Detailed Description

Connection Packet contains, in addition to the feilds in NpPacket, the following info in the order specified:
Has Specified Destination : 1 bit Specified Destination is Ipv4 or IPv6 : 1 bit (zero for IPv4) Avoid Censored Nodes: 1 bit Fast routing: 1 bit Reserved for future use: 4 bits Port number for specified TP: 2 bytes IP address for specified TP: 16 bytes.

Definition at line 6 of file ConnectionPacket.h.


Constructor & Destructor Documentation

ConnectionPacket::ConnectionPacket
 

Definition at line 16 of file ConnectionPacket.cpp.

virtual ConnectionPacket::~ConnectionPacket [inline, virtual]
 

Definition at line 9 of file ConnectionPacket.h.

ConnectionPacket::ConnectionPacket unsigned char * rawData
 

Definition at line 25 of file ConnectionPacket.cpp.


Member Function Documentation

bool ConnectionPacket::avoidCensoredNodes
 

Definition at line 112 of file ConnectionPacket.cpp.

Referenced by toStream().

bool ConnectionPacket::doFastRouting
 

Definition at line 124 of file ConnectionPacket.cpp.

Referenced by toStream().

unsigned char * ConnectionPacket::getRawData [virtual]
 

Used to encode the packet right before sending data over the wire.

Reimplemented from NpPacket.

Definition at line 63 of file ConnectionPacket.cpp.

SocketAddress ConnectionPacket::getSocketAddress
 

Definition at line 136 of file ConnectionPacket.cpp.

Referenced by toStream().

bool ConnectionPacket::hasSpecifiedDestination
 

Definition at line 100 of file ConnectionPacket.cpp.

Referenced by toStream().

void ConnectionPacket::setAvoidCensoredNodes bool value
 

Definition at line 118 of file ConnectionPacket.cpp.

void ConnectionPacket::setDoFastRouting bool value
 

Definition at line 130 of file ConnectionPacket.cpp.

void ConnectionPacket::setHasSpecifiedDestination bool value
 

Definition at line 106 of file ConnectionPacket.cpp.

void ConnectionPacket::setSocketAddress SocketAddress * value
 

Definition at line 145 of file ConnectionPacket.cpp.

void ConnectionPacket::toStream std::ostream & out [virtual]
 

Gets the length of the whole packet and makes sure the length makes sense.

Returns:
< 0 if the length is invalid

Reimplemented from NpPacket.

Definition at line 152 of file ConnectionPacket.cpp.


Member Data Documentation

bool ConnectionPacket::m_avoidCensoredNodes [private]
 

True if this connection desires to be routed only through non-firewalled nodes.

Definition at line 45 of file ConnectionPacket.h.

bool ConnectionPacket::m_doFastRouting [private]
 

True if fast routing is desired.

Definition at line 48 of file ConnectionPacket.h.

bool ConnectionPacket::m_hasSpecifiedDestination [private]
 

true if there is a specified destination.

Definition at line 42 of file ConnectionPacket.h.

IpAddress ConnectionPacket::m_ip [private]
 

Specified Terminating Peer IP address.

Definition at line 51 of file ConnectionPacket.h.

unsigned short ConnectionPacket::m_port [private]
 

Specified Terminating Peer port number.

Definition at line 54 of file ConnectionPacket.h.


The documentation for this class was generated from the following files:
Generated at Thu Jul 11 13:31:56 2002 for Peekabooty by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001