IBR-DTNSuite
0.12
|
#include <NodeHandshake.h>
Public Types | |
enum | MESSAGE_TYPE { HANDSHAKE_INVALID = 0, HANDSHAKE_REQUEST = 1, HANDSHAKE_RESPONSE = 2 } |
Public Member Functions | |
NodeHandshake () | |
NodeHandshake (MESSAGE_TYPE type, const dtn::data::Number &lifetime=60) | |
virtual | ~NodeHandshake () |
void | addRequest (const dtn::data::Number &identifier) |
bool | hasRequest (const dtn::data::Number &identifier) const |
void | addItem (NodeHandshakeItem *item) |
bool | hasItem (const dtn::data::Number &identifier) const |
MESSAGE_TYPE | getType () const |
const dtn::data::Number & | getLifetime () const |
const std::string | toString () const |
template<class T > | |
T & | get () |
Friends | |
std::ostream & | operator<< (std::ostream &, const NodeHandshake &) |
std::istream & | operator>> (std::istream &, NodeHandshake &) |
Definition at line 92 of file NodeHandshake.h.
Enumerator | |
---|---|
HANDSHAKE_INVALID | |
HANDSHAKE_REQUEST | |
HANDSHAKE_RESPONSE |
Definition at line 95 of file NodeHandshake.h.
dtn::routing::NodeHandshake::NodeHandshake | ( | ) |
Definition at line 28 of file NodeHandshake.cpp.
dtn::routing::NodeHandshake::NodeHandshake | ( | MESSAGE_TYPE | type, |
const dtn::data::Number & | lifetime = 60 |
||
) |
Definition at line 33 of file NodeHandshake.cpp.
|
virtual |
Definition at line 38 of file NodeHandshake.cpp.
void dtn::routing::NodeHandshake::addItem | ( | NodeHandshakeItem * | item) |
Definition at line 64 of file NodeHandshake.cpp.
Referenced by dtn::routing::NodeHandshakeExtension::responseHandshake(), and dtn::routing::ProphetRoutingExtension::responseHandshake().
void dtn::routing::NodeHandshake::addRequest | ( | const dtn::data::Number & | identifier) |
Definition at line 54 of file NodeHandshake.cpp.
Referenced by dtn::routing::NodeHandshakeExtension::requestHandshake(), dtn::routing::ProphetRoutingExtension::requestHandshake(), and dtn::routing::EpidemicRoutingExtension::requestHandshake().
T & dtn::routing::NodeHandshake::get | ( | ) |
Definition at line 158 of file NodeHandshake.h.
Referenced by dtn::routing::NodeHandshakeExtension::processHandshake(), and dtn::routing::ProphetRoutingExtension::processHandshake().
const dtn::data::Number & dtn::routing::NodeHandshake::getLifetime | ( | ) | const |
Definition at line 96 of file NodeHandshake.cpp.
Referenced by dtn::routing::NodeHandshakeExtension::processHandshake(), and toString().
NodeHandshake::MESSAGE_TYPE dtn::routing::NodeHandshake::getType | ( | ) | const |
Definition at line 91 of file NodeHandshake.cpp.
References dtn::data::SDNV< E >::get().
Referenced by dtn::routing::operator<<(), dtn::routing::operator>>(), dtn::routing::NodeHandshakeExtension::processHandshake(), and toString().
bool dtn::routing::NodeHandshake::hasItem | ( | const dtn::data::Number & | identifier) | const |
Definition at line 69 of file NodeHandshake.cpp.
References dtn::routing::NodeHandshakeItem::getIdentifier().
bool dtn::routing::NodeHandshake::hasRequest | ( | const dtn::data::Number & | identifier) | const |
Definition at line 59 of file NodeHandshake.cpp.
Referenced by dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::routing::NodeHandshakeExtension::responseHandshake(), and dtn::routing::ProphetRoutingExtension::responseHandshake().
const std::string dtn::routing::NodeHandshake::toString | ( | ) | const |
Definition at line 101 of file NodeHandshake.cpp.
References dtn::routing::NodeHandshakeItem::getIdentifier(), getLifetime(), getType(), HANDSHAKE_INVALID, HANDSHAKE_REQUEST, HANDSHAKE_RESPONSE, and dtn::data::SDNV< E >::toString().
Referenced by dtn::routing::NodeHandshakeExtension::processHandshake().
|
friend |
Definition at line 147 of file NodeHandshake.cpp.
|
friend |
Definition at line 192 of file NodeHandshake.cpp.