#include "BundleCore.h"
#include "HelloTLV.h"
#include "RIBDTLV.h"
#include "BaseTLV.h"
#include "Dictionary.h"
#include "PointerList.h"
#include "Node.h"
#include "BundleTLV.h"
#include "BundleTLVEntryList.h"
#include "Table.h"
#include "BundleList.h"
#include "RIBDTLV.h"
#include "RIBTLV.h"
#include "OfferTLV.h"
#include "BundleOffer.h"
#include "Oracle.h"
#include <string>
#include "Encounter.h"
Go to the source code of this file.
Namespaces | |
namespace | prophet |
Defines | |
#define | NEXT_TID (++next_tid_ == 0) ? ++next_tid_ : next_tid_ |
#define | PROPHET_TLV(_tlv, _result, _tid) |
#define | SEND_ACK(_tid) |
#define | SEND_SYN(_tid) |
#define | SEND_SYNACK(_tid) |
#define | SEND_RSTACK(_tid) |
#define | LOG(_level, _args...) |
#define | SET_STATE(_new) |
#define | UPDATE_PEER_VERIFIER(_sender_instance) |
#define | ASSIGN_ROLES(_s, _r) |
#define ASSIGN_ROLES | ( | _s, | |||
_r | ) |
do { \ if (synsender_) { \ _s = oracle_->core()->local_eid(); \ _r = next_hop_->remote_eid(); } \ else { \ _s = next_hop_->remote_eid(); \ _r = oracle_->core()->local_eid(); }\ } while (0)
Definition at line 60 of file Encounter.cc.
Referenced by prophet::Encounter::handle_ribd_tlv(), and prophet::Encounter::send_dictionary_rib().
#define LOG | ( | _level, | |||
_args... | ) |
oracle_->core()->print_log( \ name_.c_str(), BundleCore::_level, _args )
Definition at line 47 of file Encounter.cc.
#define NEXT_TID (++next_tid_ == 0) ? ++next_tid_ : next_tid_ |
Definition at line 26 of file Encounter.cc.
Referenced by prophet::Encounter::dispatch_tlv(), and prophet::Encounter::handle_timeout().
#define PROPHET_TLV | ( | _tlv, | |||
_result, | |||||
_tid | ) |
do { \ _tlv = new ProphetTLV( \ oracle_->core()->prophet_id(), \ oracle_->core()->prophet_id(next_hop_), \ _result, \ local_instance_, \ remote_instance_, \ (_tid == 0) ? NEXT_TID : _tid); \ } while (0)
Definition at line 28 of file Encounter.cc.
Referenced by prophet::Encounter::send_dictionary_rib(), prophet::Encounter::send_hello(), prophet::Encounter::send_offer(), and prophet::Encounter::send_response().
#define SEND_ACK | ( | _tid | ) |
send_hello(HelloTLV::ACK, \ ProphetTLV::NoSuccessAck,_tid)
Definition at line 38 of file Encounter.cc.
Referenced by prophet::Encounter::handle_hello_tlv(), prophet::Encounter::handle_response_tlv(), and prophet::Encounter::handle_timeout().
#define SEND_RSTACK | ( | _tid | ) |
send_hello(HelloTLV::RSTACK,\ ProphetTLV::Failure,_tid)
Definition at line 44 of file Encounter.cc.
Referenced by prophet::Encounter::handle_hello_tlv().
#define SEND_SYN | ( | _tid | ) |
send_hello(HelloTLV::SYN, \ ProphetTLV::NoSuccessAck,_tid)
Definition at line 40 of file Encounter.cc.
Referenced by prophet::Encounter::dispatch_tlv(), and prophet::Encounter::handle_timeout().
#define SEND_SYNACK | ( | _tid | ) |
send_hello(HelloTLV::SYNACK, \ ProphetTLV::NoSuccessAck,_tid)
Definition at line 42 of file Encounter.cc.
Referenced by prophet::Encounter::dispatch_tlv(), prophet::Encounter::handle_hello_tlv(), and prophet::Encounter::handle_timeout().
#define SET_STATE | ( | _new | ) |
do { LOG(LOG_DEBUG, "state_ %s -> %s %s:%d", \ state_to_str(state_), state_to_str(_new), __FILE__, __LINE__); \ state_ = _new; \ } while (0)
Definition at line 50 of file Encounter.cc.
Referenced by prophet::Encounter::dispatch_tlv(), prophet::Encounter::Encounter(), prophet::Encounter::handle_hello_tlv(), prophet::Encounter::handle_offer_tlv(), prophet::Encounter::handle_response_tlv(), prophet::Encounter::handle_rib_tlv(), prophet::Encounter::handle_ribd_tlv(), prophet::Encounter::handle_timeout(), and prophet::Encounter::send_response().
#define UPDATE_PEER_VERIFIER | ( | _sender_instance | ) |
do { \ remote_instance_ = _sender_instance; \ LOG(LOG_DEBUG, "update peer verifier %d", \ (_sender_instance)); } while (0) \
Definition at line 55 of file Encounter.cc.
Referenced by prophet::Encounter::handle_hello_tlv().