Encounter.cc File Reference

#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 Documentation

#define ASSIGN_ROLES ( _s,
_r   ) 
Value:
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...   ) 
Value:
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_
#define PROPHET_TLV ( _tlv,
_result,
_tid   ) 
Value:
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   ) 
Value:
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   ) 
Value:
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   ) 
Value:
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   ) 
Value:
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   ) 
#define UPDATE_PEER_VERIFIER ( _sender_instance   ) 
Value:
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().

Generated on Sun Nov 21 11:40:50 2010 for DTN Reference Implementation by  doxygen 1.6.3