OpenDDS
Snapshot(2023/04/28-20:55)
|
#include <Checklist.h>
Public Member Functions | |
Checklist (EndpointManager *a_endpoint, const AgentInfo &a_local, const AgentInfo &a_remote, ACE_UINT64 a_ice_tie_breaker) | |
void | compute_active_foundations (ActiveFoundationSet &a_active_foundations) const |
void | check_invariants () const |
bool | has_transaction_id (const STUN::TransactionId &a_tid) const |
bool | has_guid_pair (const GuidPair &a_guid_pair) const |
void | unfreeze () |
void | unfreeze (const FoundationType &a_foundation) |
void | generate_triggered_check (const ACE_INET_Addr &a_local_address, const ACE_INET_Addr &a_remote_address, ACE_UINT32 a_priority, bool a_use_candidate) |
void | success_response (const ACE_INET_Addr &a_local_address, const ACE_INET_Addr &a_remote_address, const STUN::Message &a_message) |
void | error_response (const ACE_INET_Addr &a_local_address, const ACE_INET_Addr &a_remote_address, const STUN::Message &a_message) |
void | add_guid (const GuidPair &a_guid_pair) |
void | remove_guid (const GuidPair &a_guid_pair) |
void | add_guids (const GuidSetType &a_guids) |
void | remove_guids () |
GuidSetType | guids () const |
ACE_INET_Addr | selected_address () const |
const AgentInfo & | original_remote_agent_info () const |
void | set_remote_password (const std::string &a_password) |
void | indication () |
![]() | |
Task (AgentImpl *a_agent_impl) | |
virtual | ~Task () |
void | enqueue (const DCPS::MonotonicTimePoint &release_time) |
![]() | |
virtual | ~RcObject () |
virtual void | _add_ref () |
virtual void | _remove_ref () |
long | ref_count () const |
WeakObject * | _get_weak_object () const |
Private Types | |
typedef std::list< CandidatePair > | CandidatePairsType |
typedef std::list< ConnectivityCheck > | ConnectivityChecksType |
Private Member Functions | |
~Checklist () | |
void | generate_candidate_pairs () |
void | fix_foundations () |
void | add_valid_pair (const CandidatePair &a_valid_pair) |
bool | get_local_candidate (const ACE_INET_Addr &a_address, Candidate &a_candidate) |
bool | get_remote_candidate (const ACE_INET_Addr &a_address, Candidate &a_candidate) |
bool | is_succeeded (const CandidatePair &a_candidate_pair) const |
bool | is_in_progress (const CandidatePair &a_candidate_pair) const |
void | add_triggered_check (const CandidatePair &a_candidate_pair) |
void | remove_from_in_progress (const CandidatePair &a_candidate_pair) |
void | succeeded (const ConnectivityCheck &a_connectivity_check) |
void | failed (const ConnectivityCheck &a_connectivity_check) |
size_t | size () const |
void | do_next_check (const DCPS::MonotonicTimePoint &a_now) |
void | execute (const DCPS::MonotonicTimePoint &a_now) |
Private Attributes | |
EndpointManager *const | endpoint_manager_ |
GuidSetType | guids_ |
AgentInfo | local_agent_info_ |
AgentInfo | remote_agent_info_ |
AgentInfo | original_remote_agent_info_ |
bool const | local_is_controlling_ |
ACE_UINT64 const | ice_tie_breaker_ |
CandidatePairsType | frozen_ |
CandidatePairsType | waiting_ |
CandidatePairsType | in_progress_ |
CandidatePairsType | succeeded_ |
CandidatePairsType | failed_ |
CandidatePairsType | triggered_check_queue_ |
CandidatePairsType | valid_list_ |
CandidatePairsType::const_iterator | nominating_ |
CandidatePairsType::const_iterator | nominated_ |
bool | nominated_is_live_ |
DCPS::MonotonicTimePoint | last_indication_ |
DCPS::TimeDuration | check_interval_ |
DCPS::TimeDuration | max_check_interval_ |
ConnectivityChecksType | connectivity_checks_ |
Additional Inherited Members | |
![]() | |
RcObject () | |
Definition at line 155 of file Checklist.h.
|
private |
Definition at line 227 of file Checklist.h.
|
private |
Definition at line 244 of file Checklist.h.
OpenDDS::ICE::Checklist::Checklist | ( | EndpointManager * | a_endpoint, |
const AgentInfo & | a_local, | ||
const AgentInfo & | a_remote, | ||
ACE_UINT64 | a_ice_tie_breaker | ||
) |
Definition at line 87 of file Checklist.cpp.
References endpoint_manager_, generate_candidate_pairs(), OpenDDS::DCPS::rchandle_from(), remote_agent_info_, OpenDDS::ICE::EndpointManager::set_responsible_checklist(), and OpenDDS::ICE::AgentInfo::username.
|
private |
Definition at line 105 of file Checklist.cpp.
void OpenDDS::ICE::Checklist::add_guid | ( | const GuidPair & | a_guid_pair | ) |
Definition at line 757 of file Checklist.cpp.
References endpoint_manager_, guids_, OpenDDS::DCPS::rchandle_from(), and OpenDDS::ICE::EndpointManager::set_responsible_checklist().
Referenced by add_guids().
void OpenDDS::ICE::Checklist::add_guids | ( | const GuidSetType & | a_guids | ) |
Definition at line 782 of file Checklist.cpp.
References add_guid().
|
private |
Definition at line 269 of file Checklist.cpp.
References OpenDDS::ICE::AgentImpl::add(), OpenDDS::ICE::EndpointManager::agent_impl, endpoint_manager_, failed_, OpenDDS::ICE::CandidatePair::foundation, frozen_, in_progress_, nominated_, nominating_, OpenDDS::ICE::CandidatePair::priority_sorted(), succeeded_, triggered_check_queue_, valid_list_, and waiting_.
Referenced by execute(), and generate_triggered_check().
|
private |
Definition at line 227 of file Checklist.cpp.
References OPENDDS_ASSERT, OpenDDS::ICE::CandidatePair::priority_sorted(), OpenDDS::ICE::CandidatePair::use_candidate, and valid_list_.
Referenced by success_response().
void OpenDDS::ICE::Checklist::check_invariants | ( | ) | const |
Definition at line 166 of file Checklist.cpp.
References OPENDDS_ASSERT, and valid_list_.
void OpenDDS::ICE::Checklist::compute_active_foundations | ( | ActiveFoundationSet & | a_active_foundations | ) | const |
Definition at line 155 of file Checklist.cpp.
References OpenDDS::ICE::ActiveFoundationSet::add(), in_progress_, and waiting_.
|
private |
Definition at line 627 of file Checklist.cpp.
References OpenDDS::ICE::Candidate::address, OpenDDS::ICE::ConnectivityCheck::cancelled(), OpenDDS::ICE::ConnectivityCheck::candidate_pair(), check_interval_, OpenDDS::ICE::Configuration::checklist_period(), connectivity_checks_, endpoint_manager_, OpenDDS::ICE::ConnectivityCheck::expiration_date(), failed(), ice_tie_breaker_, in_progress_, OpenDDS::ICE::Configuration::instance(), local_agent_info_, max_check_interval_, OpenDDS::ICE::AgentInfo::password, OpenDDS::ICE::ConnectivityCheck::password(), OpenDDS::ICE::CandidatePair::priority_sorted(), OpenDDS::DCPS::rchandle_from(), OpenDDS::ICE::CandidatePair::remote, remote_agent_info_, remove_from_in_progress(), OpenDDS::ICE::ConnectivityCheck::request(), OpenDDS::ICE::EndpointManager::send(), OpenDDS::ICE::EndpointManager::set_responsible_checklist(), OpenDDS::ICE::Configuration::T_a(), OpenDDS::STUN::Message::transaction_id, triggered_check_queue_, OpenDDS::ICE::EndpointManager::unset_responsible_checklist(), and waiting_.
Referenced by execute().
void OpenDDS::ICE::Checklist::error_response | ( | const ACE_INET_Addr & | a_local_address, |
const ACE_INET_Addr & | a_remote_address, | ||
const STUN::Message & | a_message | ||
) |
Definition at line 560 of file Checklist.cpp.
References ACE_ERROR, ACE_TEXT(), OpenDDS::STUN::BAD_REQUEST, connectivity_checks_, endpoint_manager_, failed(), OpenDDS::STUN::Message::get_error_code(), OpenDDS::STUN::Message::get_error_reason(), OpenDDS::STUN::Message::get_unknown_attributes(), OpenDDS::STUN::Message::has_error_code(), OpenDDS::STUN::Message::has_fingerprint(), OpenDDS::STUN::Message::has_message_integrity(), OpenDDS::STUN::Message::has_unknown_attributes(), LM_WARNING, OPENDDS_ASSERT, OpenDDS::DCPS::rchandle_from(), OpenDDS::STUN::Message::transaction_id, OpenDDS::STUN::UNKNOWN_ATTRIBUTE, OpenDDS::STUN::Message::unknown_comprehension_required_attributes(), OpenDDS::ICE::EndpointManager::unset_responsible_checklist(), and OpenDDS::STUN::Message::verify_message_integrity().
|
privatevirtual |
Implements OpenDDS::ICE::Task.
Definition at line 699 of file Checklist.cpp.
References add_triggered_check(), OpenDDS::STUN::Message::append_attribute(), OpenDDS::STUN::BINDING, check_interval_, OpenDDS::STUN::Message::class_, connectivity_checks_, do_next_check(), endpoint_manager_, OpenDDS::ICE::Task::enqueue(), frozen_, OpenDDS::STUN::Message::generate_transaction_id(), guids_, OpenDDS::ICE::EndpointManager::ice_connect(), OpenDDS::ICE::EndpointManager::ice_disconnect(), OpenDDS::STUN::INDICATION, OpenDDS::ICE::Configuration::instance(), last_indication_, local_agent_info_, local_is_controlling_, OpenDDS::STUN::make_fingerprint(), OpenDDS::STUN::make_message_integrity(), OpenDDS::STUN::make_username(), OpenDDS::STUN::Message::method, nominated_, nominated_is_live_, OpenDDS::ICE::Configuration::nominated_ttl(), nominating_, OpenDDS::ICE::AgentInfo::password, OpenDDS::STUN::Message::password, remote_agent_info_, OpenDDS::ICE::EndpointManager::send(), triggered_check_queue_, OpenDDS::ICE::AgentInfo::username, valid_list_, and waiting_.
|
private |
Definition at line 455 of file Checklist.cpp.
References OpenDDS::ICE::ConnectivityCheck::candidate_pair(), failed_, local_is_controlling_, nominating_, OpenDDS::ICE::CandidatePair::priority_sorted(), remove_from_in_progress(), OpenDDS::ICE::CandidatePair::use_candidate, and valid_list_.
Referenced by do_next_check(), error_response(), succeeded(), and success_response().
|
private |
Definition at line 234 of file Checklist.cpp.
References OpenDDS::ICE::EndpointManager::agent_impl, endpoint_manager_, in_progress_, OpenDDS::ICE::AgentImpl::remove(), and waiting_.
Referenced by remove_guid().
|
private |
Definition at line 109 of file Checklist.cpp.
References OpenDDS::ICE::AgentInfo::candidates, check_interval_, OpenDDS::ICE::Configuration::checklist_period(), frozen_, OpenDDS::ICE::Configuration::instance(), local_agent_info_, local_is_controlling_, max_check_interval_, OpenDDS::ICE::CandidatePair::priority_sorted(), remote_agent_info_, and OpenDDS::ICE::Configuration::T_a().
Referenced by Checklist().
void OpenDDS::ICE::Checklist::generate_triggered_check | ( | const ACE_INET_Addr & | a_local_address, |
const ACE_INET_Addr & | a_remote_address, | ||
ACE_UINT32 | a_priority, | ||
bool | a_use_candidate | ||
) |
Definition at line 340 of file Checklist.cpp.
References ACE_ERROR, ACE_TEXT(), add_triggered_check(), OpenDDS::ICE::EndpointManager::agent_impl, OpenDDS::ICE::AgentInfo::candidates, OpenDDS::ICE::candidates_sorted(), check_interval_, connectivity_checks_, endpoint_manager_, OpenDDS::ICE::Task::enqueue(), get_local_candidate(), get_remote_candidate(), OpenDDS::ICE::Configuration::instance(), is_in_progress(), is_succeeded(), LM_WARNING, local_is_controlling_, OpenDDS::ICE::make_peer_reflexive_candidate(), remote_agent_info_, OpenDDS::ICE::AgentImpl::remote_peer_reflexive_counter(), and OpenDDS::ICE::Configuration::T_a().
|
private |
Definition at line 245 of file Checklist.cpp.
References OpenDDS::ICE::AgentInfo::begin(), OpenDDS::ICE::AgentInfo::end(), and local_agent_info_.
Referenced by generate_triggered_check(), and success_response().
|
private |
Definition at line 257 of file Checklist.cpp.
References OpenDDS::ICE::AgentInfo::begin(), OpenDDS::ICE::AgentInfo::end(), and remote_agent_info_.
Referenced by generate_triggered_check().
|
inline |
|
inline |
Definition at line 169 of file Checklist.h.
|
inline |
Definition at line 164 of file Checklist.h.
void OpenDDS::ICE::Checklist::indication | ( | ) |
Definition at line 807 of file Checklist.cpp.
References last_indication_, OPENDDS_END_VERSIONED_NAMESPACE_DECL, and OpenDDS::DCPS::TimePoint_T< AceClock >::set_to_now().
|
inlineprivate |
Definition at line 264 of file Checklist.h.
Referenced by generate_triggered_check().
|
inlineprivate |
|
inline |
Definition at line 205 of file Checklist.h.
|
private |
Definition at line 332 of file Checklist.cpp.
References OpenDDS::ICE::EndpointManager::agent_impl, endpoint_manager_, OpenDDS::ICE::CandidatePair::foundation, in_progress_, and OpenDDS::ICE::AgentImpl::remove().
Referenced by do_next_check(), failed(), and succeeded().
void OpenDDS::ICE::Checklist::remove_guid | ( | const GuidPair & | a_guid_pair | ) |
Definition at line 763 of file Checklist.cpp.
References connectivity_checks_, endpoint_manager_, fix_foundations(), guids_, OpenDDS::DCPS::rchandle_from(), remote_agent_info_, OpenDDS::ICE::EndpointManager::unset_responsible_checklist(), and OpenDDS::ICE::AgentInfo::username.
Referenced by remove_guids().
void OpenDDS::ICE::Checklist::remove_guids | ( | ) |
Definition at line 789 of file Checklist.cpp.
References guids(), guids_, and remove_guid().
ACE_INET_Addr OpenDDS::ICE::Checklist::selected_address | ( | ) | const |
Definition at line 798 of file Checklist.cpp.
References nominated_, nominated_is_live_, and valid_list_.
|
inline |
Definition at line 210 of file Checklist.h.
|
inlineprivate |
Definition at line 278 of file Checklist.h.
|
private |
Definition at line 382 of file Checklist.cpp.
References OpenDDS::ICE::EndpointManager::agent_impl, OpenDDS::ICE::ConnectivityCheck::cancelled(), OpenDDS::ICE::ConnectivityCheck::candidate_pair(), connectivity_checks_, endpoint_manager_, failed(), failed_, OpenDDS::ICE::CandidatePair::foundation, frozen_, guids_, OpenDDS::ICE::EndpointManager::ice_connect(), in_progress_, last_indication_, local_is_controlling_, nominated_, nominated_is_live_, nominating_, OPENDDS_ASSERT, OpenDDS::ICE::CandidatePair::priority_sorted(), OpenDDS::DCPS::rchandle_from(), OpenDDS::ICE::AgentImpl::remove(), remove_from_in_progress(), OpenDDS::ICE::ConnectivityCheck::request(), OpenDDS::DCPS::TimePoint_T< AceClock >::set_to_now(), succeeded_, OpenDDS::STUN::Message::transaction_id, triggered_check_queue_, OpenDDS::ICE::AgentImpl::unfreeze(), OpenDDS::ICE::EndpointManager::unset_responsible_checklist(), OpenDDS::ICE::CandidatePair::use_candidate, valid_list_, and waiting_.
Referenced by success_response().
void OpenDDS::ICE::Checklist::success_response | ( | const ACE_INET_Addr & | a_local_address, |
const ACE_INET_Addr & | a_remote_address, | ||
const STUN::Message & | a_message | ||
) |
Definition at line 469 of file Checklist.cpp.
References ACE_ERROR, ACE_TEXT(), add_valid_pair(), OpenDDS::ICE::Candidate::address, OpenDDS::ICE::Candidate::base, OpenDDS::ICE::AgentInfo::candidates, OpenDDS::ICE::candidates_sorted(), connectivity_checks_, endpoint_manager_, failed(), get_local_candidate(), OpenDDS::STUN::Message::get_mapped_address(), OpenDDS::STUN::Message::has_fingerprint(), OpenDDS::STUN::Message::has_message_integrity(), LM_WARNING, OpenDDS::ICE::CandidatePair::local, local_agent_info_, local_is_controlling_, OpenDDS::ICE::make_peer_reflexive_candidate(), OPENDDS_ASSERT, OpenDDS::DCPS::rchandle_from(), OpenDDS::ICE::CandidatePair::remote, succeeded(), OpenDDS::STUN::Message::transaction_id, OpenDDS::STUN::Message::unknown_comprehension_required_attributes(), OpenDDS::ICE::EndpointManager::unset_responsible_checklist(), OpenDDS::ICE::CandidatePair::use_candidate, and OpenDDS::STUN::Message::verify_message_integrity().
void OpenDDS::ICE::Checklist::unfreeze | ( | ) |
Definition at line 173 of file Checklist.cpp.
References OpenDDS::ICE::AgentImpl::add(), OpenDDS::ICE::EndpointManager::agent_impl, OpenDDS::ICE::AgentImpl::contains(), endpoint_manager_, OpenDDS::ICE::Task::enqueue(), OpenDDS::ICE::CandidatePair::foundation, OpenDDS::ICE::EndpointManager::foundations(), frozen_, OpenDDS::ICE::CandidatePair::priority_sorted(), and waiting_.
void OpenDDS::ICE::Checklist::unfreeze | ( | const FoundationType & | a_foundation | ) |
Definition at line 204 of file Checklist.cpp.
References OpenDDS::ICE::AgentImpl::add(), OpenDDS::ICE::EndpointManager::agent_impl, endpoint_manager_, OpenDDS::ICE::Task::enqueue(), OpenDDS::ICE::CandidatePair::foundation, frozen_, OpenDDS::ICE::CandidatePair::priority_sorted(), and waiting_.
|
private |
Definition at line 242 of file Checklist.h.
Referenced by do_next_check(), execute(), generate_candidate_pairs(), and generate_triggered_check().
|
private |
Definition at line 245 of file Checklist.h.
Referenced by do_next_check(), error_response(), execute(), generate_triggered_check(), remove_guid(), succeeded(), and success_response().
|
private |
Definition at line 219 of file Checklist.h.
Referenced by add_guid(), add_triggered_check(), Checklist(), do_next_check(), error_response(), execute(), fix_foundations(), generate_triggered_check(), remove_from_in_progress(), remove_guid(), succeeded(), success_response(), and unfreeze().
|
private |
Definition at line 232 of file Checklist.h.
Referenced by add_triggered_check(), failed(), and succeeded().
|
private |
Definition at line 228 of file Checklist.h.
Referenced by add_triggered_check(), execute(), generate_candidate_pairs(), succeeded(), and unfreeze().
|
private |
Definition at line 220 of file Checklist.h.
Referenced by add_guid(), execute(), remove_guid(), remove_guids(), and succeeded().
|
private |
Definition at line 225 of file Checklist.h.
Referenced by do_next_check().
|
private |
Definition at line 230 of file Checklist.h.
Referenced by add_triggered_check(), compute_active_foundations(), do_next_check(), fix_foundations(), remove_from_in_progress(), and succeeded().
|
private |
Definition at line 241 of file Checklist.h.
Referenced by execute(), indication(), and succeeded().
|
private |
Definition at line 221 of file Checklist.h.
Referenced by do_next_check(), execute(), generate_candidate_pairs(), get_local_candidate(), and success_response().
|
private |
Definition at line 224 of file Checklist.h.
Referenced by execute(), failed(), generate_candidate_pairs(), generate_triggered_check(), succeeded(), and success_response().
|
private |
Definition at line 243 of file Checklist.h.
Referenced by do_next_check(), and generate_candidate_pairs().
|
private |
Definition at line 239 of file Checklist.h.
Referenced by add_triggered_check(), execute(), selected_address(), and succeeded().
|
private |
Definition at line 240 of file Checklist.h.
Referenced by execute(), selected_address(), and succeeded().
|
private |
Definition at line 238 of file Checklist.h.
Referenced by add_triggered_check(), execute(), failed(), and succeeded().
|
private |
Definition at line 223 of file Checklist.h.
|
private |
Definition at line 222 of file Checklist.h.
Referenced by Checklist(), do_next_check(), execute(), generate_candidate_pairs(), generate_triggered_check(), get_remote_candidate(), and remove_guid().
|
private |
Definition at line 231 of file Checklist.h.
Referenced by add_triggered_check(), and succeeded().
|
private |
Definition at line 234 of file Checklist.h.
Referenced by add_triggered_check(), do_next_check(), execute(), and succeeded().
|
private |
Definition at line 236 of file Checklist.h.
Referenced by add_triggered_check(), add_valid_pair(), check_invariants(), execute(), failed(), selected_address(), and succeeded().
|
private |
Definition at line 229 of file Checklist.h.
Referenced by add_triggered_check(), compute_active_foundations(), do_next_check(), execute(), fix_foundations(), succeeded(), and unfreeze().