OpenDDS  Snapshot(2023/04/28-20:55)
Classes | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
OpenDDS::RTPS::Sedp Class Reference

#include <Sedp.h>

Inheritance diagram for OpenDDS::RTPS::Sedp:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::RTPS::Sedp:
Collaboration graph
[legend]

Classes

class  DiscoveryReader
 
class  DiscoveryWriter
 
class  Endpoint
 
class  LivelinessReader
 
class  LivelinessWriter
 
struct  MatchingData
 
struct  MatchingPair
 
struct  PublicationAgentInfoListener
 
class  Reader
 
class  ReaderAddAssociation
 
class  ReaderRemoveAssociations
 
class  SecurityReader
 
class  SecurityWriter
 
struct  SubscriptionAgentInfoListener
 
struct  TypeIdOrigSeqNumber
 
class  TypeLookupReplyReader
 
class  TypeLookupReplyWriter
 
class  TypeLookupRequestReader
 
class  TypeLookupRequestWriter
 
class  Writer
 
class  WriterAddAssociation
 
class  WriterRemoveAssociations
 

Public Member Functions

 Sedp (const DCPS::GUID_t &participant_id, Spdp &owner, ACE_Thread_Mutex &lock)
 
 ~Sedp ()
 
DDS::ReturnCode_t init (const DCPS::GUID_t &guid, const RtpsDiscovery &disco, DDS::DomainId_t domainId, XTypes::TypeLookupService_rch tls)
 
DDS::ReturnCode_t init_security (DDS::Security::IdentityHandle id_handle, DDS::Security::PermissionsHandle perm_handle, DDS::Security::ParticipantCryptoHandle crypto_handle)
 
void shutdown ()
 
DCPS::LocatorSeq unicast_locators () const
 
DCPS::LocatorSeq multicast_locators () const
 
const DCPS::NetworkAddresslocal_address () const
 
const DCPS::NetworkAddressmulticast_group () const
 
void associate (DiscoveredParticipant &participant, const DDS::Security::ParticipantSecurityAttributes &participant_sec_attr)
 
void generate_remote_matched_crypto_handle (const BuiltinAssociationRecord &record)
 
bool ready (const DiscoveredParticipant &participant, const GUID_t &local_id, const GUID_t &remote_id, bool local_tokens_sent) const
 
void process_association_records_i (DiscoveredParticipant &participant)
 
void generate_remote_matched_crypto_handles (DiscoveredParticipant &participant)
 
void disassociate_volatile (DiscoveredParticipant &participant)
 
void cleanup_volatile_crypto (const DCPS::GUID_t &remote)
 
void associate_volatile (DiscoveredParticipant &participant)
 
void remove_remote_crypto_handle (const DCPS::GUID_t &participant, const EntityId_t &entity)
 
void send_builtin_crypto_tokens (const DCPS::GUID_t &remoteId)
 
void send_builtin_crypto_tokens (const DCPS::GUID_t &dst, const DCPS::GUID_t &src)
 Create and send keys for individual endpoints. More...
 
void resend_user_crypto_tokens (const DCPS::GUID_t &remote_participant)
 
void disassociate (DiscoveredParticipant &participant)
 
void update_locators (const ParticipantData_t &pdata)
 
DDS::ReturnCode_t write_stateless_message (const DDS::Security::ParticipantStatelessMessage &msg, const DCPS::GUID_t &reader)
 
DDS::ReturnCode_t write_volatile_message (DDS::Security::ParticipantVolatileMessageSecure &msg, const DCPS::GUID_t &reader)
 
void write_durable_dcps_participant_secure (const DCPS::GUID_t &reader)
 
DDS::ReturnCode_t write_dcps_participant_secure (const Security::SPDPdiscoveredParticipantData &msg, const DCPS::GUID_t &part)
 
DDS::ReturnCode_t write_dcps_participant_dispose (const DCPS::GUID_t &part)
 
bool update_topic_qos (const DCPS::GUID_t &topicId, const DDS::TopicQos &qos)
 
bool update_publication_qos (const DCPS::GUID_t &publicationId, const DDS::DataWriterQos &qos, const DDS::PublisherQos &publisherQos)
 
bool update_subscription_qos (const DCPS::GUID_t &subscriptionId, const DDS::DataReaderQos &qos, const DDS::SubscriberQos &subscriberQos)
 
bool update_subscription_params (const DCPS::GUID_t &subId, const DDS::StringSeq &params)
 
void association_complete_i (const DCPS::GUID_t &localId, const DCPS::GUID_t &remoteId)
 
void data_acked_i (const DCPS::GUID_t &local_id, const DCPS::GUID_t &remote_id)
 
void signal_liveliness (DDS::LivelinessQosPolicyKind kind)
 
void signal_liveliness_unsecure (DDS::LivelinessQosPolicyKind kind)
 
bool send_type_lookup_request (const XTypes::TypeIdentifierSeq &type_ids, const DCPS::GUID_t &reader, bool is_discovery_protected, bool send_get_types, const SequenceNumber &seq_num)
 
void signal_liveliness_secure (DDS::LivelinessQosPolicyKind kind)
 
DCPS::WeakRcHandle< ICE::Endpointget_ice_endpoint ()
 
void rtps_relay_only_now (bool f)
 
void use_rtps_relay_now (bool f)
 
void use_ice_now (bool f)
 
void rtps_relay_address (const ACE_INET_Addr &address)
 
void stun_server_address (const ACE_INET_Addr &address)
 
DCPS::ReactorTask_rch reactor_task () const
 
DCPS::JobQueue_rch job_queue () const
 
void append_transport_statistics (DCPS::TransportStatisticsSequence &seq)
 
void ignore (const GUID_t &to_ignore)
 
bool ignoring (const GUID_t &guid) const
 
bool ignoring (const char *topic_name) const
 
DCPS::TopicStatus assert_topic (GUID_t &topicId, const char *topicName, const char *dataTypeName, const DDS::TopicQos &qos, bool hasDcpsKey, DCPS::TopicCallbacks *topic_callbacks)
 
DCPS::TopicStatus find_topic (const char *topicName, CORBA::String_out dataTypeName, DDS::TopicQos_out qos, GUID_t &topicId)
 
DCPS::TopicStatus remove_topic (const GUID_t &topicId)
 
GUID_t add_publication (const GUID_t &topicId, DCPS::DataWriterCallbacks_rch publication, const DDS::DataWriterQos &qos, const DCPS::TransportLocatorSeq &transInfo, const DDS::PublisherQos &publisherQos, const XTypes::TypeInformation &type_info)
 
void remove_publication (const GUID_t &publicationId)
 
void update_publication_locators (const GUID_t &publicationId, const DCPS::TransportLocatorSeq &transInfo)
 
GUID_t add_subscription (const GUID_t &topicId, DCPS::DataReaderCallbacks_rch subscription, const DDS::DataReaderQos &qos, const DCPS::TransportLocatorSeq &transInfo, const DDS::SubscriberQos &subscriberQos, const char *filterClassName, const char *filterExpr, const DDS::StringSeq &params, const XTypes::TypeInformation &type_info)
 
void remove_subscription (const GUID_t &subscriptionId)
 
void update_subscription_locators (const GUID_t &subscriptionId, const DCPS::TransportLocatorSeq &transInfo)
 
Security::HandleRegistry_rch get_handle_registry () const
 
RcHandle< DCPS::TransportInsttransport_inst () const
 
void request_remote_complete_type_objects (const GUID_t &remote_entity, const XTypes::TypeInformation &remote_type_info, DCPS::TypeObjReqCond &cond)
 
- Public Member Functions inherited from OpenDDS::DCPS::RcEventHandler
 RcEventHandler ()
 
ACE_Event_Handler::Reference_Count add_reference ()
 
ACE_Event_Handler::Reference_Count remove_reference ()
 
- Public Member Functions inherited from ACE_Event_Handler
virtual ~ACE_Event_Handler (void)
 
virtual ACE_HANDLE get_handle (void) const
 
virtual void set_handle (ACE_HANDLE)
 
virtual int priority (void) const
 
virtual void priority (int priority)
 
virtual int handle_input (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_exception (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_timeout (const ACE_Time_Value &current_time, const void *act=0)
 
virtual int handle_exit (ACE_Process *)
 
virtual int handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask)
 
virtual int handle_signal (int signum, siginfo_t *=0, ucontext_t *=0)
 
virtual int resume_handler (void)
 
virtual int handle_qos (ACE_HANDLE=ACE_INVALID_HANDLE)
 
virtual int handle_group_qos (ACE_HANDLE=ACE_INVALID_HANDLE)
 
virtual void reactor (ACE_Reactor *reactor)
 
virtual ACE_Reactorreactor (void) const
 
virtual ACE_Reactor_Timer_Interfacereactor_timer_interface (void) const
 
Reference_Counting_Policyreference_counting_policy (void)
 
- Public Member Functions inherited from OpenDDS::DCPS::RcObject
virtual ~RcObject ()
 
virtual void _add_ref ()
 
virtual void _remove_ref ()
 
long ref_count () const
 
WeakObject_get_weak_object () const
 

Protected Types

typedef MatchingDataMap::iterator MatchingDataIter
 
typedef DCPS::PmfSporadicTask< SedpEndpointManagerSporadic
 
- Protected Types inherited from ACE_Event_Handler
typedef ACE_Atomic_Op< ACE_SYNCH_MUTEX, Reference_CountAtomic_Reference_Count
 

Protected Member Functions

DDS::Security::DatawriterCryptoHandle generate_remote_matched_writer_crypto_handle (const DCPS::GUID_t &writer, const DCPS::GUID_t &reader)
 
DDS::Security::DatareaderCryptoHandle generate_remote_matched_reader_crypto_handle (const DCPS::GUID_t &reader, const DCPS::GUID_t &writer, bool relay_only)
 
void create_datareader_crypto_tokens (const DDS::Security::DatareaderCryptoHandle &drch, const DDS::Security::DatawriterCryptoHandle &dwch, DDS::Security::DatareaderCryptoTokenSeq &drcts)
 
void send_datareader_crypto_tokens (const DCPS::GUID_t &local_reader, const DCPS::GUID_t &remote_writer, const DDS::Security::DatareaderCryptoTokenSeq &drcts)
 
void create_and_send_datareader_crypto_tokens (const DDS::Security::DatareaderCryptoHandle &drch, const DCPS::GUID_t &local_reader, const DDS::Security::DatawriterCryptoHandle &dwch, const DCPS::GUID_t &remote_writer)
 
void create_datawriter_crypto_tokens (const DDS::Security::DatawriterCryptoHandle &dwch, const DDS::Security::DatareaderCryptoHandle &drch, DDS::Security::DatawriterCryptoTokenSeq &dwcts)
 
void send_datawriter_crypto_tokens (const DCPS::GUID_t &local_writer, const DCPS::GUID_t &remote_reader, const DDS::Security::DatawriterCryptoTokenSeq &dwcts)
 
void create_and_send_datawriter_crypto_tokens (const DDS::Security::DatawriterCryptoHandle &dwch, const DCPS::GUID_t &local_writer, const DDS::Security::DatareaderCryptoHandle &drch, const DCPS::GUID_t &remote_reader)
 
bool handle_datareader_crypto_tokens (const DDS::Security::ParticipantVolatileMessageSecure &msg)
 
bool handle_datawriter_crypto_tokens (const DDS::Security::ParticipantVolatileMessageSecure &msg)
 
DDS::DomainId_t get_domain_id () const
 
void add_assoc_i (const DCPS::GUID_t &local_guid, const LocalPublication &lpub, const DCPS::GUID_t &remote_guid, const DiscoveredSubscription &dsub)
 
void remove_assoc_i (const DCPS::GUID_t &local_guid, const LocalPublication &lpub, const DCPS::GUID_t &remote_guid)
 
void add_assoc_i (const DCPS::GUID_t &local_guid, const LocalSubscription &lsub, const DCPS::GUID_t &remote_guid, const DiscoveredPublication &dpub)
 
void remove_assoc_i (const DCPS::GUID_t &local_guid, const LocalSubscription &lsub, const DCPS::GUID_t &remote_guid)
 
void start_ice (const DCPS::GUID_t &guid, const LocalPublication &lpub)
 
void start_ice (const DCPS::GUID_t &guid, const LocalSubscription &lsub)
 
void start_ice (const DCPS::GUID_t &guid, const DiscoveredPublication &dpub)
 
void start_ice (const DCPS::GUID_t &guid, const DiscoveredSubscription &dsub)
 
void stop_ice (const DCPS::GUID_t &guid, const DiscoveredPublication &dpub)
 
void stop_ice (const DCPS::GUID_t &guid, const DiscoveredSubscription &dsub)
 
void replay_durable_data_for (const DCPS::GUID_t &remote_sub_id)
 
virtual void assign_publication_key (GUID_t &rid, const GUID_t &topicId, const DDS::DataWriterQos &)
 
virtual void assign_subscription_key (GUID_t &rid, const GUID_t &topicId, const DDS::DataReaderQos &)
 
virtual void assign_topic_key (GUID_t &guid)
 
void match_endpoints (GUID_t repoId, const DCPS::TopicDetails &td, bool remove=false)
 
void remove_assoc (const GUID_t &remove_from, const GUID_t &removing)
 
typedef OPENDDS_MAP (MatchingPair, MatchingData) MatchingDataMap
 
void match (const GUID_t &writer, const GUID_t &reader)
 
bool need_minimal_and_or_complete_types (const XTypes::TypeInformation *type_info, bool &need_minimal, bool &need_complete) const
 
void remove_expired_endpoints (const MonotonicTimePoint &)
 
void match_continue (const GUID_t &writer, const GUID_t &reader)
 
void request_type_objects (const XTypes::TypeInformation *type_info, const MatchingPair &mp, bool is_discovery_protected, bool get_minimal, bool get_complete)
 
void get_remote_type_objects (const XTypes::TypeIdentifierWithDependencies &tid_with_deps, MatchingData &md, bool get_minimal, const GUID_t &remote_id, bool is_discovery_protected)
 
void match_continue_security_enabled (const GUID_t &writer, const GUID_t &reader, bool call_writer, bool call_reader)
 
void remove_from_bit (const DiscoveredPublication &pub)
 
void remove_from_bit (const DiscoveredSubscription &sub)
 
GUID_t make_topic_guid ()
 
bool has_dcps_key (const GUID_t &topicId) const
 
bool is_security_enabled ()
 
void set_permissions_handle (DDS::Security::PermissionsHandle h)
 
DDS::Security::PermissionsHandle get_permissions_handle () const
 
void set_access_control (DDS::Security::AccessControl_var acl)
 
DDS::Security::AccessControl_var get_access_control () const
 
void set_crypto_key_factory (DDS::Security::CryptoKeyFactory_var ckf)
 
DDS::Security::CryptoKeyFactory_var get_crypto_key_factory () const
 
void set_crypto_key_exchange (DDS::Security::CryptoKeyExchange_var ckf)
 
DDS::Security::CryptoKeyExchange_var get_crypto_key_exchange () const
 
void set_handle_registry (const Security::HandleRegistry_rch &hr)
 
 OPENDDS_SET (String) ignored_topics_
 
 OPENDDS_SET_CMP (GUID_t, GUID_tKeyLessThan) relay_only_readers_
 
typedef OPENDDS_MAP_CMP (GUID_t, DDS::Security::DatareaderCryptoTokenSeq, GUID_tKeyLessThan) DatareaderCryptoTokenSeqMap
 
typedef OPENDDS_MAP_CMP (GUID_t, DDS::Security::DatawriterCryptoTokenSeq, GUID_tKeyLessThan) DatawriterCryptoTokenSeqMap
 
void cleanup_writer_association (DCPS::DataWriterCallbacks_wrch callbacks, const GUID_t &writer, const GUID_t &reader)
 
void cleanup_reader_association (DCPS::DataReaderCallbacks_wrch callbacks, const GUID_t &reader, const GUID_t &writer)
 
- Protected Member Functions inherited from ACE_Event_Handler
 ACE_Event_Handler (ACE_Reactor *=0, int priority=ACE_Event_Handler::LO_PRIORITY)
 
- Protected Member Functions inherited from OpenDDS::DCPS::RcObject
 RcObject ()
 

Static Protected Member Functions

static DDS::BuiltinTopicKey_t get_key (const DiscoveredPublication &pub)
 
static DDS::BuiltinTopicKey_t get_key (const DiscoveredSubscription &sub)
 

Protected Attributes

Spdpspdp_
 
ACE_Thread_Mutexlock_
 
GUID_t participant_id_
 
RepoIdSet ignored_guids_
 
unsigned int publication_counter_
 
unsigned int subscription_counter_
 
unsigned int topic_counter_
 
LocalPublicationMap local_publications_
 
LocalSubscriptionMap local_subscriptions_
 
DiscoveredPublicationMap discovered_publications_
 
DiscoveredSubscriptionMap discovered_subscriptions_
 
DCPS::TopicDetailsMap topics_
 
TopicNameMap topic_names_
 
XTypes::TypeLookupService_rch type_lookup_service_
 
OrigSeqNumberMap orig_seq_numbers_
 
MatchingDataMap matching_data_buffer_
 
RcHandle< EndpointManagerSporadictype_lookup_reply_deadline_processor_
 
TimeDuration max_type_lookup_service_reply_period_
 
DCPS::SequenceNumber type_lookup_service_sequence_number_
 
const bool use_xtypes_
 
const bool use_xtypes_complete_
 
DCPS::SequenceNumber local_participant_automatic_liveliness_sn_
 
DCPS::SequenceNumber local_participant_manual_liveliness_sn_
 
DCPS::SequenceNumber local_participant_automatic_liveliness_sn_secure_
 
DCPS::SequenceNumber local_participant_manual_liveliness_sn_secure_
 
DDS::Security::ParticipantSecurityAttributes participant_sec_attr_
 
DDS::Security::AccessControl_var access_control_
 
DDS::Security::CryptoKeyFactory_var crypto_key_factory_
 
DDS::Security::CryptoKeyExchange_var crypto_key_exchange_
 
Security::HandleRegistry_rch handle_registry_
 
DDS::Security::PermissionsHandle permissions_handle_
 
DDS::Security::ParticipantCryptoHandle crypto_handle_
 
DatareaderCryptoTokenSeqMap pending_remote_reader_crypto_tokens_
 
DatawriterCryptoTokenSeqMap pending_remote_writer_crypto_tokens_
 
SequenceNumber participant_secure_sequence_
 
DiscoveryWriter_rch publications_writer_
 
DiscoveryWriter_rch publications_secure_writer_
 
DiscoveryWriter_rch subscriptions_writer_
 
DiscoveryWriter_rch subscriptions_secure_writer_
 
LivelinessWriter_rch participant_message_writer_
 
LivelinessWriter_rch participant_message_secure_writer_
 
SecurityWriter_rch participant_stateless_message_writer_
 
DiscoveryWriter_rch dcps_participant_secure_writer_
 
SecurityWriter_rch participant_volatile_message_secure_writer_
 
TypeLookupRequestWriter_rch type_lookup_request_writer_
 
TypeLookupReplyWriter_rch type_lookup_reply_writer_
 
TypeLookupRequestWriter_rch type_lookup_request_secure_writer_
 
TypeLookupReplyWriter_rch type_lookup_reply_secure_writer_
 
DiscoveryReader_rch publications_reader_
 
DiscoveryReader_rch publications_secure_reader_
 
DiscoveryReader_rch subscriptions_reader_
 
DiscoveryReader_rch subscriptions_secure_reader_
 
LivelinessReader_rch participant_message_reader_
 
LivelinessReader_rch participant_message_secure_reader_
 
SecurityReader_rch participant_stateless_message_reader_
 
SecurityReader_rch participant_volatile_message_secure_reader_
 
DiscoveryReader_rch dcps_participant_secure_reader_
 
TypeLookupRequestReader_rch type_lookup_request_reader_
 
TypeLookupReplyReader_rch type_lookup_reply_reader_
 
TypeLookupRequestReader_rch type_lookup_request_secure_reader_
 
TypeLookupReplyReader_rch type_lookup_reply_secure_reader_
 
DCPS::RcHandle< ICE::Agentice_agent_
 
RcHandle< PublicationAgentInfoListenerpublication_agent_info_listener_
 
RcHandle< SubscriptionAgentInfoListenersubscription_agent_info_listener_
 
- Protected Attributes inherited from ACE_Event_Handler
Atomic_Reference_Count reference_count_
 

Private Types

typedef DiscoveredSubscriptionMap::iterator DiscoveredSubscriptionIter
 
typedef DiscoveredPublicationMap::iterator DiscoveredPublicationIter
 
typedef LocalPublicationMap::iterator LocalPublicationIter
 
typedef LocalPublicationMap::const_iterator LocalPublicationCIter
 
typedef LocalSubscriptionMap::iterator LocalSubscriptionIter
 
typedef LocalSubscriptionMap::const_iterator LocalSubscriptionCIter
 
typedef DCPS::RcHandle< SecurityWriterSecurityWriter_rch
 
typedef DCPS::RcHandle< LivelinessWriterLivelinessWriter_rch
 
typedef DCPS::RcHandle< DiscoveryWriterDiscoveryWriter_rch
 
typedef DCPS::RcHandle< TypeLookupRequestWriterTypeLookupRequestWriter_rch
 
typedef DCPS::RcHandle< TypeLookupReplyWriterTypeLookupReplyWriter_rch
 
typedef DCPS::RcHandle< ReaderReader_rch
 
typedef DCPS::RcHandle< DiscoveryReaderDiscoveryReader_rch
 
typedef DCPS::RcHandle< LivelinessReaderLivelinessReader_rch
 
typedef DCPS::RcHandle< SecurityReaderSecurityReader_rch
 
typedef DCPS::RcHandle< TypeLookupRequestReaderTypeLookupRequestReader_rch
 
typedef DCPS::RcHandle< TypeLookupReplyReaderTypeLookupReplyReader_rch
 

Private Member Functions

typedef OPENDDS_MAP_CMP (GUID_t, DiscoveredSubscription, GUID_tKeyLessThan) DiscoveredSubscriptionMap
 
typedef OPENDDS_MAP_CMP (GUID_t, DiscoveredPublication, GUID_tKeyLessThan) DiscoveredPublicationMap
 
void populate_origination_locator (const GUID_t &id, DCPS::TransportLocator &tl)
 
bool remote_knows_about_local_i (const GUID_t &local, const GUID_t &remote) const
 
bool remote_is_authenticated_i (const GUID_t &local, const GUID_t &remote, const DiscoveredParticipant &participant) const
 
bool local_has_remote_participant_token_i (const GUID_t &local, const GUID_t &remote) const
 
bool remote_has_local_participant_token_i (const GUID_t &local, const GUID_t &remote, const DiscoveredParticipant &participant) const
 
bool local_has_remote_endpoint_token_i (const GUID_t &local, const GUID_t &remote) const
 
bool remote_has_local_endpoint_token_i (const GUID_t &local, bool local_tokens_sent, const GUID_t &remote) const
 
void type_lookup_init (DCPS::ReactorInterceptor_rch reactor_interceptor)
 
void type_lookup_fini ()
 
void purge_dead_topic (const String &topic_name)
 
void cleanup_secure_writer (const GUID_t &publicationId)
 
void cleanup_secure_reader (const GUID_t &subscriptionId)
 
typedef OPENDDS_MAP_CMP (GUID_t, LocalPublication, GUID_tKeyLessThan) LocalPublicationMap
 
typedef OPENDDS_MAP_CMP (GUID_t, LocalSubscription, GUID_tKeyLessThan) LocalSubscriptionMap
 
typedef OPENDDS_MAP_CMP (GUID_t, String, GUID_tKeyLessThan) TopicNameMap
 
typedef OPENDDS_MAP (SequenceNumber, TypeIdOrigSeqNumber) OrigSeqNumberMap
 
void cleanup_type_lookup_data (const DCPS::GUID_t &guid, const XTypes::TypeIdentifier &ti, bool secure)
 
void populate_discovered_writer_msg (DCPS::DiscoveredWriterData &dwd, const DCPS::GUID_t &publication_id, const LocalPublication &pub)
 
void populate_discovered_reader_msg (DCPS::DiscoveredReaderData &drd, const DCPS::GUID_t &subscription_id, const LocalSubscription &sub)
 
void process_discovered_writer_data (DCPS::MessageId message_id, const DCPS::DiscoveredWriterData &wdata, const DCPS::GUID_t &guid, const XTypes::TypeInformation &type_info, bool have_ice_agent_info, const ICE::AgentInfo &ice_agent_info, const DDS::Security::EndpointSecurityInfo *security_info=NULL)
 
void data_received (DCPS::MessageId message_id, const DiscoveredPublication &wdata)
 
void data_received (DCPS::MessageId message_id, const ParameterListConverter::DiscoveredPublication_SecurityWrapper &wrapper)
 
void process_discovered_reader_data (DCPS::MessageId message_id, const DCPS::DiscoveredReaderData &rdata, const DCPS::GUID_t &guid, const XTypes::TypeInformation &type_info, bool have_ice_agent_info, const ICE::AgentInfo &ice_agent_info, const DDS::Security::EndpointSecurityInfo *security_info=NULL)
 
void data_received (DCPS::MessageId message_id, const DiscoveredSubscription &rdata)
 
void data_received (DCPS::MessageId message_id, const ParameterListConverter::DiscoveredSubscription_SecurityWrapper &wrapper)
 
void notify_liveliness (const ParticipantMessageData &pmd)
 
void data_received (DCPS::MessageId message_id, const ParticipantMessageData &data)
 
void received_participant_message_data_secure (DCPS::MessageId message_id, const ParticipantMessageData &data)
 
bool should_drop_stateless_message (const DDS::Security::ParticipantGenericMessage &msg)
 
bool should_drop_volatile_message (const DDS::Security::ParticipantGenericMessage &msg)
 
bool should_drop_message (const char *unsecure_topic_name)
 
void received_stateless_message (DCPS::MessageId message_id, const DDS::Security::ParticipantStatelessMessage &data)
 
void received_volatile_message_secure (DCPS::MessageId message_id, const DDS::Security::ParticipantVolatileMessageSecure &data)
 
void assign_bit_key (DiscoveredPublication &pub)
 
void assign_bit_key (DiscoveredSubscription &sub)
 
template<typename Map >
void remove_entities_belonging_to (Map &m, DCPS::GUID_t participant, bool subscription, OPENDDS_VECTOR(typename Map::mapped_type)&to_remove_from_bit)
 
void remove_from_bit_i (const DiscoveredPublication &pub)
 
void remove_from_bit_i (const DiscoveredSubscription &sub)
 
virtual DDS::ReturnCode_t remove_publication_i (const DCPS::GUID_t &publicationId, LocalPublication &pub)
 
virtual DDS::ReturnCode_t remove_subscription_i (const DCPS::GUID_t &subscriptionId, LocalSubscription &sub)
 
virtual bool shutting_down () const
 
virtual void populate_transport_locator_sequence (DCPS::TransportLocatorSeq &tls, DiscoveredSubscriptionIter &iter, const DCPS::GUID_t &reader)
 
virtual void populate_transport_locator_sequence (DCPS::TransportLocatorSeq &tls, DiscoveredPublicationIter &iter, const DCPS::GUID_t &writer)
 
void write_durable_publication_data (const DCPS::GUID_t &reader, bool secure)
 
void write_durable_subscription_data (const DCPS::GUID_t &reader, bool secure)
 
void write_durable_participant_message_data (const DCPS::GUID_t &reader)
 
void write_durable_participant_message_data_secure (const DCPS::GUID_t &reader)
 
DDS::ReturnCode_t add_publication_i (const DCPS::GUID_t &rid, LocalPublication &pub)
 
DDS::ReturnCode_t write_publication_data (const DCPS::GUID_t &rid, LocalPublication &pub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
 
DDS::ReturnCode_t write_publication_data_secure (const DCPS::GUID_t &rid, LocalPublication &pub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
 
DDS::ReturnCode_t write_publication_data_unsecure (const DCPS::GUID_t &rid, LocalPublication &pub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
 
DDS::ReturnCode_t add_subscription_i (const DCPS::GUID_t &rid, LocalSubscription &sub)
 
DDS::ReturnCode_t write_subscription_data (const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
 
DDS::ReturnCode_t write_subscription_data_secure (const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
 
DDS::ReturnCode_t write_subscription_data_unsecure (const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
 
DDS::ReturnCode_t write_participant_message_data (const DCPS::GUID_t &rid, DCPS::SequenceNumber &sn, const DCPS::GUID_t &reader=GUID_UNKNOWN)
 
DDS::ReturnCode_t write_participant_message_data_secure (const DCPS::GUID_t &rid, DCPS::SequenceNumber &sn, const DCPS::GUID_t &reader=GUID_UNKNOWN)
 
virtual bool is_expectant_opendds (const GUID_t &endpoint) const
 

Static Private Member Functions

static void set_inline_qos (DCPS::TransportLocatorSeq &locators)
 

Private Attributes

DCPS::TransportInst_rch transport_inst_
 
DCPS::TransportConfig_rch transport_cfg_
 
DCPS::ReactorTask_rch reactor_task_
 
DCPS::JobQueue_rch job_queue_
 
DCPS::EventDispatcher_rch event_dispatcher_
 
DCPS::RepoIdSet associated_participants_
 

Friends

class Spdp
 

Additional Inherited Members

- Public Types inherited from ACE_Event_Handler
typedef long Reference_Count
 
- Static Public Member Functions inherited from ACE_Event_Handler
static ACE_THR_FUNC_RETURN read_adapter (void *event_handler)
 
static int register_stdin_handler (ACE_Event_Handler *eh, ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr, int flags=THR_DETACHED)
 
static int remove_stdin_handler (ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr)
 
- Public Attributes inherited from ACE_Event_Handler
 LO_PRIORITY
 
 HI_PRIORITY
 
 NULL_MASK
 
 READ_MASK
 
 WRITE_MASK
 
 EXCEPT_MASK
 
 ACCEPT_MASK
 
 CONNECT_MASK
 
 TIMER_MASK
 
 QOS_MASK
 
 GROUP_QOS_MASK
 
 SIGNAL_MASK
 
 ALL_EVENTS_MASK
 
 RWE_MASK
 
 DONT_CALL
 
 ACE_EVENT_HANDLER_NOT_RESUMED
 
 ACE_REACTOR_RESUMES_HANDLER
 
 ACE_APPLICATION_RESUMES_HANDLER
 

Detailed Description

Definition at line 78 of file Sedp.h.

Member Typedef Documentation

◆ DiscoveredPublicationIter

typedef DiscoveredPublicationMap::iterator OpenDDS::RTPS::Sedp::DiscoveredPublicationIter
private

Definition at line 276 of file Sedp.h.

◆ DiscoveredSubscriptionIter

typedef DiscoveredSubscriptionMap::iterator OpenDDS::RTPS::Sedp::DiscoveredSubscriptionIter
private

Definition at line 272 of file Sedp.h.

◆ DiscoveryReader_rch

Definition at line 656 of file Sedp.h.

◆ DiscoveryWriter_rch

Definition at line 561 of file Sedp.h.

◆ EndpointManagerSporadic

Definition at line 1121 of file Sedp.h.

◆ LivelinessReader_rch

Definition at line 673 of file Sedp.h.

◆ LivelinessWriter_rch

Definition at line 543 of file Sedp.h.

◆ LocalPublicationCIter

typedef LocalPublicationMap::const_iterator OpenDDS::RTPS::Sedp::LocalPublicationCIter
private

Definition at line 322 of file Sedp.h.

◆ LocalPublicationIter

typedef LocalPublicationMap::iterator OpenDDS::RTPS::Sedp::LocalPublicationIter
private

Definition at line 321 of file Sedp.h.

◆ LocalSubscriptionCIter

typedef LocalSubscriptionMap::const_iterator OpenDDS::RTPS::Sedp::LocalSubscriptionCIter
private

Definition at line 327 of file Sedp.h.

◆ LocalSubscriptionIter

typedef LocalSubscriptionMap::iterator OpenDDS::RTPS::Sedp::LocalSubscriptionIter
private

Definition at line 326 of file Sedp.h.

◆ MatchingDataIter

typedef MatchingDataMap::iterator OpenDDS::RTPS::Sedp::MatchingDataIter
protected

Definition at line 1119 of file Sedp.h.

◆ Reader_rch

Definition at line 639 of file Sedp.h.

◆ SecurityReader_rch

Definition at line 690 of file Sedp.h.

◆ SecurityWriter_rch

Definition at line 527 of file Sedp.h.

◆ TypeLookupReplyReader_rch

Definition at line 763 of file Sedp.h.

◆ TypeLookupReplyWriter_rch

Definition at line 605 of file Sedp.h.

◆ TypeLookupRequestReader_rch

Definition at line 723 of file Sedp.h.

◆ TypeLookupRequestWriter_rch

Definition at line 584 of file Sedp.h.

Constructor & Destructor Documentation

◆ Sedp()

OpenDDS::RTPS::Sedp::Sedp ( const DCPS::GUID_t participant_id,
Spdp owner,
ACE_Thread_Mutex lock 
)

Definition at line 283 of file Sedp.cpp.

284  : spdp_(owner)
285  , lock_(lock)
286  , participant_id_(participant_id)
289  , topic_counter_(0)
292  , use_xtypes_(true)
293  , use_xtypes_complete_(false)
296 #ifdef OPENDDS_SECURITY
299 #endif
300 #ifdef OPENDDS_SECURITY
303 #endif
304  , publications_writer_(make_rch<DiscoveryWriter>(
305  make_id(participant_id, ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER), ref(*this)))
306 #ifdef OPENDDS_SECURITY
307  , publications_secure_writer_(make_rch<DiscoveryWriter>(
309 #endif
310  , subscriptions_writer_(make_rch<DiscoveryWriter>(
311  make_id(participant_id, ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER), ref(*this)))
312 #ifdef OPENDDS_SECURITY
313  , subscriptions_secure_writer_(make_rch<DiscoveryWriter>(
315 #endif
316  , participant_message_writer_(make_rch<LivelinessWriter>(
318 #ifdef OPENDDS_SECURITY
319  , participant_message_secure_writer_(make_rch<LivelinessWriter>(
321  , participant_stateless_message_writer_(make_rch<SecurityWriter>(
323  , dcps_participant_secure_writer_(make_rch<DiscoveryWriter>(
325  , participant_volatile_message_secure_writer_(make_rch<SecurityWriter>(
327 #endif
328  , type_lookup_request_writer_(make_rch<TypeLookupRequestWriter>(
329  make_id(participant_id, ENTITYID_TL_SVC_REQ_WRITER), ref(*this)))
330  , type_lookup_reply_writer_(make_rch<TypeLookupReplyWriter>(
331  make_id(participant_id, ENTITYID_TL_SVC_REPLY_WRITER), ref(*this)))
332 #ifdef OPENDDS_SECURITY
333  , type_lookup_request_secure_writer_(make_rch<TypeLookupRequestWriter>(
334  make_id(participant_id, ENTITYID_TL_SVC_REQ_WRITER_SECURE), ref(*this)))
335  , type_lookup_reply_secure_writer_(make_rch<TypeLookupReplyWriter>(
336  make_id(participant_id, ENTITYID_TL_SVC_REPLY_WRITER_SECURE), ref(*this)))
337 #endif
338  , publications_reader_(make_rch<DiscoveryReader>(
339  make_id(participant_id, ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER), ref(*this)))
340 #ifdef OPENDDS_SECURITY
341  , publications_secure_reader_(make_rch<DiscoveryReader>(
343 #endif
344  , subscriptions_reader_(make_rch<DiscoveryReader>(
345  make_id(participant_id, ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER), ref(*this)))
346 #ifdef OPENDDS_SECURITY
347  , subscriptions_secure_reader_(make_rch<DiscoveryReader>(
349 #endif
350  , participant_message_reader_(make_rch<LivelinessReader>(
352 #ifdef OPENDDS_SECURITY
353  , participant_message_secure_reader_(make_rch<LivelinessReader>(
355  , participant_stateless_message_reader_(make_rch<SecurityReader>(
357  , participant_volatile_message_secure_reader_(make_rch<SecurityReader>(
359  , dcps_participant_secure_reader_(make_rch<DiscoveryReader>(
361 #endif
362  , type_lookup_request_reader_(make_rch<TypeLookupRequestReader>(
363  make_id(participant_id, ENTITYID_TL_SVC_REQ_READER), ref(*this)))
364  , type_lookup_reply_reader_(make_rch<TypeLookupReplyReader>(
365  make_id(participant_id, ENTITYID_TL_SVC_REPLY_READER), ref(*this)))
366 #ifdef OPENDDS_SECURITY
367  , type_lookup_request_secure_reader_(make_rch<TypeLookupRequestReader>(
368  make_id(participant_id, ENTITYID_TL_SVC_REQ_READER_SECURE), ref(*this)))
369  , type_lookup_reply_secure_reader_(make_rch<TypeLookupReplyReader>(
370  make_id(participant_id, ENTITYID_TL_SVC_REPLY_READER_SECURE), ref(*this)))
372  , publication_agent_info_listener_(DCPS::make_rch<PublicationAgentInfoListener>(ref(*this)))
373  , subscription_agent_info_listener_(DCPS::make_rch<SubscriptionAgentInfoListener>(ref(*this)))
374 #endif // OPENDDS_SECURITY
375 {}
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER
Definition: MessageTypes.h:81
DiscoveryWriter_rch dcps_participant_secure_writer_
Definition: Sedp.h:1288
TimeDuration max_type_lookup_service_reply_period_
Definition: Sedp.h:1244
DiscoveryReader_rch subscriptions_secure_reader_
Definition: Sedp.h:1304
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
DiscoveryWriter_rch publications_secure_writer_
Definition: Sedp.h:1278
const InstanceHandle_t HANDLE_NIL
TypeLookupReplyWriter_rch type_lookup_reply_writer_
Definition: Sedp.h:1293
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER
Definition: GuidUtils.h:43
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER
Definition: MessageTypes.h:78
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER
Definition: GuidUtils.h:47
DiscoveryReader_rch publications_secure_reader_
Definition: Sedp.h:1300
const EntityId_t ENTITYID_TL_SVC_REQ_WRITER
Definition: GuidUtils.h:52
TypeLookupRequestWriter_rch type_lookup_request_secure_writer_
Definition: Sedp.h:1295
const EntityId_t ENTITYID_TL_SVC_REPLY_READER
Definition: GuidUtils.h:55
DDS::Security::ParticipantCryptoHandle crypto_handle_
Definition: Sedp.h:1264
DCPS::SequenceNumber type_lookup_service_sequence_number_
Definition: Sedp.h:1245
DiscoveryReader_rch subscriptions_reader_
Definition: Sedp.h:1302
const EntityId_t ENTITYID_TL_SVC_REQ_WRITER_SECURE
Definition: MessageTypes.h:90
reference_wrapper< T > ref(T &r)
Definition: RcHandle_T.h:237
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER
Definition: MessageTypes.h:88
const EntityId_t ENTITYID_TL_SVC_REPLY_READER_SECURE
Definition: MessageTypes.h:93
const bool use_xtypes_
Definition: Sedp.h:1246
unsigned int subscription_counter_
Definition: Sedp.h:1231
TypeLookupReplyReader_rch type_lookup_reply_reader_
Definition: Sedp.h:1314
RcHandle< PublicationAgentInfoListener > publication_agent_info_listener_
Definition: Sedp.h:1322
TypeLookupReplyWriter_rch type_lookup_reply_secure_writer_
Definition: Sedp.h:1296
TypeLookupReplyReader_rch type_lookup_reply_secure_reader_
Definition: Sedp.h:1317
LivelinessReader_rch participant_message_secure_reader_
Definition: Sedp.h:1308
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER
Definition: MessageTypes.h:79
LivelinessWriter_rch participant_message_writer_
Definition: Sedp.h:1284
const EntityId_t ENTITYID_TL_SVC_REPLY_WRITER_SECURE
Definition: MessageTypes.h:92
SecurityReader_rch participant_volatile_message_secure_reader_
Definition: Sedp.h:1310
GUID_t participant_id_
Definition: Sedp.h:1229
SecurityReader_rch participant_stateless_message_reader_
Definition: Sedp.h:1309
DCPS::SequenceNumber local_participant_manual_liveliness_sn_secure_
Definition: Sedp.h:1254
const EntityId_t ENTITYID_TL_SVC_REQ_READER
Definition: GuidUtils.h:53
const EntityId_t ENTITYID_TL_SVC_REPLY_WRITER
Definition: GuidUtils.h:54
const bool use_xtypes_complete_
Definition: Sedp.h:1247
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER
Definition: GuidUtils.h:40
unsigned int publication_counter_
Definition: Sedp.h:1231
DCPS::SequenceNumber local_participant_automatic_liveliness_sn_secure_
Definition: Sedp.h:1253
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER
Definition: MessageTypes.h:83
DiscoveryWriter_rch subscriptions_writer_
Definition: Sedp.h:1280
LivelinessReader_rch participant_message_reader_
Definition: Sedp.h:1306
DCPS::SequenceNumber local_participant_automatic_liveliness_sn_
Definition: Sedp.h:1250
TypeLookupRequestReader_rch type_lookup_request_secure_reader_
Definition: Sedp.h:1316
DiscoveryReader_rch dcps_participant_secure_reader_
Definition: Sedp.h:1311
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER
Definition: MessageTypes.h:85
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER
Definition: MessageTypes.h:82
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
Definition: MessageTypes.h:77
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER
Definition: GuidUtils.h:42
LivelinessWriter_rch participant_message_secure_writer_
Definition: Sedp.h:1286
TypeLookupRequestWriter_rch type_lookup_request_writer_
Definition: Sedp.h:1292
DiscoveryWriter_rch subscriptions_secure_writer_
Definition: Sedp.h:1282
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER
Definition: MessageTypes.h:86
SecurityWriter_rch participant_volatile_message_secure_writer_
Definition: Sedp.h:1290
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER
Definition: MessageTypes.h:84
const EntityId_t ENTITYID_TL_SVC_REQ_READER_SECURE
Definition: MessageTypes.h:91
static DCPS::RcHandle< Agent > instance()
Definition: Ice.cpp:122
static SequenceNumber SEQUENCENUMBER_UNKNOWN()
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321
RcHandle< SubscriptionAgentInfoListener > subscription_agent_info_listener_
Definition: Sedp.h:1323
unsigned int topic_counter_
Definition: Sedp.h:1231
DiscoveryReader_rch publications_reader_
Definition: Sedp.h:1298
DDS::Security::PermissionsHandle permissions_handle_
Definition: Sedp.h:1263
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER
Definition: MessageTypes.h:87
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER
Definition: GuidUtils.h:41
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
TypeLookupRequestReader_rch type_lookup_request_reader_
Definition: Sedp.h:1313
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER
Definition: GuidUtils.h:46
SecurityWriter_rch participant_stateless_message_writer_
Definition: Sedp.h:1287
DCPS::SequenceNumber local_participant_manual_liveliness_sn_
Definition: Sedp.h:1251
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER
Definition: MessageTypes.h:80
DiscoveryWriter_rch publications_writer_
Definition: Sedp.h:1276

◆ ~Sedp()

OpenDDS::RTPS::Sedp::~Sedp ( )

Definition at line 877 of file Sedp.cpp.

References cleanup_secure_reader(), cleanup_secure_writer(), dcps_participant_secure_reader_, dcps_participant_secure_writer_, OpenDDS::Security::SecurityConfig::erase_handle_registry(), OpenDDS::RTPS::Spdp::get_security_config(), job_queue_, participant_id_, participant_message_secure_reader_, participant_message_secure_writer_, participant_volatile_message_secure_reader_, participant_volatile_message_secure_writer_, publications_secure_reader_, publications_secure_writer_, reactor_task_, OpenDDS::DCPS::RcHandle< T >::reset(), spdp_, OpenDDS::DCPS::static_rchandle_cast(), subscriptions_secure_reader_, subscriptions_secure_writer_, TheTransportRegistry, transport_cfg_, transport_inst_, and type_lookup_fini().

878 {
880 
881 #ifdef OPENDDS_SECURITY
882  using namespace OpenDDS::Security;
883  using namespace DDS::Security;
884 
885  SecurityException ex = {"", 0, 0};
886 
897  if (spdp_.get_security_config()) {
899  }
900 #endif
901 
902  job_queue_.reset();
904  DCPS::RtpsUdpInst_rch rtps_inst =
905  DCPS::static_rchandle_cast<DCPS::RtpsUdpInst>(transport_inst_);
906  rtps_inst->opendds_discovery_default_listener_.reset();
907  TheTransportRegistry->remove_config(transport_cfg_);
909 }
DiscoveryWriter_rch dcps_participant_secure_writer_
Definition: Sedp.h:1288
#define TheTransportRegistry
DiscoveryReader_rch subscriptions_secure_reader_
Definition: Sedp.h:1304
RcHandle< RtpsUdpInst > RtpsUdpInst_rch
DiscoveryWriter_rch publications_secure_writer_
Definition: Sedp.h:1278
DCPS::TransportConfig_rch transport_cfg_
Definition: Sedp.h:771
void cleanup_secure_reader(const GUID_t &subscriptionId)
Definition: Sedp.cpp:6644
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
DiscoveryReader_rch publications_secure_reader_
Definition: Sedp.h:1300
DCPS::JobQueue_rch job_queue_
Definition: Sedp.h:773
void type_lookup_fini()
Definition: Sedp.h:299
LivelinessReader_rch participant_message_secure_reader_
Definition: Sedp.h:1308
SecurityReader_rch participant_volatile_message_secure_reader_
Definition: Sedp.h:1310
GUID_t participant_id_
Definition: Sedp.h:1229
DiscoveryReader_rch dcps_participant_secure_reader_
Definition: Sedp.h:1311
LivelinessWriter_rch participant_message_secure_writer_
Definition: Sedp.h:1286
DiscoveryWriter_rch subscriptions_secure_writer_
Definition: Sedp.h:1282
SecurityWriter_rch participant_volatile_message_secure_writer_
Definition: Sedp.h:1290
RcHandle< T > static_rchandle_cast(const RcHandle< U > &h)
Definition: RcHandle_T.h:202
Security::SecurityConfig_rch get_security_config() const
Definition: Spdp.h:128
DCPS::ReactorTask_rch reactor_task_
Definition: Sedp.h:772
void cleanup_secure_writer(const GUID_t &publicationId)
Definition: Sedp.cpp:6617
void erase_handle_registry(const DCPS::GUID_t &participant_id)

Member Function Documentation

◆ add_assoc_i() [1/2]

void OpenDDS::RTPS::Sedp::add_assoc_i ( const DCPS::GUID_t local_guid,
const LocalPublication lpub,
const DCPS::GUID_t remote_guid,
const DiscoveredSubscription dsub 
)
protected

Definition at line 5616 of file Sedp.cpp.

References OpenDDS::RTPS::DiscoveredSubscription::have_ice_agent_info_, ice_agent_, OpenDDS::RTPS::DiscoveredSubscription::ice_agent_info_, OpenDDS::DCPS::WeakRcHandle< T >::lock(), and OpenDDS::RTPS::LocalPublication::publication_.

Referenced by match_continue(), and OpenDDS::RTPS::Sedp::SubscriptionAgentInfoListener::SubscriptionAgentInfoListener().

5617  {
5618 #ifdef OPENDDS_SECURITY
5619  DCPS::DataWriterCallbacks_rch pl = lpub.publication_.lock();
5620  if (pl) {
5621  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = pl->get_ice_endpoint();
5622  if (endpoint && dsub.have_ice_agent_info_) {
5623  ice_agent_->start_ice(endpoint, local_guid, remote_guid, dsub.ice_agent_info_);
5624  }
5625  }
5626 #else
5627  ACE_UNUSED_ARG(local_guid);
5628  ACE_UNUSED_ARG(lpub);
5629  ACE_UNUSED_ARG(remote_guid);
5630  ACE_UNUSED_ARG(dsub);
5631 #endif
5632 }
RcHandle< DataWriterCallbacks > DataWriterCallbacks_rch
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321

◆ add_assoc_i() [2/2]

void OpenDDS::RTPS::Sedp::add_assoc_i ( const DCPS::GUID_t local_guid,
const LocalSubscription lsub,
const DCPS::GUID_t remote_guid,
const DiscoveredPublication dpub 
)
protected

Definition at line 5653 of file Sedp.cpp.

References OpenDDS::RTPS::DiscoveredPublication::have_ice_agent_info_, ice_agent_, OpenDDS::RTPS::DiscoveredPublication::ice_agent_info_, OpenDDS::DCPS::WeakRcHandle< T >::lock(), and OpenDDS::RTPS::LocalSubscription::subscription_.

5654  {
5655 #ifdef OPENDDS_SECURITY
5656  DCPS::DataReaderCallbacks_rch sl = lsub.subscription_.lock();
5657  if (sl) {
5658  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = sl->get_ice_endpoint();
5659  if (endpoint && dpub.have_ice_agent_info_) {
5660  ice_agent_->start_ice(endpoint, local_guid, remote_guid, dpub.ice_agent_info_);
5661  }
5662  }
5663 #else
5664  ACE_UNUSED_ARG(local_guid);
5665  ACE_UNUSED_ARG(lsub);
5666  ACE_UNUSED_ARG(remote_guid);
5667  ACE_UNUSED_ARG(dpub);
5668 #endif
5669 }
RcHandle< DataReaderCallbacks > DataReaderCallbacks_rch
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321

◆ add_publication()

GUID_t OpenDDS::RTPS::Sedp::add_publication ( const GUID_t topicId,
DCPS::DataWriterCallbacks_rch  publication,
const DDS::DataWriterQos qos,
const DCPS::TransportLocatorSeq transInfo,
const DDS::PublisherQos publisherQos,
const XTypes::TypeInformation type_info 
)

Definition at line 6122 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), OpenDDS::DCPS::TopicDetails::add_local_publication(), add_publication_i(), assign_publication_key(), DDS::Security::SecurityException::code, crypto_handle_, OpenDDS::DCPS::DCPS_debug_level, get_access_control(), get_crypto_key_factory(), get_domain_id(), get_handle_registry(), get_permissions_handle(), DDS::HANDLE_NIL, OpenDDS::Security::HandleRegistry::insert_local_datawriter_crypto_handle(), DDS::Security::EndpointSecurityAttributes::is_payload_protected, is_security_enabled(), DDS::Security::EndpointSecurityAttributes::is_submessage_protected, DDS::Security::TopicSecurityAttributes::is_write_protected, LM_DEBUG, LM_ERROR, LM_WARNING, local_publications_, OpenDDS::DCPS::TransportClient::lock_, match_endpoints(), DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, participant_id_, DDS::PublisherQos::partition, OpenDDS::RTPS::LocalPublication::publication_, OpenDDS::RTPS::LocalPublication::publisher_qos_, OpenDDS::RTPS::LocalPublication::qos_, DDS::RETCODE_OK, OpenDDS::RTPS::LocalEntity::security_attribs_, OpenDDS::RTPS::LocalEntity::topic_id_, topic_names_, topics_, OpenDDS::RTPS::LocalEntity::trans_info_, OpenDDS::RTPS::LocalEntity::type_info_, and write_publication_data().

Referenced by ignoring().

6129 {
6130  ACE_GUARD_RETURN(ACE_Thread_Mutex, g, lock_, GUID_t());
6131 
6132  GUID_t rid = participant_id_;
6133  assign_publication_key(rid, topicId, qos);
6134  LocalPublication& pb = local_publications_[rid];
6135  pb.topic_id_ = topicId;
6136  pb.publication_ = publication;
6137  pb.qos_ = qos;
6138  pb.trans_info_ = transInfo;
6139  pb.publisher_qos_ = publisherQos;
6140  pb.type_info_ = type_info;
6141  const String& topic_name = topic_names_[topicId];
6142 
6143 #ifdef OPENDDS_SECURITY
6144  if (is_security_enabled()) {
6146 
6149  if (!get_access_control()->get_topic_sec_attributes(permh, topic_name.data(), topic_sec_attr, ex)) {
6150  ACE_ERROR((LM_ERROR,
6151  ACE_TEXT("(%P|%t) ERROR: ")
6152  ACE_TEXT("Sedp::add_publication: ")
6153  ACE_TEXT("Unable to get security attributes for topic '%C'. SecurityException[%d.%d]: %C\n"),
6154  topic_name.data(), ex.code, ex.minor_code, ex.message.in()));
6155  return GUID_t();
6156  }
6157 
6158  if (topic_sec_attr.is_write_protected) {
6159  if (!get_access_control()->check_create_datawriter(
6160  permh, get_domain_id(), topic_name.data(), qos,
6161  publisherQos.partition, DDS::Security::DataTagQosPolicy(), ex)) {
6162  ACE_ERROR((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: ")
6163  ACE_TEXT("Sedp::add_publication: ")
6164  ACE_TEXT("Permissions check failed for local datawriter on topic '%C'. ")
6165  ACE_TEXT("Security Exception[%d.%d]: %C\n"), topic_name.data(),
6166  ex.code, ex.minor_code, ex.message.in()));
6167  return GUID_t();
6168  }
6169  }
6170 
6171  if (!get_access_control()->get_datawriter_sec_attributes(permh, topic_name.data(),
6172  publisherQos.partition, DDS::Security::DataTagQosPolicy(), pb.security_attribs_, ex)) {
6173  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ")
6174  ACE_TEXT("Sedp::add_publication: ")
6175  ACE_TEXT("Unable to get security attributes for local datawriter. ")
6176  ACE_TEXT("Security Exception[%d.%d]: %C\n"),
6177  ex.code, ex.minor_code, ex.message.in()));
6178  return GUID_t();
6179  }
6180 
6181  if (pb.security_attribs_.is_submessage_protected || pb.security_attribs_.is_payload_protected) {
6183  get_crypto_key_factory()->register_local_datawriter(
6184  crypto_handle_, DDS::PropertySeq(), pb.security_attribs_, ex);
6185  if (handle == DDS::HANDLE_NIL) {
6186  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ")
6187  ACE_TEXT("Sedp::add_publication: ")
6188  ACE_TEXT("Unable to get local datawriter crypto handle. ")
6189  ACE_TEXT("Security Exception[%d.%d]: %C\n"),
6190  ex.code, ex.minor_code, ex.message.in()));
6191  }
6192 
6193  get_handle_registry()->insert_local_datawriter_crypto_handle(rid, handle, pb.security_attribs_);
6194  }
6195  }
6196 #endif
6197 
6198  DCPS::TopicDetails& td = topics_[topic_name];
6199  td.add_local_publication(rid);
6200 
6201  if (DDS::RETCODE_OK != add_publication_i(rid, pb)) {
6202  return GUID_t();
6203  }
6204 
6205  if (DDS::RETCODE_OK != write_publication_data(rid, pb)) {
6206  return GUID_t();
6207  }
6208 
6209  if (DCPS_debug_level > 3) {
6210  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) Sedp::add_publication: ")
6211  ACE_TEXT("calling match_endpoints\n")));
6212  }
6213  match_endpoints(rid, td);
6214 
6215  return rid;
6216 }
#define ACE_DEBUG(X)
void insert_local_datawriter_crypto_handle(const DCPS::GUID_t &id, DDS::Security::DatawriterCryptoHandle handle, const DDS::Security::EndpointSecurityAttributes &attributes)
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_ERROR(X)
DDS::Security::PermissionsHandle get_permissions_handle() const
Definition: Sedp.h:1186
const InstanceHandle_t HANDLE_NIL
std::string String
DDS::ReturnCode_t add_publication_i(const DCPS::GUID_t &rid, LocalPublication &pub)
Definition: Sedp.cpp:4806
DDS::Security::ParticipantCryptoHandle crypto_handle_
Definition: Sedp.h:1264
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
void match_endpoints(GUID_t repoId, const DCPS::TopicDetails &td, bool remove=false)
Definition: Sedp.cpp:6673
DDS::Security::CryptoKeyFactory_var get_crypto_key_factory() const
Definition: Sedp.h:1206
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
NativeCryptoHandle DatawriterCryptoHandle
bool is_security_enabled()
Definition: Sedp.h:1176
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
DDS::Security::AccessControl_var get_access_control() const
Definition: Sedp.h:1196
GUID_t participant_id_
Definition: Sedp.h:1229
DDS::PropertySeq PropertySeq
Definition: RtpsCore.idl:49
DataTags DataTagQosPolicy
ACE_TEXT("TCP_Factory")
virtual void assign_publication_key(GUID_t &rid, const GUID_t &topicId, const DDS::DataWriterQos &)
Definition: Sedp.h:1018
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const ReturnCode_t RETCODE_OK
DDS::DomainId_t get_domain_id() const
Definition: Sedp.cpp:5538
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
TopicNameMap topic_names_
Definition: Sedp.h:1237
DDS::ReturnCode_t write_publication_data(const DCPS::GUID_t &rid, LocalPublication &pub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4830
PartitionQosPolicy partition

◆ add_publication_i()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::add_publication_i ( const DCPS::GUID_t rid,
LocalPublication pub 
)
private

Definition at line 4806 of file Sedp.cpp.

References OpenDDS::RTPS::Spdp::config(), OpenDDS::RTPS::Spdp::get_participant_discovered_at(), OpenDDS::RTPS::LocalEntity::have_ice_agent_info, ice_agent_, OpenDDS::RTPS::LocalEntity::ice_agent_info, OpenDDS::DCPS::WeakRcHandle< T >::lock(), OpenDDS::RTPS::LocalEntity::participant_discovered_at_, OpenDDS::RTPS::LocalPublication::publication_, publication_agent_info_listener_, DDS::RETCODE_OK, spdp_, start_ice(), and OpenDDS::RTPS::LocalEntity::transport_context_.

Referenced by add_publication().

4808 {
4809  pub.participant_discovered_at_ = spdp_.get_participant_discovered_at();
4810  pub.transport_context_ = spdp_.config()->participant_flags();
4811 #ifdef OPENDDS_SECURITY
4812  DCPS::DataWriterCallbacks_rch pl = pub.publication_.lock();
4813  if (pl) {
4814  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = pl->get_ice_endpoint();
4815  if (endpoint) {
4816  pub.have_ice_agent_info = true;
4817  pub.ice_agent_info = ice_agent_->get_local_agent_info(endpoint);
4818  ice_agent_->add_local_agent_info_listener(endpoint, rid, DCPS::static_rchandle_cast<ICE::AgentInfoListener>(publication_agent_info_listener_));
4819  start_ice(rid, pub);
4820  }
4821  }
4822 #else
4823  ACE_UNUSED_ARG(rid);
4824  ACE_UNUSED_ARG(pub);
4825 #endif
4826  return DDS::RETCODE_OK;
4827 }
RcHandle< PublicationAgentInfoListener > publication_agent_info_listener_
Definition: Sedp.h:1322
RcHandle< DataWriterCallbacks > DataWriterCallbacks_rch
DCPS::MonotonicTime_t get_participant_discovered_at() const
Definition: Spdp.cpp:4461
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321
DCPS::RcHandle< RtpsDiscoveryConfig > config() const
Definition: Spdp.h:218
const ReturnCode_t RETCODE_OK
void start_ice(const DCPS::GUID_t &guid, const LocalPublication &lpub)
Definition: Sedp.cpp:5740

◆ add_subscription()

GUID_t OpenDDS::RTPS::Sedp::add_subscription ( const GUID_t topicId,
DCPS::DataReaderCallbacks_rch  subscription,
const DDS::DataReaderQos qos,
const DCPS::TransportLocatorSeq transInfo,
const DDS::SubscriberQos subscriberQos,
const char *  filterClassName,
const char *  filterExpr,
const DDS::StringSeq params,
const XTypes::TypeInformation type_info 
)

Definition at line 6261 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), OpenDDS::DCPS::TopicDetails::add_local_subscription(), add_subscription_i(), assign_subscription_key(), DDS::Security::SecurityException::code, crypto_handle_, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::ContentFilterProperty_t::expressionParameters, OpenDDS::DCPS::ContentFilterProperty_t::filterClassName, OpenDDS::DCPS::ContentFilterProperty_t::filterExpression, OpenDDS::RTPS::LocalSubscription::filterProperties, get_access_control(), get_crypto_key_factory(), get_domain_id(), get_handle_registry(), get_permissions_handle(), DDS::HANDLE_NIL, OpenDDS::Security::HandleRegistry::insert_local_datareader_crypto_handle(), DDS::Security::EndpointSecurityAttributes::is_payload_protected, DDS::Security::TopicSecurityAttributes::is_read_protected, is_security_enabled(), DDS::Security::EndpointSecurityAttributes::is_submessage_protected, LM_DEBUG, LM_ERROR, LM_WARNING, local_subscriptions_, OpenDDS::DCPS::TransportClient::lock_, match_endpoints(), DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, participant_id_, DDS::SubscriberQos::partition, OpenDDS::RTPS::LocalSubscription::qos_, DDS::RETCODE_OK, OpenDDS::RTPS::LocalEntity::security_attribs_, OpenDDS::RTPS::LocalSubscription::subscriber_qos_, OpenDDS::RTPS::LocalSubscription::subscription_, OpenDDS::RTPS::LocalEntity::topic_id_, topic_names_, topics_, OpenDDS::RTPS::LocalEntity::trans_info_, OpenDDS::RTPS::LocalEntity::type_info_, and write_subscription_data().

Referenced by ignoring().

6271 {
6272  ACE_GUARD_RETURN(ACE_Thread_Mutex, g, lock_, GUID_t());
6273 
6274  GUID_t rid = participant_id_;
6275  assign_subscription_key(rid, topicId, qos);
6276  LocalSubscription& sb = local_subscriptions_[rid];
6277  sb.topic_id_ = topicId;
6278  sb.subscription_ = subscription;
6279  sb.qos_ = qos;
6280  sb.trans_info_ = transInfo;
6281  sb.subscriber_qos_ = subscriberQos;
6282  sb.filterProperties.filterClassName = filterClassName;
6283  sb.filterProperties.filterExpression = filterExpr;
6284  sb.filterProperties.expressionParameters = params;
6285  sb.type_info_ = type_info;
6286  const String& topic_name = topic_names_[topicId];
6287 
6288 #ifdef OPENDDS_SECURITY
6289  if (is_security_enabled()) {
6291 
6293  if (!get_access_control()->get_topic_sec_attributes(
6294  get_permissions_handle(), topic_name.data(), topic_sec_attr, ex)) {
6295  ACE_ERROR((LM_ERROR,
6296  ACE_TEXT("(%P|%t) ERROR: ")
6297  ACE_TEXT("Sedp::add_subscription: ")
6298  ACE_TEXT("Unable to get security attributes for topic '%C'. ")
6299  ACE_TEXT("SecurityException[%d.%d]: %C\n"),
6300  topic_name.data(), ex.code, ex.minor_code, ex.message.in()));
6301  return GUID_t();
6302  }
6303 
6304  if (topic_sec_attr.is_read_protected) {
6305  if (!get_access_control()->check_create_datareader(
6306  get_permissions_handle(), get_domain_id(), topic_name.data(), qos,
6307  subscriberQos.partition, DDS::Security::DataTagQosPolicy(), ex)) {
6308  ACE_ERROR((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: ")
6309  ACE_TEXT("Sedp::add_subscription: ")
6310  ACE_TEXT("Permissions check failed for local datareader on topic '%C'. ")
6311  ACE_TEXT("Security Exception[%d.%d]: %C\n"), topic_name.data(),
6312  ex.code, ex.minor_code, ex.message.in()));
6313  return GUID_t();
6314  }
6315  }
6316 
6317  if (!get_access_control()->get_datareader_sec_attributes(get_permissions_handle(), topic_name.data(),
6318  subscriberQos.partition, DDS::Security::DataTagQosPolicy(), sb.security_attribs_, ex)) {
6319  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ")
6320  ACE_TEXT("Sedp::add_subscription: ")
6321  ACE_TEXT("Unable to get security attributes for local datareader. ")
6322  ACE_TEXT("Security Exception[%d.%d]: %C\n"),
6323  ex.code, ex.minor_code, ex.message.in()));
6324  return GUID_t();
6325  }
6326 
6327  if (sb.security_attribs_.is_submessage_protected || sb.security_attribs_.is_payload_protected) {
6329  get_crypto_key_factory()->register_local_datareader(
6330  crypto_handle_, DDS::PropertySeq(), sb.security_attribs_, ex);
6331  if (handle == DDS::HANDLE_NIL) {
6332  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ")
6333  ACE_TEXT("Sedp::add_subscription: ")
6334  ACE_TEXT("Unable to get local datareader crypto handle. ")
6335  ACE_TEXT("Security Exception[%d.%d]: %C\n"),
6336  ex.code, ex.minor_code, ex.message.in()));
6337  }
6338 
6339  get_handle_registry()->insert_local_datareader_crypto_handle(rid, handle, sb.security_attribs_);
6340  }
6341  }
6342 #endif
6343 
6344  DCPS::TopicDetails& td = topics_[topic_name];
6345  td.add_local_subscription(rid);
6346 
6347  if (DDS::RETCODE_OK != add_subscription_i(rid, sb)) {
6348  return GUID_t();
6349  }
6350 
6351  if (DDS::RETCODE_OK != write_subscription_data(rid, sb)) {
6352  return GUID_t();
6353  }
6354 
6355  if (DCPS_debug_level > 3) {
6356  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) Sedp::add_subscription: ")
6357  ACE_TEXT("calling match_endpoints\n")));
6358  }
6359  match_endpoints(rid, td);
6360 
6361  return rid;
6362 }
PartitionQosPolicy partition
#define ACE_DEBUG(X)
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_ERROR(X)
DDS::Security::PermissionsHandle get_permissions_handle() const
Definition: Sedp.h:1186
const InstanceHandle_t HANDLE_NIL
std::string String
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
DDS::Security::ParticipantCryptoHandle crypto_handle_
Definition: Sedp.h:1264
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
void match_endpoints(GUID_t repoId, const DCPS::TopicDetails &td, bool remove=false)
Definition: Sedp.cpp:6673
DDS::Security::CryptoKeyFactory_var get_crypto_key_factory() const
Definition: Sedp.h:1206
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
DDS::ReturnCode_t add_subscription_i(const DCPS::GUID_t &rid, LocalSubscription &sub)
Definition: Sedp.cpp:4958
virtual void assign_subscription_key(GUID_t &rid, const GUID_t &topicId, const DDS::DataReaderQos &)
Definition: Sedp.h:1028
bool is_security_enabled()
Definition: Sedp.h:1176
DDS::ReturnCode_t write_subscription_data(const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4982
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
DDS::Security::AccessControl_var get_access_control() const
Definition: Sedp.h:1196
NativeCryptoHandle DatareaderCryptoHandle
GUID_t participant_id_
Definition: Sedp.h:1229
DDS::PropertySeq PropertySeq
Definition: RtpsCore.idl:49
void insert_local_datareader_crypto_handle(const DCPS::GUID_t &id, DDS::Security::DatareaderCryptoHandle handle, const DDS::Security::EndpointSecurityAttributes &attributes)
DataTags DataTagQosPolicy
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const ReturnCode_t RETCODE_OK
DDS::DomainId_t get_domain_id() const
Definition: Sedp.cpp:5538
TopicNameMap topic_names_
Definition: Sedp.h:1237

◆ add_subscription_i()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::add_subscription_i ( const DCPS::GUID_t rid,
LocalSubscription sub 
)
private

Definition at line 4958 of file Sedp.cpp.

References OpenDDS::RTPS::Spdp::config(), OpenDDS::RTPS::Spdp::get_participant_discovered_at(), OpenDDS::RTPS::LocalEntity::have_ice_agent_info, ice_agent_, OpenDDS::RTPS::LocalEntity::ice_agent_info, OpenDDS::DCPS::WeakRcHandle< T >::lock(), OpenDDS::RTPS::LocalEntity::participant_discovered_at_, DDS::RETCODE_OK, spdp_, start_ice(), OpenDDS::RTPS::LocalSubscription::subscription_, subscription_agent_info_listener_, and OpenDDS::RTPS::LocalEntity::transport_context_.

Referenced by add_subscription().

4960 {
4961  sub.participant_discovered_at_ = spdp_.get_participant_discovered_at();
4962  sub.transport_context_ = spdp_.config()->participant_flags();
4963 #ifdef OPENDDS_SECURITY
4964  DCPS::DataReaderCallbacks_rch sl = sub.subscription_.lock();
4965  if (sl) {
4966  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = sl->get_ice_endpoint();
4967  if (endpoint) {
4968  sub.have_ice_agent_info = true;
4969  sub.ice_agent_info = ice_agent_->get_local_agent_info(endpoint);
4970  ice_agent_->add_local_agent_info_listener(endpoint, rid, DCPS::static_rchandle_cast<ICE::AgentInfoListener>(subscription_agent_info_listener_));
4971  start_ice(rid, sub);
4972  }
4973  }
4974 #else
4975  ACE_UNUSED_ARG(rid);
4976  ACE_UNUSED_ARG(sub);
4977 #endif
4978  return DDS::RETCODE_OK;
4979 }
RcHandle< DataReaderCallbacks > DataReaderCallbacks_rch
DCPS::MonotonicTime_t get_participant_discovered_at() const
Definition: Spdp.cpp:4461
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321
RcHandle< SubscriptionAgentInfoListener > subscription_agent_info_listener_
Definition: Sedp.h:1323
DCPS::RcHandle< RtpsDiscoveryConfig > config() const
Definition: Spdp.h:218
const ReturnCode_t RETCODE_OK
void start_ice(const DCPS::GUID_t &guid, const LocalPublication &lpub)
Definition: Sedp.cpp:5740

◆ append_transport_statistics()

void OpenDDS::RTPS::Sedp::append_transport_statistics ( DCPS::TransportStatisticsSequence seq)

Definition at line 5977 of file Sedp.cpp.

References OpenDDS::DCPS::TransportInst::append_transport_statistics(), and transport_inst_.

Referenced by job_queue().

5978 {
5980 }
virtual void append_transport_statistics(TransportStatisticsSequence &)
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770

◆ assert_topic()

DCPS::TopicStatus OpenDDS::RTPS::Sedp::assert_topic ( GUID_t topicId,
const char *  topicName,
const char *  dataTypeName,
const DDS::TopicQos qos,
bool  hasDcpsKey,
DCPS::TopicCallbacks topic_callbacks 
)

Definition at line 6060 of file Sedp.cpp.

References ACE_GUARD_RETURN, OpenDDS::DCPS::CONFLICTING_TYPENAME, OpenDDS::DCPS::CREATED, OpenDDS::DCPS::FOUND, OpenDDS::DCPS::TopicDetails::init(), OpenDDS::DCPS::INTERNAL_ERROR, OpenDDS::DCPS::TransportClient::lock_, make_topic_guid(), OpenDDS::DCPS::TopicDetails::set_local(), topic_names_, and topics_.

Referenced by OpenDDS::RTPS::Spdp::assert_topic(), and ignoring().

6064 {
6066  DCPS::TopicDetailsMap::iterator iter = topics_.find(topicName);
6067  if (iter != topics_.end()) {
6068  if (iter->second.local_is_set() && iter->second.local_data_type_name() != dataTypeName) {
6070  }
6071  topicId = iter->second.topic_id();
6072  iter->second.set_local(dataTypeName, qos, hasDcpsKey, topic_callbacks);
6073  return DCPS::FOUND;
6074  }
6075 
6076  DCPS::TopicDetails& td = topics_[topicName];
6077  topicId = make_topic_guid();
6078  td.init(topicName, topicId);
6079  topic_names_[topicId] = topicName;
6080  td.set_local(dataTypeName, qos, hasDcpsKey, topic_callbacks);
6081 
6082  return DCPS::CREATED;
6083 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
GUID_t make_topic_guid()
Definition: Sedp.h:1154
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
TopicNameMap topic_names_
Definition: Sedp.h:1237

◆ assign_bit_key() [1/2]

void OpenDDS::RTPS::Sedp::assign_bit_key ( DiscoveredPublication pub)
private

Definition at line 954 of file Sedp.cpp.

References OpenDDS::DCPS::DiscoveredWriterData::ddsPublicationData, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::DCPS::guid_to_bit_key(), OpenDDS::DCPS::make_id(), OpenDDS::DCPS::WriterProxy_t::remoteWriterGuid, OpenDDS::RTPS::DiscoveredPublication::writer_data_, and OpenDDS::DCPS::DiscoveredWriterData::writerProxy.

Referenced by process_discovered_reader_data(), and process_discovered_writer_data().

955 {
956  const DDS::BuiltinTopicKey_t key = guid_to_bit_key(pub.writer_data_.writerProxy.remoteWriterGuid);
957  pub.writer_data_.ddsPublicationData.key = key;
958  pub.writer_data_.ddsPublicationData.participant_key = guid_to_bit_key(make_id(pub.writer_data_.writerProxy.remoteWriterGuid, ENTITYID_PARTICIPANT));
959 }
sequence< octet > key
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
OpenDDS_Dcps_Export DDS::BuiltinTopicKey_t guid_to_bit_key(const GUID_t &guid)
Definition: GuidUtils.h:243

◆ assign_bit_key() [2/2]

void OpenDDS::RTPS::Sedp::assign_bit_key ( DiscoveredSubscription sub)
private

Definition at line 962 of file Sedp.cpp.

References OpenDDS::DCPS::DiscoveredReaderData::ddsSubscriptionData, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::DCPS::guid_to_bit_key(), OpenDDS::DCPS::make_id(), OpenDDS::RTPS::DiscoveredSubscription::reader_data_, OpenDDS::DCPS::DiscoveredReaderData::readerProxy, and OpenDDS::DCPS::ReaderProxy_t::remoteReaderGuid.

963 {
964  const DDS::BuiltinTopicKey_t key = guid_to_bit_key(sub.reader_data_.readerProxy.remoteReaderGuid);
965  sub.reader_data_.ddsSubscriptionData.key = key;
966  sub.reader_data_.ddsSubscriptionData.participant_key = guid_to_bit_key(make_id(sub.reader_data_.readerProxy.remoteReaderGuid, ENTITYID_PARTICIPANT));
967 }
sequence< octet > key
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
OpenDDS_Dcps_Export DDS::BuiltinTopicKey_t guid_to_bit_key(const GUID_t &guid)
Definition: GuidUtils.h:243

◆ assign_publication_key()

virtual void OpenDDS::RTPS::Sedp::assign_publication_key ( GUID_t rid,
const GUID_t topicId,
const DDS::DataWriterQos  
)
inlineprotectedvirtual

Definition at line 1018 of file Sedp.h.

References OpenDDS::DCPS::assign(), OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::EntityId_t::entityKey, OpenDDS::DCPS::EntityId_t::entityKind, OpenDDS::DCPS::ENTITYKIND_USER_WRITER_NO_KEY, OpenDDS::DCPS::ENTITYKIND_USER_WRITER_WITH_KEY, has_dcps_key(), and publication_counter_.

Referenced by add_publication().

1021  {
1022  rid.entityId.entityKind =
1023  has_dcps_key(topicId)
1026  assign(rid.entityId.entityKey, publication_counter_++);
1027  }
unsigned int publication_counter_
Definition: Sedp.h:1231
const octet ENTITYKIND_USER_WRITER_NO_KEY
Definition: DdsDcpsGuid.idl:41
const octet ENTITYKIND_USER_WRITER_WITH_KEY
Definition: DdsDcpsGuid.idl:40
bool has_dcps_key(const GUID_t &topicId) const
Definition: Sedp.h:1163
void assign(EntityId_t &dest, const EntityId_t &src)
Definition: GuidUtils.h:157

◆ assign_subscription_key()

virtual void OpenDDS::RTPS::Sedp::assign_subscription_key ( GUID_t rid,
const GUID_t topicId,
const DDS::DataReaderQos  
)
inlineprotectedvirtual

Definition at line 1028 of file Sedp.h.

References OpenDDS::DCPS::assign(), OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::EntityId_t::entityKey, OpenDDS::DCPS::EntityId_t::entityKind, OpenDDS::DCPS::ENTITYKIND_USER_READER_NO_KEY, OpenDDS::DCPS::ENTITYKIND_USER_READER_WITH_KEY, has_dcps_key(), and subscription_counter_.

Referenced by add_subscription().

1031  {
1032  rid.entityId.entityKind =
1033  has_dcps_key(topicId)
1036  assign(rid.entityId.entityKey, subscription_counter_++);
1037  }
unsigned int subscription_counter_
Definition: Sedp.h:1231
const octet ENTITYKIND_USER_READER_WITH_KEY
Definition: DdsDcpsGuid.idl:43
bool has_dcps_key(const GUID_t &topicId) const
Definition: Sedp.h:1163
void assign(EntityId_t &dest, const EntityId_t &src)
Definition: GuidUtils.h:157
const octet ENTITYKIND_USER_READER_NO_KEY
Definition: DdsDcpsGuid.idl:42

◆ assign_topic_key()

virtual void OpenDDS::RTPS::Sedp::assign_topic_key ( GUID_t guid)
inlineprotectedvirtual

Definition at line 1038 of file Sedp.h.

References ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::assign(), OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::EntityId_t::entityKey, LM_ERROR, match_endpoints(), remove_assoc(), and topic_counter_.

Referenced by make_topic_guid().

1039  {
1040  assign(guid.entityId.entityKey, topic_counter_++);
1041 
1042  if (topic_counter_ == 0x1000000) {
1043  ACE_ERROR((LM_ERROR,
1044  ACE_TEXT("(%P|%t) ERROR: Sedp::assign_topic_key: ")
1045  ACE_TEXT("Exceeded Maximum number of topic entity keys!")
1046  ACE_TEXT("Next key will be a duplicate!\n")));
1047  topic_counter_ = 0;
1048  }
1049  }
#define ACE_ERROR(X)
ACE_TEXT("TCP_Factory")
unsigned int topic_counter_
Definition: Sedp.h:1231
void assign(EntityId_t &dest, const EntityId_t &src)
Definition: GuidUtils.h:157

◆ associate()

void OpenDDS::RTPS::Sedp::associate ( DiscoveredParticipant participant,
const DDS::Security::ParticipantSecurityAttributes participant_sec_attr 
)

Definition at line 1044 of file Sedp.cpp.

References OpenDDS::RTPS::AC_EMPTY, OpenDDS::RTPS::AC_GENERATE_REMOTE_MATCHED_CRYPTO_HANDLE, OpenDDS::RTPS::AC_REMOTE_DURABLE, OpenDDS::RTPS::AC_REMOTE_RELIABLE, OpenDDS::RTPS::AC_SEND_LOCAL_TOKEN, associated_participants_, OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::RTPS::Spdp::available_extended_builtin_endpoints(), OpenDDS::RTPS::BEST_EFFORT_PARTICIPANT_MESSAGE_DATA_READER, OpenDDS::RTPS::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_READER, OpenDDS::RTPS::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_READER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_WRITER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_READER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_WRITER, DDS::Security::BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER, DDS::Security::BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER, DDS::Security::BUILTIN_PARTICIPANT_STATELESS_MESSAGE_READER, DDS::Security::BUILTIN_PARTICIPANT_STATELESS_MESSAGE_WRITER, DDS::Security::BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_READER, DDS::Security::BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_WRITER, dcps_participant_secure_reader_, dcps_participant_secure_writer_, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_PUBLICATION_DETECTOR, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_DETECTOR, OpenDDS::DCPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER, OpenDDS::RTPS::ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER, OpenDDS::RTPS::ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_TL_SVC_REPLY_READER, OpenDDS::RTPS::ENTITYID_TL_SVC_REPLY_READER_SECURE, OpenDDS::DCPS::ENTITYID_TL_SVC_REPLY_WRITER, OpenDDS::RTPS::ENTITYID_TL_SVC_REPLY_WRITER_SECURE, OpenDDS::DCPS::ENTITYID_TL_SVC_REQ_READER, OpenDDS::RTPS::ENTITYID_TL_SVC_REQ_READER_SECURE, OpenDDS::DCPS::ENTITYID_TL_SVC_REQ_WRITER, OpenDDS::RTPS::ENTITYID_TL_SVC_REQ_WRITER_SECURE, OpenDDS::RTPS::Spdp::is_security_enabled(), OpenDDS::DCPS::make_id(), participant_message_reader_, participant_message_secure_reader_, participant_message_secure_writer_, participant_message_writer_, participant_stateless_message_reader_, participant_stateless_message_writer_, participant_volatile_message_secure_reader_, participant_volatile_message_secure_writer_, process_association_records_i(), publications_reader_, publications_secure_reader_, publications_secure_writer_, publications_writer_, DDS::Security::SEDP_BUILTIN_PUBLICATIONS_SECURE_READER, DDS::Security::SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER, DDS::Security::SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER, DDS::Security::SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER, OpenDDS::RTPS::Spdp::shutting_down(), spdp_, DDS::Security::SPDP_BUILTIN_PARTICIPANT_SECURE_READER, DDS::Security::SPDP_BUILTIN_PARTICIPANT_SECURE_WRITER, subscriptions_reader_, subscriptions_secure_reader_, subscriptions_secure_writer_, subscriptions_writer_, type_lookup_reply_reader_, type_lookup_reply_secure_reader_, type_lookup_reply_secure_writer_, type_lookup_reply_writer_, type_lookup_request_reader_, type_lookup_request_secure_reader_, type_lookup_request_secure_writer_, type_lookup_request_writer_, DDS::Security::TYPE_LOOKUP_SERVICE_REPLY_READER_SECURE, DDS::Security::TYPE_LOOKUP_SERVICE_REPLY_WRITER_SECURE, DDS::Security::TYPE_LOOKUP_SERVICE_REQUEST_READER_SECURE, and DDS::Security::TYPE_LOOKUP_SERVICE_REQUEST_WRITER_SECURE.

1049 {
1050  const BuiltinEndpointSet_t local_available = spdp_.available_builtin_endpoints();
1051  const BuiltinEndpointSet_t remote_available = participant.pdata_.participantProxy.availableBuiltinEndpoints;
1052  const BuiltinEndpointQos_t& beq = participant.pdata_.participantProxy.builtinEndpointQos;
1053 
1054  // See RTPS v2.1 section 8.5.5.1
1055  if ((local_available & DISC_BUILTIN_ENDPOINT_PUBLICATION_DETECTOR) &&
1056  (remote_available & DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER)) {
1057  BuiltinAssociationRecord record(publications_reader_,
1058  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER),
1060  participant.builtin_pending_records_.push_back(record);
1061  }
1062  if ((local_available & DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_DETECTOR) &&
1063  (remote_available & DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER)) {
1064  BuiltinAssociationRecord record(subscriptions_reader_,
1065  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER),
1067  participant.builtin_pending_records_.push_back(record);
1068  }
1069  if ((local_available & BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_READER) &&
1070  (remote_available & BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER)) {
1071  BuiltinAssociationRecord record(participant_message_reader_,
1072  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER),
1074  participant.builtin_pending_records_.push_back(record);
1075  }
1076 
1077  if ((local_available & BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_READER) &&
1078  (remote_available & BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_WRITER)) {
1079  BuiltinAssociationRecord record(type_lookup_request_reader_,
1080  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_TL_SVC_REQ_WRITER),
1082  participant.builtin_pending_records_.push_back(record);
1083  }
1084  if ((local_available & BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_WRITER) &&
1085  (remote_available & BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_READER)) {
1086  BuiltinAssociationRecord record(type_lookup_request_writer_,
1087  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_TL_SVC_REQ_READER),
1089  participant.builtin_pending_records_.push_back(record);
1090  }
1091  if ((local_available & BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_READER) &&
1092  (remote_available & BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_WRITER)) {
1093  BuiltinAssociationRecord record(type_lookup_reply_reader_,
1094  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_TL_SVC_REPLY_WRITER),
1096  participant.builtin_pending_records_.push_back(record);
1097  }
1098  if ((local_available & BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_WRITER) &&
1099  (remote_available & BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_READER)) {
1100  BuiltinAssociationRecord record(type_lookup_reply_writer_,
1101  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_TL_SVC_REPLY_READER),
1103  participant.builtin_pending_records_.push_back(record);
1104  }
1105 
1106  if ((local_available & DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER) &&
1107  (remote_available & DISC_BUILTIN_ENDPOINT_PUBLICATION_DETECTOR)) {
1108  BuiltinAssociationRecord record(publications_writer_,
1109  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER),
1111  participant.builtin_pending_records_.push_back(record);
1112  }
1113  if ((local_available & DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER) &&
1114  (remote_available & DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_DETECTOR)) {
1115  BuiltinAssociationRecord record(subscriptions_writer_,
1116  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER),
1118  participant.builtin_pending_records_.push_back(record);
1119  }
1120  if ((local_available & BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER) &&
1121  (remote_available & BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_READER)) {
1122  BuiltinAssociationRecord record(participant_message_writer_,
1123  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER),
1125  participant.builtin_pending_records_.push_back(record);
1126  }
1127 
1128  //FUTURE: if/when topic propagation is supported, add it here
1129 
1130 #ifdef OPENDDS_SECURITY
1131  if (spdp_.is_security_enabled()) {
1132  using namespace DDS::Security;
1133 
1134  const ExtendedBuiltinEndpointSet_t local_available_extended = spdp_.available_extended_builtin_endpoints();
1135  const ExtendedBuiltinEndpointSet_t remote_available_extended = participant.pdata_.participantProxy.availableExtendedBuiltinEndpoints;
1136 
1137  if ((local_available & BUILTIN_PARTICIPANT_STATELESS_MESSAGE_READER) &&
1138  (remote_available & BUILTIN_PARTICIPANT_STATELESS_MESSAGE_WRITER)) {
1139  BuiltinAssociationRecord record(participant_stateless_message_reader_,
1140  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER),
1141  AC_EMPTY);
1142  participant.builtin_pending_records_.push_back(record);
1143  }
1144 
1145  if ((local_available & BUILTIN_PARTICIPANT_STATELESS_MESSAGE_WRITER) &&
1146  (remote_available & BUILTIN_PARTICIPANT_STATELESS_MESSAGE_READER)) {
1147  BuiltinAssociationRecord record(participant_stateless_message_writer_,
1148  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER),
1149  AC_EMPTY);
1150  participant.builtin_pending_records_.push_back(record);
1151  }
1152 
1153  if ((local_available & BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_READER) &&
1155  BuiltinAssociationRecord record(participant_volatile_message_secure_reader_,
1156  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER),
1158  participant.builtin_pending_records_.push_back(record);
1159  }
1160  if ((local_available & BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_WRITER) &&
1161  (remote_available & BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_READER)) {
1162  BuiltinAssociationRecord record(participant_volatile_message_secure_writer_,
1163  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER),
1165  participant.builtin_pending_records_.push_back(record);
1166  }
1167 
1168  if ((local_available & BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER) &&
1169  (remote_available & BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER)) {
1170  BuiltinAssociationRecord record(participant_message_secure_reader_,
1171  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER),
1173  participant.builtin_pending_records_.push_back(record);
1174  }
1175  if ((local_available & SPDP_BUILTIN_PARTICIPANT_SECURE_READER) &&
1176  (remote_available & SPDP_BUILTIN_PARTICIPANT_SECURE_WRITER)) {
1177  BuiltinAssociationRecord record(dcps_participant_secure_reader_,
1178  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER),
1180  participant.builtin_pending_records_.push_back(record);
1181  }
1182  if ((local_available & SEDP_BUILTIN_PUBLICATIONS_SECURE_READER) &&
1183  (remote_available & SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER)) {
1184  BuiltinAssociationRecord record(publications_secure_reader_,
1185  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER),
1187  participant.builtin_pending_records_.push_back(record);
1188  }
1189  if ((local_available & SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER) &&
1190  (remote_available & SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER)) {
1191  BuiltinAssociationRecord record(subscriptions_secure_reader_,
1192  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER),
1194  participant.builtin_pending_records_.push_back(record);
1195  }
1196 
1197  if ((local_available_extended & TYPE_LOOKUP_SERVICE_REQUEST_READER_SECURE) &&
1198  (remote_available_extended & TYPE_LOOKUP_SERVICE_REQUEST_WRITER_SECURE)) {
1199  BuiltinAssociationRecord record(type_lookup_request_secure_reader_,
1200  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_TL_SVC_REQ_WRITER_SECURE),
1202  participant.builtin_pending_records_.push_back(record);
1203  }
1204  if ((local_available_extended & TYPE_LOOKUP_SERVICE_REQUEST_WRITER_SECURE) &&
1205  (remote_available_extended & TYPE_LOOKUP_SERVICE_REQUEST_READER_SECURE)) {
1206  BuiltinAssociationRecord record(type_lookup_request_secure_writer_,
1207  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_TL_SVC_REQ_READER_SECURE),
1209  participant.builtin_pending_records_.push_back(record);
1210  }
1211  if ((local_available_extended & TYPE_LOOKUP_SERVICE_REPLY_READER_SECURE) &&
1212  (remote_available_extended & TYPE_LOOKUP_SERVICE_REPLY_WRITER_SECURE)) {
1213  BuiltinAssociationRecord record(type_lookup_reply_secure_reader_,
1214  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_TL_SVC_REPLY_WRITER_SECURE),
1216  participant.builtin_pending_records_.push_back(record);
1217  }
1218  if ((local_available_extended & TYPE_LOOKUP_SERVICE_REPLY_WRITER_SECURE) &&
1219  (remote_available_extended & TYPE_LOOKUP_SERVICE_REPLY_READER_SECURE)) {
1220  BuiltinAssociationRecord record(type_lookup_reply_secure_writer_,
1221  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_TL_SVC_REPLY_READER_SECURE),
1223  participant.builtin_pending_records_.push_back(record);
1224  }
1225 
1226  if ((local_available & BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER) &&
1227  (remote_available & BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER)) {
1228  BuiltinAssociationRecord record(participant_message_secure_writer_,
1229  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER),
1231  participant.builtin_pending_records_.push_back(record);
1232  }
1233  if ((local_available & SPDP_BUILTIN_PARTICIPANT_SECURE_WRITER) &&
1234  (remote_available & SPDP_BUILTIN_PARTICIPANT_SECURE_READER)) {
1235  BuiltinAssociationRecord record(dcps_participant_secure_writer_,
1236  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER),
1238  participant.builtin_pending_records_.push_back(record);
1239  }
1240  if ((local_available & SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER) &&
1241  (remote_available & SEDP_BUILTIN_PUBLICATIONS_SECURE_READER)) {
1242  BuiltinAssociationRecord record(publications_secure_writer_,
1243  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER),
1245  participant.builtin_pending_records_.push_back(record);
1246  }
1247  if ((local_available & SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER) &&
1248  (remote_available & SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER)) {
1249  BuiltinAssociationRecord record(subscriptions_secure_writer_,
1250  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER),
1252  participant.builtin_pending_records_.push_back(record);
1253  }
1254  }
1255 #endif
1256 
1257  if (spdp_.shutting_down()) { return; }
1258 
1259  associated_participants_.insert(make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_PARTICIPANT));
1260 
1261  process_association_records_i(participant);
1262 }
unsigned long BuiltinEndpointQos_t
Definition: RtpsCore.idl:232
const int AC_EMPTY
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER
Definition: MessageTypes.h:81
DiscoveryWriter_rch dcps_participant_secure_writer_
Definition: Sedp.h:1288
DiscoveryReader_rch subscriptions_secure_reader_
Definition: Sedp.h:1304
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER
Definition: RtpsCore.idl:206
DiscoveryWriter_rch publications_secure_writer_
Definition: Sedp.h:1278
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REPLY_READER_SECURE
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_WRITER
Definition: RtpsCore.idl:223
TypeLookupReplyWriter_rch type_lookup_reply_writer_
Definition: Sedp.h:1293
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER
Definition: GuidUtils.h:43
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER
Definition: RtpsCore.idl:202
const BuiltinEndpointSet_t SEDP_BUILTIN_PUBLICATIONS_SECURE_READER
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER
Definition: MessageTypes.h:78
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER
Definition: GuidUtils.h:47
DiscoveryReader_rch publications_secure_reader_
Definition: Sedp.h:1300
const EntityId_t ENTITYID_TL_SVC_REQ_WRITER
Definition: GuidUtils.h:52
TypeLookupRequestWriter_rch type_lookup_request_secure_writer_
Definition: Sedp.h:1295
const BuiltinEndpointQos_t BEST_EFFORT_PARTICIPANT_MESSAGE_DATA_READER
Definition: RtpsCore.idl:233
void process_association_records_i(DiscoveredParticipant &participant)
Definition: Sedp.cpp:1264
const EntityId_t ENTITYID_TL_SVC_REPLY_READER
Definition: GuidUtils.h:55
const int AC_GENERATE_REMOTE_MATCHED_CRYPTO_HANDLE
unsigned long ExtendedBuiltinEndpointSet_t
DiscoveryReader_rch subscriptions_reader_
Definition: Sedp.h:1302
const EntityId_t ENTITYID_TL_SVC_REQ_WRITER_SECURE
Definition: MessageTypes.h:90
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER
Definition: MessageTypes.h:88
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REPLY_WRITER_SECURE
DDS::Security::ExtendedBuiltinEndpointSet_t available_extended_builtin_endpoints() const
Definition: Spdp.h:203
const int AC_REMOTE_DURABLE
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER
Definition: RtpsCore.idl:218
const int AC_REMOTE_RELIABLE
const EntityId_t ENTITYID_TL_SVC_REPLY_READER_SECURE
Definition: MessageTypes.h:93
const BuiltinEndpointSet_t SPDP_BUILTIN_PARTICIPANT_SECURE_READER
TypeLookupReplyReader_rch type_lookup_reply_reader_
Definition: Sedp.h:1314
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
TypeLookupReplyWriter_rch type_lookup_reply_secure_writer_
Definition: Sedp.h:1296
TypeLookupReplyReader_rch type_lookup_reply_secure_reader_
Definition: Sedp.h:1317
const int AC_SEND_LOCAL_TOKEN
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_READER
Definition: RtpsCore.idl:220
LivelinessReader_rch participant_message_secure_reader_
Definition: Sedp.h:1308
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER
Definition: MessageTypes.h:79
LivelinessWriter_rch participant_message_writer_
Definition: Sedp.h:1284
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_WRITER
const EntityId_t ENTITYID_TL_SVC_REPLY_WRITER_SECURE
Definition: MessageTypes.h:92
SecurityReader_rch participant_volatile_message_secure_reader_
Definition: Sedp.h:1310
SecurityReader_rch participant_stateless_message_reader_
Definition: Sedp.h:1309
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_STATELESS_MESSAGE_WRITER
const EntityId_t ENTITYID_TL_SVC_REQ_READER
Definition: GuidUtils.h:53
const EntityId_t ENTITYID_TL_SVC_REPLY_WRITER
Definition: GuidUtils.h:54
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REQUEST_READER_SECURE
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER
Definition: GuidUtils.h:40
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER
Definition: MessageTypes.h:83
DiscoveryWriter_rch subscriptions_writer_
Definition: Sedp.h:1280
LivelinessReader_rch participant_message_reader_
Definition: Sedp.h:1306
bool shutting_down()
Definition: Spdp.h:118
DCPS::RepoIdSet associated_participants_
Definition: Sedp.h:864
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_READER
Definition: RtpsCore.idl:229
TypeLookupRequestReader_rch type_lookup_request_secure_reader_
Definition: Sedp.h:1316
DiscoveryReader_rch dcps_participant_secure_reader_
Definition: Sedp.h:1311
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER
Definition: MessageTypes.h:85
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER
Definition: MessageTypes.h:82
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_WRITER
Definition: RtpsCore.idl:227
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
Definition: MessageTypes.h:77
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_DETECTOR
Definition: RtpsCore.idl:208
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER
Definition: GuidUtils.h:42
LivelinessWriter_rch participant_message_secure_writer_
Definition: Sedp.h:1286
const BuiltinEndpointSet_t SPDP_BUILTIN_PARTICIPANT_SECURE_WRITER
const BuiltinEndpointSet_t SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
TypeLookupRequestWriter_rch type_lookup_request_writer_
Definition: Sedp.h:1292
DiscoveryWriter_rch subscriptions_secure_writer_
Definition: Sedp.h:1282
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER
Definition: MessageTypes.h:86
bool is_security_enabled() const
Definition: Spdp.h:159
SecurityWriter_rch participant_volatile_message_secure_writer_
Definition: Sedp.h:1290
const BuiltinEndpointSet_t SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER
Definition: MessageTypes.h:84
const EntityId_t ENTITYID_TL_SVC_REQ_READER_SECURE
Definition: MessageTypes.h:91
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REQUEST_WRITER_SECURE
unsigned long BuiltinEndpointSet_t
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PUBLICATION_DETECTOR
Definition: RtpsCore.idl:204
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_READER
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_STATELESS_MESSAGE_READER
DiscoveryReader_rch publications_reader_
Definition: Sedp.h:1298
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER
Definition: MessageTypes.h:87
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_READER
Definition: RtpsCore.idl:225
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER
Definition: GuidUtils.h:41
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER
TypeLookupRequestReader_rch type_lookup_request_reader_
Definition: Sedp.h:1313
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER
Definition: GuidUtils.h:46
const BuiltinEndpointSet_t SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER
SecurityWriter_rch participant_stateless_message_writer_
Definition: Sedp.h:1287
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER
Definition: MessageTypes.h:80
DiscoveryWriter_rch publications_writer_
Definition: Sedp.h:1276
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER

◆ associate_volatile()

void OpenDDS::RTPS::Sedp::associate_volatile ( DiscoveredParticipant participant)

Definition at line 1385 of file Sedp.cpp.

References OpenDDS::RTPS::AC_GENERATE_REMOTE_MATCHED_CRYPTO_HANDLE, OpenDDS::RTPS::AC_REMOTE_RELIABLE, OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::RTPS::ParticipantProxy_t::availableBuiltinEndpoints, DDS::Security::BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_READER, DDS::Security::BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_WRITER, OpenDDS::RTPS::DiscoveredParticipant::builtin_pending_records_, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER, OpenDDS::RTPS::ParticipantProxy_t::guidPrefix, OpenDDS::DCPS::make_id(), participant_volatile_message_secure_reader_, participant_volatile_message_secure_writer_, OpenDDS::Security::SPDPdiscoveredParticipantData::participantProxy, OpenDDS::RTPS::DiscoveredParticipant::pdata_, and spdp_.

1386 {
1387  using namespace DDS::Security;
1388 
1389  const BuiltinEndpointSet_t local_available = spdp_.available_builtin_endpoints();
1390  const BuiltinEndpointSet_t remote_available = participant.pdata_.participantProxy.availableBuiltinEndpoints;
1391 
1392  if ((local_available & BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_READER) &&
1394  BuiltinAssociationRecord record(participant_volatile_message_secure_reader_,
1395  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER),
1397  participant.builtin_pending_records_.push_back(record);
1398  }
1399  if ((local_available & BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_WRITER) &&
1400  (remote_available & BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_READER)) {
1401  BuiltinAssociationRecord record(participant_volatile_message_secure_writer_,
1402  make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER),
1404  participant.builtin_pending_records_.push_back(record);
1405  }
1406 }
const int AC_GENERATE_REMOTE_MATCHED_CRYPTO_HANDLE
const int AC_REMOTE_RELIABLE
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_WRITER
SecurityReader_rch participant_volatile_message_secure_reader_
Definition: Sedp.h:1310
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER
Definition: MessageTypes.h:85
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER
Definition: MessageTypes.h:86
SecurityWriter_rch participant_volatile_message_secure_writer_
Definition: Sedp.h:1290
unsigned long BuiltinEndpointSet_t
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_READER
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ association_complete_i()

void OpenDDS::RTPS::Sedp::association_complete_i ( const DCPS::GUID_t localId,
const DCPS::GUID_t remoteId 
)

Definition at line 2920 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER, OpenDDS::RTPS::ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER, OpenDDS::DCPS::ENTITYID_TL_SVC_REPLY_READER, OpenDDS::RTPS::ENTITYID_TL_SVC_REPLY_READER_SECURE, OpenDDS::DCPS::ENTITYID_TL_SVC_REQ_READER, OpenDDS::RTPS::ENTITYID_TL_SVC_REQ_READER_SECURE, is_expectant_opendds(), LM_DEBUG, local_subscriptions_, resend_user_crypto_tokens(), send_builtin_crypto_tokens(), OpenDDS::RTPS::Spdp::send_participant_crypto_tokens(), spdp_, type_lookup_reply_secure_writer_, type_lookup_reply_writer_, type_lookup_request_secure_writer_, type_lookup_request_writer_, write_durable_dcps_participant_secure(), write_durable_participant_message_data(), write_durable_participant_message_data_secure(), write_durable_publication_data(), write_durable_subscription_data(), and write_subscription_data().

Referenced by OpenDDS::RTPS::Sedp::Writer::transport_assoc_done().

2922 {
2923  if (DCPS::DCPS_debug_level) {
2924  ACE_DEBUG((LM_DEBUG,
2925  ACE_TEXT("(%P|%t) DEBUG: Sedp::association_complete_i local %C remote %C\n"),
2926  DCPS::LogGuid(localId).c_str(),
2927  DCPS::LogGuid(remoteId).c_str()));
2928  }
2929 
2930  // If the remote endpoint is an opendds endpoint that expects associated datawriter announcements
2931  if (is_expectant_opendds(remoteId)) {
2932  LocalSubscriptionIter sub = local_subscriptions_.find(localId);
2933  // If the local endpoint is a reader
2934  if (sub != local_subscriptions_.end()) {
2935  std::pair<DCPS::RepoIdSet::iterator, bool> result =
2936  sub->second.remote_expectant_opendds_associations_.insert(remoteId);
2937  // If this is a new association for the local reader
2938  if (result.second) {
2939  // Tell other participants
2940  write_subscription_data(localId, sub->second);
2941  }
2942  }
2943  }
2944 
2945 #ifdef OPENDDS_SECURITY
2946  if (remoteId.entityId == ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER) {
2947  write_durable_publication_data(remoteId, true);
2948  } else if (remoteId.entityId == ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER) {
2949  write_durable_subscription_data(remoteId, true);
2950  } else if (remoteId.entityId == ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER) {
2952  } else if (remoteId.entityId == ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER) {
2954  } else if (remoteId.entityId == ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER) {
2956  send_builtin_crypto_tokens(remoteId);
2957  resend_user_crypto_tokens(remoteId);
2958  } else if (remoteId.entityId == ENTITYID_TL_SVC_REQ_READER_SECURE) {
2960  } else if (remoteId.entityId == ENTITYID_TL_SVC_REPLY_READER_SECURE) {
2962  } else
2963 #endif
2964  if (remoteId.entityId == ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER) {
2965  write_durable_publication_data(remoteId, false);
2966  } else if (remoteId.entityId == ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER) {
2967  write_durable_subscription_data(remoteId, false);
2968  } else if (remoteId.entityId == ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER) {
2970  } else if (remoteId.entityId == ENTITYID_TL_SVC_REQ_READER) {
2972  } else if (remoteId.entityId == ENTITYID_TL_SVC_REPLY_READER) {
2974  }
2975 }
#define ACE_DEBUG(X)
TypeLookupReplyWriter_rch type_lookup_reply_writer_
Definition: Sedp.h:1293
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
virtual bool is_expectant_opendds(const GUID_t &endpoint) const
Definition: Sedp.cpp:2912
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER
Definition: GuidUtils.h:43
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER
Definition: MessageTypes.h:78
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER
Definition: GuidUtils.h:47
TypeLookupRequestWriter_rch type_lookup_request_secure_writer_
Definition: Sedp.h:1295
const EntityId_t ENTITYID_TL_SVC_REPLY_READER
Definition: GuidUtils.h:55
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER
Definition: MessageTypes.h:88
void write_durable_dcps_participant_secure(const DCPS::GUID_t &reader)
Definition: Sedp.cpp:4775
const EntityId_t ENTITYID_TL_SVC_REPLY_READER_SECURE
Definition: MessageTypes.h:93
void write_durable_publication_data(const DCPS::GUID_t &reader, bool secure)
Definition: Sedp.cpp:4641
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
TypeLookupReplyWriter_rch type_lookup_reply_secure_writer_
Definition: Sedp.h:1296
DDS::ReturnCode_t write_subscription_data(const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4982
void send_participant_crypto_tokens(const DCPS::GUID_t &id)
Definition: Spdp.cpp:3801
const EntityId_t ENTITYID_TL_SVC_REQ_READER
Definition: GuidUtils.h:53
void write_durable_participant_message_data_secure(const DCPS::GUID_t &reader)
Definition: Sedp.cpp:4736
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER
Definition: MessageTypes.h:82
ACE_TEXT("TCP_Factory")
TypeLookupRequestWriter_rch type_lookup_request_writer_
Definition: Sedp.h:1292
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER
Definition: MessageTypes.h:86
void write_durable_participant_message_data(const DCPS::GUID_t &reader)
Definition: Sedp.cpp:4713
void send_deferred_samples(const GUID_t &reader)
Definition: Sedp.cpp:3283
const EntityId_t ENTITYID_TL_SVC_REQ_READER_SECURE
Definition: MessageTypes.h:91
void write_durable_subscription_data(const DCPS::GUID_t &reader, bool secure)
Definition: Sedp.cpp:4677
void send_builtin_crypto_tokens(const DCPS::GUID_t &remoteId)
Definition: Sedp.cpp:1512
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER
Definition: GuidUtils.h:41
void resend_user_crypto_tokens(const DCPS::GUID_t &remote_participant)
Definition: Sedp.cpp:5542
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER
Definition: MessageTypes.h:80

◆ cleanup_reader_association()

void OpenDDS::RTPS::Sedp::cleanup_reader_association ( DCPS::DataReaderCallbacks_wrch  callbacks,
const GUID_t reader,
const GUID_t writer 
)
protected

Definition at line 6759 of file Sedp.cpp.

References OpenDDS::DCPS::EventDispatcher::dispatch(), OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::DCPS::equal_guid_prefixes(), event_dispatcher_, OpenDDS::DCPS::make_id(), participant_id_, OpenDDS::DCPS::WriterAssociation::participantDiscoveredAt, OpenDDS::RTPS::Spdp::participants_, OpenDDS::DCPS::WriterAssociation::pubQos, spdp_, TheServiceParticipant, OpenDDS::DCPS::WriterAssociation::transportContext, OpenDDS::DCPS::WriterAssociation::writerId, and OpenDDS::DCPS::WriterAssociation::writerQos.

Referenced by match_continue(), and remove_assoc().

6762 {
6764  if (part_iter != spdp_.participants_.end()) {
6765  for (DiscoveredParticipant::ReaderAssociationRecords::iterator pos = part_iter->second.reader_pending_records_.begin(), limit = part_iter->second.reader_pending_records_.end(); pos != limit; ++pos) {
6766  if ((*pos)->reader_id() == reader && (*pos)->writer_id() == writer) {
6767  part_iter->second.reader_pending_records_.erase(pos);
6768  break;
6769  }
6770  }
6771 
6772  for (DiscoveredParticipant::ReaderAssociationRecords::iterator pos = part_iter->second.reader_associated_records_.begin(), limit = part_iter->second.reader_associated_records_.end(); pos != limit; ++pos) {
6773  if ((*pos)->reader_id() == reader && (*pos)->writer_id() == writer) {
6774  event_dispatcher_->dispatch(DCPS::make_rch<ReaderRemoveAssociations>(*pos));
6775  part_iter->second.reader_associated_records_.erase(pos);
6776  break;
6777  }
6778  }
6779  } else if (equal_guid_prefixes(reader, participant_id_) && equal_guid_prefixes(writer, participant_id_)) {
6780  DCPS::WriterAssociation wa = DCPS::WriterAssociation();
6781  wa.writerId = writer;
6782  wa.participantDiscoveredAt = MTZERO;
6783  wa.pubQos = TheServiceParticipant->initial_PublisherQos();
6784  wa.writerQos = TheServiceParticipant->initial_DataWriterQos();
6785  wa.transportContext = 0;
6786  event_dispatcher_->dispatch(DCPS::make_rch<ReaderRemoveAssociations>(DCPS::make_rch<ReaderAssociationRecord>(callbacks, reader, wa)));
6787  }
6788 }
DiscoveredParticipantMap::iterator DiscoveredParticipantIter
Definition: Spdp.h:70
DCPS::EventDispatcher_rch event_dispatcher_
Definition: Sedp.h:774
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
GUID_t participant_id_
Definition: Sedp.h:1229
OpenDDS_Dcps_Export bool equal_guid_prefixes(const GuidPrefix_t &lhs, const GuidPrefix_t &rhs)
Definition: GuidUtils.h:132
virtual bool dispatch(EventBase_rch event)=0
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
#define TheServiceParticipant
DiscoveredParticipantMap participants_
Definition: Spdp.h:382

◆ cleanup_secure_reader()

void OpenDDS::RTPS::Sedp::cleanup_secure_reader ( const GUID_t subscriptionId)
private

Definition at line 6644 of file Sedp.cpp.

References ACE_ERROR, ACE_TEXT(), DDS::Security::SecurityException::code, OpenDDS::Security::HandleRegistry::erase_local_datareader_crypto_handle(), get_crypto_key_factory(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_local_datareader_crypto_handle(), DDS::HANDLE_NIL, LM_ERROR, DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, and OpenDDS::DCPS::security_debug.

Referenced by purge_dead_topic(), remove_subscription(), and ~Sedp().

6645 {
6646  using namespace DDS::Security;
6647 
6649  if (!handle_registry) {
6650  return;
6651  }
6652  const DatareaderCryptoHandle drch =
6653  handle_registry->get_local_datareader_crypto_handle(subscriptionId);
6654  if (drch == DDS::HANDLE_NIL) {
6655  return;
6656  }
6657 
6658  SecurityException ex = {"", 0, 0};
6659  if (!get_crypto_key_factory()->unregister_datareader(drch, ex)) {
6660  if (DCPS::security_debug.cleanup_error) {
6661  ACE_ERROR((LM_ERROR,
6662  ACE_TEXT("(%P|%t) {cleanup_error} Sedp::cleanup_secure_reader() - ")
6663  ACE_TEXT("Failure calling unregister_datareader (ch %d).")
6664  ACE_TEXT(" Security Exception[%d.%d]: %C\n"),
6665  drch, ex.code, ex.minor_code, ex.message.in()));
6666  }
6667  }
6668  handle_registry->erase_local_datareader_crypto_handle(subscriptionId);
6669 }
#define ACE_ERROR(X)
const InstanceHandle_t HANDLE_NIL
DDS::Security::CryptoKeyFactory_var get_crypto_key_factory() const
Definition: Sedp.h:1206
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
DCPS::RcHandle< HandleRegistry > HandleRegistry_rch
NativeCryptoHandle DatareaderCryptoHandle
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ cleanup_secure_writer()

void OpenDDS::RTPS::Sedp::cleanup_secure_writer ( const GUID_t publicationId)
private

Definition at line 6617 of file Sedp.cpp.

References ACE_ERROR, ACE_TEXT(), DDS::Security::SecurityException::code, OpenDDS::Security::HandleRegistry::erase_local_datawriter_crypto_handle(), get_crypto_key_factory(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_local_datawriter_crypto_handle(), DDS::HANDLE_NIL, LM_ERROR, DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, and OpenDDS::DCPS::security_debug.

Referenced by purge_dead_topic(), remove_publication(), and ~Sedp().

6618 {
6619  using namespace DDS::Security;
6620 
6622  if (!handle_registry) {
6623  return;
6624  }
6625  const DatawriterCryptoHandle dwch =
6626  handle_registry->get_local_datawriter_crypto_handle(publicationId);
6627  if (dwch == DDS::HANDLE_NIL) {
6628  return;
6629  }
6630 
6631  SecurityException ex = {"", 0, 0};
6632  if (!get_crypto_key_factory()->unregister_datawriter(dwch, ex)) {
6633  if (DCPS::security_debug.cleanup_error) {
6634  ACE_ERROR((LM_ERROR,
6635  ACE_TEXT("(%P|%t) {cleanup_error} Sedp::cleanup_secure_writer() - ")
6636  ACE_TEXT("Failure calling unregister_datawriter. (ch %d)")
6637  ACE_TEXT(" Security Exception[%d.%d]: %C\n"),
6638  dwch, ex.code, ex.minor_code, ex.message.in()));
6639  }
6640  }
6641  handle_registry->erase_local_datawriter_crypto_handle(publicationId);
6642 }
#define ACE_ERROR(X)
const InstanceHandle_t HANDLE_NIL
DDS::Security::CryptoKeyFactory_var get_crypto_key_factory() const
Definition: Sedp.h:1206
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
DCPS::RcHandle< HandleRegistry > HandleRegistry_rch
NativeCryptoHandle DatawriterCryptoHandle
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ cleanup_type_lookup_data()

void OpenDDS::RTPS::Sedp::cleanup_type_lookup_data ( const DCPS::GUID_t guid,
const XTypes::TypeIdentifier ti,
bool  secure 
)
private

Definition at line 4050 of file Sedp.cpp.

References type_lookup_reply_reader_, and type_lookup_reply_secure_reader_.

Referenced by remove_expired_endpoints().

4053 {
4054 #ifdef OPENDDS_SECURITY
4055  if (secure) {
4057  } else {
4059  }
4060 #else
4061  ACE_UNUSED_ARG(secure);
4063 #endif
4064 }
void cleanup(const DCPS::GUID_t &guid, const XTypes::TypeIdentifier &ti)
Definition: Sedp.cpp:3834
TypeLookupReplyReader_rch type_lookup_reply_reader_
Definition: Sedp.h:1314
TypeLookupReplyReader_rch type_lookup_reply_secure_reader_
Definition: Sedp.h:1317

◆ cleanup_volatile_crypto()

void OpenDDS::RTPS::Sedp::cleanup_volatile_crypto ( const DCPS::GUID_t remote)

◆ cleanup_writer_association()

void OpenDDS::RTPS::Sedp::cleanup_writer_association ( DCPS::DataWriterCallbacks_wrch  callbacks,
const GUID_t writer,
const GUID_t reader 
)
protected

Definition at line 6728 of file Sedp.cpp.

References OpenDDS::DCPS::EventDispatcher::dispatch(), OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::DCPS::equal_guid_prefixes(), event_dispatcher_, OpenDDS::DCPS::make_id(), participant_id_, OpenDDS::DCPS::ReaderAssociation::participantDiscoveredAt, OpenDDS::RTPS::Spdp::participants_, OpenDDS::DCPS::ReaderAssociation::readerId, OpenDDS::DCPS::ReaderAssociation::readerQos, spdp_, OpenDDS::DCPS::ReaderAssociation::subQos, TheServiceParticipant, and OpenDDS::DCPS::ReaderAssociation::transportContext.

Referenced by match_continue(), and remove_assoc().

6731 {
6733  if (part_iter != spdp_.participants_.end()) {
6734  for (DiscoveredParticipant::WriterAssociationRecords::iterator pos = part_iter->second.writer_pending_records_.begin(), limit = part_iter->second.writer_pending_records_.end(); pos != limit; ++pos) {
6735  if ((*pos)->writer_id() == writer && (*pos)->reader_id() == reader) {
6736  part_iter->second.writer_pending_records_.erase(pos);
6737  break;
6738  }
6739  }
6740 
6741  for (DiscoveredParticipant::WriterAssociationRecords::iterator pos = part_iter->second.writer_associated_records_.begin(), limit = part_iter->second.writer_associated_records_.end(); pos != limit; ++pos) {
6742  if ((*pos)->writer_id() == writer && (*pos)->reader_id() == reader) {
6743  event_dispatcher_->dispatch(DCPS::make_rch<WriterRemoveAssociations>(*pos));
6744  part_iter->second.writer_associated_records_.erase(pos);
6745  break;
6746  }
6747  }
6748  } else if (equal_guid_prefixes(writer, participant_id_) && equal_guid_prefixes(reader, participant_id_)) {
6749  DCPS::ReaderAssociation ra = DCPS::ReaderAssociation();
6750  ra.readerId = reader;
6751  ra.participantDiscoveredAt = MTZERO;
6752  ra.subQos = TheServiceParticipant->initial_SubscriberQos();
6753  ra.readerQos = TheServiceParticipant->initial_DataReaderQos();
6754  ra.transportContext = 0;
6755  event_dispatcher_->dispatch(DCPS::make_rch<WriterRemoveAssociations>(DCPS::make_rch<WriterAssociationRecord>(callbacks, writer, ra)));
6756  }
6757 }
DiscoveredParticipantMap::iterator DiscoveredParticipantIter
Definition: Spdp.h:70
DCPS::EventDispatcher_rch event_dispatcher_
Definition: Sedp.h:774
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
GUID_t participant_id_
Definition: Sedp.h:1229
OpenDDS_Dcps_Export bool equal_guid_prefixes(const GuidPrefix_t &lhs, const GuidPrefix_t &rhs)
Definition: GuidUtils.h:132
virtual bool dispatch(EventBase_rch event)=0
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
#define TheServiceParticipant
DiscoveredParticipantMap participants_
Definition: Spdp.h:382

◆ create_and_send_datareader_crypto_tokens()

void OpenDDS::RTPS::Sedp::create_and_send_datareader_crypto_tokens ( const DDS::Security::DatareaderCryptoHandle drch,
const DCPS::GUID_t local_reader,
const DDS::Security::DatawriterCryptoHandle dwch,
const DCPS::GUID_t remote_writer 
)
protected

Definition at line 1462 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), create_datareader_crypto_tokens(), LM_DEBUG, OpenDDS::DCPS::security_debug, and send_datareader_crypto_tokens().

Referenced by match_continue_security_enabled(), resend_user_crypto_tokens(), and send_builtin_crypto_tokens().

1465 {
1466  if (DCPS::security_debug.bookkeeping) {
1467  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
1468  ACE_TEXT("Sedp::create_and_send_datareader_crypto_tokens() - ")
1469  ACE_TEXT("sending tokens for local reader %C (ch %d) to remote writer %C (ch %d)\n"),
1470  DCPS::LogGuid(local_reader).c_str(), drch,
1471  DCPS::LogGuid(remote_writer).c_str(), dwch));
1472  }
1473 
1475  create_datareader_crypto_tokens(drch, dwch, drcts);
1476 
1477  send_datareader_crypto_tokens(local_reader, remote_writer, drcts);
1478 }
#define ACE_DEBUG(X)
void create_datareader_crypto_tokens(const DDS::Security::DatareaderCryptoHandle &drch, const DDS::Security::DatawriterCryptoHandle &dwch, DDS::Security::DatareaderCryptoTokenSeq &drcts)
Definition: Sedp.cpp:5325
void send_datareader_crypto_tokens(const DCPS::GUID_t &local_reader, const DCPS::GUID_t &remote_writer, const DDS::Security::DatareaderCryptoTokenSeq &drcts)
Definition: Sedp.cpp:5341
CryptoTokenSeq DatareaderCryptoTokenSeq
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ create_and_send_datawriter_crypto_tokens()

void OpenDDS::RTPS::Sedp::create_and_send_datawriter_crypto_tokens ( const DDS::Security::DatawriterCryptoHandle dwch,
const DCPS::GUID_t local_writer,
const DDS::Security::DatareaderCryptoHandle drch,
const DCPS::GUID_t remote_reader 
)
protected

Definition at line 1481 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), create_datawriter_crypto_tokens(), LM_DEBUG, OpenDDS::DCPS::security_debug, and send_datawriter_crypto_tokens().

Referenced by match_continue_security_enabled(), resend_user_crypto_tokens(), and send_builtin_crypto_tokens().

1484 {
1485  if (DCPS::security_debug.bookkeeping) {
1486  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
1487  ACE_TEXT("Sedp::create_and_send_datawriter_crypto_tokens() - ")
1488  ACE_TEXT("sending tokens for local writer %C (ch %d) to remote reader %C (ch %d)\n"),
1489  DCPS::LogGuid(local_writer).c_str(), dwch,
1490  DCPS::LogGuid(remote_reader).c_str(), drch));
1491  }
1492 
1494  create_datawriter_crypto_tokens(dwch, drch, dwcts);
1495 
1496  send_datawriter_crypto_tokens(local_writer, remote_reader, dwcts);
1497 }
#define ACE_DEBUG(X)
ACE_TEXT("TCP_Factory")
void send_datawriter_crypto_tokens(const DCPS::GUID_t &local_writer, const DCPS::GUID_t &remote_reader, const DDS::Security::DatawriterCryptoTokenSeq &dwcts)
Definition: Sedp.cpp:5385
void create_datawriter_crypto_tokens(const DDS::Security::DatawriterCryptoHandle &dwch, const DDS::Security::DatareaderCryptoHandle &drch, DDS::Security::DatawriterCryptoTokenSeq &dwcts)
Definition: Sedp.cpp:5369
CryptoTokenSeq DatawriterCryptoTokenSeq
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ create_datareader_crypto_tokens()

void OpenDDS::RTPS::Sedp::create_datareader_crypto_tokens ( const DDS::Security::DatareaderCryptoHandle drch,
const DDS::Security::DatawriterCryptoHandle dwch,
DDS::Security::DatareaderCryptoTokenSeq drcts 
)
protected

Definition at line 5325 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), DDS::Security::SecurityException::code, OpenDDS::Security::SecurityConfig::get_crypto_key_exchange(), OpenDDS::RTPS::Spdp::get_security_config(), LM_WARNING, DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, and spdp_.

Referenced by create_and_send_datareader_crypto_tokens().

5328 {
5329  DDS::Security::SecurityException se = {"", 0, 0};
5330  DDS::Security::CryptoKeyExchange_var key_exchange = spdp_.get_security_config()->get_crypto_key_exchange();
5331 
5332  if (!key_exchange->create_local_datareader_crypto_tokens(drcts, drch, dwch, se)) {
5333  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: ")
5334  ACE_TEXT("Sedp::create_datareader_crypto_tokens() - ")
5335  ACE_TEXT("Unable to create local datareader crypto tokens with crypto key exchange plugin. ")
5336  ACE_TEXT("Security Exception[%d.%d]: %C\n"), se.code, se.minor_code, se.message.in()));
5337  }
5338 }
#define ACE_DEBUG(X)
CryptoKeyExchange_var get_crypto_key_exchange() const
ACE_TEXT("TCP_Factory")
Security::SecurityConfig_rch get_security_config() const
Definition: Spdp.h:128

◆ create_datawriter_crypto_tokens()

void OpenDDS::RTPS::Sedp::create_datawriter_crypto_tokens ( const DDS::Security::DatawriterCryptoHandle dwch,
const DDS::Security::DatareaderCryptoHandle drch,
DDS::Security::DatawriterCryptoTokenSeq dwcts 
)
protected

Definition at line 5369 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), DDS::Security::SecurityException::code, OpenDDS::Security::SecurityConfig::get_crypto_key_exchange(), OpenDDS::RTPS::Spdp::get_security_config(), LM_WARNING, DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, and spdp_.

Referenced by create_and_send_datawriter_crypto_tokens().

5372 {
5373  DDS::Security::SecurityException se = {"", 0, 0};
5374  DDS::Security::CryptoKeyExchange_var key_exchange = spdp_.get_security_config()->get_crypto_key_exchange();
5375 
5376  if (!key_exchange->create_local_datawriter_crypto_tokens(dwcts, dwch, drch, se)) {
5377  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: ")
5378  ACE_TEXT("Sedp::create_datawriter_crypto_tokens() - ")
5379  ACE_TEXT("Unable to create local datawriter crypto tokens with crypto key exchange plugin. ")
5380  ACE_TEXT("Security Exception[%d.%d]: %C\n"), se.code, se.minor_code, se.message.in()));
5381  }
5382 }
#define ACE_DEBUG(X)
CryptoKeyExchange_var get_crypto_key_exchange() const
ACE_TEXT("TCP_Factory")
Security::SecurityConfig_rch get_security_config() const
Definition: Spdp.h:128

◆ data_acked_i()

void OpenDDS::RTPS::Sedp::data_acked_i ( const DCPS::GUID_t local_id,
const DCPS::GUID_t remote_id 
)

Definition at line 2977 of file Sedp.cpp.

References ACE_GUARD, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER, lock_, OpenDDS::DCPS::make_id(), OpenDDS::RTPS::Spdp::participants_, process_association_records_i(), and spdp_.

Referenced by OpenDDS::RTPS::Sedp::Writer::data_acked().

2979 {
2980  if (local_id.entityId == ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER ||
2981  local_id.entityId == ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER
2982 #ifdef OPENDDS_SECURITY
2984  || local_id.entityId == ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
2986 #endif
2987  ) {
2988  const GUID_t remote_part = make_id(remote_id, ENTITYID_PARTICIPANT);
2990  Spdp::DiscoveredParticipantIter iter = spdp_.participants_.find(remote_part);
2991  if (iter != spdp_.participants_.end()) {
2992  process_association_records_i(iter->second);
2993  }
2994  }
2995 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
DiscoveredParticipantMap::iterator DiscoveredParticipantIter
Definition: Spdp.h:70
void process_association_records_i(DiscoveredParticipant &participant)
Definition: Sedp.cpp:1264
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER
Definition: MessageTypes.h:79
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER
Definition: GuidUtils.h:40
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER
Definition: MessageTypes.h:85
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
Definition: MessageTypes.h:77
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER
Definition: GuidUtils.h:42
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
DiscoveredParticipantMap participants_
Definition: Spdp.h:382

◆ data_received() [1/5]

void OpenDDS::RTPS::Sedp::data_received ( DCPS::MessageId  message_id,
const DiscoveredPublication wdata 
)
private

Definition at line 2279 of file Sedp.cpp.

References ACE_GUARD, OpenDDS::DCPS::DiscoveredWriterData::ddsPublicationData, OpenDDS::RTPS::Spdp::has_discovered_participant(), OpenDDS::RTPS::DiscoveredPublication::have_ice_agent_info_, OpenDDS::RTPS::DiscoveredPublication::ice_agent_info_, ignoring(), OpenDDS::RTPS::Spdp::initialized(), lock_, OpenDDS::DCPS::make_part_guid(), process_discovered_writer_data(), OpenDDS::DCPS::WriterProxy_t::remoteWriterGuid, OpenDDS::DCPS::SAMPLE_DATA, should_drop_message(), OpenDDS::RTPS::Spdp::shutting_down(), spdp_, OpenDDS::RTPS::DiscoveredPublication::type_info_, OpenDDS::RTPS::DiscoveredPublication::writer_data_, and OpenDDS::DCPS::DiscoveredWriterData::writerProxy.

Referenced by OpenDDS::RTPS::Sedp::DiscoveryReader::data_received_i(), OpenDDS::RTPS::Sedp::LivelinessReader::data_received_i(), and OpenDDS::RTPS::Sedp::Reader::Reader().

2281 {
2282  if (!spdp_.initialized() || spdp_.shutting_down()) { return; }
2283 
2284  const DCPS::DiscoveredWriterData& wdata = dpub.writer_data_;
2285  const GUID_t& guid = wdata.writerProxy.remoteWriterGuid;
2286  const GUID_t guid_participant = make_part_guid(guid);
2287 
2289 
2290  if (ignoring(guid)
2291  || ignoring(guid_participant)
2292  || ignoring(wdata.ddsPublicationData.topic_name)) {
2293  return;
2294  }
2295 
2296 #ifdef OPENDDS_SECURITY
2297  if (message_id == DCPS::SAMPLE_DATA && should_drop_message(wdata.ddsPublicationData.topic_name)) {
2298  return;
2299  }
2300 #endif
2301 
2302  if (!spdp_.has_discovered_participant(guid_participant)) {
2303  return;
2304  }
2305 
2306  process_discovered_writer_data(message_id, wdata, guid, dpub.type_info_
2307 #ifdef OPENDDS_SECURITY
2308  , dpub.have_ice_agent_info_, dpub.ice_agent_info_
2309 #endif
2310  );
2311 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
bool initialized()
Definition: Spdp.h:110
bool shutting_down()
Definition: Spdp.h:118
OpenDDS_Dcps_Export GUID_t make_part_guid(const GuidPrefix_t &prefix)
Definition: GuidUtils.h:216
bool ignoring(const GUID_t &guid) const
Definition: Sedp.h:205
bool should_drop_message(const char *unsecure_topic_name)
Definition: Sedp.cpp:2825
void process_discovered_writer_data(DCPS::MessageId message_id, const DCPS::DiscoveredWriterData &wdata, const DCPS::GUID_t &guid, const XTypes::TypeInformation &type_info, bool have_ice_agent_info, const ICE::AgentInfo &ice_agent_info, const DDS::Security::EndpointSecurityInfo *security_info=NULL)
Definition: Sedp.cpp:2042
bool has_discovered_participant(const DCPS::GUID_t &guid) const
Definition: Spdp.cpp:3688

◆ data_received() [2/5]

void OpenDDS::RTPS::Sedp::data_received ( DCPS::MessageId  message_id,
const ParameterListConverter::DiscoveredPublication_SecurityWrapper wrapper 
)
private

Definition at line 2314 of file Sedp.cpp.

References ACE_GUARD, OpenDDS::RTPS::ParameterListConverter::DiscoveredPublication_SecurityWrapper::data, OpenDDS::DCPS::DiscoveredWriterData::ddsPublicationData, OpenDDS::RTPS::ParameterListConverter::DiscoveredPublication_SecurityWrapper::have_ice_agent_info, OpenDDS::RTPS::ParameterListConverter::DiscoveredPublication_SecurityWrapper::ice_agent_info, ignoring(), OpenDDS::RTPS::Spdp::initialized(), lock_, OpenDDS::DCPS::make_part_guid(), process_discovered_writer_data(), OpenDDS::DCPS::WriterProxy_t::remoteWriterGuid, OpenDDS::RTPS::ParameterListConverter::DiscoveredPublication_SecurityWrapper::security_info, OpenDDS::RTPS::Spdp::shutting_down(), spdp_, OpenDDS::RTPS::ParameterListConverter::DiscoveredPublication_SecurityWrapper::type_info, and OpenDDS::DCPS::DiscoveredWriterData::writerProxy.

2316 {
2317  if (!spdp_.initialized() || spdp_.shutting_down()) { return; }
2318 
2319  const GUID_t& guid = wrapper.data.writerProxy.remoteWriterGuid;
2320  const GUID_t guid_participant = make_part_guid(guid);
2321 
2323 
2324  if (ignoring(guid)
2325  || ignoring(guid_participant)
2326  || ignoring(wrapper.data.ddsPublicationData.topic_name)) {
2327  return;
2328  }
2329 
2330  process_discovered_writer_data(message_id, wrapper.data, guid, wrapper.type_info,
2331  wrapper.have_ice_agent_info, wrapper.ice_agent_info,
2332  &wrapper.security_info);
2333 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
bool initialized()
Definition: Spdp.h:110
bool shutting_down()
Definition: Spdp.h:118
OpenDDS_Dcps_Export GUID_t make_part_guid(const GuidPrefix_t &prefix)
Definition: GuidUtils.h:216
bool ignoring(const GUID_t &guid) const
Definition: Sedp.h:205
void process_discovered_writer_data(DCPS::MessageId message_id, const DCPS::DiscoveredWriterData &wdata, const DCPS::GUID_t &guid, const XTypes::TypeInformation &type_info, bool have_ice_agent_info, const ICE::AgentInfo &ice_agent_info, const DDS::Security::EndpointSecurityInfo *security_info=NULL)
Definition: Sedp.cpp:2042

◆ data_received() [3/5]

void OpenDDS::RTPS::Sedp::data_received ( DCPS::MessageId  message_id,
const DiscoveredSubscription rdata 
)
private

Definition at line 2615 of file Sedp.cpp.

References ACE_GUARD, OpenDDS::DCPS::DiscoveredReaderData::ddsSubscriptionData, OpenDDS::RTPS::Spdp::has_discovered_participant(), OpenDDS::RTPS::DiscoveredSubscription::have_ice_agent_info_, OpenDDS::RTPS::DiscoveredSubscription::ice_agent_info_, ignoring(), OpenDDS::RTPS::Spdp::initialized(), lock_, OpenDDS::DCPS::make_part_guid(), process_discovered_reader_data(), OpenDDS::RTPS::DiscoveredSubscription::reader_data_, OpenDDS::DCPS::DiscoveredReaderData::readerProxy, OpenDDS::DCPS::ReaderProxy_t::remoteReaderGuid, OpenDDS::DCPS::SAMPLE_DATA, should_drop_message(), OpenDDS::RTPS::Spdp::shutting_down(), spdp_, and OpenDDS::RTPS::DiscoveredSubscription::type_info_.

2617 {
2618  if (!spdp_.initialized() || spdp_.shutting_down()) { return; }
2619 
2620  const DCPS::DiscoveredReaderData& rdata = dsub.reader_data_;
2621  const GUID_t& guid = rdata.readerProxy.remoteReaderGuid;
2622  const GUID_t part_guid = make_part_guid(guid);
2623 
2625 
2626  if (ignoring(guid) || ignoring(part_guid)
2627  || ignoring(rdata.ddsSubscriptionData.topic_name)) {
2628  return;
2629  }
2630 
2631 #ifdef OPENDDS_SECURITY
2632  if (message_id == DCPS::SAMPLE_DATA && should_drop_message(rdata.ddsSubscriptionData.topic_name)) {
2633  return;
2634  }
2635 #endif
2636 
2637  if (!spdp_.has_discovered_participant(part_guid)) {
2638  return;
2639  }
2640 
2641  process_discovered_reader_data(message_id, rdata, guid, dsub.type_info_
2642 #ifdef OPENDDS_SECURITY
2643  , dsub.have_ice_agent_info_, dsub.ice_agent_info_
2644 #endif
2645  );
2646 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
bool initialized()
Definition: Spdp.h:110
void process_discovered_reader_data(DCPS::MessageId message_id, const DCPS::DiscoveredReaderData &rdata, const DCPS::GUID_t &guid, const XTypes::TypeInformation &type_info, bool have_ice_agent_info, const ICE::AgentInfo &ice_agent_info, const DDS::Security::EndpointSecurityInfo *security_info=NULL)
Definition: Sedp.cpp:2336
bool shutting_down()
Definition: Spdp.h:118
OpenDDS_Dcps_Export GUID_t make_part_guid(const GuidPrefix_t &prefix)
Definition: GuidUtils.h:216
bool ignoring(const GUID_t &guid) const
Definition: Sedp.h:205
bool should_drop_message(const char *unsecure_topic_name)
Definition: Sedp.cpp:2825
bool has_discovered_participant(const DCPS::GUID_t &guid) const
Definition: Spdp.cpp:3688

◆ data_received() [4/5]

void OpenDDS::RTPS::Sedp::data_received ( DCPS::MessageId  message_id,
const ParameterListConverter::DiscoveredSubscription_SecurityWrapper wrapper 
)
private

Definition at line 2649 of file Sedp.cpp.

References ACE_GUARD, OpenDDS::RTPS::ParameterListConverter::DiscoveredSubscription_SecurityWrapper::data, OpenDDS::DCPS::DiscoveredReaderData::ddsSubscriptionData, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::RTPS::ParameterListConverter::DiscoveredSubscription_SecurityWrapper::have_ice_agent_info, OpenDDS::RTPS::ParameterListConverter::DiscoveredSubscription_SecurityWrapper::ice_agent_info, ignoring(), OpenDDS::RTPS::Spdp::initialized(), lock_, process_discovered_reader_data(), OpenDDS::DCPS::DiscoveredReaderData::readerProxy, OpenDDS::DCPS::ReaderProxy_t::remoteReaderGuid, OpenDDS::RTPS::ParameterListConverter::DiscoveredSubscription_SecurityWrapper::security_info, OpenDDS::RTPS::Spdp::shutting_down(), spdp_, and OpenDDS::RTPS::ParameterListConverter::DiscoveredSubscription_SecurityWrapper::type_info.

2651 {
2652  if (!spdp_.initialized() || spdp_.shutting_down()) { return; }
2653 
2654  const GUID_t& guid = wrapper.data.readerProxy.remoteReaderGuid;
2655  GUID_t guid_participant = guid;
2656  guid_participant.entityId = ENTITYID_PARTICIPANT;
2657 
2659 
2660  if (ignoring(guid)
2661  || ignoring(guid_participant)
2662  || ignoring(wrapper.data.ddsSubscriptionData.topic_name)) {
2663  return;
2664  }
2665 
2666  process_discovered_reader_data(message_id, wrapper.data, guid, wrapper.type_info, wrapper.have_ice_agent_info, wrapper.ice_agent_info, &wrapper.security_info);
2667 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
bool initialized()
Definition: Spdp.h:110
void process_discovered_reader_data(DCPS::MessageId message_id, const DCPS::DiscoveredReaderData &rdata, const DCPS::GUID_t &guid, const XTypes::TypeInformation &type_info, bool have_ice_agent_info, const ICE::AgentInfo &ice_agent_info, const DDS::Security::EndpointSecurityInfo *security_info=NULL)
Definition: Sedp.cpp:2336
bool shutting_down()
Definition: Spdp.h:118
bool ignoring(const GUID_t &guid) const
Definition: Sedp.h:205

◆ data_received() [5/5]

void OpenDDS::RTPS::Sedp::data_received ( DCPS::MessageId  message_id,
const ParticipantMessageData data 
)
private

Definition at line 2705 of file Sedp.cpp.

References ACE_GUARD, OpenDDS::RTPS::Spdp::has_discovered_participant(), ignoring(), OpenDDS::RTPS::Spdp::initialized(), lock_, OpenDDS::DCPS::make_part_guid(), notify_liveliness(), OpenDDS::RTPS::ParticipantMessageData::participantGuid, OpenDDS::RTPS::Spdp::shutting_down(), and spdp_.

2707 {
2708  if (!spdp_.initialized() || spdp_.shutting_down()) {
2709  return;
2710  }
2711 
2712  const GUID_t& guid = data.participantGuid;
2713  const GUID_t guid_participant = make_part_guid(guid);
2714 
2716 
2717  if (ignoring(guid) || ignoring(guid_participant)) {
2718  return;
2719  }
2720 
2721  if (!spdp_.has_discovered_participant(guid_participant)) {
2722  return;
2723  }
2724  notify_liveliness(data);
2725 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
bool initialized()
Definition: Spdp.h:110
bool shutting_down()
Definition: Spdp.h:118
OpenDDS_Dcps_Export GUID_t make_part_guid(const GuidPrefix_t &prefix)
Definition: GuidUtils.h:216
void notify_liveliness(const ParticipantMessageData &pmd)
Definition: Sedp.cpp:2671
bool ignoring(const GUID_t &guid) const
Definition: Sedp.h:205
bool has_discovered_participant(const DCPS::GUID_t &guid) const
Definition: Spdp.cpp:3688

◆ disassociate()

void OpenDDS::RTPS::Sedp::disassociate ( DiscoveredParticipant participant)

Definition at line 1544 of file Sedp.cpp.

References ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::array_count(), associated_participants_, OpenDDS::RTPS::DiscoveredParticipant::builtin_associated_records_, OpenDDS::RTPS::DiscoveredParticipant::builtin_pending_records_, DDS::Security::SecurityException::code, discovered_publications_, discovered_subscriptions_, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER, OpenDDS::RTPS::ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER, OpenDDS::RTPS::ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER, OpenDDS::RTPS::ENTITYID_TL_SVC_REPLY_READER_SECURE, OpenDDS::RTPS::ENTITYID_TL_SVC_REPLY_WRITER_SECURE, OpenDDS::RTPS::ENTITYID_TL_SVC_REQ_READER_SECURE, OpenDDS::RTPS::ENTITYID_TL_SVC_REQ_WRITER_SECURE, OpenDDS::Security::HandleRegistry::erase_remote_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::erase_remote_datawriter_crypto_handle(), OpenDDS::Security::HandleRegistry::get_all_remote_datareaders(), OpenDDS::Security::HandleRegistry::get_all_remote_datawriters(), OpenDDS::Security::SecurityConfig::get_crypto_key_factory(), get_handle_registry(), OpenDDS::RTPS::Spdp::get_security_config(), OpenDDS::RTPS::ParticipantProxy_t::guidPrefix, OpenDDS::RTPS::Spdp::is_security_enabled(), LM_ERROR, OpenDDS::DCPS::make_id(), OpenDDS::DCPS::make_unknown_guid(), DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, OPENDDS_VECTOR, OpenDDS::Security::SPDPdiscoveredParticipantData::participantProxy, OpenDDS::RTPS::DiscoveredParticipant::pdata_, OpenDDS::RTPS::BuiltinAssociationRecord::remote_id(), remove_entities_belonging_to(), remove_from_bit_i(), remove_remote_crypto_handle(), OpenDDS::DCPS::security_debug, spdp_, and OpenDDS::RTPS::BuiltinAssociationRecord::transport_client_.

Referenced by OpenDDS::RTPS::Spdp::purge_discovered_participant().

1545 {
1546  const GUID_t part = make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_PARTICIPANT);
1547 
1548  associated_participants_.erase(part);
1549 
1550  OPENDDS_VECTOR(DiscoveredPublication) pubs_to_remove_from_bit;
1551  OPENDDS_VECTOR(DiscoveredSubscription) subs_to_remove_from_bit;
1552 
1553  remove_entities_belonging_to(discovered_publications_, part, false, pubs_to_remove_from_bit);
1554  remove_entities_belonging_to(discovered_subscriptions_, part, true, subs_to_remove_from_bit);
1555 
1556  for (OPENDDS_VECTOR(DiscoveredPublication)::iterator it = pubs_to_remove_from_bit.begin(); it != pubs_to_remove_from_bit.end(); ++it) {
1557  remove_from_bit_i(*it);
1558  }
1559 
1560  for (OPENDDS_VECTOR(DiscoveredSubscription)::iterator it = subs_to_remove_from_bit.begin(); it != subs_to_remove_from_bit.end(); ++it) {
1561  remove_from_bit_i(*it);
1562  }
1563 
1564  participant.builtin_pending_records_.clear();
1565 
1566  for (DiscoveredParticipant::BuiltinAssociationRecords::const_iterator pos = participant.builtin_associated_records_.begin(), limit = participant.builtin_associated_records_.end(); pos != limit; ++pos) {
1567  const BuiltinAssociationRecord& record = *pos;
1568  record.transport_client_->disassociate(record.remote_id());
1569  }
1570 
1571  participant.builtin_associated_records_.clear();
1572 
1573  //FUTURE: if/when topic propagation is supported, add it here
1574 
1575 #ifdef OPENDDS_SECURITY
1576  // Clean up crypto handles after diassociation because the transport might be using them.
1577  if (spdp_.is_security_enabled()) {
1578  static const EntityId_t secure_entities[] = {
1593  };
1594  for (size_t i = 0; i < DCPS::array_count(secure_entities); ++i) {
1595  remove_remote_crypto_handle(part, secure_entities[i]);
1596  }
1597 
1598  const DDS::Security::CryptoKeyFactory_var key_factory = spdp_.get_security_config()->get_crypto_key_factory();
1600 
1601  typedef Security::HandleRegistry::DatareaderCryptoHandleList DatareaderCryptoHandleList;
1602  typedef Security::HandleRegistry::DatawriterCryptoHandleList DatawriterCryptoHandleList;
1603 
1604  const GUID_t key = make_unknown_guid(part);
1605  const DatareaderCryptoHandleList drlist = get_handle_registry()->get_all_remote_datareaders(key);
1606  for (DatareaderCryptoHandleList::const_iterator pos = drlist.begin(), limit = drlist.end();
1607  pos != limit; ++pos) {
1608  if (!key_factory->unregister_datareader(pos->second, se)) {
1609  if (DCPS::security_debug.cleanup_error) {
1610  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) {cleanup_error} Sedp::disassociate() - ")
1611  ACE_TEXT("Failure calling unregister_datareader() (ch %d). Security Exception[%d.%d]: %C\n"),
1612  pos->second, se.code, se.minor_code, se.message.in()));
1613  }
1614  }
1616  }
1617  const DatawriterCryptoHandleList dwlist = get_handle_registry()->get_all_remote_datawriters(key);
1618  for (DatawriterCryptoHandleList::const_iterator pos = dwlist.begin(), limit = dwlist.end();
1619  pos != limit; ++pos) {
1620  if (!key_factory->unregister_datawriter(pos->second, se)) {
1621  if (DCPS::security_debug.cleanup_error) {
1622  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) {cleanup_error} Sedp::disassociate() - ")
1623  ACE_TEXT("Failure calling unregister_datawriter() (ch %d). Security Exception[%d.%d]: %C\n"),
1624  pos->second, se.code, se.minor_code, se.message.in()));
1625  }
1626  }
1628  }
1629  }
1630 #endif
1631 }
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER
Definition: MessageTypes.h:81
#define ACE_ERROR(X)
DiscoveredSubscriptionMap discovered_subscriptions_
Definition: Sedp.h:1235
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER
Definition: MessageTypes.h:78
sequence< octet > key
size_t array_count(Type(&)[count])
Definition: Util.h:221
OpenDDS_Dcps_Export GUID_t make_unknown_guid(const GuidPrefix_t &prefix)
Definition: GuidUtils.h:228
const EntityId_t ENTITYID_TL_SVC_REQ_WRITER_SECURE
Definition: MessageTypes.h:90
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER
Definition: MessageTypes.h:88
void remove_from_bit_i(const DiscoveredPublication &pub)
Definition: Sedp.cpp:1828
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
const EntityId_t ENTITYID_TL_SVC_REPLY_READER_SECURE
Definition: MessageTypes.h:93
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER
Definition: MessageTypes.h:79
const EntityId_t ENTITYID_TL_SVC_REPLY_WRITER_SECURE
Definition: MessageTypes.h:92
DCPS::RepoIdSet associated_participants_
Definition: Sedp.h:864
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER
Definition: MessageTypes.h:85
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER
Definition: MessageTypes.h:82
ACE_TEXT("TCP_Factory")
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
Definition: MessageTypes.h:77
void erase_remote_datawriter_crypto_handle(const DCPS::GUID_t &id)
#define OPENDDS_VECTOR(T)
DatareaderCryptoHandleList get_all_remote_datareaders(const DCPS::GUID_t &prefix) const
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER
Definition: MessageTypes.h:86
bool is_security_enabled() const
Definition: Spdp.h:159
const EntityId_t ENTITYID_TL_SVC_REQ_READER_SECURE
Definition: MessageTypes.h:91
DiscoveredPublicationMap discovered_publications_
Definition: Sedp.h:1234
void remove_entities_belonging_to(Map &m, DCPS::GUID_t participant, bool subscription, OPENDDS_VECTOR(typename Map::mapped_type)&to_remove_from_bit)
Definition: Sedp.cpp:1795
CryptoKeyFactory_var get_crypto_key_factory() const
Security::SecurityConfig_rch get_security_config() const
Definition: Spdp.h:128
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER
Definition: MessageTypes.h:87
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
DatawriterCryptoHandleList get_all_remote_datawriters(const DCPS::GUID_t &prefix) const
void erase_remote_datareader_crypto_handle(const DCPS::GUID_t &id)
void remove_remote_crypto_handle(const DCPS::GUID_t &participant, const EntityId_t &entity)
Definition: Sedp.cpp:1421
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER
Definition: MessageTypes.h:80
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ disassociate_volatile()

void OpenDDS::RTPS::Sedp::disassociate_volatile ( DiscoveredParticipant participant)

Definition at line 1345 of file Sedp.cpp.

References OpenDDS::RTPS::DiscoveredParticipant::builtin_associated_records_, OpenDDS::RTPS::DiscoveredParticipant::builtin_pending_records_, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER, OpenDDS::RTPS::ParticipantProxy_t::guidPrefix, OpenDDS::RTPS::BuiltinAssociationRecord::local_id(), OpenDDS::DCPS::make_id(), participant_id_, OpenDDS::Security::SPDPdiscoveredParticipantData::participantProxy, OpenDDS::RTPS::DiscoveredParticipant::pdata_, OpenDDS::RTPS::BuiltinAssociationRecord::remote_id(), and OpenDDS::RTPS::BuiltinAssociationRecord::transport_client_.

1346 {
1349  const GUID_t remote_writer = make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER);
1350  const GUID_t remote_reader = make_id(participant.pdata_.participantProxy.guidPrefix, ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER);
1351 
1352  for (DiscoveredParticipant::BuiltinAssociationRecords::iterator pos = participant.builtin_pending_records_.begin(),
1353  limit = participant.builtin_pending_records_.end(); pos != limit;) {
1354  const BuiltinAssociationRecord& record = *pos;
1355  if (record.local_id() == local_writer && record.remote_id() == remote_reader) {
1356  participant.builtin_pending_records_.erase(pos++);
1357  } else if (record.local_id() == local_reader && record.remote_id() == remote_writer) {
1358  participant.builtin_pending_records_.erase(pos++);
1359  } else {
1360  ++pos;
1361  }
1362  }
1363 
1364  for (DiscoveredParticipant::BuiltinAssociationRecords::iterator pos = participant.builtin_associated_records_.begin(),
1365  limit = participant.builtin_associated_records_.end(); pos != limit;) {
1366  const BuiltinAssociationRecord& record = *pos;
1367  if (record.local_id() == local_writer && record.remote_id() == remote_reader) {
1368  record.transport_client_->disassociate(record.remote_id());
1369  participant.builtin_associated_records_.erase(pos++);
1370  } else if (record.local_id() == local_reader && record.remote_id() == remote_writer) {
1371  record.transport_client_->disassociate(record.remote_id());
1372  participant.builtin_associated_records_.erase(pos++);
1373  } else {
1374  ++pos;
1375  }
1376  }
1377 }
GUID_t participant_id_
Definition: Sedp.h:1229
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER
Definition: MessageTypes.h:85
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER
Definition: MessageTypes.h:86
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ find_topic()

DCPS::TopicStatus OpenDDS::RTPS::Sedp::find_topic ( const char *  topicName,
CORBA::String_out  dataTypeName,
DDS::TopicQos_out  qos,
GUID_t topicId 
)

Definition at line 6085 of file Sedp.cpp.

References ACE_GUARD_RETURN, OpenDDS::DCPS::FOUND, OpenDDS::DCPS::INTERNAL_ERROR, OpenDDS::DCPS::TopicDetails::local_data_type_name(), OpenDDS::DCPS::TopicDetails::local_qos(), OpenDDS::DCPS::TransportClient::lock_, OpenDDS::DCPS::NOT_FOUND, OpenDDS::DCPS::TopicDetails::topic_id(), Update::TopicQos, and topics_.

Referenced by ignoring().

6090 {
6092  DCPS::TopicDetailsMap::const_iterator iter = topics_.find(topicName);
6093  if (iter == topics_.end()) {
6094  return DCPS::NOT_FOUND;
6095  }
6096 
6097  const DCPS::TopicDetails& td = iter->second;
6098 
6099  dataTypeName = td.local_data_type_name().c_str();
6100  qos = new DDS::TopicQos(td.local_qos());
6101  topicId = td.topic_id();
6102  return DCPS::FOUND;
6103 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)

◆ generate_remote_matched_crypto_handle()

void OpenDDS::RTPS::Sedp::generate_remote_matched_crypto_handle ( const BuiltinAssociationRecord record)

Definition at line 1012 of file Sedp.cpp.

References generate_remote_matched_reader_crypto_handle(), generate_remote_matched_writer_crypto_handle(), OpenDDS::RTPS::BuiltinAssociationRecord::local_id(), and OpenDDS::RTPS::BuiltinAssociationRecord::remote_id().

Referenced by generate_remote_matched_crypto_handles().

1013 {
1014  if (DCPS::GuidConverter(record.remote_id()).isWriter()) {
1015  generate_remote_matched_writer_crypto_handle(record.remote_id(), record.local_id());
1016  } else {
1017  generate_remote_matched_reader_crypto_handle(record.remote_id(), record.local_id(), false);
1018  }
1019 }
DDS::Security::DatawriterCryptoHandle generate_remote_matched_writer_crypto_handle(const DCPS::GUID_t &writer, const DCPS::GUID_t &reader)
Definition: Sedp.cpp:5258
DDS::Security::DatareaderCryptoHandle generate_remote_matched_reader_crypto_handle(const DCPS::GUID_t &reader, const DCPS::GUID_t &writer, bool relay_only)
Definition: Sedp.cpp:5291

◆ generate_remote_matched_crypto_handles()

void OpenDDS::RTPS::Sedp::generate_remote_matched_crypto_handles ( DiscoveredParticipant participant)

Definition at line 1334 of file Sedp.cpp.

References OpenDDS::RTPS::DiscoveredParticipant::builtin_pending_records_, OpenDDS::RTPS::BuiltinAssociationRecord::generate_remote_matched_crypto_handle(), and generate_remote_matched_crypto_handle().

1335 {
1336  for (DiscoveredParticipant::BuiltinAssociationRecords::iterator pos = participant.builtin_pending_records_.begin(),
1337  limit = participant.builtin_pending_records_.end(); pos != limit; ++pos) {
1338  const BuiltinAssociationRecord& record = *pos;
1339  if (record.generate_remote_matched_crypto_handle()) {
1341  }
1342  }
1343 }
void generate_remote_matched_crypto_handle(const BuiltinAssociationRecord &record)
Definition: Sedp.cpp:1012

◆ generate_remote_matched_reader_crypto_handle()

DDS::Security::DatareaderCryptoHandle OpenDDS::RTPS::Sedp::generate_remote_matched_reader_crypto_handle ( const DCPS::GUID_t reader,
const DCPS::GUID_t writer,
bool  relay_only 
)
protected

Definition at line 5291 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), DDS::Security::SecurityException::code, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::Security::SecurityConfig::get_crypto_key_factory(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_local_datawriter_crypto_handle(), OpenDDS::Security::HandleRegistry::get_local_datawriter_security_attributes(), OpenDDS::Security::HandleRegistry::get_remote_datareader_crypto_handle(), OpenDDS::RTPS::Spdp::get_security_config(), DDS::HANDLE_NIL, OpenDDS::Security::HandleRegistry::insert_remote_datareader_crypto_handle(), LM_WARNING, OpenDDS::RTPS::Spdp::lookup_participant_crypto_info(), OpenDDS::DCPS::make_id(), DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, and spdp_.

Referenced by generate_remote_matched_crypto_handle(), and match_continue_security_enabled().

5294 {
5296  if (result != DDS::HANDLE_NIL) {
5297  return result;
5298  }
5299 
5300  const GUID_t reader_part = make_id(reader, ENTITYID_PARTICIPANT);
5302 
5303  if (info.first != DDS::HANDLE_NIL && info.second) {
5308  DDS::Security::CryptoKeyFactory_var key_factory = spdp_.get_security_config()->get_crypto_key_factory();
5309  DDS::Security::SecurityException se = {"", 0, 0};
5310  result = key_factory->register_matched_remote_datareader(dwch, info.first, info.second, relay_only, se);
5311  get_handle_registry()->insert_remote_datareader_crypto_handle(reader, result, attribs);
5312  if (result == DDS::HANDLE_NIL) {
5313  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::generate_remote_matched_reader_crypto_handle() - ")
5314  ACE_TEXT("Failure calling register_matched_remote_datareader(). Security Exception[%d.%d]: %C\n"),
5315  se.code, se.minor_code, se.message.in()));
5316  }
5317  } else {
5318  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::generate_remote_matched_reader_crypto_handle() - ")
5319  ACE_TEXT("Unable to lookup remote participant crypto info.\n")));
5320  }
5321  return result;
5322 }
#define ACE_DEBUG(X)
void insert_remote_datareader_crypto_handle(const DCPS::GUID_t &id, DDS::Security::DatareaderCryptoHandle handle, const DDS::Security::EndpointSecurityAttributes &attributes)
const InstanceHandle_t HANDLE_NIL
DDS::Security::DatawriterCryptoHandle get_local_datawriter_crypto_handle(const DCPS::GUID_t &id) const
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
NativeCryptoHandle DatawriterCryptoHandle
ParticipantCryptoInfoPair lookup_participant_crypto_info(const DCPS::GUID_t &id) const
Definition: Spdp.cpp:3788
NativeCryptoHandle DatareaderCryptoHandle
std::pair< DDS::Security::ParticipantCryptoHandle, DDS::Security::SharedSecretHandle_var > ParticipantCryptoInfoPair
Definition: Spdp.h:165
ACE_TEXT("TCP_Factory")
DDS::Security::DatareaderCryptoHandle get_remote_datareader_crypto_handle(const DCPS::GUID_t &id) const
const DDS::Security::EndpointSecurityAttributes & get_local_datawriter_security_attributes(const DCPS::GUID_t &id) const
CryptoKeyFactory_var get_crypto_key_factory() const
Security::SecurityConfig_rch get_security_config() const
Definition: Spdp.h:128
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ generate_remote_matched_writer_crypto_handle()

DDS::Security::DatawriterCryptoHandle OpenDDS::RTPS::Sedp::generate_remote_matched_writer_crypto_handle ( const DCPS::GUID_t writer,
const DCPS::GUID_t reader 
)
protected

Definition at line 5258 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), DDS::Security::SecurityException::code, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::Security::SecurityConfig::get_crypto_key_factory(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_local_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::get_local_datareader_security_attributes(), OpenDDS::Security::HandleRegistry::get_remote_datawriter_crypto_handle(), OpenDDS::RTPS::Spdp::get_security_config(), DDS::HANDLE_NIL, OpenDDS::Security::HandleRegistry::insert_remote_datawriter_crypto_handle(), LM_WARNING, OpenDDS::RTPS::Spdp::lookup_participant_crypto_info(), OpenDDS::DCPS::make_id(), DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, and spdp_.

Referenced by generate_remote_matched_crypto_handle(), and match_continue_security_enabled().

5260 {
5262  if (result != DDS::HANDLE_NIL) {
5263  return result;
5264  }
5265 
5266  const GUID_t writer_part = make_id(writer, ENTITYID_PARTICIPANT);
5268 
5269  if (info.first != DDS::HANDLE_NIL && info.second) {
5274  DDS::Security::CryptoKeyFactory_var key_factory = spdp_.get_security_config()->get_crypto_key_factory();
5275  DDS::Security::SecurityException se = {"", 0, 0};
5276  result = key_factory->register_matched_remote_datawriter(drch, info.first, info.second, se);
5277  get_handle_registry()->insert_remote_datawriter_crypto_handle(writer, result, attribs);
5278  if (result == DDS::HANDLE_NIL) {
5279  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::generate_remote_matched_writer_crypto_handle() - ")
5280  ACE_TEXT("Failure calling register_matched_remote_datawriter(). Security Exception[%d.%d]: %C\n"),
5281  se.code, se.minor_code, se.message.in()));
5282  }
5283  } else {
5284  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::generate_remote_matched_writer_crypto_handle() - ")
5285  ACE_TEXT("Unable to lookup remote participant crypto info.\n")));
5286  }
5287  return result;
5288 }
#define ACE_DEBUG(X)
const DDS::Security::EndpointSecurityAttributes & get_local_datareader_security_attributes(const DCPS::GUID_t &id) const
void insert_remote_datawriter_crypto_handle(const DCPS::GUID_t &id, DDS::Security::DatawriterCryptoHandle handle, const DDS::Security::EndpointSecurityAttributes &attributes)
const InstanceHandle_t HANDLE_NIL
DDS::Security::DatareaderCryptoHandle get_local_datareader_crypto_handle(const DCPS::GUID_t &id) const
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
NativeCryptoHandle DatawriterCryptoHandle
ParticipantCryptoInfoPair lookup_participant_crypto_info(const DCPS::GUID_t &id) const
Definition: Spdp.cpp:3788
NativeCryptoHandle DatareaderCryptoHandle
std::pair< DDS::Security::ParticipantCryptoHandle, DDS::Security::SharedSecretHandle_var > ParticipantCryptoInfoPair
Definition: Spdp.h:165
ACE_TEXT("TCP_Factory")
DDS::Security::DatawriterCryptoHandle get_remote_datawriter_crypto_handle(const DCPS::GUID_t &id) const
CryptoKeyFactory_var get_crypto_key_factory() const
Security::SecurityConfig_rch get_security_config() const
Definition: Spdp.h:128
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ get_access_control()

DDS::Security::AccessControl_var OpenDDS::RTPS::Sedp::get_access_control ( ) const
inlineprotected

Definition at line 1196 of file Sedp.h.

References access_control_.

Referenced by add_publication(), add_subscription(), process_discovered_reader_data(), process_discovered_writer_data(), should_drop_message(), and signal_liveliness().

1197  {
1198  return access_control_;
1199  }
DDS::Security::AccessControl_var access_control_
Definition: Sedp.h:1258

◆ get_crypto_key_exchange()

DDS::Security::CryptoKeyExchange_var OpenDDS::RTPS::Sedp::get_crypto_key_exchange ( ) const
inlineprotected

Definition at line 1216 of file Sedp.h.

References crypto_key_exchange_.

Referenced by match_continue_security_enabled().

1217  {
1218  return crypto_key_exchange_;
1219  }
DDS::Security::CryptoKeyExchange_var crypto_key_exchange_
Definition: Sedp.h:1260

◆ get_crypto_key_factory()

DDS::Security::CryptoKeyFactory_var OpenDDS::RTPS::Sedp::get_crypto_key_factory ( ) const
inlineprotected

Definition at line 1206 of file Sedp.h.

References crypto_key_factory_.

Referenced by add_publication(), add_subscription(), cleanup_secure_reader(), and cleanup_secure_writer().

1207  {
1208  return crypto_key_factory_;
1209  }
DDS::Security::CryptoKeyFactory_var crypto_key_factory_
Definition: Sedp.h:1259

◆ get_domain_id()

DDS::DomainId_t OpenDDS::RTPS::Sedp::get_domain_id ( ) const
protected

Definition at line 5538 of file Sedp.cpp.

References OpenDDS::RTPS::Spdp::get_domain_id(), and spdp_.

Referenced by add_publication(), and add_subscription().

5538  {
5539  return spdp_.get_domain_id();
5540 }
DDS::DomainId_t get_domain_id() const
Definition: Spdp.h:169

◆ get_handle_registry()

Security::HandleRegistry_rch OpenDDS::RTPS::Sedp::get_handle_registry ( ) const
inline

◆ get_ice_endpoint()

DCPS::WeakRcHandle< ICE::Endpoint > OpenDDS::RTPS::Sedp::get_ice_endpoint ( )

Definition at line 3117 of file Sedp.cpp.

References OpenDDS::DCPS::TransportInst::get_ice_endpoint(), and transport_inst_.

3117  {
3119 }
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
DCPS::WeakRcHandle< ICE::Endpoint > get_ice_endpoint()

◆ get_key() [1/2]

static DDS::BuiltinTopicKey_t OpenDDS::RTPS::Sedp::get_key ( const DiscoveredPublication pub)
inlinestaticprotected

Definition at line 1009 of file Sedp.h.

References OpenDDS::DCPS::DiscoveredWriterData::ddsPublicationData, and OpenDDS::RTPS::DiscoveredPublication::writer_data_.

1010  {
1011  return pub.writer_data_.ddsPublicationData.key;
1012  }

◆ get_key() [2/2]

static DDS::BuiltinTopicKey_t OpenDDS::RTPS::Sedp::get_key ( const DiscoveredSubscription sub)
inlinestaticprotected

Definition at line 1013 of file Sedp.h.

References OpenDDS::DCPS::DiscoveredReaderData::ddsSubscriptionData, and OpenDDS::RTPS::DiscoveredSubscription::reader_data_.

1014  {
1015  return sub.reader_data_.ddsSubscriptionData.key;
1016  }

◆ get_permissions_handle()

DDS::Security::PermissionsHandle OpenDDS::RTPS::Sedp::get_permissions_handle ( ) const
inlineprotected

Definition at line 1186 of file Sedp.h.

References permissions_handle_.

Referenced by add_publication(), add_subscription(), should_drop_message(), and signal_liveliness().

1187  {
1188  return permissions_handle_;
1189  }
DDS::Security::PermissionsHandle permissions_handle_
Definition: Sedp.h:1263

◆ get_remote_type_objects()

void OpenDDS::RTPS::Sedp::get_remote_type_objects ( const XTypes::TypeIdentifierWithDependencies tid_with_deps,
MatchingData md,
bool  get_minimal,
const GUID_t remote_id,
bool  is_discovery_protected 
)
protected

Definition at line 7529 of file Sedp.cpp.

References OpenDDS::XTypes::Sequence< T >::append(), OpenDDS::XTypes::TypeIdentifierWithDependencies::dependent_typeid_count, OpenDDS::XTypes::TypeIdentifierWithDependencies::dependent_typeids, is_security_enabled(), OpenDDS::XTypes::Sequence< T >::length(), OpenDDS::DCPS::make_part_guid(), max_type_lookup_service_reply_period_, orig_seq_numbers_, OpenDDS::RTPS::Sedp::TypeIdOrigSeqNumber::participant, OpenDDS::RTPS::Sedp::MatchingData::rpc_seqnum_complete, OpenDDS::RTPS::Sedp::MatchingData::rpc_seqnum_minimal, OpenDDS::RTPS::Sedp::TypeIdOrigSeqNumber::secure, send_type_lookup_request(), OpenDDS::RTPS::Sedp::TypeIdOrigSeqNumber::seq_number, OpenDDS::RTPS::Sedp::MatchingData::time_added_to_map, OpenDDS::RTPS::Sedp::TypeIdOrigSeqNumber::time_started, OpenDDS::RTPS::Sedp::TypeIdOrigSeqNumber::type_id, OpenDDS::XTypes::TypeIdentifierWithSize::type_id, type_lookup_reply_deadline_processor_, and OpenDDS::XTypes::TypeIdentifierWithDependencies::typeid_with_size.

Referenced by request_type_objects().

7532 {
7533  // Store an entry for the first request in the sequence.
7534  TypeIdOrigSeqNumber orig_req_data;
7535  orig_req_data.participant = make_part_guid(remote_id);
7536  orig_req_data.type_id = tid_with_deps.typeid_with_size.type_id;
7537  const SequenceNumber& orig_seqnum = get_minimal ? md.rpc_seqnum_minimal : md.rpc_seqnum_complete;
7538  orig_req_data.seq_number = orig_seqnum;
7539  orig_req_data.secure = false;
7540 #ifdef OPENDDS_SECURITY
7541  if (is_security_enabled() && is_discovery_protected) {
7542  orig_req_data.secure = true;
7543  }
7544 #endif
7545  orig_req_data.time_started = md.time_added_to_map;
7546  orig_seq_numbers_.insert(std::make_pair(orig_seqnum, orig_req_data));
7547 
7548  XTypes::TypeIdentifierSeq type_ids;
7549  if (tid_with_deps.dependent_typeid_count == -1 ||
7550  tid_with_deps.dependent_typeids.length() < (CORBA::ULong)tid_with_deps.dependent_typeid_count) {
7551  type_ids.append(tid_with_deps.typeid_with_size.type_id);
7552 
7553  // Get dependencies of the topic type. TypeObjects of both topic type and
7554  // its dependencies are obtained in subsequent type lookup requests.
7555  send_type_lookup_request(type_ids, remote_id, is_discovery_protected, false, orig_req_data.seq_number);
7556  } else {
7557  type_ids.length(tid_with_deps.dependent_typeid_count + 1);
7558  type_ids[0] = tid_with_deps.typeid_with_size.type_id;
7559  for (unsigned i = 1; i <= (unsigned)tid_with_deps.dependent_typeid_count; ++i) {
7560  type_ids[i] = tid_with_deps.dependent_typeids[i - 1].type_id;
7561  }
7562 
7563  // Get TypeObjects of topic type and all of its dependencies.
7564  send_type_lookup_request(type_ids, remote_id, is_discovery_protected, true, orig_req_data.seq_number);
7565  }
7567 }
TimeDuration max_type_lookup_service_reply_period_
Definition: Sedp.h:1244
bool send_type_lookup_request(const XTypes::TypeIdentifierSeq &type_ids, const DCPS::GUID_t &reader, bool is_discovery_protected, bool send_get_types, const SequenceNumber &seq_num)
Definition: Sedp.cpp:3064
OrigSeqNumberMap orig_seq_numbers_
Definition: Sedp.h:1241
RcHandle< EndpointManagerSporadic > type_lookup_reply_deadline_processor_
Definition: Sedp.h:1243
ACE_CDR::ULong ULong
bool is_security_enabled()
Definition: Sedp.h:1176
Sequence< TypeIdentifier > TypeIdentifierSeq
Definition: TypeObject.h:830
OpenDDS_Dcps_Export GUID_t make_part_guid(const GuidPrefix_t &prefix)
Definition: GuidUtils.h:216

◆ handle_datareader_crypto_tokens()

bool OpenDDS::RTPS::Sedp::handle_datareader_crypto_tokens ( const DDS::Security::ParticipantVolatileMessageSecure msg)
protected

Definition at line 5476 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::LogGuid::c_str(), DDS::Security::SecurityException::code, DDS::Security::ParticipantGenericMessage::destination_endpoint_guid, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::Security::SecurityConfig::get_crypto_key_exchange(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_local_datawriter_crypto_handle(), OpenDDS::Security::HandleRegistry::get_remote_datareader_crypto_handle(), OpenDDS::RTPS::Spdp::get_security_config(), DDS::HANDLE_NIL, LM_DEBUG, LM_ERROR, LM_WARNING, OpenDDS::DCPS::TransportClient::lock_, OpenDDS::DCPS::make_id(), DDS::Security::SecurityException::message, DDS::Security::ParticipantGenericMessage::message_data, DDS::Security::SecurityException::minor_code, OpenDDS::RTPS::Spdp::participants_, pending_remote_reader_crypto_tokens_, process_association_records_i(), OpenDDS::DCPS::security_debug, DDS::Security::ParticipantGenericMessage::source_endpoint_guid, and spdp_.

Referenced by received_volatile_message_secure().

5476  {
5477  if (DCPS::security_debug.auth_debug) {
5478  ACE_DEBUG((LM_DEBUG,
5479  ACE_TEXT("(%P|%t) Sedp::handle_datareader_crypto_tokens() %C\n"),
5480  DCPS::LogGuid(msg.source_endpoint_guid).c_str()));
5481  }
5482 
5483  DDS::Security::SecurityException se = {"", 0, 0};
5484  Security::CryptoKeyExchange_var key_exchange = spdp_.get_security_config()->get_crypto_key_exchange();
5485 
5487 
5492 
5494  drcts = reinterpret_cast<const DDS::Security::DatareaderCryptoTokenSeq&>(msg.message_data);
5495 
5496  if (drch == DDS::HANDLE_NIL) {
5497  if (DCPS::security_debug.auth_debug) {
5498  ACE_DEBUG((LM_DEBUG,
5499  ACE_TEXT("(%P|%t) Sedp::handle_datareader_crypto_tokens() - ")
5500  ACE_TEXT("received tokens for unknown remote reader %C Caching.\n"),
5501  DCPS::LogGuid(msg.source_endpoint_guid).c_str()));
5502  }
5503 
5505  return true;
5506  }
5507 
5508  if (dwch == DDS::HANDLE_NIL) {
5509  if (DCPS::security_debug.auth_debug) {
5510  ACE_DEBUG((LM_WARNING,
5511  ACE_TEXT("(%P|%t) Sedp::handle_datareader_crypto_tokens() - ")
5512  ACE_TEXT("received tokens for unknown local writer. Ignoring.\n")));
5513  }
5514  return false;
5515  }
5516 
5517  if (DCPS::security_debug.auth_debug) {
5518  ACE_DEBUG((LM_DEBUG,
5519  ACE_TEXT("(%P|%t) Sedp::handle_datareader_crypto_tokens() from %C dwch %d drch %d count %d\n"),
5520  DCPS::LogGuid(msg.source_endpoint_guid).c_str(), dwch, drch, drcts.length()));
5521  }
5522 
5523  if (!key_exchange->set_remote_datareader_crypto_tokens(dwch, drch, drcts, se)) {
5524  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: Sedp::handle_datareader_crypto_tokens() - ")
5525  ACE_TEXT("Unable to set remote datareader crypto tokens with crypto key exchange plugin. ")
5526  ACE_TEXT("Security Exception[%d.%d]: %C\n"), se.code, se.minor_code, se.message.in()));
5527  return false;
5528  }
5529 
5531  if (iter != spdp_.participants_.end()) {
5532  process_association_records_i(iter->second);
5533  }
5534 
5535  return true;
5536 }
#define ACE_DEBUG(X)
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_ERROR(X)
const InstanceHandle_t HANDLE_NIL
DDS::Security::DatawriterCryptoHandle get_local_datawriter_crypto_handle(const DCPS::GUID_t &id) const
DiscoveredParticipantMap::iterator DiscoveredParticipantIter
Definition: Spdp.h:70
void process_association_records_i(DiscoveredParticipant &participant)
Definition: Sedp.cpp:1264
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
NativeCryptoHandle DatawriterCryptoHandle
CryptoTokenSeq DatareaderCryptoTokenSeq
CryptoKeyExchange_var get_crypto_key_exchange() const
NativeCryptoHandle DatareaderCryptoHandle
ACE_TEXT("TCP_Factory")
DatareaderCryptoTokenSeqMap pending_remote_reader_crypto_tokens_
Definition: Sedp.h:1268
DDS::Security::DatareaderCryptoHandle get_remote_datareader_crypto_handle(const DCPS::GUID_t &id) const
Security::SecurityConfig_rch get_security_config() const
Definition: Spdp.h:128
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
DiscoveredParticipantMap participants_
Definition: Spdp.h:382
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ handle_datawriter_crypto_tokens()

bool OpenDDS::RTPS::Sedp::handle_datawriter_crypto_tokens ( const DDS::Security::ParticipantVolatileMessageSecure msg)
protected

Definition at line 5413 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::LogGuid::c_str(), DDS::Security::SecurityException::code, DDS::Security::ParticipantGenericMessage::destination_endpoint_guid, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::Security::SecurityConfig::get_crypto_key_exchange(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_local_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::get_remote_datawriter_crypto_handle(), OpenDDS::RTPS::Spdp::get_security_config(), DDS::HANDLE_NIL, LM_DEBUG, LM_ERROR, LM_WARNING, OpenDDS::DCPS::TransportClient::lock_, OpenDDS::DCPS::make_id(), DDS::Security::SecurityException::message, DDS::Security::ParticipantGenericMessage::message_data, DDS::Security::SecurityException::minor_code, OpenDDS::RTPS::Spdp::participants_, pending_remote_writer_crypto_tokens_, process_association_records_i(), OpenDDS::DCPS::security_debug, DDS::Security::ParticipantGenericMessage::source_endpoint_guid, and spdp_.

Referenced by received_volatile_message_secure().

5413  {
5414  if (DCPS::security_debug.auth_debug) {
5415  ACE_DEBUG((LM_DEBUG,
5416  ACE_TEXT("(%P|%t) Sedp::handle_datawriter_crypto_tokens() %C\n"),
5417  DCPS::LogGuid(msg.source_endpoint_guid).c_str()));
5418  }
5419 
5420  DDS::Security::SecurityException se = {"", 0, 0};
5421  Security::CryptoKeyExchange_var key_exchange = spdp_.get_security_config()->get_crypto_key_exchange();
5422 
5424 
5429 
5431  dwcts = reinterpret_cast<const DDS::Security::DatawriterCryptoTokenSeq&>(msg.message_data);
5432 
5433  if (dwch == DDS::HANDLE_NIL) {
5434  if (DCPS::security_debug.auth_debug) {
5435  ACE_DEBUG((LM_DEBUG,
5436  ACE_TEXT("(%P|%t) Sedp::handle_datawriter_crypto_tokens() - ")
5437  ACE_TEXT("received tokens for unknown remote writer %C Caching.\n"),
5438  DCPS::LogGuid(msg.source_endpoint_guid).c_str()));
5439  }
5440 
5442  return true;
5443  }
5444 
5445  if (drch == DDS::HANDLE_NIL) {
5446  if (DCPS::security_debug.auth_debug) {
5447  ACE_DEBUG((LM_WARNING,
5448  ACE_TEXT("(%P|%t) Sedp::handle_datawriter_crypto_tokens() - ")
5449  ACE_TEXT("received tokens for unknown local reader. Ignoring.\n")));
5450  }
5451  return false;
5452  }
5453 
5454  if (DCPS::security_debug.auth_debug) {
5455  ACE_DEBUG((LM_DEBUG,
5456  ACE_TEXT("(%P|%t) Sedp::handle_datawriter_crypto_tokens() from %C drch %d dwch %d count %d\n"),
5457  DCPS::LogGuid(msg.source_endpoint_guid).c_str(), drch, dwch, dwcts.length()));
5458  }
5459 
5460  if (!key_exchange->set_remote_datawriter_crypto_tokens(drch, dwch, dwcts, se)) {
5461  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: Sedp::handle_datawriter_crypto_tokens() - ")
5462  ACE_TEXT("Unable to set remote datawriter crypto tokens with crypto key exchange plugin. ")
5463  ACE_TEXT("Security Exception[%d.%d]: %C\n"), se.code, se.minor_code, se.message.in()));
5464  return false;
5465  }
5466 
5468  if (iter != spdp_.participants_.end()) {
5469  process_association_records_i(iter->second);
5470  }
5471 
5472  return true;
5473 }
#define ACE_DEBUG(X)
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_ERROR(X)
const InstanceHandle_t HANDLE_NIL
DDS::Security::DatareaderCryptoHandle get_local_datareader_crypto_handle(const DCPS::GUID_t &id) const
DiscoveredParticipantMap::iterator DiscoveredParticipantIter
Definition: Spdp.h:70
void process_association_records_i(DiscoveredParticipant &participant)
Definition: Sedp.cpp:1264
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
NativeCryptoHandle DatawriterCryptoHandle
CryptoKeyExchange_var get_crypto_key_exchange() const
NativeCryptoHandle DatareaderCryptoHandle
ACE_TEXT("TCP_Factory")
DDS::Security::DatawriterCryptoHandle get_remote_datawriter_crypto_handle(const DCPS::GUID_t &id) const
Security::SecurityConfig_rch get_security_config() const
Definition: Spdp.h:128
DatawriterCryptoTokenSeqMap pending_remote_writer_crypto_tokens_
Definition: Sedp.h:1271
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
CryptoTokenSeq DatawriterCryptoTokenSeq
DiscoveredParticipantMap participants_
Definition: Spdp.h:382
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ has_dcps_key()

bool OpenDDS::RTPS::Sedp::has_dcps_key ( const GUID_t topicId) const
inlineprotected

Definition at line 1163 of file Sedp.h.

References OPENDDS_MAP_CMP(), topic_names_, and topics_.

Referenced by assign_publication_key(), and assign_subscription_key().

1164  {
1165  typedef OPENDDS_MAP_CMP(GUID_t, String, GUID_tKeyLessThan) TNMap;
1166  TNMap::const_iterator tn = topic_names_.find(topicId);
1167  if (tn == topic_names_.end()) return false;
1168 
1169  DCPS::TopicDetailsMap::const_iterator td = topics_.find(tn->second);
1170  if (td == topics_.end()) return false;
1171 
1172  return td->second.has_dcps_key();
1173  }
std::string String
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
typedef OPENDDS_MAP_CMP(GUID_t, DiscoveredSubscription, GUID_tKeyLessThan) DiscoveredSubscriptionMap
TopicNameMap topic_names_
Definition: Sedp.h:1237

◆ ignore()

void OpenDDS::RTPS::Sedp::ignore ( const GUID_t to_ignore)

Definition at line 5988 of file Sedp.cpp.

References OpenDDS::DCPS::TopicDetails::discovered_publications(), discovered_publications_, OpenDDS::DCPS::TopicDetails::discovered_subscriptions(), discovered_subscriptions_, ignored_guids_, OpenDDS::DCPS::TopicDetails::is_dead(), match_endpoints(), OpenDDS::DCPS::TransportClient::OPENDDS_MAP_CMP(), purge_dead_topic(), OpenDDS::DCPS::TopicDetails::remove_discovered_publication(), OpenDDS::DCPS::TopicDetails::remove_discovered_subscription(), remove_from_bit(), OpenDDS::RTPS::Sedp::Endpoint::shutting_down(), topic_names_, and topics_.

Referenced by OpenDDS::RTPS::Spdp::ignore_domain_participant(), and job_queue().

5989 {
5990  // Locked prior to call from Spdp.
5991  ignored_guids_.insert(to_ignore);
5992  {
5993  const DiscoveredPublicationIter iter =
5994  discovered_publications_.find(to_ignore);
5995  if (iter != discovered_publications_.end()) {
5996  // clean up tracking info
5997  const String topic_name = iter->second.get_topic_name();
5998  DCPS::TopicDetails& td = topics_[topic_name];
5999  td.remove_discovered_publication(to_ignore);
6000  remove_from_bit(iter->second);
6001  discovered_publications_.erase(iter);
6002  // break associations
6003  match_endpoints(to_ignore, td, true /*remove*/);
6004  if (td.is_dead()) {
6005  purge_dead_topic(topic_name);
6006  }
6007  return;
6008  }
6009  }
6010  {
6011  const DiscoveredSubscriptionIter iter =
6012  discovered_subscriptions_.find(to_ignore);
6013  if (iter != discovered_subscriptions_.end()) {
6014  // clean up tracking info
6015  const String topic_name = iter->second.get_topic_name();
6016  DCPS::TopicDetails& td = topics_[topic_name];
6017  td.remove_discovered_publication(to_ignore);
6018  remove_from_bit(iter->second);
6019  discovered_subscriptions_.erase(iter);
6020  // break associations
6021  match_endpoints(to_ignore, td, true /*remove*/);
6022  if (td.is_dead()) {
6023  purge_dead_topic(topic_name);
6024  }
6025  return;
6026  }
6027  }
6028  {
6029  const OPENDDS_MAP_CMP(GUID_t, String, GUID_tKeyLessThan)::iterator
6030  iter = topic_names_.find(to_ignore);
6031  if (iter != topic_names_.end()) {
6032  ignored_topics_.insert(iter->second);
6033  // Remove all publications and subscriptions on this topic
6034  DCPS::TopicDetails& td = topics_[iter->second];
6035  {
6036  const RepoIdSet ids = td.discovered_publications();
6037  for (RepoIdSet::const_iterator ep = ids.begin(); ep!= ids.end(); ++ep) {
6038  match_endpoints(*ep, td, true /*remove*/);
6039  td.remove_discovered_publication(*ep);
6040  // TODO: Do we need to remove from discovered_subscriptions?
6041  if (shutting_down()) { return; }
6042  }
6043  }
6044  {
6045  const RepoIdSet ids = td.discovered_subscriptions();
6046  for (RepoIdSet::const_iterator ep = ids.begin(); ep!= ids.end(); ++ep) {
6047  match_endpoints(*ep, td, true /*remove*/);
6048  td.remove_discovered_subscription(*ep);
6049  // TODO: Do we need to remove from discovered_publications?
6050  if (shutting_down()) { return; }
6051  }
6052  }
6053  if (td.is_dead()) {
6054  purge_dead_topic(iter->second);
6055  }
6056  }
6057  }
6058 }
std::string String
DiscoveredSubscriptionMap discovered_subscriptions_
Definition: Sedp.h:1235
DiscoveredSubscriptionMap::iterator DiscoveredSubscriptionIter
Definition: Sedp.h:272
RepoIdSet ignored_guids_
Definition: Sedp.h:1230
GuidSet RepoIdSet
Definition: GuidUtils.h:113
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
void match_endpoints(GUID_t repoId, const DCPS::TopicDetails &td, bool remove=false)
Definition: Sedp.cpp:6673
typedef OPENDDS_MAP_CMP(GUID_t, DiscoveredSubscription, GUID_tKeyLessThan) DiscoveredSubscriptionMap
void purge_dead_topic(const String &topic_name)
Definition: Sedp.h:307
int find(const PG_Property_Set &decoder, const ACE_CString &key, TYPE &value)
void remove_from_bit(const DiscoveredPublication &pub)
Definition: Sedp.h:1144
DiscoveredPublicationMap discovered_publications_
Definition: Sedp.h:1234
TopicNameMap topic_names_
Definition: Sedp.h:1237
virtual bool shutting_down() const
Definition: Sedp.cpp:5170
DiscoveredPublicationMap::iterator DiscoveredPublicationIter
Definition: Sedp.h:276

◆ ignoring() [1/2]

bool OpenDDS::RTPS::Sedp::ignoring ( const GUID_t guid) const
inline

Definition at line 205 of file Sedp.h.

References ignored_guids_.

Referenced by data_received(), received_participant_message_data_secure(), should_drop_stateless_message(), and should_drop_volatile_message().

206  {
207  return ignored_guids_.count(guid);
208  }
RepoIdSet ignored_guids_
Definition: Sedp.h:1230

◆ ignoring() [2/2]

bool OpenDDS::RTPS::Sedp::ignoring ( const char *  topic_name) const
inline

Definition at line 209 of file Sedp.h.

References add_publication(), add_subscription(), assert_topic(), find_topic(), remove_publication(), remove_subscription(), remove_topic(), update_publication_locators(), and update_subscription_locators().

210  {
211  return ignored_topics_.count(topic_name);
212  }

◆ init()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::init ( const DCPS::GUID_t guid,
const RtpsDiscovery disco,
DDS::DomainId_t  domainId,
XTypes::TypeLookupService_rch  tls 
)

Definition at line 378 of file Sedp.cpp.

References ACE_GUARD_RETURN, OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::RTPS::Spdp::available_extended_builtin_endpoints(), OpenDDS::RTPS::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_READER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_WRITER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_READER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_WRITER, DDS::Security::BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER, OpenDDS::RTPS::RtpsDiscovery::config(), OpenDDS::RTPS::Spdp::crypto_handle(), dcps_participant_secure_reader_, dcps_participant_secure_writer_, OpenDDS::DCPS::TransportRegistry::DEFAULT_INST_PREFIX, OpenDDS::RTPS::RtpsDiscovery::default_multicast_group(), OpenDDS::RTPS::RtpsDiscovery::dg(), OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER, OpenDDS::RTPS::RtpsDiscovery::dx(), OpenDDS::DCPS::TransportClient::enable_transport_using_config(), OpenDDS::DCPS::TransportInst::event_dispatcher(), event_dispatcher_, OpenDDS::DCPS::ReactorTask::get_reactor(), OpenDDS::DCPS::TransportConfig::instances_, OpenDDS::DCPS::ReactorTask::interceptor(), job_queue_, max_type_lookup_service_reply_period_, OpenDDS::RTPS::RtpsDiscovery::multicast_interface(), OPENDDS_STRING, participant_message_reader_, participant_message_secure_reader_, participant_message_secure_writer_, participant_message_writer_, participant_stateless_message_reader_, participant_stateless_message_writer_, participant_volatile_message_secure_reader_, participant_volatile_message_secure_writer_, OpenDDS::DCPS::TransportConfig::passive_connect_duration_, OpenDDS::RTPS::RtpsDiscovery::pb(), publications_reader_, publications_secure_reader_, publications_secure_writer_, publications_writer_, ACE_Event_Handler::reactor(), OpenDDS::DCPS::TransportInst::reactor_task(), reactor_task_, DDS::RETCODE_OK, DDS::RETCODE_PRECONDITION_NOT_MET, DDS::Security::SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER, DDS::Security::SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER, OpenDDS::RTPS::RtpsDiscovery::sedp_multicast(), OpenDDS::RTPS::Sedp::Endpoint::set_crypto_handles(), ACE_INET_Addr::set_port_number(), spdp_, OpenDDS::DCPS::static_rchandle_cast(), subscriptions_reader_, subscriptions_secure_reader_, subscriptions_secure_writer_, subscriptions_writer_, TheTransportRegistry, OpenDDS::DCPS::to_dds_string(), transport_cfg_, transport_inst_, OpenDDS::RTPS::RtpsDiscovery::ttl(), type_lookup_init(), type_lookup_reply_reader_, type_lookup_reply_secure_reader_, type_lookup_reply_secure_writer_, type_lookup_reply_writer_, type_lookup_request_reader_, type_lookup_request_secure_reader_, type_lookup_request_secure_writer_, type_lookup_request_writer_, type_lookup_service_, DDS::Security::TYPE_LOOKUP_SERVICE_REPLY_READER_SECURE, DDS::Security::TYPE_LOOKUP_SERVICE_REPLY_WRITER_SECURE, DDS::Security::TYPE_LOOKUP_SERVICE_REQUEST_READER_SECURE, DDS::Security::TYPE_LOOKUP_SERVICE_REQUEST_WRITER_SECURE, OpenDDS::DCPS::GuidConverter::uniqueParticipantId(), OpenDDS::RTPS::RtpsDiscovery::use_xtypes(), use_xtypes_, OpenDDS::RTPS::RtpsDiscovery::use_xtypes_complete(), and use_xtypes_complete_.

382 {
383  type_lookup_service_ = tls;
384 
385  const OPENDDS_STRING domainStr = DCPS::to_dds_string(domainId);
386  const OPENDDS_STRING key = DCPS::GuidConverter(guid).uniqueParticipantId();
387 
388  // configure one transport
389  transport_inst_ = TheTransportRegistry->create_inst(
391  OPENDDS_STRING("_SEDPTransportInst_") + key + domainStr,
392  "rtps_udp");
393 
394  // Be careful to not call any function that causes the transport be
395  // to created before the configuration is complete.
396 
397  // Use a static cast to avoid dependency on the RtpsUdp library
398  DCPS::RtpsUdpInst_rch rtps_inst =
399  DCPS::static_rchandle_cast<DCPS::RtpsUdpInst>(transport_inst_);
400  rtps_inst->max_message_size_ = disco.config()->sedp_max_message_size();
401  rtps_inst->heartbeat_period_ = disco.config()->sedp_heartbeat_period();
402  rtps_inst->nak_response_delay_ = disco.config()->sedp_nak_response_delay();
403  rtps_inst->responsive_mode_ = disco.config()->sedp_responsive_mode();
404  rtps_inst->send_delay_ = disco.config()->sedp_send_delay();
405  rtps_inst->send_buffer_size_ = disco.config()->send_buffer_size();
406  rtps_inst->rcv_buffer_size_ = disco.config()->recv_buffer_size();
407  rtps_inst->receive_preallocated_message_blocks_ = disco.config()->sedp_receive_preallocated_message_blocks();
408  rtps_inst->receive_preallocated_data_blocks_ = disco.config()->sedp_receive_preallocated_data_blocks();
409 
410  if (disco.sedp_multicast()) {
411  // Bind to a specific multicast group
412  const u_short mc_port = disco.pb() + disco.dg() * domainId + disco.dx();
413 
414  ACE_INET_Addr mc_addr = disco.default_multicast_group();
415  mc_addr.set_port_number(mc_port);
416  rtps_inst->multicast_group_address_ = mc_addr;
417 
418  rtps_inst->ttl_ = disco.ttl();
419  rtps_inst->multicast_interface_ = disco.multicast_interface();
420 
421  } else {
422  rtps_inst->use_multicast_ = false;
423  }
424 
425  rtps_inst->local_address_ = disco.config()->sedp_local_address();
426  rtps_inst->advertised_address_ = disco.config()->sedp_advertised_address();
427 #ifdef ACE_HAS_IPV6
428  rtps_inst->ipv6_local_address_ = disco.config()->ipv6_sedp_local_address();
429  rtps_inst->ipv6_advertised_address_ = disco.config()->ipv6_sedp_advertised_address();
430 #endif
431 
432  if (!disco.config()->sedp_fragment_reassembly_timeout().is_zero()) {
433  rtps_inst->fragment_reassembly_timeout_ = disco.config()->sedp_fragment_reassembly_timeout();
434  }
435 
436  {
438  rtps_inst->rtps_relay_address_ = disco.config()->sedp_rtps_relay_address();
439  rtps_inst->use_rtps_relay_ = disco.config()->use_rtps_relay();
440  rtps_inst->rtps_relay_only_ = disco.config()->rtps_relay_only();
441  rtps_inst->stun_server_address_ = disco.config()->sedp_stun_server_address();
442  rtps_inst->use_ice_ = disco.config()->use_ice();
443  }
444 
445  // Create a config
447  OPENDDS_STRING("_SEDP_TransportCfg_") + key +
448  domainStr;
449  transport_cfg_ = TheTransportRegistry->create_config(config_name.c_str());
452  static_cast<unsigned long>(disco.config()->sedp_passive_connect_duration().value().get_msec());
453 
454  rtps_inst->opendds_discovery_default_listener_ = publications_reader_;
455  rtps_inst->opendds_discovery_guid_ = guid;
456 
457  const_cast<bool&>(use_xtypes_) = disco.use_xtypes();
458  const_cast<bool&>(use_xtypes_complete_) = disco.use_xtypes_complete();
459 
461  // One should assume that the transport is configured after this
462  // point. Changes to transport_inst_ or rtps_inst after this line
463  // may not be reflected.
465  job_queue_ = DCPS::make_rch<DCPS::JobQueue>(reactor);
468 
469  // Configure and enable each reader/writer
470  const bool reliable = true;
471  const bool durable = true;
472  const bool nondurable = false;
473 
474 #ifdef OPENDDS_SECURITY
475  const bool besteffort = false;
476 #endif
477 
479 #ifdef OPENDDS_SECURITY
482 #endif
483 
486  }
488 
489 #ifdef OPENDDS_SECURITY
494  }
496 #endif
497 
500  }
502 
503 #ifdef OPENDDS_SECURITY
508  }
510 #endif
511 
514  }
516 
517 #ifdef OPENDDS_SECURITY
522  }
524 
527 
532 
537 #endif
538 
541  }
544  }
545 
548  }
551  }
552 
553 #ifdef OPENDDS_SECURITY
557  }
561  }
562 
566  }
570  }
571 #endif
572 
573  max_type_lookup_service_reply_period_ = disco.config()->max_type_lookup_service_reply_period();
574 
575  return DDS::RETCODE_OK;
576 }
DiscoveryWriter_rch dcps_participant_secure_writer_
Definition: Sedp.h:1288
TimeDuration max_type_lookup_service_reply_period_
Definition: Sedp.h:1244
#define TheTransportRegistry
DiscoveryReader_rch subscriptions_secure_reader_
Definition: Sedp.h:1304
RcHandle< RtpsUdpInst > RtpsUdpInst_rch
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER
Definition: RtpsCore.idl:206
DiscoveryWriter_rch publications_secure_writer_
Definition: Sedp.h:1278
const ReturnCode_t RETCODE_PRECONDITION_NOT_MET
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REPLY_READER_SECURE
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_WRITER
Definition: RtpsCore.idl:223
DCPS::TransportConfig_rch transport_cfg_
Definition: Sedp.h:771
TypeLookupReplyWriter_rch type_lookup_reply_writer_
Definition: Sedp.h:1293
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER
Definition: RtpsCore.idl:202
sequence< octet > key
String to_dds_string(unsigned short to_convert)
DiscoveryReader_rch publications_secure_reader_
Definition: Sedp.h:1300
EventDispatcher_rch event_dispatcher()
TypeLookupRequestWriter_rch type_lookup_request_secure_writer_
Definition: Sedp.h:1295
unsigned long ExtendedBuiltinEndpointSet_t
XTypes::TypeLookupService_rch type_lookup_service_
Definition: Sedp.h:1240
DiscoveryReader_rch subscriptions_reader_
Definition: Sedp.h:1302
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REPLY_WRITER_SECURE
DDS::Security::ExtendedBuiltinEndpointSet_t available_extended_builtin_endpoints() const
Definition: Spdp.h:203
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER
Definition: RtpsCore.idl:218
DCPS::JobQueue_rch job_queue_
Definition: Sedp.h:773
const bool use_xtypes_
Definition: Sedp.h:1246
DCPS::EventDispatcher_rch event_dispatcher_
Definition: Sedp.h:774
TypeLookupReplyReader_rch type_lookup_reply_reader_
Definition: Sedp.h:1314
#define OPENDDS_STRING
TypeLookupReplyWriter_rch type_lookup_reply_secure_writer_
Definition: Sedp.h:1296
TypeLookupReplyReader_rch type_lookup_reply_secure_reader_
Definition: Sedp.h:1317
LivelinessReader_rch participant_message_secure_reader_
Definition: Sedp.h:1308
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
LivelinessWriter_rch participant_message_writer_
Definition: Sedp.h:1284
SecurityReader_rch participant_volatile_message_secure_reader_
Definition: Sedp.h:1310
SecurityReader_rch participant_stateless_message_reader_
Definition: Sedp.h:1309
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REQUEST_READER_SECURE
const bool use_xtypes_complete_
Definition: Sedp.h:1247
DiscoveryWriter_rch subscriptions_writer_
Definition: Sedp.h:1280
LivelinessReader_rch participant_message_reader_
Definition: Sedp.h:1306
virtual ACE_Reactor * reactor(void) const
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_READER
Definition: RtpsCore.idl:229
TypeLookupRequestReader_rch type_lookup_request_secure_reader_
Definition: Sedp.h:1316
DiscoveryReader_rch dcps_participant_secure_reader_
Definition: Sedp.h:1311
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_WRITER
Definition: RtpsCore.idl:227
LivelinessWriter_rch participant_message_secure_writer_
Definition: Sedp.h:1286
const BuiltinEndpointSet_t SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
TypeLookupRequestWriter_rch type_lookup_request_writer_
Definition: Sedp.h:1292
DiscoveryWriter_rch subscriptions_secure_writer_
Definition: Sedp.h:1282
ReactorTask_rch reactor_task()
SecurityWriter_rch participant_volatile_message_secure_writer_
Definition: Sedp.h:1290
ReactorInterceptor_rch interceptor() const
Definition: ReactorTask.inl:65
RcHandle< T > static_rchandle_cast(const RcHandle< U > &h)
Definition: RcHandle_T.h:202
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REQUEST_WRITER_SECURE
unsigned long BuiltinEndpointSet_t
void set_port_number(u_short, int encode=1)
static const char DEFAULT_INST_PREFIX[]
ACE_Reactor * get_reactor()
Definition: ReactorTask.inl:14
void type_lookup_init(DCPS::ReactorInterceptor_rch reactor_interceptor)
Definition: Sedp.h:290
const ReturnCode_t RETCODE_OK
DiscoveryReader_rch publications_reader_
Definition: Sedp.h:1298
void enable_transport_using_config(bool reliable, bool durable, const TransportConfig_rch &tc)
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_READER
Definition: RtpsCore.idl:225
TypeLookupRequestReader_rch type_lookup_request_reader_
Definition: Sedp.h:1313
void set_crypto_handles(DDS::Security::ParticipantCryptoHandle p, DDS::Security::NativeCryptoHandle e=DDS::HANDLE_NIL)
Definition: Sedp.h:383
DCPS::ReactorTask_rch reactor_task_
Definition: Sedp.h:772
const BuiltinEndpointSet_t SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER
SecurityWriter_rch participant_stateless_message_writer_
Definition: Sedp.h:1287
DiscoveryWriter_rch publications_writer_
Definition: Sedp.h:1276
DDS::Security::ParticipantCryptoHandle crypto_handle() const
Definition: Spdp.h:129
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER

◆ init_security()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::init_security ( DDS::Security::IdentityHandle  id_handle,
DDS::Security::PermissionsHandle  perm_handle,
DDS::Security::ParticipantCryptoHandle  crypto_handle 
)

Definition at line 579 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), DDS::Security::SecurityException::code, crypto_handle_, dcps_participant_secure_reader_, dcps_participant_secure_writer_, OpenDDS::Security::HandleRegistry::default_endpoint_security_attributes(), OpenDDS::Security::SecurityConfig::get_access_control(), OpenDDS::Security::SecurityConfig::get_authentication(), OpenDDS::Security::SecurityConfig::get_crypto_key_exchange(), OpenDDS::Security::SecurityConfig::get_crypto_key_factory(), OpenDDS::Security::SecurityConfig::get_handle_registry(), get_handle_registry(), OpenDDS::RTPS::Spdp::get_security_config(), DDS::HANDLE_NIL, OpenDDS::Security::HandleRegistry::insert_local_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::insert_local_datawriter_crypto_handle(), LM_WARNING, DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, participant_id_, participant_message_secure_reader_, participant_message_secure_writer_, participant_sec_attr_, participant_volatile_message_secure_reader_, participant_volatile_message_secure_writer_, publications_secure_reader_, publications_secure_writer_, DDS::RETCODE_ERROR, DDS::RETCODE_OK, set_access_control(), set_crypto_key_exchange(), set_crypto_key_factory(), set_handle_registry(), set_permissions_handle(), spdp_, subscriptions_secure_reader_, subscriptions_secure_writer_, TheServiceParticipant, type_lookup_reply_secure_reader_, type_lookup_reply_secure_writer_, type_lookup_request_secure_reader_, and type_lookup_request_secure_writer_.

582 {
583  using namespace OpenDDS::Security;
584  using namespace DDS::Security;
585 
587 
588  CryptoKeyFactory_var key_factory = spdp_.get_security_config()->get_crypto_key_factory();
589  CryptoKeyExchange_var key_exchange = spdp_.get_security_config()->get_crypto_key_exchange();
590  AccessControl_var acl = spdp_.get_security_config()->get_access_control();
591  Authentication_var auth = spdp_.get_security_config()->get_authentication();
593 
594  set_permissions_handle(perm_handle);
595  set_access_control(acl);
596  set_crypto_key_factory(key_factory);
597  set_crypto_key_exchange(key_exchange);
598  set_handle_registry(handle_registry);
599  crypto_handle_ = crypto_handle;
600 
601  // TODO: Handle all exceptions below once error-codes have been defined, etc.
602  SecurityException ex = {"", 0, 0};
603 
604  bool ok = acl->get_participant_sec_attributes(perm_handle, participant_sec_attr_, ex);
605  if (ok) {
606 
608 
610 
611  const DDS::PartitionQosPolicy& default_part_qos = TheServiceParticipant->initial_PartitionQosPolicy();
612  const DDS::Security::DataTagQosPolicy default_data_tag_qos; // default is empty sequence
613 
614  // Volatile-Message-Secure
615  {
616  PropertySeq writer_props(1), reader_props(1);
617  writer_props.length(1);
618  writer_props[0].name = "dds.sec.builtin_endpoint_name";
619  writer_props[0].value = "BuiltinParticipantVolatileMessageSecureWriter";
620 
621  reader_props.length(1);
622  reader_props[0].name = "dds.sec.builtin_endpoint_name";
623  reader_props[0].value = "BuiltinParticipantVolatileMessageSecureReader";
624 
625  EndpointSecurityAttributes dw_sec_attr(default_sec_attr);
626 
627  ok = acl->get_datawriter_sec_attributes(perm_handle, "DCPSParticipantVolatileMessageSecure",
628  default_part_qos, default_data_tag_qos, dw_sec_attr, ex);
629  if (!ok) {
630  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
631  ACE_TEXT("Failure calling get_datawriter_sec_attributes for topic 'DCPSParticipantVolatileMessageSecure'. ")
632  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
633  result = DDS::RETCODE_ERROR;
634  }
635 
636  h = key_factory->register_local_datawriter(crypto_handle, writer_props, dw_sec_attr, ex);
637  participant_volatile_message_secure_writer_->set_crypto_handles(crypto_handle, h);
638  const GUID_t pvms_writer = participant_volatile_message_secure_writer_->get_guid();
639  get_handle_registry()->insert_local_datawriter_crypto_handle(pvms_writer, h, dw_sec_attr);
640 
641  EndpointSecurityAttributes dr_sec_attr(default_sec_attr);
642  ok = acl->get_datareader_sec_attributes(perm_handle, "DCPSParticipantVolatileMessageSecure",
643  default_part_qos, default_data_tag_qos, dr_sec_attr, ex);
644  if (!ok) {
645  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
646  ACE_TEXT("Failure calling get_datareader_sec_attributes for topic 'DCPSParticipantVolatileMessageSecure'.")
647  ACE_TEXT(" Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
648  result = DDS::RETCODE_ERROR;
649  }
650 
651  h = key_factory->register_local_datareader(crypto_handle, reader_props, dr_sec_attr, ex);
652  participant_volatile_message_secure_reader_->set_crypto_handles(crypto_handle, h);
653  const GUID_t pvms_reader = participant_volatile_message_secure_reader_->get_guid();
654  get_handle_registry()->insert_local_datareader_crypto_handle(pvms_reader, h, dr_sec_attr);
655  }
656 
657  // DCPS-Participant-Message-Secure
658  {
659  PropertySeq reader_props, writer_props;
660 
661  EndpointSecurityAttributes dw_sec_attr(default_sec_attr);
662  ok = acl->get_datawriter_sec_attributes(perm_handle, "DCPSParticipantMessageSecure",
663  default_part_qos, default_data_tag_qos, dw_sec_attr, ex);
664  if (!ok) {
665  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
666  ACE_TEXT("Failure calling get_datawriter_sec_attributes for topic 'DCPSParticipantMessageSecure'. ")
667  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
668  result = DDS::RETCODE_ERROR;
669  }
670 
671  h = key_factory->register_local_datawriter(crypto_handle, writer_props, dw_sec_attr, ex);
672  participant_message_secure_writer_->set_crypto_handles(crypto_handle, h);
673  const GUID_t pms_writer = participant_message_secure_writer_->get_guid();
674  get_handle_registry()->insert_local_datawriter_crypto_handle(pms_writer, h, dw_sec_attr);
675 
676  EndpointSecurityAttributes dr_sec_attr(default_sec_attr);
677  ok = acl->get_datareader_sec_attributes(perm_handle, "DCPSParticipantMessageSecure",
678  default_part_qos, default_data_tag_qos, dr_sec_attr, ex);
679  if (!ok) {
680  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
681  ACE_TEXT("Failure calling get_datareader_sec_attributes for topic 'DCPSParticipantMessageSecure'. ")
682  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
683  result = DDS::RETCODE_ERROR;
684  }
685 
686  h = key_factory->register_local_datareader(crypto_handle, reader_props, dr_sec_attr, ex);
687  participant_message_secure_reader_->set_crypto_handles(crypto_handle, h);
688  const GUID_t pms_reader = participant_message_secure_reader_->get_guid();
689  get_handle_registry()->insert_local_datareader_crypto_handle(pms_reader, h, dr_sec_attr);
690  }
691 
692  // DCPS-Publications-Secure
693  {
694  PropertySeq reader_props, writer_props;
695 
696  EndpointSecurityAttributes dw_sec_attr(default_sec_attr);
697  ok = acl->get_datawriter_sec_attributes(perm_handle, "DCPSPublicationsSecure",
698  default_part_qos, default_data_tag_qos, dw_sec_attr, ex);
699  if (!ok) {
700  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
701  ACE_TEXT("Failure calling get_datawriter_sec_attributes for topic 'DCPSPublicationsSecure'. ")
702  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
703  result = DDS::RETCODE_ERROR;
704  }
705 
706  h = key_factory->register_local_datawriter(crypto_handle, writer_props, dw_sec_attr, ex);
707  publications_secure_writer_->set_crypto_handles(crypto_handle, h);
708  const GUID_t ps_writer = publications_secure_writer_->get_guid();
709  get_handle_registry()->insert_local_datawriter_crypto_handle(ps_writer, h, dw_sec_attr);
710 
711  EndpointSecurityAttributes dr_sec_attr(default_sec_attr);
712  ok = acl->get_datareader_sec_attributes(perm_handle, "DCPSPublicationsSecure",
713  default_part_qos, default_data_tag_qos, dr_sec_attr, ex);
714  if (!ok) {
715  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
716  ACE_TEXT("Failure calling get_datareader_sec_attributes for topic 'DCPSPublicationsSecure'. ")
717  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
718  result = DDS::RETCODE_ERROR;
719  }
720 
721  h = key_factory->register_local_datareader(crypto_handle, reader_props, dr_sec_attr, ex);
722  publications_secure_reader_->set_crypto_handles(crypto_handle, h);
723  const GUID_t ps_reader = publications_secure_reader_->get_guid();
724  get_handle_registry()->insert_local_datareader_crypto_handle(ps_reader, h, dr_sec_attr);
725  }
726 
727  // DCPS-Subscriptions-Secure
728  {
729  PropertySeq reader_props, writer_props;
730 
731  EndpointSecurityAttributes dw_sec_attr(default_sec_attr);
732  ok = acl->get_datawriter_sec_attributes(perm_handle, "DCPSSubscriptionsSecure",
733  default_part_qos, default_data_tag_qos, dw_sec_attr, ex);
734  if (!ok) {
735  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
736  ACE_TEXT("Failure calling get_datawriter_sec_attributes for topic 'DCPSSubscriptionsSecure'. ")
737  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
738  result = DDS::RETCODE_ERROR;
739  }
740 
741  h = key_factory->register_local_datawriter(crypto_handle, writer_props, dw_sec_attr, ex);
742  subscriptions_secure_writer_->set_crypto_handles(crypto_handle, h);
743  const GUID_t ss_writer = subscriptions_secure_writer_->get_guid();
744  get_handle_registry()->insert_local_datawriter_crypto_handle(ss_writer, h, dw_sec_attr);
745 
746  EndpointSecurityAttributes dr_sec_attr(default_sec_attr);
747  ok = acl->get_datareader_sec_attributes(perm_handle, "DCPSSubscriptionsSecure",
748  default_part_qos, default_data_tag_qos, dr_sec_attr, ex);
749  if (!ok) {
750  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
751  ACE_TEXT("Failure calling get_datareader_sec_attributes for topic 'DCPSSubscriptionsSecure'. ")
752  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
753  result = DDS::RETCODE_ERROR;
754  }
755 
756  h = key_factory->register_local_datareader(crypto_handle, reader_props, dr_sec_attr, ex);
757  subscriptions_secure_reader_->set_crypto_handles(crypto_handle, h);
758  const GUID_t ss_reader = subscriptions_secure_reader_->get_guid();
759  get_handle_registry()->insert_local_datareader_crypto_handle(ss_reader, h, dr_sec_attr);
760  }
761 
762  // DCPS-Participants-Secure
763  {
764  PropertySeq reader_props, writer_props;
765 
766  EndpointSecurityAttributes dw_sec_attr(default_sec_attr);
767  ok = acl->get_datawriter_sec_attributes(perm_handle, "DCPSParticipantSecure",
768  default_part_qos, default_data_tag_qos, dw_sec_attr, ex);
769  if (!ok) {
770  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
771  ACE_TEXT("Failure calling get_datawriter_sec_attributes for topic 'DCPSParticipantSecure'. ")
772  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
773  result = DDS::RETCODE_ERROR;
774  }
775 
776  h = key_factory->register_local_datawriter(crypto_handle, writer_props, dw_sec_attr, ex);
777  dcps_participant_secure_writer_->set_crypto_handles(crypto_handle, h);
778  const GUID_t dps_writer = dcps_participant_secure_writer_->get_guid();
779  get_handle_registry()->insert_local_datawriter_crypto_handle(dps_writer, h, dw_sec_attr);
780 
781  EndpointSecurityAttributes dr_sec_attr(default_sec_attr);
782  ok = acl->get_datareader_sec_attributes(perm_handle, "DCPSParticipantSecure",
783  default_part_qos, default_data_tag_qos, dr_sec_attr, ex);
784  if (!ok) {
785  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
786  ACE_TEXT("Failure calling get_datareader_sec_attributes for topic 'DCPSParticipantSecure'. ")
787  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
788  result = DDS::RETCODE_ERROR;
789  }
790 
791  h = key_factory->register_local_datareader(crypto_handle, reader_props, dr_sec_attr, ex);
792  dcps_participant_secure_reader_->set_crypto_handles(crypto_handle, h);
793  const GUID_t dps_reader = dcps_participant_secure_reader_->get_guid();
794  get_handle_registry()->insert_local_datareader_crypto_handle(dps_reader, h, dr_sec_attr);
795  }
796 
797  // Type Lookup Service Request
798  {
799  PropertySeq reader_props, writer_props;
800 
801  EndpointSecurityAttributes dw_sec_attr(default_sec_attr);
802  ok = acl->get_datawriter_sec_attributes(perm_handle, "TypeLookupServiceRequestSecure",
803  default_part_qos, default_data_tag_qos, dw_sec_attr, ex);
804  if (!ok) {
805  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
806  ACE_TEXT("Failure calling get_datawriter_sec_attributes for topic 'TypeLookupServiceRequestSecure'. ")
807  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
808  result = DDS::RETCODE_ERROR;
809  }
810 
811  h = key_factory->register_local_datawriter(crypto_handle, writer_props, dw_sec_attr, ex);
812  type_lookup_request_secure_writer_->set_crypto_handles(crypto_handle, h);
813  const GUID_t ps_writer = type_lookup_request_secure_writer_->get_guid();
814  get_handle_registry()->insert_local_datawriter_crypto_handle(ps_writer, h, dw_sec_attr);
815 
816  EndpointSecurityAttributes dr_sec_attr(default_sec_attr);
817  ok = acl->get_datareader_sec_attributes(perm_handle, "TypeLookupServiceRequestSecure",
818  default_part_qos, default_data_tag_qos, dr_sec_attr, ex);
819  if (!ok) {
820  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
821  ACE_TEXT("Failure calling get_datareader_sec_attributes for topic 'TypeLookupServiceRequestSecure'. ")
822  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
823  result = DDS::RETCODE_ERROR;
824  }
825 
826  h = key_factory->register_local_datareader(crypto_handle, reader_props, dr_sec_attr, ex);
827  type_lookup_request_secure_reader_->set_crypto_handles(crypto_handle, h);
828  const GUID_t ps_reader = type_lookup_request_secure_reader_->get_guid();
829  get_handle_registry()->insert_local_datareader_crypto_handle(ps_reader, h, dr_sec_attr);
830  }
831 
832  // Type Lookup Service Reply
833  {
834  PropertySeq reader_props, writer_props;
835 
836  EndpointSecurityAttributes dw_sec_attr(default_sec_attr);
837  ok = acl->get_datawriter_sec_attributes(perm_handle, "TypeLookupServiceReplySecure",
838  default_part_qos, default_data_tag_qos, dw_sec_attr, ex);
839  if (!ok) {
840  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
841  ACE_TEXT("Failure calling get_datawriter_sec_attributes for topic 'TypeLookupServiceReplySecure'. ")
842  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
843  result = DDS::RETCODE_ERROR;
844  }
845 
846  h = key_factory->register_local_datawriter(crypto_handle, writer_props, dw_sec_attr, ex);
847  type_lookup_reply_secure_writer_->set_crypto_handles(crypto_handle, h);
848  const GUID_t ps_writer = type_lookup_reply_secure_writer_->get_guid();
849  get_handle_registry()->insert_local_datawriter_crypto_handle(ps_writer, h, dw_sec_attr);
850 
851  EndpointSecurityAttributes dr_sec_attr(default_sec_attr);
852  ok = acl->get_datareader_sec_attributes(perm_handle, "TypeLookupServiceReplySecure",
853  default_part_qos, default_data_tag_qos, dr_sec_attr, ex);
854  if (!ok) {
855  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
856  ACE_TEXT("Failure calling get_datareader_sec_attributes for topic 'TypeLookupServiceReplySecure'. ")
857  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
858  result = DDS::RETCODE_ERROR;
859  }
860 
861  h = key_factory->register_local_datareader(crypto_handle, reader_props, dr_sec_attr, ex);
862  type_lookup_reply_secure_reader_->set_crypto_handles(crypto_handle, h);
863  const GUID_t ps_reader = type_lookup_reply_secure_reader_->get_guid();
864  get_handle_registry()->insert_local_datareader_crypto_handle(ps_reader, h, dr_sec_attr);
865  }
866 
867  } else {
868  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::init_security() - ")
869  ACE_TEXT("Failure calling get_participant_sec_attributes. ")
870  ACE_TEXT("Security Exception[%d.%d]: %C\n"), ex.code, ex.minor_code, ex.message.in()));
871  result = DDS::RETCODE_ERROR;
872  }
873  return result;
874 }
DiscoveryWriter_rch dcps_participant_secure_writer_
Definition: Sedp.h:1288
#define ACE_DEBUG(X)
DiscoveryReader_rch subscriptions_secure_reader_
Definition: Sedp.h:1304
DDS::Security::ParticipantSecurityAttributes participant_sec_attr_
Definition: Sedp.h:1256
void insert_local_datawriter_crypto_handle(const DCPS::GUID_t &id, DDS::Security::DatawriterCryptoHandle handle, const DDS::Security::EndpointSecurityAttributes &attributes)
DiscoveryWriter_rch publications_secure_writer_
Definition: Sedp.h:1278
const InstanceHandle_t HANDLE_NIL
void set_handle_registry(const Security::HandleRegistry_rch &hr)
Definition: Sedp.h:1221
DiscoveryReader_rch publications_secure_reader_
Definition: Sedp.h:1300
TypeLookupRequestWriter_rch type_lookup_request_secure_writer_
Definition: Sedp.h:1295
DDS::Security::ParticipantCryptoHandle crypto_handle_
Definition: Sedp.h:1264
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
void set_access_control(DDS::Security::AccessControl_var acl)
Definition: Sedp.h:1191
TypeLookupReplyWriter_rch type_lookup_reply_secure_writer_
Definition: Sedp.h:1296
TypeLookupReplyReader_rch type_lookup_reply_secure_reader_
Definition: Sedp.h:1317
CryptoKeyExchange_var get_crypto_key_exchange() const
void set_permissions_handle(DDS::Security::PermissionsHandle h)
Definition: Sedp.h:1181
LivelinessReader_rch participant_message_secure_reader_
Definition: Sedp.h:1308
HandleRegistry_rch get_handle_registry(const DCPS::GUID_t &participant_id)
SecurityReader_rch participant_volatile_message_secure_reader_
Definition: Sedp.h:1310
GUID_t participant_id_
Definition: Sedp.h:1229
void insert_local_datareader_crypto_handle(const DCPS::GUID_t &id, DDS::Security::DatareaderCryptoHandle handle, const DDS::Security::EndpointSecurityAttributes &attributes)
AccessControl_var get_access_control() const
TypeLookupRequestReader_rch type_lookup_request_secure_reader_
Definition: Sedp.h:1316
DiscoveryReader_rch dcps_participant_secure_reader_
Definition: Sedp.h:1311
ACE_TEXT("TCP_Factory")
Authentication_var get_authentication() const
void set_crypto_key_exchange(DDS::Security::CryptoKeyExchange_var ckf)
Definition: Sedp.h:1211
LivelinessWriter_rch participant_message_secure_writer_
Definition: Sedp.h:1286
DiscoveryWriter_rch subscriptions_secure_writer_
Definition: Sedp.h:1282
SecurityWriter_rch participant_volatile_message_secure_writer_
Definition: Sedp.h:1290
const ReturnCode_t RETCODE_ERROR
sequence< Property > PropertySeq
const ReturnCode_t RETCODE_OK
CryptoKeyFactory_var get_crypto_key_factory() const
Security::SecurityConfig_rch get_security_config() const
Definition: Spdp.h:128
#define TheServiceParticipant
const DDS::Security::EndpointSecurityAttributes & default_endpoint_security_attributes() const
void set_crypto_key_factory(DDS::Security::CryptoKeyFactory_var ckf)
Definition: Sedp.h:1201

◆ is_expectant_opendds()

bool OpenDDS::RTPS::Sedp::is_expectant_opendds ( const GUID_t endpoint) const
privatevirtual

Definition at line 2912 of file Sedp.cpp.

References OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::RTPS::Spdp::is_expectant_opendds(), and spdp_.

Referenced by association_complete_i(), and process_discovered_reader_data().

2913 {
2914  GUID_t participant = endpoint;
2915  participant.entityId = DCPS::ENTITYID_PARTICIPANT;
2916  return spdp_.is_expectant_opendds(participant);
2917 }
bool is_expectant_opendds(const GUID_t &participant) const
Definition: Spdp.cpp:2191
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37

◆ is_security_enabled()

bool OpenDDS::RTPS::Sedp::is_security_enabled ( )
inlineprotected

◆ job_queue()

DCPS::JobQueue_rch OpenDDS::RTPS::Sedp::job_queue ( ) const
inline

Definition at line 199 of file Sedp.h.

References append_transport_statistics(), ignore(), and job_queue_.

199 { return job_queue_; }
DCPS::JobQueue_rch job_queue_
Definition: Sedp.h:773

◆ local_address()

const DCPS::NetworkAddress & OpenDDS::RTPS::Sedp::local_address ( ) const

Definition at line 928 of file Sedp.cpp.

References OpenDDS::DCPS::static_rchandle_cast(), and transport_inst_.

929 {
930  DCPS::RtpsUdpInst_rch rtps_inst =
931  DCPS::static_rchandle_cast<DCPS::RtpsUdpInst>(transport_inst_);
932  return rtps_inst->local_address_;
933 }
RcHandle< RtpsUdpInst > RtpsUdpInst_rch
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
RcHandle< T > static_rchandle_cast(const RcHandle< U > &h)
Definition: RcHandle_T.h:202

◆ local_has_remote_endpoint_token_i()

bool OpenDDS::RTPS::Sedp::local_has_remote_endpoint_token_i ( const GUID_t local,
const GUID_t remote 
) const
private

Definition at line 6536 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::RTPS::Spdp::crypto_handle_, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::Security::SecurityConfig::get_crypto_key_exchange(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_local_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::get_local_datawriter_crypto_handle(), OpenDDS::Security::HandleRegistry::get_remote_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::get_remote_datareader_security_attributes(), OpenDDS::Security::HandleRegistry::get_remote_datawriter_crypto_handle(), OpenDDS::Security::HandleRegistry::get_remote_datawriter_security_attributes(), DDS::HANDLE_NIL, DDS::Security::EndpointSecurityAttributes::is_payload_protected, DDS::Security::EndpointSecurityAttributes::is_submessage_protected, LM_INFO, OpenDDS::RTPS::Spdp::security_config_, and spdp_.

Referenced by ready().

6537 {
6538  if (DCPS_debug_level > 6) {
6539  ACE_DEBUG((LM_INFO,
6540  ACE_TEXT("(%P|%t) Sedp::local_has_remote_endpoint_token_i: local %C remote %C\n"),
6541  LogGuid(local).c_str(), LogGuid(remote).c_str()));
6542  }
6543 
6545  return true;
6546  }
6547 
6548  if (is_stateless_or_volatile(local)) {
6549  // Don't need the token so okay.
6550  return true;
6551  }
6552 
6553  Security::CryptoKeyExchange_var key_exchange = spdp_.security_config_->get_crypto_key_exchange();
6554  if (DCPS::GuidConverter(local).isWriter()) {
6555  const DDS::Security::DatawriterCryptoHandle local_crypto_handle =
6557  if (local_crypto_handle == DDS::HANDLE_NIL) {
6558  return true;
6559  }
6560  const DDS::Security::DatareaderCryptoHandle remote_crypto_handle =
6564  return !attribs.is_submessage_protected ||
6565  key_exchange->have_remote_datareader_crypto_tokens(local_crypto_handle, remote_crypto_handle);
6566  } else {
6567  const DDS::Security::DatareaderCryptoHandle local_crypto_handle =
6569  if (local_crypto_handle == DDS::HANDLE_NIL) {
6570  return true;
6571  }
6572  const DDS::Security::DatawriterCryptoHandle remote_crypto_handle =
6576  return (!attribs.is_submessage_protected && !attribs.is_payload_protected) ||
6577  key_exchange->have_remote_datawriter_crypto_tokens(local_crypto_handle, remote_crypto_handle);
6578  }
6579 }
#define ACE_DEBUG(X)
const InstanceHandle_t HANDLE_NIL
DDS::Security::DatawriterCryptoHandle get_local_datawriter_crypto_handle(const DCPS::GUID_t &id) const
DDS::Security::DatareaderCryptoHandle get_local_datareader_crypto_handle(const DCPS::GUID_t &id) const
const DDS::Security::EndpointSecurityAttributes & get_remote_datareader_security_attributes(const DCPS::GUID_t &id) const
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
DDS::Security::ParticipantCryptoHandle crypto_handle_
Definition: Spdp.h:625
NativeCryptoHandle DatawriterCryptoHandle
const DDS::Security::EndpointSecurityAttributes & get_remote_datawriter_security_attributes(const DCPS::GUID_t &id) const
CryptoKeyExchange_var get_crypto_key_exchange() const
NativeCryptoHandle DatareaderCryptoHandle
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
DDS::Security::DatawriterCryptoHandle get_remote_datawriter_crypto_handle(const DCPS::GUID_t &id) const
DDS::Security::DatareaderCryptoHandle get_remote_datareader_crypto_handle(const DCPS::GUID_t &id) const
Security::SecurityConfig_rch security_config_
Definition: Spdp.h:618

◆ local_has_remote_participant_token_i()

bool OpenDDS::RTPS::Sedp::local_has_remote_participant_token_i ( const GUID_t local,
const GUID_t remote 
) const
private

Definition at line 6481 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::RTPS::Spdp::crypto_handle_, crypto_handle_, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::Security::SecurityConfig::get_crypto_key_exchange(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_remote_participant_crypto_handle(), DDS::HANDLE_NIL, LM_INFO, OpenDDS::DCPS::make_id(), OpenDDS::RTPS::Spdp::security_config_, and spdp_.

Referenced by ready().

6482 {
6483  if (DCPS_debug_level > 6) {
6484  ACE_DEBUG((LM_INFO,
6485  ACE_TEXT("(%P|%t) Sedp::local_has_remote_participant_token_i: local %C remote %C\n"),
6486  LogGuid(local).c_str(), LogGuid(remote).c_str()));
6487  }
6488 
6490  return true;
6491  }
6492 
6493  const GUID_t remote_part = make_id(remote, ENTITYID_PARTICIPANT);
6494 
6495  if (is_stateless_or_volatile(local)) {
6496  // Don't need the token so okay.
6497  return true;
6498  }
6499 
6500  Security::CryptoKeyExchange_var key_exchange = spdp_.security_config_->get_crypto_key_exchange();
6501  const DDS::Security::ParticipantCryptoHandle dp_crypto_handle =
6503 
6504  return !key_exchange->have_local_participant_crypto_tokens(crypto_handle_, dp_crypto_handle) ||
6505  key_exchange->have_remote_participant_crypto_tokens(crypto_handle_, dp_crypto_handle);
6506 }
#define ACE_DEBUG(X)
const InstanceHandle_t HANDLE_NIL
DDS::Security::ParticipantCryptoHandle crypto_handle_
Definition: Sedp.h:1264
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
DDS::Security::ParticipantCryptoHandle crypto_handle_
Definition: Spdp.h:625
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
CryptoKeyExchange_var get_crypto_key_exchange() const
DDS::Security::ParticipantCryptoHandle get_remote_participant_crypto_handle(const DCPS::GUID_t &id) const
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
Security::SecurityConfig_rch security_config_
Definition: Spdp.h:618
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ make_topic_guid()

GUID_t OpenDDS::RTPS::Sedp::make_topic_guid ( )
inlineprotected

Definition at line 1154 of file Sedp.h.

References assign_topic_key(), OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::EntityId_t::entityKind, OpenDDS::DCPS::ENTITYKIND_OPENDDS_TOPIC, and participant_id_.

Referenced by assert_topic(), process_discovered_reader_data(), and process_discovered_writer_data().

1155  {
1156  GUID_t guid;
1157  guid = participant_id_;
1159  assign_topic_key(guid);
1160  return guid;
1161  }
virtual void assign_topic_key(GUID_t &guid)
Definition: Sedp.h:1038
const octet ENTITYKIND_OPENDDS_TOPIC
Definition: DdsDcpsGuid.idl:49
GUID_t participant_id_
Definition: Sedp.h:1229
key EntityId_t entityId
Definition: DdsDcpsGuid.idl:59

◆ match()

void OpenDDS::RTPS::Sedp::match ( const GUID_t writer,
const GUID_t reader 
)
protected

Definition at line 6824 of file Sedp.cpp.

References ACE_DEBUG, OpenDDS::DCPS::DCPS_debug_level, discovered_publications_, discovered_subscriptions_, OpenDDS::XTypes::TypeIdentifier::kind(), LM_DEBUG, local_publications_, local_subscriptions_, match_continue(), OpenDDS::XTypes::TypeInformation::minimal, need_minimal_and_or_complete_types(), request_type_objects(), OpenDDS::XTypes::TK_NONE, OpenDDS::XTypes::TypeIdentifierWithSize::type_id, OpenDDS::XTypes::TypeIdentifierWithDependencies::typeid_with_size, and use_xtypes_.

Referenced by match_endpoints().

6825 {
6826  if (DCPS_debug_level >= 4) {
6827  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::match: w: %C r: %C\n",
6828  LogGuid(writer).c_str(), LogGuid(reader).c_str()));
6829  }
6830 
6831  // 1. collect type info about the writer, which may be local or discovered
6832  XTypes::TypeInformation* writer_type_info = 0;
6833 
6834  const LocalPublicationIter lpi = local_publications_.find(writer);
6836  bool writer_local = false;
6837  if (lpi != local_publications_.end()) {
6838  writer_local = true;
6839  writer_type_info = &lpi->second.type_info_;
6840  } else if ((dpi = discovered_publications_.find(writer))
6841  != discovered_publications_.end()) {
6842  writer_type_info = &dpi->second.type_info_;
6843  } else {
6844  if (DCPS_debug_level >= 4) {
6845  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::match: Undiscovered Writer\n"));
6846  }
6847  return; // Possible and ok, since lock is released
6848  }
6849 
6850  // 2. collect type info about the reader, which may be local or discovered
6851  XTypes::TypeInformation* reader_type_info = 0;
6852 
6853  const LocalSubscriptionIter lsi = local_subscriptions_.find(reader);
6855  bool reader_local = false;
6856  if (lsi != local_subscriptions_.end()) {
6857  reader_local = true;
6858  reader_type_info = &lsi->second.type_info_;
6859  } else if ((dsi = discovered_subscriptions_.find(reader))
6860  != discovered_subscriptions_.end()) {
6861  reader_type_info = &dsi->second.type_info_;
6862  } else {
6863  if (DCPS_debug_level >= 4) {
6864  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::match: Undiscovered Reader\n"));
6865  }
6866  return; // Possible and ok, since lock is released
6867  }
6868 
6869  // if the type object is not in cache, send RPC request
6870  // NOTE(sonndinh): Is it possible for a discovered endpoint to include only the "complete"
6871  // part in its TypeInformation? If it's possible, then we may need to handle that case, i.e.,
6872  // request only the remote complete TypeObject (if it's not already in the cache).
6873  // The following code assumes when the "minimal" part is not included in the discovered
6874  // endpoint's TypeInformation, then the "complete" part also is not included.
6875  bool request = false;
6876  bool need_minimal, need_complete;
6877  if ((writer_type_info->minimal.typeid_with_size.type_id.kind() != XTypes::TK_NONE) &&
6878  (reader_type_info->minimal.typeid_with_size.type_id.kind() != XTypes::TK_NONE)) {
6879  if (!writer_local && reader_local) {
6880  if (need_minimal_and_or_complete_types(writer_type_info, need_minimal, need_complete)) {
6881  if (DCPS_debug_level >= 4) {
6882  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::match: "
6883  "Need to get type objects from remote writer\n"));
6884  }
6885  request = true;
6886  }
6887  } else if (!reader_local && writer_local) {
6888  if (need_minimal_and_or_complete_types(reader_type_info, need_minimal, need_complete)) {
6889  if (DCPS_debug_level >= 4) {
6890  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::match: "
6891  "Need to get type objects from remote reader\n"));
6892  }
6893  request = true;
6894  }
6895  }
6896  } else if (reader_local && !writer_local && use_xtypes_ &&
6897  writer_type_info->minimal.typeid_with_size.type_id.kind() != XTypes::TK_NONE) {
6898  // We are a recorder trying to associate with a remote xtypes writer
6899  if (need_minimal_and_or_complete_types(writer_type_info, need_minimal, need_complete)) {
6900  if (DCPS_debug_level >= 4) {
6901  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::match: "
6902  "Need to get type objects from remote reader for recorder\n"));
6903  }
6904  request = true;
6905  }
6906  }
6907 
6908  if (request) {
6910  reader_local ? writer_type_info : reader_type_info,
6911  MatchingPair(reader, writer, reader_local),
6912 #ifdef OPENDDS_SECURITY
6913  reader_local ?
6914  lsi->second.security_attribs_.base.is_discovery_protected :
6915  lpi->second.security_attribs_.base.is_discovery_protected,
6916 #else
6917  false,
6918 #endif
6919  need_minimal, need_complete);
6920  } else {
6921  match_continue(writer, reader);
6922  }
6923 }
#define ACE_DEBUG(X)
DiscoveredSubscriptionMap discovered_subscriptions_
Definition: Sedp.h:1235
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
DiscoveredSubscriptionMap::iterator DiscoveredSubscriptionIter
Definition: Sedp.h:272
const bool use_xtypes_
Definition: Sedp.h:1246
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
void match_continue(const GUID_t &writer, const GUID_t &reader)
Definition: Sedp.cpp:7049
bool need_minimal_and_or_complete_types(const XTypes::TypeInformation *type_info, bool &need_minimal, bool &need_complete) const
Definition: Sedp.cpp:6964
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
void request_type_objects(const XTypes::TypeInformation *type_info, const MatchingPair &mp, bool is_discovery_protected, bool get_minimal, bool get_complete)
Definition: Sedp.cpp:7484
DiscoveredPublicationMap discovered_publications_
Definition: Sedp.h:1234
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
const TypeKind TK_NONE
Definition: TypeObject.h:213
DiscoveredPublicationMap::iterator DiscoveredPublicationIter
Definition: Sedp.h:276
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ match_continue()

void OpenDDS::RTPS::Sedp::match_continue ( const GUID_t writer,
const GUID_t reader 
)
protected

Definition at line 7049 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), add_assoc_i(), OpenDDS::DCPS::RecorderImpl::add_to_dynamic_type_map(), DDS::ALLOW_TYPE_COERCION, OpenDDS::XTypes::TypeAssignability::assignable(), cleanup_reader_association(), cleanup_writer_association(), OpenDDS::DCPS::compatibleQOS(), OpenDDS::XTypes::TypeInformation::complete, OpenDDS::DCPS::IncompatibleQosStatus::count_since_last_send, OpenDDS::DCPS::DCPS_debug_level, DDS::DataWriterQos::deadline, DDS::DataReaderQos::deadline, OpenDDS::XTypes::deserialize_type_info(), DDS::DataWriterQos::destination_order, DDS::DataReaderQos::destination_order, discovered_publications_, discovered_subscriptions_, OpenDDS::DCPS::EventDispatcher::dispatch(), DDS::DataWriterQos::durability, DDS::DataReaderQos::durability, DDS::DataWriterQos::durability_service, DDS::PublisherQos::entity_factory, DDS::SubscriberQos::entity_factory, OpenDDS::DCPS::ENTITYID_PARTICIPANT, event_dispatcher_, OpenDDS::DCPS::ContentFilterProperty_t::expressionParameters, OpenDDS::DCPS::ContentFilterProperty_t::filterClassName, OpenDDS::DCPS::ContentFilterProperty_t::filterExpression, DDS::TypeConsistencyEnforcementQosPolicy::force_type_validation, DDS::PublisherQos::group_data, DDS::SubscriberQos::group_data, DDS::DataWriterQos::history, DDS::DataReaderQos::history, OpenDDS::XTypes::TypeConsistencyAttributes::ignore_member_names, DDS::TypeConsistencyEnforcementQosPolicy::ignore_member_names, OpenDDS::XTypes::TypeConsistencyAttributes::ignore_sequence_bounds, DDS::TypeConsistencyEnforcementQosPolicy::ignore_sequence_bounds, OpenDDS::XTypes::TypeConsistencyAttributes::ignore_string_bounds, DDS::TypeConsistencyEnforcementQosPolicy::ignore_string_bounds, OpenDDS::DCPS::RcHandle< T >::in(), OpenDDS::XTypes::IS_APPENDABLE, is_security_enabled(), DDS::TypeConsistencyEnforcementQosPolicy::kind, OpenDDS::XTypes::TypeIdentifier::kind(), OpenDDS::DCPS::Encoding::KIND_XCDR1, DDS::DataWriterQos::latency_budget, DDS::DataReaderQos::latency_budget, DDS::DataWriterQos::lifespan, DDS::DataWriterQos::liveliness, DDS::DataReaderQos::liveliness, LM_DEBUG, LM_ERROR, LM_WARNING, local_publications_, local_subscriptions_, OpenDDS::DCPS::WeakRcHandle< T >::lock(), OpenDDS::DCPS::make_id(), match_continue_security_enabled(), OpenDDS::XTypes::TypeInformation::minimal, OPENDDS_ASSERT, DDS::DataWriterQos::ownership, DDS::DataReaderQos::ownership, DDS::DataWriterQos::ownership_strength, OpenDDS::RTPS::Spdp::participants_, DDS::PublisherQos::partition, DDS::SubscriberQos::partition, populate_origination_locator(), populate_transport_locator_sequence(), DDS::PublisherQos::presentation, DDS::SubscriberQos::presentation, OpenDDS::XTypes::TypeConsistencyAttributes::prevent_type_widening, DDS::TypeConsistencyEnforcementQosPolicy::prevent_type_widening, process_association_records_i(), DDS::DataReaderQos::reader_data_lifecycle, OpenDDS::DCPS::ReaderAssociation::readerTransInfo, DDS::DataWriterQos::reliability, DDS::DataReaderQos::reliability, remove_assoc_i(), OpenDDS::DCPS::repr_to_encoding_kind(), DDS::DataWriterQos::representation, DDS::DataReaderQos::representation, DDS::DataWriterQos::resource_limits, DDS::DataReaderQos::resource_limits, OpenDDS::XTypes::serialize_type_info(), spdp_, TheServiceParticipant, DDS::DataReaderQos::time_based_filter, OpenDDS::XTypes::TK_NONE, topic_names_, topics_, DDS::DataWriterQos::transport_priority, DDS::DataReaderQos::type_consistency, OpenDDS::XTypes::TypeIdentifierWithSize::type_id, type_lookup_service_, OpenDDS::XTypes::TypeIdentifierWithDependencies::typeid_with_size, use_xtypes_complete_, DDS::DataWriterQos::user_data, DDS::DataReaderQos::user_data, DDS::DataRepresentationQosPolicy::value, DDS::DataWriterQos::writer_data_lifecycle, and OpenDDS::DCPS::WriterAssociation::writerTransInfo.

Referenced by match(), and OpenDDS::RTPS::Sedp::TypeLookupReplyReader::process_type_lookup_reply().

7050 {
7051  if (DCPS_debug_level >= 4) {
7052  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::match_continue: w: %C r: %C\n",
7053  LogGuid(writer).c_str(), LogGuid(reader).c_str()));
7054  }
7055 
7056  // 0. For discovered endpoints, we'll have the QoS info in the form of the
7057  // publication or subscription BIT data which doesn't use the same structures
7058  // for QoS. In those cases we can copy the individual QoS policies to temp
7059  // QoS structs:
7060  DDS::DataWriterQos tempDwQos;
7061  DDS::PublisherQos tempPubQos;
7062  DDS::DataReaderQos tempDrQos;
7063  DDS::SubscriberQos tempSubQos;
7064  DCPS::ContentFilterProperty_t tempCfp;
7065 
7068  if (dpi != discovered_publications_.end() && dsi != discovered_subscriptions_.end()) {
7069  // This is a discovered/discovered match, nothing for us to do
7070  return;
7071  }
7072 
7073  // 1. Collect details about the writer, which may be local or discovered
7074  const DDS::DataWriterQos* dwQos = 0;
7075  const DDS::PublisherQos* pubQos = 0;
7076  DCPS::TransportLocatorSeq* wTls = 0;
7077  ACE_CDR::ULong wTransportContext = 0;
7078  XTypes::TypeInformation* writer_type_info = 0;
7079  String topic_name;
7080  DCPS::MonotonicTime_t writer_participant_discovered_at;
7081 
7082  const LocalPublicationIter lpi = local_publications_.find(writer);
7083  bool writer_local = false, already_matched = false;
7084  if (lpi != local_publications_.end()) {
7085  writer_local = true;
7086  dwQos = &lpi->second.qos_;
7087  pubQos = &lpi->second.publisher_qos_;
7088  wTls = &lpi->second.trans_info_;
7089  wTransportContext = lpi->second.transport_context_;
7090  already_matched = lpi->second.matched_endpoints_.count(reader);
7091  writer_type_info = &lpi->second.type_info_;
7092  topic_name = topic_names_[lpi->second.topic_id_];
7093  writer_participant_discovered_at = lpi->second.participant_discovered_at_;
7094  } else if (dpi != discovered_publications_.end()) {
7095  wTls = &dpi->second.writer_data_.writerProxy.allLocators;
7096  wTransportContext = dpi->second.transport_context_;
7097  writer_type_info = &dpi->second.type_info_;
7098  topic_name = dpi->second.get_topic_name();
7099  writer_participant_discovered_at = dpi->second.participant_discovered_at_;
7100 
7102  dpi->second.writer_data_.ddsPublicationData;
7103  tempDwQos.durability = bit.durability;
7104  tempDwQos.durability_service = bit.durability_service;
7105  tempDwQos.deadline = bit.deadline;
7106  tempDwQos.latency_budget = bit.latency_budget;
7107  tempDwQos.liveliness = bit.liveliness;
7108  tempDwQos.reliability = bit.reliability;
7109  tempDwQos.destination_order = bit.destination_order;
7110  tempDwQos.history = TheServiceParticipant->initial_HistoryQosPolicy();
7111  tempDwQos.resource_limits =
7112  TheServiceParticipant->initial_ResourceLimitsQosPolicy();
7113  tempDwQos.transport_priority =
7114  TheServiceParticipant->initial_TransportPriorityQosPolicy();
7115  tempDwQos.lifespan = bit.lifespan;
7116  tempDwQos.user_data = bit.user_data;
7117  tempDwQos.ownership = bit.ownership;
7118  tempDwQos.ownership_strength = bit.ownership_strength;
7119  tempDwQos.writer_data_lifecycle =
7120  TheServiceParticipant->initial_WriterDataLifecycleQosPolicy();
7121  tempDwQos.representation = bit.representation;
7122  dwQos = &tempDwQos;
7123 
7124  tempPubQos.presentation = bit.presentation;
7125  tempPubQos.partition = bit.partition;
7126  tempPubQos.group_data = bit.group_data;
7127  tempPubQos.entity_factory =
7128  TheServiceParticipant->initial_EntityFactoryQosPolicy();
7129  pubQos = &tempPubQos;
7130 
7131  populate_transport_locator_sequence(*wTls, dpi, writer);
7132  } else {
7133  return; // Possible and ok, since lock is released
7134  }
7135 
7136  // 2. Collect details about the reader, which may be local or discovered
7137  const DDS::DataReaderQos* drQos = 0;
7138  const DDS::SubscriberQos* subQos = 0;
7139  DCPS::TransportLocatorSeq* rTls = 0;
7140  ACE_CDR::ULong rTransportContext = 0;
7141 #ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC
7142  const DCPS::ContentFilterProperty_t* cfProp = 0;
7143 #endif
7144  XTypes::TypeInformation* reader_type_info = 0;
7145  DCPS::MonotonicTime_t reader_participant_discovered_at;
7146 
7147  const LocalSubscriptionIter lsi = local_subscriptions_.find(reader);
7148  bool reader_local = false;
7149  if (lsi != local_subscriptions_.end()) {
7150  reader_local = true;
7151  drQos = &lsi->second.qos_;
7152  subQos = &lsi->second.subscriber_qos_;
7153  rTls = &lsi->second.trans_info_;
7154  rTransportContext = lsi->second.transport_context_;
7155  reader_type_info = &lsi->second.type_info_;
7156  if (lsi->second.filterProperties.filterExpression[0] != 0) {
7157  tempCfp.filterExpression = lsi->second.filterProperties.filterExpression;
7158  tempCfp.expressionParameters = lsi->second.filterProperties.expressionParameters;
7159  }
7160 #ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC
7161  cfProp = &tempCfp;
7162 #endif
7163  if (!already_matched) {
7164  already_matched = lsi->second.matched_endpoints_.count(writer);
7165  }
7166  reader_participant_discovered_at = lsi->second.participant_discovered_at_;
7167  } else if (dsi != discovered_subscriptions_.end()) {
7168  rTls = &dsi->second.reader_data_.readerProxy.allLocators;
7169 
7170  populate_transport_locator_sequence(*rTls, dsi, reader);
7171  rTransportContext = dsi->second.transport_context_;
7172 
7174  dsi->second.reader_data_.ddsSubscriptionData;
7175  tempDrQos.durability = bit.durability;
7176  tempDrQos.deadline = bit.deadline;
7177  tempDrQos.latency_budget = bit.latency_budget;
7178  tempDrQos.liveliness = bit.liveliness;
7179  tempDrQos.reliability = bit.reliability;
7180  tempDrQos.destination_order = bit.destination_order;
7181  tempDrQos.history = TheServiceParticipant->initial_HistoryQosPolicy();
7182  tempDrQos.resource_limits =
7183  TheServiceParticipant->initial_ResourceLimitsQosPolicy();
7184  tempDrQos.user_data = bit.user_data;
7185  tempDrQos.ownership = bit.ownership;
7186  tempDrQos.time_based_filter = bit.time_based_filter;
7187  tempDrQos.reader_data_lifecycle =
7188  TheServiceParticipant->initial_ReaderDataLifecycleQosPolicy();
7189  tempDrQos.representation = bit.representation;
7190  tempDrQos.type_consistency = bit.type_consistency;
7191  drQos = &tempDrQos;
7192 
7193  tempSubQos.presentation = bit.presentation;
7194  tempSubQos.partition = bit.partition;
7195  tempSubQos.group_data = bit.group_data;
7196  tempSubQos.entity_factory =
7197  TheServiceParticipant->initial_EntityFactoryQosPolicy();
7198  subQos = &tempSubQos;
7199 
7200 #ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC
7201  cfProp = &dsi->second.reader_data_.contentFilterProperty;
7202 #endif
7203  reader_type_info = &dsi->second.type_info_;
7204  reader_participant_discovered_at = dsi->second.participant_discovered_at_;
7205  } else {
7206  return; // Possible and ok, since lock is released
7207  }
7208 
7209  // 3. Perform type consistency check (XTypes 1.3, Section 7.6.3.4.2)
7210  bool consistent = false;
7211 
7212  DCPS::TopicDetailsMap::iterator td_iter = topics_.find(topic_name);
7213  if (td_iter == topics_.end()) {
7214  ACE_ERROR((LM_ERROR,
7215  ACE_TEXT("(%P|%t) Sedp::match_continue - ERROR ")
7216  ACE_TEXT("Didn't find topic for consistency check\n")));
7217  return;
7218  } else {
7219  const XTypes::TypeIdentifier& writer_type_id =
7220  writer_type_info->minimal.typeid_with_size.type_id;
7221  const XTypes::TypeIdentifier& reader_type_id =
7222  reader_type_info->minimal.typeid_with_size.type_id;
7223  if (writer_type_id.kind() != XTypes::TK_NONE && reader_type_id.kind() != XTypes::TK_NONE) {
7224  if (!writer_local || !reader_local) {
7225  DCPS::Encoding::Kind encoding_kind;
7226  if (tempDwQos.representation.value.length() > 0 &&
7227  DCPS::repr_to_encoding_kind(tempDwQos.representation.value[0], encoding_kind) &&
7228  encoding_kind == DCPS::Encoding::KIND_XCDR1) {
7229  const XTypes::TypeFlag extensibility_mask = XTypes::IS_APPENDABLE;
7230  if (type_lookup_service_->extensibility(extensibility_mask, writer_type_id)) {
7232  ACE_DEBUG((LM_WARNING, "(%P|%t) WARNING: "
7233  "Sedp::match_continue: "
7234  "Encountered unsupported combination of XCDR1 encoding and appendable "
7235  "extensibility\n"));
7236  }
7237  }
7238  }
7239  }
7240 
7241  XTypes::TypeConsistencyAttributes type_consistency;
7242  type_consistency.ignore_sequence_bounds = drQos->type_consistency.ignore_sequence_bounds;
7243  type_consistency.ignore_string_bounds = drQos->type_consistency.ignore_string_bounds;
7244  type_consistency.ignore_member_names = drQos->type_consistency.ignore_member_names;
7245  type_consistency.prevent_type_widening = drQos->type_consistency.prevent_type_widening;
7246  XTypes::TypeAssignability ta(type_lookup_service_, type_consistency);
7247 
7249  consistent = ta.assignable(reader_type_id, writer_type_id);
7250  } else {
7251  // The two types must be equivalent for DISALLOW_TYPE_COERCION
7252  consistent = reader_type_id == writer_type_id;
7253  if (!consistent && DCPS::DCPS_debug_level >= 4) {
7254  ACE_DEBUG((LM_WARNING, "(%P|%t) Sedp::match_continue: will not match because type "
7255  "ids must be the same when using DISALLOW_TYPE_COERCION\n"));
7256  }
7257  }
7258  } else {
7260  // Cannot do type validation since not both TypeObjects are available
7261  consistent = false;
7262  if (DCPS::DCPS_debug_level >= 4) {
7263  ACE_DEBUG((LM_WARNING, "(%P|%t) Sedp::match_continue: will not match because "
7264  "force_type_validation is true, but TypeObjects are not available\n"));
7265  }
7266  } else {
7267  // Fall back to matching type names
7268  String writer_type_name;
7269  String reader_type_name;
7270  if (writer_local) {
7271  writer_type_name = td_iter->second.local_data_type_name();
7272  } else {
7273  writer_type_name = dpi->second.get_type_name();
7274  }
7275  if (reader_local) {
7276  reader_type_name = td_iter->second.local_data_type_name();
7277  } else {
7278  reader_type_name = dsi->second.get_type_name();
7279  }
7280  consistent = reader_type_name.empty() || writer_type_name == reader_type_name;
7281  }
7282  }
7283 
7284  if (!consistent) {
7285  td_iter->second.increment_inconsistent();
7286  if (DCPS::DCPS_debug_level) {
7287  ACE_DEBUG((LM_WARNING,
7288  ACE_TEXT("(%P|%t) Sedp::match_continue - WARNING ")
7289  ACE_TEXT("Data types of topic %C does not match (inconsistent)\n"),
7290  topic_name.c_str()));
7291  }
7292  return;
7293  }
7294  }
7295 
7296  // 4. Check transport and QoS compatibility
7297 
7298  // Copy entries from local publication and local subscription maps
7299  // prior to releasing lock
7302  if (writer_local) {
7303  dwr = lpi->second.publication_;
7304  OPENDDS_ASSERT(lpi->second.publication_);
7305  OPENDDS_ASSERT(dwr);
7306  }
7307  if (reader_local) {
7308  drr = lsi->second.subscription_;
7309  OPENDDS_ASSERT(lsi->second.subscription_);
7310  OPENDDS_ASSERT(drr);
7311  }
7312 
7313  DCPS::IncompatibleQosStatus writerStatus = {0, 0, 0, DDS::QosPolicyCountSeq()};
7314  DCPS::IncompatibleQosStatus readerStatus = {0, 0, 0, DDS::QosPolicyCountSeq()};
7315 
7316  if (compatibleQOS(&writerStatus, &readerStatus, *wTls, *rTls,
7317  dwQos, drQos, pubQos, subQos)) {
7318 
7319  bool call_writer = false, call_reader = false;
7320 
7321  if (writer_local) {
7322  call_writer = lpi->second.matched_endpoints_.insert(reader).second;
7323  dwr = lpi->second.publication_;
7324  if (!reader_local) {
7325  dsi->second.matched_endpoints_.insert(writer);
7326  }
7327  }
7328  if (reader_local) {
7329  call_reader = lsi->second.matched_endpoints_.insert(writer).second;
7330  drr = lsi->second.subscription_;
7331  if (!writer_local) {
7332  dpi->second.matched_endpoints_.insert(reader);
7333  }
7334  }
7335 
7336  if (writer_local && !reader_local) {
7337  add_assoc_i(writer, lpi->second, reader, dsi->second);
7338  }
7339  if (reader_local && !writer_local) {
7340  add_assoc_i(reader, lsi->second, writer, dpi->second);
7341  }
7342 
7343  if (!call_writer && !call_reader) {
7344  return; // nothing more to do
7345  }
7346 
7347  // Copy reader and writer association data prior to releasing lock
7349  if (call_writer) {
7350  war = make_rch<WriterAssociationRecord>(dwr, writer, DCPS::ReaderAssociation());
7351  DCPS::ReaderAssociation& ra = const_cast<DCPS::ReaderAssociation&>(war->reader_association_);
7352  ra.readerTransInfo = *rTls;
7353  populate_origination_locator(reader, ra.readerDiscInfo);
7354  ra.transportContext = rTransportContext;
7355  ra.readerId = reader;
7356  ra.subQos = *subQos;
7357  ra.readerQos = *drQos;
7358 #ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC
7359  ra.filterClassName = cfProp->filterClassName;
7360  ra.filterExpression = cfProp->filterExpression;
7361  ra.exprParams = cfProp->expressionParameters;
7362 #endif
7363  XTypes::serialize_type_info(*reader_type_info, ra.serializedTypeInfo);
7364  ra.participantDiscoveredAt = writer_participant_discovered_at;
7365  }
7366 
7368  if (call_reader) {
7369  rar = make_rch<ReaderAssociationRecord>(drr, reader, DCPS::WriterAssociation());
7370  DCPS::WriterAssociation& wa = const_cast<DCPS::WriterAssociation&>(rar->writer_association_);
7371  wa.writerTransInfo = *wTls;
7372  populate_origination_locator(writer, wa.writerDiscInfo);
7373  wa.transportContext = wTransportContext;
7374  wa.writerId = writer;
7375  wa.pubQos = *pubQos;
7376  wa.writerQos = *dwQos;
7377  XTypes::serialize_type_info(*writer_type_info, wa.serializedTypeInfo);
7378  wa.participantDiscoveredAt = writer_participant_discovered_at;
7379  }
7380 
7381 #ifdef OPENDDS_SECURITY
7382  if (is_security_enabled()) {
7383  match_continue_security_enabled(writer, reader, call_writer, call_reader);
7384  }
7385 #endif
7386 
7387  if (call_reader && call_writer) {
7388  // Associate immediately.
7389  event_dispatcher_->dispatch(DCPS::make_rch<ReaderAddAssociation>(rar));
7390  event_dispatcher_->dispatch(DCPS::make_rch<WriterAddAssociation>(war));
7391 
7392 #ifndef OPENDDS_SAFETY_PROFILE
7393  if (use_xtypes_complete_ && reader_type_info->complete.typeid_with_size.type_id.kind() == XTypes::TK_NONE) {
7394  // Reader is a local recorder using complete types
7395  DCPS::DataReaderCallbacks_rch lock = rar->callbacks_.lock();
7396  OpenDDS::DCPS::RecorderImpl* ri = dynamic_cast<OpenDDS::DCPS::RecorderImpl*>(lock.in());
7397  if (ri) {
7398  XTypes::TypeInformation type_info;
7399  if (XTypes::deserialize_type_info(type_info, rar->writer_association_.serializedTypeInfo)) {
7400  ri->add_to_dynamic_type_map(rar->writer_id(), type_info.complete.typeid_with_size.type_id);
7401  }
7402  }
7403  }
7404 #endif
7405 
7406  } else if (call_reader) {
7407 #ifndef OPENDDS_SAFETY_PROFILE
7408  if (use_xtypes_complete_ && reader_type_info->complete.typeid_with_size.type_id.kind() == XTypes::TK_NONE) {
7409  // Reader is a local recorder using complete types
7410  DCPS::DataReaderCallbacks_rch lock = rar->callbacks_.lock();
7411  OpenDDS::DCPS::RecorderImpl* ri = dynamic_cast<OpenDDS::DCPS::RecorderImpl*>(lock.in());
7412  if (ri) {
7413  XTypes::TypeInformation type_info;
7414  if (XTypes::deserialize_type_info(type_info, rar->writer_association_.serializedTypeInfo)) {
7415  ri->add_to_dynamic_type_map(rar->writer_id(), type_info.complete.typeid_with_size.type_id);
7416  }
7417  }
7418  }
7419 #endif
7421  if (iter != spdp_.participants_.end()) {
7422  iter->second.reader_pending_records_.push_back(rar);
7423  process_association_records_i(iter->second);
7424  }
7425  } else if (call_writer) {
7427  if (iter != spdp_.participants_.end()) {
7428  iter->second.writer_pending_records_.push_back(war);
7429  process_association_records_i(iter->second);
7430  }
7431  }
7432 
7433  } else if (already_matched) { // break an existing association
7434  if (writer_local) {
7435  lpi->second.matched_endpoints_.erase(reader);
7436  lpi->second.remote_expectant_opendds_associations_.erase(reader);
7437  if (dsi != discovered_subscriptions_.end()) {
7438  dsi->second.matched_endpoints_.erase(writer);
7439  }
7440  }
7441  if (reader_local) {
7442  lsi->second.matched_endpoints_.erase(writer);
7443  lsi->second.remote_expectant_opendds_associations_.erase(writer);
7444  if (dpi != discovered_publications_.end()) {
7445  dpi->second.matched_endpoints_.erase(reader);
7446  }
7447  }
7448  if (writer_local && !reader_local) {
7449  remove_assoc_i(writer, lpi->second, reader);
7450  }
7451  if (reader_local && !writer_local) {
7452  remove_assoc_i(reader, lsi->second, writer);
7453  }
7454  if (writer_local) {
7455  cleanup_writer_association(dwr, writer, reader);
7456  }
7457  if (reader_local) {
7458  cleanup_reader_association(drr, reader, writer);
7459  }
7460  } else { // something was incompatible
7461  if (writer_local && writerStatus.count_since_last_send) {
7462  if (DCPS_debug_level > 3) {
7463  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) Sedp::match_continue - ")
7464  ACE_TEXT("writer incompatible\n")));
7465  }
7466  DCPS::DataWriterCallbacks_rch dwr_lock = dwr.lock();
7467  if (dwr_lock) {
7468  dwr_lock->update_incompatible_qos(writerStatus);
7469  }
7470  }
7471  if (reader_local && readerStatus.count_since_last_send) {
7472  if (DCPS_debug_level > 3) {
7473  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) Sedp::match_continue - ")
7474  ACE_TEXT("reader incompatible\n")));
7475  }
7476  DCPS::DataReaderCallbacks_rch drr_lock = drr.lock();
7477  if (drr_lock) {
7478  drr_lock->update_incompatible_qos(readerStatus);
7479  }
7480  }
7481  }
7482 }
PartitionQosPolicy partition
#define ACE_DEBUG(X)
HistoryQosPolicy history
#define ACE_ERROR(X)
WeakRcHandle< DataReaderCallbacks > DataReaderCallbacks_wrch
std::string String
sequence< QosPolicyCount > QosPolicyCountSeq
Definition: DdsDcpsCore.idl:62
ReliabilityQosPolicy reliability
GroupDataQosPolicy group_data
DiscoveredSubscriptionMap discovered_subscriptions_
Definition: Sedp.h:1235
OwnershipQosPolicy ownership
DurabilityQosPolicy durability
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
DiscoveredSubscriptionMap::iterator DiscoveredSubscriptionIter
Definition: Sedp.h:272
TimeBasedFilterQosPolicy time_based_filter
DiscoveredParticipantMap::iterator DiscoveredParticipantIter
Definition: Spdp.h:70
void process_association_records_i(DiscoveredParticipant &participant)
Definition: Sedp.cpp:1264
OwnershipQosPolicy ownership
Implementation of Recorder functionality.
Definition: RecorderImpl.h:45
#define OPENDDS_ASSERT(C)
Definition: Definitions.h:72
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
LivelinessQosPolicy liveliness
DeadlineQosPolicy deadline
XTypes::TypeLookupService_rch type_lookup_service_
Definition: Sedp.h:1240
DestinationOrderQosPolicy destination_order
sequence< TransportLocator > TransportLocatorSeq
EntityFactoryQosPolicy entity_factory
bool compatibleQOS(OpenDDS::DCPS::IncompatibleQosStatus *writerStatus, OpenDDS::DCPS::IncompatibleQosStatus *readerStatus, const OpenDDS::DCPS::TransportLocatorSeq &pubTLS, const OpenDDS::DCPS::TransportLocatorSeq &subTLS, DDS::DataWriterQos const *const writerQos, DDS::DataReaderQos const *const readerQos, DDS::PublisherQos const *const pubQos, DDS::SubscriberQos const *const subQos)
Definition: DCPS_Utils.cpp:237
DataRepresentationQosPolicy representation
EntityFactoryQosPolicy entity_factory
RcHandle< DataReaderCallbacks > DataReaderCallbacks_rch
LatencyBudgetQosPolicy latency_budget
DCPS::EventDispatcher_rch event_dispatcher_
Definition: Sedp.h:774
void populate_origination_locator(const GUID_t &id, DCPS::TransportLocator &tl)
Definition: Sedp.cpp:7017
DurabilityServiceQosPolicy durability_service
TypeConsistencyEnforcementQosPolicy type_consistency
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
const TypeConsistencyEnforcementQosPolicyKind_t ALLOW_TYPE_COERCION
PresentationQosPolicy presentation
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
DurabilityQosPolicy durability
bool is_security_enabled()
Definition: Sedp.h:1176
OwnershipStrengthQosPolicy ownership_strength
DestinationOrderQosPolicy destination_order
WeakRcHandle< DataWriterCallbacks > DataWriterCallbacks_wrch
DataRepresentationQosPolicy representation
void serialize_type_info(const TypeInformation &type_info, T &seq, const DCPS::Encoding *encoding_option=0)
Definition: TypeObject.h:3382
void cleanup_reader_association(DCPS::DataReaderCallbacks_wrch callbacks, const GUID_t &reader, const GUID_t &writer)
Definition: Sedp.cpp:6759
bool deserialize_type_info(TypeInformation &type_info, const T &seq)
Definition: TypeObject.h:3397
ResourceLimitsQosPolicy resource_limits
DCPS::RcHandle< WriterAssociationRecord > WriterAssociationRecord_rch
RcHandle< DataWriterCallbacks > DataWriterCallbacks_rch
const bool use_xtypes_complete_
Definition: Sedp.h:1247
ACE_UINT32 ULong
ReaderDataLifecycleQosPolicy reader_data_lifecycle
DCPS::RcHandle< ReaderAssociationRecord > ReaderAssociationRecord_rch
ACE_TEXT("TCP_Factory")
HistoryQosPolicy history
TransportPriorityQosPolicy transport_priority
void remove_assoc_i(const DCPS::GUID_t &local_guid, const LocalPublication &lpub, const DCPS::GUID_t &remote_guid)
Definition: Sedp.cpp:5635
ACE_CDR::UShort TypeFlag
Definition: TypeObject.h:399
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
ReliabilityQosPolicy reliability
bool repr_to_encoding_kind(DDS::DataRepresentationId_t repr, Encoding::Kind &kind)
Definition: DCPS_Utils.cpp:455
DiscoveredPublicationMap discovered_publications_
Definition: Sedp.h:1234
LifespanQosPolicy lifespan
WriterDataLifecycleQosPolicy writer_data_lifecycle
const TypeFlag IS_APPENDABLE
Definition: TypeObject.h:401
void add_to_dynamic_type_map(const GUID_t &pub_id, const XTypes::TypeIdentifier &ti)
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
TopicNameMap topic_names_
Definition: Sedp.h:1237
LivelinessQosPolicy liveliness
TypeConsistencyEnforcementQosPolicyKind_t kind
virtual bool dispatch(EventBase_rch event)=0
DataRepresentationIdSeq value
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
UserDataQosPolicy user_data
UserDataQosPolicy user_data
virtual void populate_transport_locator_sequence(DCPS::TransportLocatorSeq &tls, DiscoveredSubscriptionIter &iter, const DCPS::GUID_t &reader)
Definition: Sedp.cpp:5176
DeadlineQosPolicy deadline
GroupDataQosPolicy group_data
#define TheServiceParticipant
const TypeKind TK_NONE
Definition: TypeObject.h:213
void match_continue_security_enabled(const GUID_t &writer, const GUID_t &reader, bool call_writer, bool call_reader)
Definition: Sedp.cpp:7570
PartitionQosPolicy partition
DiscoveredParticipantMap participants_
Definition: Spdp.h:382
PresentationQosPolicy presentation
ResourceLimitsQosPolicy resource_limits
void add_assoc_i(const DCPS::GUID_t &local_guid, const LocalPublication &lpub, const DCPS::GUID_t &remote_guid, const DiscoveredSubscription &dsub)
Definition: Sedp.cpp:5616
DiscoveredPublicationMap::iterator DiscoveredPublicationIter
Definition: Sedp.h:276
void cleanup_writer_association(DCPS::DataWriterCallbacks_wrch callbacks, const GUID_t &writer, const GUID_t &reader)
Definition: Sedp.cpp:6728
LatencyBudgetQosPolicy latency_budget
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ match_continue_security_enabled()

void OpenDDS::RTPS::Sedp::match_continue_security_enabled ( const GUID_t writer,
const GUID_t reader,
bool  call_writer,
bool  call_reader 
)
protected

Definition at line 7570 of file Sedp.cpp.

References ACE_ERROR, ACE_TEXT(), DDS::Security::SecurityException::code, create_and_send_datareader_crypto_tokens(), create_and_send_datawriter_crypto_tokens(), generate_remote_matched_reader_crypto_handle(), generate_remote_matched_writer_crypto_handle(), get_crypto_key_exchange(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_local_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::get_local_datareader_security_attributes(), OpenDDS::Security::HandleRegistry::get_local_datawriter_crypto_handle(), OpenDDS::Security::HandleRegistry::get_local_datawriter_security_attributes(), DDS::HANDLE_NIL, DDS::Security::EndpointSecurityAttributes::is_payload_protected, DDS::Security::EndpointSecurityAttributes::is_submessage_protected, LM_ERROR, DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, pending_remote_reader_crypto_tokens_, and pending_remote_writer_crypto_tokens_.

Referenced by match_continue().

7572 {
7573  DDS::Security::CryptoKeyExchange_var keyexg = get_crypto_key_exchange();
7574  if (call_reader && !call_writer) {
7579 
7580  // It might not exist due to security attributes, and that's OK
7581  if (drch != DDS::HANDLE_NIL) {
7584  DatawriterCryptoTokenSeqMap::iterator t_iter =
7586  if (t_iter != pending_remote_writer_crypto_tokens_.end()) {
7588  if (!keyexg->set_remote_datawriter_crypto_tokens(drch, dwch, t_iter->second, se)) {
7589  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ")
7590  ACE_TEXT("DiscoveryBase::match_continue_security_enabled: ")
7591  ACE_TEXT("Unable to set pending remote datawriter crypto tokens with ")
7592  ACE_TEXT("crypto key exchange plugin. Security Exception[%d.%d]: %C\n"),
7593  se.code, se.minor_code, se.message.in()));
7594  }
7596  }
7597  // Yes, this is different for remote datawriters than readers (see 8.8.9.3 vs 8.8.9.2)
7598  if (attribs.is_submessage_protected) {
7599  create_and_send_datareader_crypto_tokens(drch, reader, dwch, writer);
7600  }
7601  }
7602  }
7603 
7604  if (call_writer && !call_reader) {
7609 
7610  // It might not exist due to security attributes, and that's OK
7611  if (dwch != DDS::HANDLE_NIL) {
7614  relay_only_readers_.count(reader));
7615  DatareaderCryptoTokenSeqMap::iterator t_iter =
7617  if (t_iter != pending_remote_reader_crypto_tokens_.end()) {
7619  if (!keyexg->set_remote_datareader_crypto_tokens(dwch, drch, t_iter->second, se)) {
7620  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ")
7621  ACE_TEXT("DiscoveryBase::match_continue_security_enabled: ")
7622  ACE_TEXT("Unable to set pending remote datareader crypto tokens with crypto ")
7623  ACE_TEXT("key exchange plugin. Security Exception[%d.%d]: %C\n"),
7624  se.code, se.minor_code, se.message.in()));
7625  }
7627  }
7628  if (attribs.is_submessage_protected || attribs.is_payload_protected) {
7629  create_and_send_datawriter_crypto_tokens(dwch, writer, drch, reader);
7630  }
7631  }
7632  }
7633 }
const DDS::Security::EndpointSecurityAttributes & get_local_datareader_security_attributes(const DCPS::GUID_t &id) const
#define ACE_ERROR(X)
const InstanceHandle_t HANDLE_NIL
DDS::Security::DatawriterCryptoHandle get_local_datawriter_crypto_handle(const DCPS::GUID_t &id) const
DDS::Security::DatareaderCryptoHandle get_local_datareader_crypto_handle(const DCPS::GUID_t &id) const
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
DDS::Security::DatawriterCryptoHandle generate_remote_matched_writer_crypto_handle(const DCPS::GUID_t &writer, const DCPS::GUID_t &reader)
Definition: Sedp.cpp:5258
NativeCryptoHandle DatawriterCryptoHandle
NativeCryptoHandle DatareaderCryptoHandle
DDS::Security::DatareaderCryptoHandle generate_remote_matched_reader_crypto_handle(const DCPS::GUID_t &reader, const DCPS::GUID_t &writer, bool relay_only)
Definition: Sedp.cpp:5291
DDS::Security::CryptoKeyExchange_var get_crypto_key_exchange() const
Definition: Sedp.h:1216
void create_and_send_datareader_crypto_tokens(const DDS::Security::DatareaderCryptoHandle &drch, const DCPS::GUID_t &local_reader, const DDS::Security::DatawriterCryptoHandle &dwch, const DCPS::GUID_t &remote_writer)
Definition: Sedp.cpp:1462
ACE_TEXT("TCP_Factory")
DatareaderCryptoTokenSeqMap pending_remote_reader_crypto_tokens_
Definition: Sedp.h:1268
const DDS::Security::EndpointSecurityAttributes & get_local_datawriter_security_attributes(const DCPS::GUID_t &id) const
DatawriterCryptoTokenSeqMap pending_remote_writer_crypto_tokens_
Definition: Sedp.h:1271
void create_and_send_datawriter_crypto_tokens(const DDS::Security::DatawriterCryptoHandle &dwch, const DCPS::GUID_t &local_writer, const DDS::Security::DatareaderCryptoHandle &drch, const DCPS::GUID_t &remote_reader)
Definition: Sedp.cpp:1481

◆ match_endpoints()

void OpenDDS::RTPS::Sedp::match_endpoints ( GUID_t  repoId,
const DCPS::TopicDetails td,
bool  remove = false 
)
protected

Definition at line 6673 of file Sedp.cpp.

References ACE_DEBUG, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::TopicDetails::discovered_publications(), OpenDDS::DCPS::TopicDetails::discovered_subscriptions(), OpenDDS::DCPS::equal_guid_prefixes(), OpenDDS::DCPS::GuidConverter::isReader(), LM_DEBUG, OpenDDS::DCPS::TopicDetails::local_publications(), OpenDDS::DCPS::TopicDetails::local_subscriptions(), match(), participant_id_, and remove_assoc().

Referenced by add_publication(), add_subscription(), assign_topic_key(), ignore(), process_discovered_reader_data(), process_discovered_writer_data(), remove_entities_belonging_to(), remove_publication(), remove_subscription(), update_publication_qos(), and update_subscription_qos().

6674 {
6675  if (DCPS_debug_level >= 4) {
6676  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::match_endpoints %C%C\n",
6677  remove ? "remove " : "", LogGuid(repoId).c_str()));
6678  }
6679 
6680  const bool reader = DCPS::GuidConverter(repoId).isReader();
6681  // Copy the endpoint set - lock can be released in match()
6682  RepoIdSet local_endpoints;
6683  RepoIdSet discovered_endpoints;
6684  if (reader) {
6685  local_endpoints = td.local_publications();
6686  discovered_endpoints = td.discovered_publications();
6687  } else {
6688  local_endpoints = td.local_subscriptions();
6689  discovered_endpoints = td.discovered_subscriptions();
6690  }
6691 
6692  const bool is_remote = !equal_guid_prefixes(repoId, participant_id_);
6693  if (is_remote && local_endpoints.empty()) {
6694  // Nothing to match.
6695  return;
6696  }
6697 
6698  for (RepoIdSet::const_iterator iter = local_endpoints.begin();
6699  iter != local_endpoints.end(); ++iter) {
6700  // check to make sure it's a Reader/Writer or Writer/Reader match
6701  if (DCPS::GuidConverter(*iter).isReader() != reader) {
6702  if (remove) {
6703  remove_assoc(*iter, repoId);
6704  } else {
6705  match(reader ? *iter : repoId, reader ? repoId : *iter);
6706  }
6707  }
6708  }
6709 
6710  // Remote/remote matches are a waste of time
6711  if (is_remote) {
6712  return;
6713  }
6714 
6715  for (RepoIdSet::const_iterator iter = discovered_endpoints.begin();
6716  iter != discovered_endpoints.end(); ++iter) {
6717  // check to make sure it's a Reader/Writer or Writer/Reader match
6718  if (DCPS::GuidConverter(*iter).isReader() != reader) {
6719  if (remove) {
6720  remove_assoc(*iter, repoId);
6721  } else {
6722  match(reader ? *iter : repoId, reader ? repoId : *iter);
6723  }
6724  }
6725  }
6726 }
#define ACE_DEBUG(X)
GuidSet RepoIdSet
Definition: GuidUtils.h:113
void remove_assoc(const GUID_t &remove_from, const GUID_t &removing)
Definition: Sedp.cpp:6790
GUID_t participant_id_
Definition: Sedp.h:1229
void match(const GUID_t &writer, const GUID_t &reader)
Definition: Sedp.cpp:6824
OpenDDS_Dcps_Export bool equal_guid_prefixes(const GuidPrefix_t &lhs, const GuidPrefix_t &rhs)
Definition: GuidUtils.h:132
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30

◆ multicast_group()

const DCPS::NetworkAddress & OpenDDS::RTPS::Sedp::multicast_group ( ) const

Definition at line 946 of file Sedp.cpp.

References OpenDDS::DCPS::static_rchandle_cast(), and transport_inst_.

947 {
948  DCPS::RtpsUdpInst_rch rtps_inst =
949  DCPS::static_rchandle_cast<DCPS::RtpsUdpInst>(transport_inst_);
950  return rtps_inst->multicast_group_address_;
951 }
RcHandle< RtpsUdpInst > RtpsUdpInst_rch
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
RcHandle< T > static_rchandle_cast(const RcHandle< U > &h)
Definition: RcHandle_T.h:202

◆ multicast_locators()

DCPS::LocatorSeq OpenDDS::RTPS::Sedp::multicast_locators ( ) const

Definition at line 920 of file Sedp.cpp.

References OpenDDS::DCPS::CONNINFO_MULTICAST, OpenDDS::DCPS::TransportInst::populate_locator(), transport_inst_, and OpenDDS::RTPS::transport_locator_to_locator_seq().

921 {
922  DCPS::TransportLocator trans_info;
924  return transport_locator_to_locator_seq(trans_info);
925 }
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
virtual size_t populate_locator(OpenDDS::DCPS::TransportLocator &trans_info, ConnectionInfoFlags flags) const =0
Populate a transport locator sequence. Return the number of "locators.".
OpenDDS_Rtps_Export DCPS::LocatorSeq transport_locator_to_locator_seq(const DCPS::TransportLocator &info)
static const ConnectionInfoFlags CONNINFO_MULTICAST

◆ need_minimal_and_or_complete_types()

bool OpenDDS::RTPS::Sedp::need_minimal_and_or_complete_types ( const XTypes::TypeInformation type_info,
bool &  need_minimal,
bool &  need_complete 
) const
protected

Definition at line 6964 of file Sedp.cpp.

References OpenDDS::XTypes::TypeInformation::complete, OpenDDS::XTypes::TypeIdentifier::kind(), OpenDDS::XTypes::TypeInformation::minimal, OpenDDS::XTypes::TK_NONE, OpenDDS::XTypes::TypeIdentifierWithSize::type_id, type_lookup_service_, OpenDDS::XTypes::TypeIdentifierWithDependencies::typeid_with_size, and use_xtypes_complete_.

Referenced by match().

6967 {
6968  need_minimal = type_lookup_service_ &&
6969  !type_lookup_service_->type_object_in_cache(type_info->minimal.typeid_with_size.type_id);
6970 
6971  need_complete = use_xtypes_complete_ && type_lookup_service_ &&
6972  type_info->complete.typeid_with_size.type_id.kind() != XTypes::TK_NONE &&
6973  !type_lookup_service_->type_object_in_cache(type_info->complete.typeid_with_size.type_id);
6974 
6975  return need_minimal || need_complete;
6976 }
XTypes::TypeLookupService_rch type_lookup_service_
Definition: Sedp.h:1240
const bool use_xtypes_complete_
Definition: Sedp.h:1247
const TypeKind TK_NONE
Definition: TypeObject.h:213

◆ notify_liveliness()

void OpenDDS::RTPS::Sedp::notify_liveliness ( const ParticipantMessageData pmd)
private

This is a function to unify the notification of liveliness within RTPS The local participant map is checked for associated entities and then they are notified of liveliness if their QoS is compatible

Definition at line 2671 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), DDS::AUTOMATIC_LIVELINESS_QOS, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::equal_guid_prefixes(), LM_DEBUG, local_subscriptions_, OpenDDS::DCPS::make_part_guid(), OpenDDS::DCPS::make_unknown_guid(), DDS::MANUAL_BY_PARTICIPANT_LIVELINESS_QOS, OpenDDS::RTPS::PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE, and OpenDDS::RTPS::ParticipantMessageData::participantGuid.

Referenced by data_received(), received_participant_message_data_secure(), and write_participant_message_data().

2672 {
2673  const GUID_t& guid = pmd.participantGuid;
2674  const GUID_t guid_participant = make_part_guid(guid);
2675  // Clear the entityId so lower bound will work.
2676  const GUID_t prefix = make_unknown_guid(pmd.participantGuid);
2677  const bool is_automatic = PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE != pmd.participantGuid.entityId;
2678  if (DCPS::DCPS_debug_level >= 8) {
2679  ACE_DEBUG((LM_DEBUG,
2680  ACE_TEXT("(%P|%t) Sedp::notify_liveliness: Notifying Liveliness, %C\n"),
2681  DCPS::LogGuid(guid).c_str()));
2682  }
2683 
2684  for (LocalSubscriptionMap::const_iterator sub_pos = local_subscriptions_.begin(),
2685  sub_limit = local_subscriptions_.end();
2686  sub_pos != sub_limit; ++sub_pos) {
2687  const DCPS::RepoIdSet::const_iterator pos =
2688  sub_pos->second.matched_endpoints_.lower_bound(prefix);
2689  if (pos != sub_pos->second.matched_endpoints_.end() &&
2690  DCPS::equal_guid_prefixes(*pos, prefix)) {
2691  DCPS::DataReaderCallbacks_rch sl = sub_pos->second.subscription_.lock();
2692  if (sl) {
2693  if (sub_pos->second.qos_.liveliness.kind == ::DDS::AUTOMATIC_LIVELINESS_QOS && is_automatic) {
2694  sl->signal_liveliness(guid_participant);
2695  } else if ((sub_pos->second.qos_.liveliness.kind == ::DDS::MANUAL_BY_PARTICIPANT_LIVELINESS_QOS
2696  || sub_pos->second.qos_.liveliness.kind == ::DDS::AUTOMATIC_LIVELINESS_QOS) && !is_automatic) {
2697  sl->signal_liveliness(guid_participant);
2698  }
2699  }
2700  }
2701  }
2702 }
#define ACE_DEBUG(X)
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
OpenDDS_Dcps_Export GUID_t make_unknown_guid(const GuidPrefix_t &prefix)
Definition: GuidUtils.h:228
RcHandle< DataReaderCallbacks > DataReaderCallbacks_rch
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export GUID_t make_part_guid(const GuidPrefix_t &prefix)
Definition: GuidUtils.h:216
OpenDDS_Dcps_Export bool equal_guid_prefixes(const GuidPrefix_t &lhs, const GuidPrefix_t &rhs)
Definition: GuidUtils.h:132
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const DCPS::EntityId_t PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE
Definition: MessageTypes.h:119

◆ OPENDDS_MAP() [1/2]

typedef OpenDDS::RTPS::Sedp::OPENDDS_MAP ( SequenceNumber  ,
TypeIdOrigSeqNumber   
)
private

◆ OPENDDS_MAP() [2/2]

typedef OpenDDS::RTPS::Sedp::OPENDDS_MAP ( MatchingPair  ,
MatchingData   
)
protected

◆ OPENDDS_MAP_CMP() [1/7]

typedef OpenDDS::RTPS::Sedp::OPENDDS_MAP_CMP ( GUID_t  ,
DiscoveredSubscription  ,
GUID_tKeyLessThan   
)
private

◆ OPENDDS_MAP_CMP() [2/7]

typedef OpenDDS::RTPS::Sedp::OPENDDS_MAP_CMP ( GUID_t  ,
DiscoveredPublication  ,
GUID_tKeyLessThan   
)
private

◆ OPENDDS_MAP_CMP() [3/7]

typedef OpenDDS::RTPS::Sedp::OPENDDS_MAP_CMP ( GUID_t  ,
LocalPublication  ,
GUID_tKeyLessThan   
)
private

◆ OPENDDS_MAP_CMP() [4/7]

typedef OpenDDS::RTPS::Sedp::OPENDDS_MAP_CMP ( GUID_t  ,
LocalSubscription  ,
GUID_tKeyLessThan   
)
private

◆ OPENDDS_MAP_CMP() [5/7]

typedef OpenDDS::RTPS::Sedp::OPENDDS_MAP_CMP ( GUID_t  ,
String  ,
GUID_tKeyLessThan   
)
private

◆ OPENDDS_MAP_CMP() [6/7]

typedef OpenDDS::RTPS::Sedp::OPENDDS_MAP_CMP ( GUID_t  ,
DDS::Security::DatareaderCryptoTokenSeq  ,
GUID_tKeyLessThan   
)
protected

◆ OPENDDS_MAP_CMP() [7/7]

typedef OpenDDS::RTPS::Sedp::OPENDDS_MAP_CMP ( GUID_t  ,
DDS::Security::DatawriterCryptoTokenSeq  ,
GUID_tKeyLessThan   
)
protected

◆ OPENDDS_SET()

OpenDDS::RTPS::Sedp::OPENDDS_SET ( String  )
protected

◆ OPENDDS_SET_CMP()

OpenDDS::RTPS::Sedp::OPENDDS_SET_CMP ( GUID_t  ,
GUID_tKeyLessThan   
)
protected

◆ populate_discovered_reader_msg()

void OpenDDS::RTPS::Sedp::populate_discovered_reader_msg ( DCPS::DiscoveredReaderData drd,
const DCPS::GUID_t subscription_id,
const LocalSubscription sub 
)
private

Definition at line 4586 of file Sedp.cpp.

References OpenDDS::DCPS::ReaderProxy_t::allLocators, OpenDDS::DCPS::ReaderProxy_t::associatedWriters, OpenDDS::DCPS::LogGuid::c_str(), OpenDDS::DCPS::ContentFilterProperty_t::contentFilteredTopicName, OpenDDS::DCPS::DiscoveredReaderData::contentFilterProperty, OpenDDS::DCPS::DiscoveredReaderData::ddsSubscriptionData, DDS::DataReaderQos::deadline, DDS::DataReaderQos::destination_order, DDS::DataReaderQos::durability, OpenDDS::DCPS::ReaderProxy_t::expectsInlineQos, OpenDDS::DCPS::ContentFilterProperty_t::expressionParameters, OpenDDS::DCPS::ContentFilterProperty_t::filterClassName, OpenDDS::DCPS::ContentFilterProperty_t::filterExpression, OpenDDS::RTPS::LocalSubscription::filterProperties, DDS::SubscriberQos::group_data, DDS::DataReaderQos::latency_budget, DDS::DataReaderQos::liveliness, OpenDDS::DCPS::TopicDetails::local_data_type_name(), OpenDDS::DCPS::TopicDetails::local_qos(), OPENDDS_STRING, DDS::DataReaderQos::ownership, DDS::SubscriberQos::partition, DDS::SubscriberQos::presentation, OpenDDS::RTPS::LocalSubscription::qos_, OpenDDS::DCPS::DiscoveredReaderData::readerProxy, OpenDDS::DCPS::ContentFilterProperty_t::relatedTopicName, DDS::DataReaderQos::reliability, OpenDDS::RTPS::LocalEntity::remote_expectant_opendds_associations_, OpenDDS::DCPS::ReaderProxy_t::remoteReaderGuid, DDS::DataReaderQos::representation, OpenDDS::RTPS::LocalSubscription::subscriber_qos_, DDS::DataReaderQos::time_based_filter, DDS::TopicQos::topic_data, OpenDDS::RTPS::LocalEntity::topic_id_, topic_names_, topics_, OpenDDS::RTPS::LocalEntity::trans_info_, DDS::DataReaderQos::type_consistency, and DDS::DataReaderQos::user_data.

Referenced by write_subscription_data_secure(), and write_subscription_data_unsecure().

4590 {
4591  // Ignored on the wire drd.ddsSubscription.key
4592  // Ignored on the wire drd.ddsSubscription.participant_key
4593  OPENDDS_STRING topic_name = topic_names_[sub.topic_id_];
4594  drd.ddsSubscriptionData.topic_name = topic_name.c_str();
4595  TopicDetails& topic_details = topics_[topic_name];
4596  drd.ddsSubscriptionData.type_name = topic_details.local_data_type_name().c_str();
4597  drd.ddsSubscriptionData.durability = sub.qos_.durability;
4598  drd.ddsSubscriptionData.deadline = sub.qos_.deadline;
4599  drd.ddsSubscriptionData.latency_budget = sub.qos_.latency_budget;
4600  drd.ddsSubscriptionData.liveliness = sub.qos_.liveliness;
4601  drd.ddsSubscriptionData.reliability = sub.qos_.reliability;
4602  drd.ddsSubscriptionData.ownership = sub.qos_.ownership;
4603  drd.ddsSubscriptionData.destination_order = sub.qos_.destination_order;
4604  drd.ddsSubscriptionData.user_data = sub.qos_.user_data;
4605  drd.ddsSubscriptionData.time_based_filter = sub.qos_.time_based_filter;
4606  drd.ddsSubscriptionData.representation = sub.qos_.representation;
4607  drd.ddsSubscriptionData.presentation = sub.subscriber_qos_.presentation;
4608  drd.ddsSubscriptionData.partition = sub.subscriber_qos_.partition;
4609  drd.ddsSubscriptionData.topic_data = topic_details.local_qos().topic_data;
4610  drd.ddsSubscriptionData.group_data = sub.subscriber_qos_.group_data;
4611  drd.ddsSubscriptionData.type_consistency = sub.qos_.type_consistency;
4612 
4613  drd.readerProxy.remoteReaderGuid = subscription_id;
4614  drd.readerProxy.expectsInlineQos = false; // We never expect inline qos
4615  // Ignore drd.readerProxy.unicastLocatorList;
4616  // Ignore drd.readerProxy.multicastLocatorList;
4617  drd.readerProxy.allLocators = sub.trans_info_;
4618 
4619  drd.contentFilterProperty.contentFilteredTopicName =
4620  DCPS::LogGuid(subscription_id).c_str();
4621  drd.contentFilterProperty.relatedTopicName = topic_name.c_str();
4622  drd.contentFilterProperty.filterClassName = ""; // PLConverter adds default
4623  drd.contentFilterProperty.filterExpression = sub.filterProperties.filterExpression;
4624  drd.contentFilterProperty.expressionParameters = sub.filterProperties.expressionParameters;
4625 
4626  const CORBA::ULong len = drd.readerProxy.associatedWriters.length();
4627  const CORBA::ULong added_len = static_cast<CORBA::ULong>(sub.remote_expectant_opendds_associations_.size());
4628  drd.readerProxy.associatedWriters.length(len + added_len);
4629 
4630  CORBA::ULong i = 0;
4631  for (DCPS::RepoIdSet::const_iterator writer =
4632  sub.remote_expectant_opendds_associations_.begin();
4633  writer != sub.remote_expectant_opendds_associations_.end();
4634  ++writer) {
4635  drd.readerProxy.associatedWriters[len + i] = *writer;
4636  ++i;
4637  }
4638 }
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
#define OPENDDS_STRING
ACE_CDR::ULong ULong
TopicNameMap topic_names_
Definition: Sedp.h:1237

◆ populate_discovered_writer_msg()

void OpenDDS::RTPS::Sedp::populate_discovered_writer_msg ( DCPS::DiscoveredWriterData dwd,
const DCPS::GUID_t publication_id,
const LocalPublication pub 
)
private

Definition at line 4551 of file Sedp.cpp.

References OpenDDS::DCPS::WriterProxy_t::allLocators, OpenDDS::DCPS::DiscoveredWriterData::ddsPublicationData, DDS::DataWriterQos::deadline, DDS::DataWriterQos::destination_order, DDS::DataWriterQos::durability, DDS::DataWriterQos::durability_service, DDS::PublisherQos::group_data, DDS::DataWriterQos::latency_budget, DDS::DataWriterQos::lifespan, DDS::DataWriterQos::liveliness, OpenDDS::DCPS::TopicDetails::local_data_type_name(), OpenDDS::DCPS::TopicDetails::local_qos(), OPENDDS_STRING, DDS::DataWriterQos::ownership, DDS::DataWriterQos::ownership_strength, DDS::PublisherQos::partition, DDS::PublisherQos::presentation, OpenDDS::RTPS::LocalPublication::publisher_qos_, OpenDDS::RTPS::LocalPublication::qos_, DDS::DataWriterQos::reliability, OpenDDS::DCPS::WriterProxy_t::remoteWriterGuid, DDS::DataWriterQos::representation, DDS::TopicQos::topic_data, OpenDDS::RTPS::LocalEntity::topic_id_, topic_names_, topics_, OpenDDS::RTPS::LocalEntity::trans_info_, DDS::DataWriterQos::user_data, and OpenDDS::DCPS::DiscoveredWriterData::writerProxy.

Referenced by write_publication_data_secure(), and write_publication_data_unsecure().

4555 {
4556  // Ignored on the wire dwd.ddsPublicationData.key
4557  // Ignored on the wire dwd.ddsPublicationData.participant_key
4558  OPENDDS_STRING topic_name = topic_names_[pub.topic_id_];
4559  dwd.ddsPublicationData.topic_name = topic_name.c_str();
4560  TopicDetails& topic_details = topics_[topic_name];
4561  dwd.ddsPublicationData.type_name = topic_details.local_data_type_name().c_str();
4562  dwd.ddsPublicationData.durability = pub.qos_.durability;
4563  dwd.ddsPublicationData.durability_service = pub.qos_.durability_service;
4564  dwd.ddsPublicationData.deadline = pub.qos_.deadline;
4565  dwd.ddsPublicationData.latency_budget = pub.qos_.latency_budget;
4566  dwd.ddsPublicationData.liveliness = pub.qos_.liveliness;
4567  dwd.ddsPublicationData.reliability = pub.qos_.reliability;
4568  dwd.ddsPublicationData.lifespan = pub.qos_.lifespan;
4569  dwd.ddsPublicationData.user_data = pub.qos_.user_data;
4570  dwd.ddsPublicationData.ownership = pub.qos_.ownership;
4571  dwd.ddsPublicationData.ownership_strength = pub.qos_.ownership_strength;
4572  dwd.ddsPublicationData.destination_order = pub.qos_.destination_order;
4573  dwd.ddsPublicationData.representation = pub.qos_.representation;
4574  dwd.ddsPublicationData.presentation = pub.publisher_qos_.presentation;
4575  dwd.ddsPublicationData.partition = pub.publisher_qos_.partition;
4576  dwd.ddsPublicationData.topic_data = topic_details.local_qos().topic_data;
4577  dwd.ddsPublicationData.group_data = pub.publisher_qos_.group_data;
4578 
4579  dwd.writerProxy.remoteWriterGuid = publication_id;
4580  // Ignore dwd.writerProxy.unicastLocatorList;
4581  // Ignore dwd.writerProxy.multicastLocatorList;
4582  dwd.writerProxy.allLocators = pub.trans_info_;
4583 }
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
#define OPENDDS_STRING
TopicNameMap topic_names_
Definition: Sedp.h:1237

◆ populate_origination_locator()

void OpenDDS::RTPS::Sedp::populate_origination_locator ( const GUID_t id,
DCPS::TransportLocator tl 
)
private

Definition at line 7017 of file Sedp.cpp.

References OpenDDS::DCPS::TransportLocator::data, OpenDDS::STUN::encoding(), OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER, OpenDDS::RTPS::Spdp::get_last_recv_locator(), OpenDDS::DCPS::TransportInst::get_last_recv_locator(), OpenDDS::RTPS::get_locators_encoding(), OpenDDS::DCPS::GuidConverter::isBuiltinDomainEntity(), OpenDDS::DCPS::GuidConverter::isReader(), OpenDDS::DCPS::make_id(), OpenDDS::RTPS::message_block_to_sequence(), OpenDDS::DCPS::primitive_serialized_size_boolean(), OpenDDS::DCPS::serialized_size(), spdp_, transport_inst_, and OpenDDS::DCPS::TransportLocator::transport_type.

Referenced by match_continue(), and process_association_records_i().

7018 {
7019  DCPS::GuidConverter conv(id);
7020  if (conv.isBuiltinDomainEntity()) {
7021  DCPS::LocatorSeq locators;
7022  bool expects_inline_qos = false;
7023  bool found = spdp_.get_last_recv_locator(make_id(id, ENTITYID_PARTICIPANT), locators, expects_inline_qos);
7024 
7025  if (!found || !locators.length()) {
7026  return;
7027  }
7028 
7029  const Encoding& encoding = RTPS::get_locators_encoding();
7030  size_t size = serialized_size(encoding, locators);
7031  primitive_serialized_size_boolean(encoding, size);
7032 
7033  ACE_Message_Block mb_locator(size);
7034  Serializer ser_loc(&mb_locator, encoding);
7035  ser_loc << locators;
7036  ser_loc << ACE_OutputCDR::from_boolean(expects_inline_qos);
7037 
7038  tl.transport_type = "rtps_udp";
7039  RTPS::message_block_to_sequence(mb_locator, tl.data);
7040  } else {
7041  if (conv.isReader()) {
7043  } else {
7045  }
7046  }
7047 }
virtual void get_last_recv_locator(const GUID_t &, TransportLocator &)
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
sequence< Locator_t > LocatorSeq
void serialized_size(const Encoding &encoding, size_t &size, const SequenceNumber &)
bool get_last_recv_locator(const DCPS::GUID_t &part_id, DCPS::LocatorSeq &target, bool &inlineQos)
Definition: Spdp.cpp:3668
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
void message_block_to_sequence(const ACE_Message_Block &mb_locator, T &out)
Definition: MessageUtils.h:101
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER
Definition: GuidUtils.h:40
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER
Definition: GuidUtils.h:42
const DCPS::Encoding & get_locators_encoding()
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
const DCPS::Encoding encoding(DCPS::Encoding::KIND_UNALIGNED_CDR, DCPS::ENDIAN_BIG)
OpenDDS_Dcps_Export void primitive_serialized_size_boolean(const Encoding &encoding, size_t &size, size_t count=1)

◆ populate_transport_locator_sequence() [1/2]

void OpenDDS::RTPS::Sedp::populate_transport_locator_sequence ( DCPS::TransportLocatorSeq tls,
DiscoveredSubscriptionIter iter,
const DCPS::GUID_t reader 
)
privatevirtual

Definition at line 5176 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::DCPS::TransportLocator::data, OpenDDS::STUN::encoding(), OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::RTPS::Spdp::get_default_locators(), OpenDDS::RTPS::get_locators_encoding(), LM_WARNING, OpenDDS::RTPS::message_block_to_sequence(), OpenDDS::DCPS::primitive_serialized_size_boolean(), OpenDDS::DCPS::serialized_size(), spdp_, and OpenDDS::DCPS::TransportLocator::transport_type.

Referenced by match_continue().

5179 {
5180  DCPS::LocatorSeq locs;
5181  bool participantExpectsInlineQos = false;
5182  GUID_t remote_participant = reader;
5183  remote_participant.entityId = ENTITYID_PARTICIPANT;
5184  const bool participant_found =
5185  spdp_.get_default_locators(remote_participant, locs,
5186  participantExpectsInlineQos);
5187  if (!rTls.length()) { // if no locators provided, add the default
5188  if (!participant_found) {
5189  return;
5190  } else if (locs.length()) {
5191  const Encoding& encoding = get_locators_encoding();
5192  size_t size = DCPS::serialized_size(encoding, locs);
5194 
5195  ACE_Message_Block mb_locator(size);
5196  Serializer ser_loc(&mb_locator, encoding);
5197  ser_loc << locs;
5198  const bool readerExpectsInlineQos =
5199  dsi->second.reader_data_.readerProxy.expectsInlineQos;
5200  ser_loc << ACE_OutputCDR::from_boolean(participantExpectsInlineQos
5201  || readerExpectsInlineQos);
5202 
5203  DCPS::TransportLocator tl;
5204  tl.transport_type = "rtps_udp";
5205  message_block_to_sequence(mb_locator, tl.data);
5206  rTls.length(1);
5207  rTls[0] = tl;
5208  } else {
5209  ACE_DEBUG((LM_WARNING,
5210  ACE_TEXT("(%P|%t) Sedp::match - ")
5211  ACE_TEXT("remote reader found with no locators ")
5212  ACE_TEXT("and no default locators\n")));
5213  }
5214  }
5215 }
#define ACE_DEBUG(X)
sequence< Locator_t > LocatorSeq
void serialized_size(const Encoding &encoding, size_t &size, const SequenceNumber &)
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
bool get_default_locators(const DCPS::GUID_t &part_id, DCPS::LocatorSeq &target, bool &inlineQos)
Definition: Spdp.cpp:3639
void message_block_to_sequence(const ACE_Message_Block &mb_locator, T &out)
Definition: MessageUtils.h:101
ACE_TEXT("TCP_Factory")
const DCPS::Encoding & get_locators_encoding()
const DCPS::Encoding encoding(DCPS::Encoding::KIND_UNALIGNED_CDR, DCPS::ENDIAN_BIG)
OpenDDS_Dcps_Export void primitive_serialized_size_boolean(const Encoding &encoding, size_t &size, size_t count=1)

◆ populate_transport_locator_sequence() [2/2]

void OpenDDS::RTPS::Sedp::populate_transport_locator_sequence ( DCPS::TransportLocatorSeq tls,
DiscoveredPublicationIter iter,
const DCPS::GUID_t writer 
)
privatevirtual

Definition at line 5218 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::DCPS::TransportLocator::data, OpenDDS::STUN::encoding(), OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::RTPS::Spdp::get_default_locators(), OpenDDS::RTPS::get_locators_encoding(), LM_WARNING, OpenDDS::RTPS::message_block_to_sequence(), OpenDDS::DCPS::primitive_serialized_size_boolean(), OpenDDS::DCPS::serialized_size(), spdp_, and OpenDDS::DCPS::TransportLocator::transport_type.

5221 {
5222  DCPS::LocatorSeq locs;
5223  bool participantExpectsInlineQos = false;
5224  GUID_t remote_participant = writer;
5225  remote_participant.entityId = ENTITYID_PARTICIPANT;
5226  const bool participant_found =
5227  spdp_.get_default_locators(remote_participant, locs,
5228  participantExpectsInlineQos);
5229  if (!wTls.length()) { // if no locators provided, add the default
5230  if (!participant_found) {
5231  return;
5232  } else if (locs.length()) {
5233  const Encoding& encoding = get_locators_encoding();
5234  size_t size = DCPS::serialized_size(encoding, locs);
5236 
5237  ACE_Message_Block mb_locator(size);
5238  Serializer ser_loc(&mb_locator, encoding);
5239  ser_loc << locs;
5240  ser_loc << ACE_OutputCDR::from_boolean(participantExpectsInlineQos);
5241 
5242  DCPS::TransportLocator tl;
5243  tl.transport_type = "rtps_udp";
5244  message_block_to_sequence(mb_locator, tl.data);
5245  wTls.length(1);
5246  wTls[0] = tl;
5247  } else {
5248  ACE_DEBUG((LM_WARNING,
5249  ACE_TEXT("(%P|%t) Sedp::match - ")
5250  ACE_TEXT("remote writer found with no locators ")
5251  ACE_TEXT("and no default locators\n")));
5252  }
5253  }
5254 }
#define ACE_DEBUG(X)
sequence< Locator_t > LocatorSeq
void serialized_size(const Encoding &encoding, size_t &size, const SequenceNumber &)
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
bool get_default_locators(const DCPS::GUID_t &part_id, DCPS::LocatorSeq &target, bool &inlineQos)
Definition: Spdp.cpp:3639
void message_block_to_sequence(const ACE_Message_Block &mb_locator, T &out)
Definition: MessageUtils.h:101
ACE_TEXT("TCP_Factory")
const DCPS::Encoding & get_locators_encoding()
const DCPS::Encoding encoding(DCPS::Encoding::KIND_UNALIGNED_CDR, DCPS::ENDIAN_BIG)
OpenDDS_Dcps_Export void primitive_serialized_size_boolean(const Encoding &encoding, size_t &size, size_t count=1)

◆ process_association_records_i()

void OpenDDS::RTPS::Sedp::process_association_records_i ( DiscoveredParticipant participant)

Definition at line 1264 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::RTPS::DiscoveredParticipant::builtin_associated_records_, OpenDDS::RTPS::DiscoveredParticipant::builtin_pending_records_, OpenDDS::RTPS::create_association_data_proto(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::AssociationData::discovery_locator_, OpenDDS::DCPS::EventDispatcher::dispatch(), event_dispatcher_, OpenDDS::DCPS::GuidConverter::isReader(), LM_INFO, OpenDDS::RTPS::BuiltinAssociationRecord::local_id(), OpenDDS::RTPS::BuiltinAssociationRecord::local_tokens_sent(), OpenDDS::RTPS::DiscoveredParticipant::pdata_, populate_origination_locator(), OpenDDS::RTPS::DiscoveredParticipant::reader_associated_records_, OpenDDS::RTPS::WriterAssociationRecord::reader_id(), OpenDDS::RTPS::ReaderAssociationRecord::reader_id(), OpenDDS::RTPS::DiscoveredParticipant::reader_pending_records_, ready(), OpenDDS::RTPS::BuiltinAssociationRecord::remote_durable(), OpenDDS::DCPS::AssociationData::remote_durable_, OpenDDS::RTPS::BuiltinAssociationRecord::remote_id(), OpenDDS::DCPS::AssociationData::remote_id_, OpenDDS::RTPS::BuiltinAssociationRecord::remote_reliable(), OpenDDS::DCPS::AssociationData::remote_reliable_, OpenDDS::RTPS::BuiltinAssociationRecord::transport_client_, OpenDDS::RTPS::DiscoveredParticipant::writer_associated_records_, OpenDDS::RTPS::WriterAssociationRecord::writer_id(), OpenDDS::RTPS::ReaderAssociationRecord::writer_id(), and OpenDDS::RTPS::DiscoveredParticipant::writer_pending_records_.

Referenced by associate(), data_acked_i(), handle_datareader_crypto_tokens(), handle_datawriter_crypto_tokens(), and match_continue().

1265 {
1266  for (DiscoveredParticipant::BuiltinAssociationRecords::iterator pos = participant.builtin_pending_records_.begin(),
1267  limit = participant.builtin_pending_records_.end(); pos != limit;) {
1268  const BuiltinAssociationRecord& record = *pos;
1269  if (ready(participant, record.local_id(), record.remote_id(), record.local_tokens_sent())) {
1270  if (DCPS::DCPS_debug_level > 3) {
1271  ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) Sedp::process_association_records_i associating built-ins local %C remote %C pending %B done %B\n"),
1272  LogGuid(record.local_id()).c_str(), LogGuid(record.remote_id()).c_str(), participant.builtin_pending_records_.size(), participant.builtin_associated_records_.size()));
1273  }
1274 
1275  DCPS::AssociationData association_data;
1276  create_association_data_proto(association_data, participant.pdata_);
1277  populate_origination_locator(record.remote_id(), association_data.discovery_locator_);
1278  association_data.remote_id_ = record.remote_id();
1279  association_data.remote_reliable_ = record.remote_reliable();
1280  association_data.remote_durable_ = record.remote_durable();
1281  record.transport_client_->associate(association_data, DCPS::GuidConverter(association_data.remote_id_).isReader());
1282 
1283  participant.builtin_associated_records_.push_back(record);
1284  participant.builtin_pending_records_.erase(pos++);
1285 
1286  } else {
1287  if (DCPS::DCPS_debug_level > 6) {
1288  ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) Sedp::process_association_records_i builtin not ready local %C remote %C pending %B done %B\n"),
1289  LogGuid(record.local_id()).c_str(), LogGuid(record.remote_id()).c_str(), participant.builtin_pending_records_.size(), participant.builtin_associated_records_.size()));
1290  }
1291 
1292  ++pos;
1293  }
1294  }
1295 
1296  for (DiscoveredParticipant::WriterAssociationRecords::iterator pos = participant.writer_pending_records_.begin(),
1297  limit = participant.writer_pending_records_.end(); pos != limit;) {
1298  const WriterAssociationRecord& record = **pos;
1299  // The local tokens have already been sent.
1300  if (ready(participant, record.writer_id(), record.reader_id(), true)) {
1301  event_dispatcher_->dispatch(DCPS::make_rch<WriterAddAssociation>(*pos));
1302 
1303  participant.writer_associated_records_.push_back(*pos);
1304  participant.writer_pending_records_.erase(pos++);
1305  } else {
1306  if (DCPS::DCPS_debug_level > 6) {
1307  ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) Sedp::process_association_records_i writer not ready local %C remote %C pending %B done %B\n"),
1308  LogGuid(record.writer_id()).c_str(), LogGuid(record.reader_id()).c_str(), participant.writer_pending_records_.size(), participant.writer_associated_records_.size()));
1309  }
1310  ++pos;
1311  }
1312  }
1313 
1314  for (DiscoveredParticipant::ReaderAssociationRecords::iterator pos = participant.reader_pending_records_.begin(),
1315  limit = participant.reader_pending_records_.end(); pos != limit;) {
1316  const ReaderAssociationRecord& record = **pos;
1317  // The local tokens have already been sent.
1318  if (ready(participant, record.reader_id(), record.writer_id(), true)) {
1319  event_dispatcher_->dispatch(DCPS::make_rch<ReaderAddAssociation>(*pos));
1320 
1321  participant.reader_associated_records_.push_back(*pos);
1322  participant.reader_pending_records_.erase(pos++);
1323  } else {
1324  if (DCPS::DCPS_debug_level > 6) {
1325  ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) Sedp::process_association_records_i reader not ready local %C remote %C pending %B done %B\n"),
1326  LogGuid(record.reader_id()).c_str(), LogGuid(record.writer_id()).c_str(), participant.reader_pending_records_.size(), participant.reader_associated_records_.size()));
1327  }
1328  ++pos;
1329  }
1330  }
1331 }
#define ACE_DEBUG(X)
bool ready(const DiscoveredParticipant &participant, const GUID_t &local_id, const GUID_t &remote_id, bool local_tokens_sent) const
Definition: Sedp.cpp:1022
DCPS::EventDispatcher_rch event_dispatcher_
Definition: Sedp.h:774
void populate_origination_locator(const GUID_t &id, DCPS::TransportLocator &tl)
Definition: Sedp.cpp:7017
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
virtual bool dispatch(EventBase_rch event)=0
void create_association_data_proto(DCPS::AssociationData &proto, const ParticipantData_t &pdata)
Definition: Sedp.cpp:1000

◆ process_discovered_reader_data()

void OpenDDS::RTPS::Sedp::process_discovered_reader_data ( DCPS::MessageId  message_id,
const DCPS::DiscoveredReaderData rdata,
const DCPS::GUID_t guid,
const XTypes::TypeInformation type_info,
bool  have_ice_agent_info,
const ICE::AgentInfo ice_agent_info,
const DDS::Security::EndpointSecurityInfo security_info = NULL 
)
private

Definition at line 2336 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::TopicDetails::add_discovered_subscription(), OpenDDS::DCPS::ReaderProxy_t::allLocators, assign_bit_key(), OpenDDS::DCPS::ReaderProxy_t::associatedWriters, OpenDDS::RTPS::AUTH_STATE_AUTHENTICATED, OpenDDS::RTPS::AUTH_STATE_UNAUTHENTICATED, DDS::Security::SubscriptionBuiltinTopicData::base, DDS::Security::SubscriptionBuiltinTopicDataSecure::base, OpenDDS::RTPS::DiscoveredSubscription::bit_ih_, OpenDDS::RTPS::Spdp::bit_subscriber_, DDS::Security::SecurityException::code, OpenDDS::DCPS::DiscoveredReaderData::contentFilterProperty, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::DiscoveredReaderData::ddsSubscriptionData, discovered_subscriptions_, OpenDDS::DCPS::DISPOSE_INSTANCE, OpenDDS::DCPS::DISPOSE_UNREGISTER_INSTANCE, DDS::Security::EndpointSecurityInfo::endpoint_security_attributes, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::DCPS::ContentFilterProperty_t::expressionParameters, get_access_control(), OpenDDS::RTPS::Spdp::get_domain_id(), OpenDDS::RTPS::Spdp::get_participant_discovered_at(), OpenDDS::RTPS::Spdp::get_participant_flags(), OpenDDS::RTPS::DiscoveredSubscription::get_topic_name(), OpenDDS::RTPS::DiscoveredSubscription::have_ice_agent_info_, OpenDDS::RTPS::DiscoveredSubscription::ice_agent_info_, DDS::Security::ParticipantSecurityAttributes::is_access_protected, is_expectant_opendds(), DDS::Security::TopicSecurityAttributes::is_read_protected, is_security_enabled(), LM_DEBUG, LM_WARNING, local_publications_, OpenDDS::DCPS::log_progress(), OpenDDS::RTPS::Spdp::lookup_participant_auth_state(), OpenDDS::RTPS::Spdp::lookup_participant_permissions(), make_topic_guid(), match_endpoints(), DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, DDS::NEW_VIEW_STATE, DDS::NOT_NEW_VIEW_STATE, OPENDDS_ASSERT, OPENDDS_STRING, OpenDDS::RTPS::DiscoveredSubscription::participant_discovered_at_, participant_id_, participant_sec_attr_, DDS::Security::EndpointSecurityInfo::plugin_endpoint_security_attributes, purge_dead_topic(), OpenDDS::RTPS::DiscoveredSubscription::reader_data_, OpenDDS::DCPS::DiscoveredReaderData::readerProxy, remove_from_bit(), OpenDDS::DCPS::SAMPLE_DATA, DDS::Security::SubscriptionBuiltinTopicData::security_info, OpenDDS::RTPS::Spdp::shutting_down(), spdp_, start_ice(), stop_ice(), topic_names_, topics_, OpenDDS::RTPS::DiscoveredSubscription::transport_context_, OpenDDS::DCPS::transport_debug, OpenDDS::RTPS::DiscoveredSubscription::type_info_, and OpenDDS::DCPS::UNREGISTER_INSTANCE.

Referenced by data_received().

2347 {
2348  OPENDDS_STRING topic_name;
2349 
2350  GUID_t participant_id = guid;
2351  participant_id.entityId = ENTITYID_PARTICIPANT;
2352 
2353  // Find the subscripion - iterator valid only as long as we hold the lock
2355 
2356  if (message_id == DCPS::SAMPLE_DATA) {
2357  DCPS::DiscoveredReaderData rdata_copy;
2358 
2359 #ifdef OPENDDS_SECURITY
2360  if (iter != discovered_subscriptions_.end()) {
2361  DiscoveredSubscription& dsub = iter->second;
2362  if (!dsub.have_ice_agent_info_ && have_ice_agent_info) {
2363  dsub.have_ice_agent_info_ = have_ice_agent_info;
2364  dsub.ice_agent_info_ = ice_agent_info;
2365  start_ice(guid, dsub);
2366  } else if (dsub.have_ice_agent_info_ && !have_ice_agent_info) {
2367  dsub.have_ice_agent_info_ = have_ice_agent_info;
2368  dsub.ice_agent_info_ = ice_agent_info;
2369  stop_ice(guid, dsub);
2370  } else if (dsub.ice_agent_info_ != ice_agent_info) {
2371  dsub.ice_agent_info_ = ice_agent_info;
2372  start_ice(guid, dsub);
2373  }
2374  }
2375 #endif
2376 
2377  if (iter == discovered_subscriptions_.end()) { // add new
2378  DiscoveredSubscription presub(rdata);
2379  presub.participant_discovered_at_ = spdp_.get_participant_discovered_at(participant_id);
2380  presub.transport_context_ = spdp_.get_participant_flags(participant_id);
2381  presub.type_info_ = type_info;
2382 #ifdef OPENDDS_SECURITY
2383  presub.have_ice_agent_info_ = have_ice_agent_info;
2384  presub.ice_agent_info_ = ice_agent_info;
2385 #endif
2386 
2387  topic_name = presub.get_topic_name();
2388 
2389 #ifdef OPENDDS_SECURITY
2390  if (is_security_enabled()) {
2391 
2392  DDS::Security::SecurityException ex = {"", 0, 0};
2393 
2395  data.key = rdata.ddsSubscriptionData.key;
2396  data.name = rdata.ddsSubscriptionData.topic_name;
2397  data.type_name = rdata.ddsSubscriptionData.type_name;
2398  data.durability = rdata.ddsSubscriptionData.durability;
2399  data.deadline = rdata.ddsSubscriptionData.deadline;
2400  data.latency_budget = rdata.ddsSubscriptionData.latency_budget;
2401  data.liveliness = rdata.ddsSubscriptionData.liveliness;
2402  data.reliability = rdata.ddsSubscriptionData.reliability;
2403  data.destination_order = rdata.ddsSubscriptionData.destination_order;
2404  data.ownership = rdata.ddsSubscriptionData.ownership;
2405  data.topic_data = rdata.ddsSubscriptionData.topic_data;
2406 
2407  AuthState auth_state = spdp_.lookup_participant_auth_state(participant_id);
2408  if (auth_state == AUTH_STATE_AUTHENTICATED) {
2409 
2410  DDS::Security::PermissionsHandle remote_permissions = spdp_.lookup_participant_permissions(participant_id);
2411 
2413  !get_access_control()->check_remote_topic(remote_permissions, spdp_.get_domain_id(), data, ex))
2414  {
2415  ACE_ERROR((LM_WARNING,
2416  ACE_TEXT("(%P|%t) WARNING: ")
2417  ACE_TEXT("Sedp::process_discovered_reader_data - ")
2418  ACE_TEXT("Unable to check remote topic '%C'. SecurityException[%d.%d]: %C\n"),
2419  topic_name.data(), ex.code, ex.minor_code, ex.message.in()));
2420  return;
2421  }
2422 
2424  if (!get_access_control()->get_topic_sec_attributes(remote_permissions, topic_name.data(), topic_sec_attr, ex))
2425  {
2426  ACE_ERROR((LM_WARNING,
2427  ACE_TEXT("(%P|%t) WARNING: ")
2428  ACE_TEXT("Sedp::process_discovered_reader_data - ")
2429  ACE_TEXT("Unable to get security attributes for remote topic '%C'. SecurityException[%d.%d]: %C\n"),
2430  topic_name.data(), ex.code, ex.minor_code, ex.message.in()));
2431  return;
2432  }
2433 
2435  sub_data_sec.base.base = rdata.ddsSubscriptionData;
2436 
2437  if (security_info != NULL) {
2439  security_info->endpoint_security_attributes;
2441  security_info->plugin_endpoint_security_attributes;
2442  }
2443 
2444  bool relay_only = false;
2445  if (topic_sec_attr.is_read_protected &&
2446  !get_access_control()->check_remote_datareader(
2447  remote_permissions, spdp_.get_domain_id(), sub_data_sec, relay_only, ex))
2448  {
2449  ACE_ERROR((LM_WARNING,
2450  ACE_TEXT("(%P|%t) WARNING: ")
2451  ACE_TEXT("Sedp::process_discovered_reader_data - ")
2452  ACE_TEXT("Unable to check remote datareader '%C'. SecurityException[%d.%d]: %C\n"),
2453  topic_name.data(), ex.code, ex.minor_code, ex.message.in()));
2454  return;
2455  }
2456 
2457  if (relay_only) {
2458  relay_only_readers_.insert(guid);
2459  } else {
2460  relay_only_readers_.erase(guid);
2461  }
2462  } else if (auth_state != AUTH_STATE_UNAUTHENTICATED) {
2463  ACE_ERROR((LM_WARNING,
2464  ACE_TEXT("(%P|%t) WARNING: ")
2465  ACE_TEXT("Sedp::process_discovered_reader_data - ")
2466  ACE_TEXT("Unsupported remote participant authentication state for discovered datareader '%C'. ")
2467  ACE_TEXT("SecurityException[%d.%d]: %C\n"),
2468  topic_name.data(), ex.code, ex.minor_code, ex.message.in()));
2469  return;
2470  }
2471  }
2472 #endif
2473 
2474  DiscoveredSubscription& sub = discovered_subscriptions_[guid] = presub;
2475 
2476  // Create a topic if necessary.
2477  TopicDetailsMap::iterator top_it = topics_.find(topic_name);
2478  if (top_it == topics_.end()) {
2479  top_it = topics_.insert(std::make_pair(topic_name, TopicDetails())).first;
2480  DCPS::GUID_t topic_id = make_topic_guid();
2481  top_it->second.init(topic_name, topic_id);
2482  topic_names_[topic_id] = topic_name;
2483  }
2484 
2485  TopicDetails& td = top_it->second;
2486 
2487  // Upsert the remote topic.
2488  td.add_discovered_subscription(guid);
2489 
2490  assign_bit_key(sub);
2491  rdata_copy = sub.reader_data_;
2492 
2493  sub.bit_ih_ = spdp_.bit_subscriber_->add_subscription(rdata_copy.ddsSubscriptionData, DDS::NEW_VIEW_STATE);
2494  if (spdp_.shutting_down()) { return; }
2495 
2496  if (DCPS::DCPS_debug_level > 3) {
2497  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) Sedp::process_discovered_reader_data - ")
2498  ACE_TEXT("calling match_endpoints new\n")));
2499  }
2501  DCPS::log_progress("discovered reader data new", participant_id_, participant_id, spdp_.get_participant_discovered_at(participant_id), guid);
2502  }
2503  match_endpoints(guid, top_it->second);
2504  } else { // update existing
2505  if (checkAndAssignQos(iter->second.reader_data_.ddsSubscriptionData,
2506  rdata.ddsSubscriptionData)) {
2507 
2508  spdp_.bit_subscriber_->add_subscription(iter->second.reader_data_.ddsSubscriptionData, DDS::NOT_NEW_VIEW_STATE);
2509  if (spdp_.shutting_down()) { return; }
2510 
2511  // Match/unmatch local publication(s)
2512  topic_name = iter->second.get_topic_name();
2513  TopicDetailsMap::iterator top_it = topics_.find(topic_name);
2514  if (top_it != topics_.end()) {
2515  if (DCPS::DCPS_debug_level > 3) {
2516  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) Sedp::process_discovered_reader_data - ")
2517  ACE_TEXT("calling match_endpoints update\n")));
2518  }
2519  if (DCPS::transport_debug.log_progress) {
2520  log_progress("discovered reader data update", participant_id_, participant_id,
2521  spdp_.get_participant_discovered_at(participant_id), guid);
2522  }
2523  match_endpoints(guid, top_it->second);
2524  iter = discovered_subscriptions_.find(guid);
2525  if (iter == discovered_subscriptions_.end()) {
2526  return;
2527  }
2528  }
2529  }
2530 
2531  if (checkAndAssignParams(iter->second.reader_data_.contentFilterProperty,
2532  rdata.contentFilterProperty)) {
2533  // Let any associated local publications know about the change
2534  topic_name = iter->second.get_topic_name();
2535  TopicDetailsMap::iterator top_it = topics_.find(topic_name);
2536  using DCPS::RepoIdSet;
2537  const RepoIdSet& assoc =
2538  (top_it == topics_.end()) ? RepoIdSet() : top_it->second.local_publications();
2539  for (RepoIdSet::const_iterator i = assoc.begin(); i != assoc.end(); ++i) {
2540  const LocalPublicationIter lpi = local_publications_.find(*i);
2541  if (lpi != local_publications_.end()) {
2542  DCPS::DataWriterCallbacks_rch pl = lpi->second.publication_.lock();
2543  if (pl) {
2544  pl->update_subscription_params(guid, rdata.contentFilterProperty.expressionParameters);
2545  }
2546  }
2547  }
2548  }
2549 
2550  if (checkAndAssignLocators(iter->second.reader_data_.readerProxy, rdata.readerProxy)) {
2551  topic_name = iter->second.get_topic_name();
2552  TopicDetailsMap::const_iterator top_it = topics_.find(topic_name);
2553  using DCPS::RepoIdSet;
2554  const RepoIdSet& assoc =
2555  (top_it == topics_.end()) ? RepoIdSet() : top_it->second.local_publications();
2556  for (RepoIdSet::const_iterator i = assoc.begin(); i != assoc.end(); ++i) {
2558  OPENDDS_ASSERT(lpi != local_publications_.end());
2559  if (lpi != local_publications_.end()) {
2560  DCPS::DataWriterCallbacks_rch pl = lpi->second.publication_.lock();
2561  if (pl) {
2562  pl->update_locators(guid, rdata.readerProxy.allLocators);
2563  }
2564  }
2565  }
2566  }
2567  }
2568 
2569  if (is_expectant_opendds(guid)) {
2570  // For each associated opendds writer to this reader
2571  CORBA::ULong len = rdata.readerProxy.associatedWriters.length();
2572  for (CORBA::ULong writerIndex = 0; writerIndex < len; ++writerIndex) {
2573  GUID_t writerGuid = rdata.readerProxy.associatedWriters[writerIndex];
2574 
2575  // If the associated writer is in this participant
2576  LocalPublicationIter lp = local_publications_.find(writerGuid);
2577  if (lp != local_publications_.end()) {
2578  // If the local writer is not fully associated with the reader
2579  lp->second.remote_expectant_opendds_associations_.insert(guid);
2580  }
2581  }
2582  }
2583 
2584  } else if (message_id == DCPS::UNREGISTER_INSTANCE ||
2585  message_id == DCPS::DISPOSE_INSTANCE ||
2586  message_id == DCPS::DISPOSE_UNREGISTER_INSTANCE) {
2587  if (iter != discovered_subscriptions_.end()) {
2588  // Unmatch local publication(s)
2589  topic_name = iter->second.get_topic_name();
2590  TopicDetailsMap::iterator top_it = topics_.find(topic_name);
2591  if (top_it != topics_.end()) {
2592  top_it->second.remove_discovered_subscription(guid);
2593  if (DCPS::DCPS_debug_level > 3) {
2594  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) Sedp::process_discovered_reader_data - ")
2595  ACE_TEXT("calling match_endpoints disp/unreg\n")));
2596  }
2597  if (DCPS::transport_debug.log_progress) {
2598  log_progress("discovered reader data disposed", participant_id_, participant_id,
2599  spdp_.get_participant_discovered_at(participant_id), guid);
2600  }
2601  match_endpoints(guid, top_it->second, true /*remove*/);
2602  if (top_it->second.is_dead()) {
2603  purge_dead_topic(topic_name);
2604  }
2605  if (spdp_.shutting_down()) { return; }
2606  }
2607  DiscoveredSubscription s = iter->second;
2608  discovered_subscriptions_.erase(iter);
2609  remove_from_bit(s);
2610  }
2611  }
2612 }
#define ACE_DEBUG(X)
DDS::Security::ParticipantSecurityAttributes participant_sec_attr_
Definition: Sedp.h:1256
#define ACE_ERROR(X)
DiscoveredSubscriptionMap discovered_subscriptions_
Definition: Sedp.h:1235
OpenDDS_Dcps_Export TransportDebug transport_debug
Definition: debug.cpp:26
virtual bool is_expectant_opendds(const GUID_t &endpoint) const
Definition: Sedp.cpp:2912
DiscoveredSubscriptionMap::iterator DiscoveredSubscriptionIter
Definition: Sedp.h:272
GuidSet RepoIdSet
Definition: GuidUtils.h:113
#define OPENDDS_ASSERT(C)
Definition: Definitions.h:72
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
ACE_CDR::ULong get_participant_flags(const DCPS::GUID_t &guid) const
Definition: Spdp.cpp:3693
void match_endpoints(GUID_t repoId, const DCPS::TopicDetails &td, bool remove=false)
Definition: Sedp.cpp:6673
PluginEndpointSecurityAttributesMask plugin_endpoint_security_attributes
void OpenDDS_Dcps_Export log_progress(const char *activity, const GUID_t &local, const GUID_t &remote, const MonotonicTime_t &start_time, const GUID_t &reference)
Definition: Logging.cpp:20
EndpointSecurityAttributesMask endpoint_security_attributes
AuthState lookup_participant_auth_state(const GUID_t &id) const
Definition: Spdp.cpp:3855
DDS::DomainId_t get_domain_id() const
Definition: Spdp.h:169
#define OPENDDS_STRING
void stop_ice(const DCPS::GUID_t &guid, const DiscoveredPublication &dpub)
Definition: Sedp.cpp:5851
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
GUID_t make_topic_guid()
Definition: Sedp.h:1154
const ViewStateKind NOT_NEW_VIEW_STATE
ACE_CDR::ULong ULong
bool is_security_enabled()
Definition: Sedp.h:1176
DDS::Security::AccessControl_var get_access_control() const
Definition: Sedp.h:1196
const ViewStateKind NEW_VIEW_STATE
DDS::Security::PermissionsHandle lookup_participant_permissions(const DCPS::GUID_t &id) const
Definition: Spdp.cpp:3843
GUID_t participant_id_
Definition: Sedp.h:1229
RcHandle< DataWriterCallbacks > DataWriterCallbacks_rch
DCPS::MonotonicTime_t get_participant_discovered_at() const
Definition: Spdp.cpp:4461
bool shutting_down()
Definition: Spdp.h:118
void purge_dead_topic(const String &topic_name)
Definition: Sedp.h:307
ACE_TEXT("TCP_Factory")
void assign_bit_key(DiscoveredPublication &pub)
Definition: Sedp.cpp:954
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
void remove_from_bit(const DiscoveredPublication &pub)
Definition: Sedp.h:1144
DCPS::RcHandle< DCPS::BitSubscriber > bit_subscriber_
Definition: Spdp.h:379
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
TopicNameMap topic_names_
Definition: Sedp.h:1237
void start_ice(const DCPS::GUID_t &guid, const LocalPublication &lpub)
Definition: Sedp.cpp:5740
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321
DDS::SubscriptionBuiltinTopicData base

◆ process_discovered_writer_data()

void OpenDDS::RTPS::Sedp::process_discovered_writer_data ( DCPS::MessageId  message_id,
const DCPS::DiscoveredWriterData wdata,
const DCPS::GUID_t guid,
const XTypes::TypeInformation type_info,
bool  have_ice_agent_info,
const ICE::AgentInfo ice_agent_info,
const DDS::Security::EndpointSecurityInfo security_info = NULL 
)
private

Definition at line 2042 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::TopicDetails::add_discovered_publication(), OpenDDS::DCPS::WriterProxy_t::allLocators, assign_bit_key(), OpenDDS::RTPS::AUTH_STATE_AUTHENTICATED, OpenDDS::RTPS::AUTH_STATE_UNAUTHENTICATED, DDS::Security::PublicationBuiltinTopicData::base, DDS::Security::PublicationBuiltinTopicDataSecure::base, OpenDDS::RTPS::DiscoveredPublication::bit_ih_, OpenDDS::RTPS::Spdp::bit_subscriber_, DDS::Security::SecurityException::code, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::DiscoveredWriterData::ddsPublicationData, discovered_publications_, OpenDDS::DCPS::DISPOSE_INSTANCE, OpenDDS::DCPS::DISPOSE_UNREGISTER_INSTANCE, DDS::Security::EndpointSecurityInfo::endpoint_security_attributes, get_access_control(), OpenDDS::RTPS::Spdp::get_domain_id(), OpenDDS::RTPS::Spdp::get_participant_discovered_at(), OpenDDS::RTPS::Spdp::get_participant_flags(), OpenDDS::RTPS::DiscoveredPublication::get_topic_name(), OpenDDS::RTPS::DiscoveredPublication::have_ice_agent_info_, OpenDDS::RTPS::DiscoveredPublication::ice_agent_info_, DDS::Security::ParticipantSecurityAttributes::is_access_protected, is_security_enabled(), DDS::Security::TopicSecurityAttributes::is_write_protected, LM_DEBUG, LM_WARNING, local_subscriptions_, OpenDDS::DCPS::log_progress(), OpenDDS::RTPS::Spdp::lookup_participant_auth_state(), OpenDDS::RTPS::Spdp::lookup_participant_permissions(), OpenDDS::DCPS::make_part_guid(), make_topic_guid(), match_endpoints(), DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, DDS::NEW_VIEW_STATE, DDS::NOT_NEW_VIEW_STATE, OPENDDS_STRING, OpenDDS::RTPS::DiscoveredPublication::participant_discovered_at_, participant_id_, participant_sec_attr_, DDS::Security::EndpointSecurityInfo::plugin_endpoint_security_attributes, purge_dead_topic(), remove_from_bit(), OpenDDS::DCPS::SAMPLE_DATA, DDS::Security::PublicationBuiltinTopicData::security_info, OpenDDS::RTPS::Spdp::shutting_down(), spdp_, start_ice(), stop_ice(), topic_names_, topics_, OpenDDS::RTPS::DiscoveredPublication::transport_context_, OpenDDS::DCPS::transport_debug, OpenDDS::RTPS::DiscoveredPublication::type_info_, OpenDDS::DCPS::UNREGISTER_INSTANCE, OpenDDS::RTPS::DiscoveredPublication::writer_data_, and OpenDDS::DCPS::DiscoveredWriterData::writerProxy.

Referenced by data_received().

2053 {
2054  OPENDDS_STRING topic_name;
2055 
2056  const GUID_t participant_id = make_part_guid(guid);
2057 
2058  // Find the publication - iterator valid only as long as we hold the lock
2060 
2061  if (message_id == DCPS::SAMPLE_DATA) {
2062  DCPS::DiscoveredWriterData wdata_copy;
2063 
2064 #ifdef OPENDDS_SECURITY
2065  if (iter != discovered_publications_.end()) {
2066  DiscoveredPublication& dpub = iter->second;
2067  if (!dpub.have_ice_agent_info_ && have_ice_agent_info) {
2068  dpub.have_ice_agent_info_ = have_ice_agent_info;
2069  dpub.ice_agent_info_ = ice_agent_info;
2070  start_ice(guid, dpub);
2071  } else if (dpub.have_ice_agent_info_ && !have_ice_agent_info) {
2072  dpub.have_ice_agent_info_ = have_ice_agent_info;
2073  dpub.ice_agent_info_ = ice_agent_info;
2074  stop_ice(guid, dpub);
2075  } else if (dpub.ice_agent_info_ != ice_agent_info) {
2076  dpub.ice_agent_info_ = ice_agent_info;
2077  start_ice(guid, dpub);
2078  }
2079  }
2080 #endif
2081 
2082  if (iter == discovered_publications_.end()) { // add new
2083  DiscoveredPublication prepub(wdata);
2084  prepub.participant_discovered_at_ = spdp_.get_participant_discovered_at(participant_id);
2085  prepub.transport_context_ = spdp_.get_participant_flags(participant_id);
2086  prepub.type_info_ = type_info;
2087 
2088 #ifdef OPENDDS_SECURITY
2089  prepub.have_ice_agent_info_ = have_ice_agent_info;
2090  prepub.ice_agent_info_ = ice_agent_info;
2091 #endif
2092  topic_name = prepub.get_topic_name();
2093 
2094 #ifdef OPENDDS_SECURITY
2095  if (is_security_enabled()) {
2096 
2097  DDS::Security::SecurityException ex = {"", 0, 0};
2098 
2100  data.key = wdata.ddsPublicationData.key;
2101  data.name = wdata.ddsPublicationData.topic_name;
2102  data.type_name = wdata.ddsPublicationData.type_name;
2103  data.durability = wdata.ddsPublicationData.durability;
2104  data.durability_service = wdata.ddsPublicationData.durability_service;
2105  data.deadline = wdata.ddsPublicationData.deadline;
2106  data.latency_budget = wdata.ddsPublicationData.latency_budget;
2107  data.liveliness = wdata.ddsPublicationData.liveliness;
2108  data.reliability = wdata.ddsPublicationData.reliability;
2109  data.lifespan = wdata.ddsPublicationData.lifespan;
2110  data.destination_order = wdata.ddsPublicationData.destination_order;
2111  data.ownership = wdata.ddsPublicationData.ownership;
2112  data.topic_data = wdata.ddsPublicationData.topic_data;
2113 
2114  AuthState auth_state = spdp_.lookup_participant_auth_state(participant_id);
2115  if (auth_state == AUTH_STATE_AUTHENTICATED) {
2116 
2117  DDS::Security::PermissionsHandle remote_permissions = spdp_.lookup_participant_permissions(participant_id);
2118 
2120  !get_access_control()->check_remote_topic(remote_permissions, spdp_.get_domain_id(), data, ex))
2121  {
2122  ACE_ERROR((LM_WARNING,
2123  ACE_TEXT("(%P|%t) WARNING: ")
2124  ACE_TEXT("Sedp::process_discovered_writer_data - ")
2125  ACE_TEXT("Unable to check remote topic '%C'. SecurityException[%d.%d]: %C\n"),
2126  topic_name.data(), ex.code, ex.minor_code, ex.message.in()));
2127  return;
2128  }
2129 
2131  if (!get_access_control()->get_topic_sec_attributes(remote_permissions, topic_name.data(), topic_sec_attr, ex))
2132  {
2133  ACE_ERROR((LM_WARNING,
2134  ACE_TEXT("(%P|%t) WARNING: ")
2135  ACE_TEXT("Sedp::process_discovered_writer_data - ")
2136  ACE_TEXT("Unable to get security attributes for remote topic '%C'. SecurityException[%d.%d]: %C\n"),
2137  topic_name.data(), ex.code, ex.minor_code, ex.message.in()));
2138  return;
2139  }
2140 
2142  pub_data_sec.base.base = wdata.ddsPublicationData;
2143 
2144  if (security_info != NULL) {
2146  security_info->endpoint_security_attributes;
2148  security_info->plugin_endpoint_security_attributes;
2149  }
2150 
2151  if (topic_sec_attr.is_write_protected &&
2152  !get_access_control()->check_remote_datawriter(remote_permissions, spdp_.get_domain_id(), pub_data_sec, ex))
2153  {
2154  ACE_ERROR((LM_WARNING,
2155  ACE_TEXT("(%P|%t) WARNING: ")
2156  ACE_TEXT("Sedp::process_discovered_writer_data - ")
2157  ACE_TEXT("Unable to check remote datawriter '%C'. SecurityException[%d.%d]: %C\n"),
2158  topic_name.data(), ex.code, ex.minor_code, ex.message.in()));
2159  return;
2160  }
2161  } else if (auth_state != AUTH_STATE_UNAUTHENTICATED) {
2162  ACE_ERROR((LM_WARNING,
2163  ACE_TEXT("(%P|%t) WARNING: ")
2164  ACE_TEXT("Sedp::process_discovered_writer_data - ")
2165  ACE_TEXT("Unsupported remote participant authentication state for discovered datawriter '%C'. ")
2166  ACE_TEXT("SecurityException[%d.%d]: %C\n"),
2167  topic_name.data(), ex.code, ex.minor_code, ex.message.in()));
2168  return;
2169  }
2170  }
2171 #endif
2172 
2173  DiscoveredPublication& pub = discovered_publications_[guid] = prepub;
2174 
2175  // Create a topic if necessary.
2176  TopicDetailsMap::iterator top_it = topics_.find(topic_name);
2177  if (top_it == topics_.end()) {
2178  top_it = topics_.insert(std::make_pair(topic_name, TopicDetails())).first;
2179  DCPS::GUID_t topic_id = make_topic_guid();
2180  top_it->second.init(topic_name, topic_id);
2181  topic_names_[topic_id] = topic_name;
2182  }
2183 
2184  TopicDetails& td = top_it->second;
2185 
2186  // Upsert the remote topic.
2187  td.add_discovered_publication(guid);
2188 
2189  assign_bit_key(pub);
2190  wdata_copy = pub.writer_data_;
2191 
2192  pub.bit_ih_ = spdp_.bit_subscriber_->add_publication(wdata_copy.ddsPublicationData, DDS::NEW_VIEW_STATE);
2193  if (spdp_.shutting_down()) { return; }
2194 
2195  if (DCPS::DCPS_debug_level > 3) {
2196  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) Sedp::process_discovered_writer_data - ")
2197  ACE_TEXT("calling match_endpoints new\n")));
2198  }
2200  DCPS::log_progress("discovered writer data new", participant_id_, participant_id, spdp_.get_participant_discovered_at(participant_id), guid);
2201  }
2202  match_endpoints(guid, top_it->second);
2203  } else {
2204  if (checkAndAssignQos(iter->second.writer_data_.ddsPublicationData,
2205  wdata.ddsPublicationData)) { // update existing
2206 
2207  spdp_.bit_subscriber_->add_publication(iter->second.writer_data_.ddsPublicationData, DDS::NOT_NEW_VIEW_STATE);
2208  if (spdp_.shutting_down()) { return; }
2209 
2210  // Match/unmatch local subscription(s)
2211  topic_name = iter->second.get_topic_name();
2212  TopicDetailsMap::iterator top_it = topics_.find(topic_name);
2213  if (top_it != topics_.end()) {
2214  if (DCPS::DCPS_debug_level > 3) {
2215  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) Sedp::process_discovered_writer_data - ")
2216  ACE_TEXT("calling match_endpoints update\n")));
2217  }
2218  if (DCPS::transport_debug.log_progress) {
2219  log_progress("discovered writer data update", participant_id_, participant_id,
2220  spdp_.get_participant_discovered_at(participant_id), guid);
2221  }
2222  match_endpoints(guid, top_it->second);
2223  iter = discovered_publications_.find(guid);
2224  if (iter == discovered_publications_.end()) {
2225  return;
2226  }
2227  }
2228  }
2229 
2230  if (checkAndAssignLocators(iter->second.writer_data_.writerProxy, wdata.writerProxy)) {
2231  topic_name = iter->second.get_topic_name();
2232  TopicDetailsMap::const_iterator top_it = topics_.find(topic_name);
2233  using DCPS::RepoIdSet;
2234  const RepoIdSet& assoc =
2235  (top_it == topics_.end()) ? RepoIdSet() : top_it->second.local_subscriptions();
2236  for (RepoIdSet::const_iterator i = assoc.begin(); i != assoc.end(); ++i) {
2238  if (lsi != local_subscriptions_.end()) {
2239  DCPS::DataReaderCallbacks_rch sl = lsi->second.subscription_.lock();
2240  if (sl) {
2241  sl->update_locators(guid, wdata.writerProxy.allLocators);
2242  }
2243  }
2244  }
2245  }
2246  }
2247 
2248  } else if (message_id == DCPS::UNREGISTER_INSTANCE ||
2249  message_id == DCPS::DISPOSE_INSTANCE ||
2250  message_id == DCPS::DISPOSE_UNREGISTER_INSTANCE) {
2251  if (iter != discovered_publications_.end()) {
2252  // Unmatch local subscription(s)
2253  topic_name = iter->second.get_topic_name();
2254  TopicDetailsMap::iterator top_it = topics_.find(topic_name);
2255  if (top_it != topics_.end()) {
2256  top_it->second.remove_discovered_publication(guid);
2257  match_endpoints(guid, top_it->second, true /*remove*/);
2258  if (spdp_.shutting_down()) { return; }
2259  if (top_it->second.is_dead()) {
2260  purge_dead_topic(topic_name);
2261  }
2262  }
2263  DiscoveredPublication p = iter->second;
2264  discovered_publications_.erase(iter);
2265  remove_from_bit(p);
2266  if (DCPS::DCPS_debug_level > 3) {
2267  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) Sedp::process_discovered_writer_data - ")
2268  ACE_TEXT("calling match_endpoints disp/unreg\n")));
2269  }
2270  if (DCPS::transport_debug.log_progress) {
2271  log_progress("discovered writer data disposed", participant_id_, participant_id,
2272  spdp_.get_participant_discovered_at(participant_id), guid);
2273  }
2274  }
2275  }
2276 }
#define ACE_DEBUG(X)
DDS::Security::ParticipantSecurityAttributes participant_sec_attr_
Definition: Sedp.h:1256
DDS::PublicationBuiltinTopicData base
#define ACE_ERROR(X)
OpenDDS_Dcps_Export TransportDebug transport_debug
Definition: debug.cpp:26
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
GuidSet RepoIdSet
Definition: GuidUtils.h:113
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
ACE_CDR::ULong get_participant_flags(const DCPS::GUID_t &guid) const
Definition: Spdp.cpp:3693
void match_endpoints(GUID_t repoId, const DCPS::TopicDetails &td, bool remove=false)
Definition: Sedp.cpp:6673
PluginEndpointSecurityAttributesMask plugin_endpoint_security_attributes
void OpenDDS_Dcps_Export log_progress(const char *activity, const GUID_t &local, const GUID_t &remote, const MonotonicTime_t &start_time, const GUID_t &reference)
Definition: Logging.cpp:20
EndpointSecurityAttributesMask endpoint_security_attributes
AuthState lookup_participant_auth_state(const GUID_t &id) const
Definition: Spdp.cpp:3855
RcHandle< DataReaderCallbacks > DataReaderCallbacks_rch
DDS::DomainId_t get_domain_id() const
Definition: Spdp.h:169
#define OPENDDS_STRING
void stop_ice(const DCPS::GUID_t &guid, const DiscoveredPublication &dpub)
Definition: Sedp.cpp:5851
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
GUID_t make_topic_guid()
Definition: Sedp.h:1154
const ViewStateKind NOT_NEW_VIEW_STATE
bool is_security_enabled()
Definition: Sedp.h:1176
DDS::Security::AccessControl_var get_access_control() const
Definition: Sedp.h:1196
const ViewStateKind NEW_VIEW_STATE
DDS::Security::PermissionsHandle lookup_participant_permissions(const DCPS::GUID_t &id) const
Definition: Spdp.cpp:3843
GUID_t participant_id_
Definition: Sedp.h:1229
DCPS::MonotonicTime_t get_participant_discovered_at() const
Definition: Spdp.cpp:4461
bool shutting_down()
Definition: Spdp.h:118
void purge_dead_topic(const String &topic_name)
Definition: Sedp.h:307
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export GUID_t make_part_guid(const GuidPrefix_t &prefix)
Definition: GuidUtils.h:216
void assign_bit_key(DiscoveredPublication &pub)
Definition: Sedp.cpp:954
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
void remove_from_bit(const DiscoveredPublication &pub)
Definition: Sedp.h:1144
DiscoveredPublicationMap discovered_publications_
Definition: Sedp.h:1234
DCPS::RcHandle< DCPS::BitSubscriber > bit_subscriber_
Definition: Spdp.h:379
TopicNameMap topic_names_
Definition: Sedp.h:1237
DiscoveredPublicationMap::iterator DiscoveredPublicationIter
Definition: Sedp.h:276
void start_ice(const DCPS::GUID_t &guid, const LocalPublication &lpub)
Definition: Sedp.cpp:5740

◆ purge_dead_topic()

void OpenDDS::RTPS::Sedp::purge_dead_topic ( const String &  topic_name)
inlineprivate

Definition at line 307 of file Sedp.h.

References cleanup_secure_reader(), cleanup_secure_writer(), OPENDDS_MAP_CMP(), topic_names_, and topics_.

Referenced by ignore(), process_discovered_reader_data(), process_discovered_writer_data(), remove_entities_belonging_to(), and remove_topic().

308  {
309  DCPS::TopicDetailsMap::iterator top_it = topics_.find(topic_name);
310  topic_names_.erase(top_it->second.topic_id());
311  topics_.erase(top_it);
312  }
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
TopicNameMap topic_names_
Definition: Sedp.h:1237

◆ reactor_task()

DCPS::ReactorTask_rch OpenDDS::RTPS::Sedp::reactor_task ( ) const
inline

Definition at line 197 of file Sedp.h.

References reactor_task_.

197 { return reactor_task_; }
DCPS::ReactorTask_rch reactor_task_
Definition: Sedp.h:772

◆ ready()

bool OpenDDS::RTPS::Sedp::ready ( const DiscoveredParticipant participant,
const GUID_t local_id,
const GUID_t remote_id,
bool  local_tokens_sent 
) const

Definition at line 1022 of file Sedp.cpp.

References local_has_remote_endpoint_token_i(), local_has_remote_participant_token_i(), remote_has_local_endpoint_token_i(), remote_has_local_participant_token_i(), remote_is_authenticated_i(), and remote_knows_about_local_i().

Referenced by process_association_records_i().

1026 {
1027 #ifndef OPENDDS_SECURITY
1028  ACE_UNUSED_ARG(participant);
1029  ACE_UNUSED_ARG(local_tokens_sent);
1030 #endif
1031 
1032  return remote_knows_about_local_i(local_id, remote_id)
1033 #ifdef OPENDDS_SECURITY
1034  && remote_is_authenticated_i(local_id, remote_id, participant)
1035  && local_has_remote_participant_token_i(local_id, remote_id)
1036  && remote_has_local_participant_token_i(local_id, remote_id, participant)
1037  && local_has_remote_endpoint_token_i(local_id, remote_id)
1038  && remote_has_local_endpoint_token_i(local_id, local_tokens_sent, remote_id)
1039 #endif
1040  ;
1041 }
bool remote_has_local_endpoint_token_i(const GUID_t &local, bool local_tokens_sent, const GUID_t &remote) const
Definition: Sedp.cpp:6581
bool remote_is_authenticated_i(const GUID_t &local, const GUID_t &remote, const DiscoveredParticipant &participant) const
Definition: Sedp.cpp:6455
bool remote_has_local_participant_token_i(const GUID_t &local, const GUID_t &remote, const DiscoveredParticipant &participant) const
Definition: Sedp.cpp:6508
bool remote_knows_about_local_i(const GUID_t &local, const GUID_t &remote) const
Definition: Sedp.cpp:6408
bool local_has_remote_endpoint_token_i(const GUID_t &local, const GUID_t &remote) const
Definition: Sedp.cpp:6536
bool local_has_remote_participant_token_i(const GUID_t &local, const GUID_t &remote) const
Definition: Sedp.cpp:6481

◆ received_participant_message_data_secure()

void OpenDDS::RTPS::Sedp::received_participant_message_data_secure ( DCPS::MessageId  message_id,
const ParticipantMessageData data 
)
private

Definition at line 2729 of file Sedp.cpp.

References ACE_GUARD, OpenDDS::RTPS::Spdp::has_discovered_participant(), ignoring(), lock_, OpenDDS::DCPS::make_part_guid(), notify_liveliness(), OpenDDS::RTPS::ParticipantMessageData::participantGuid, OpenDDS::RTPS::Spdp::shutting_down(), and spdp_.

Referenced by OpenDDS::RTPS::Sedp::LivelinessReader::data_received_i().

2731 {
2732  if (spdp_.shutting_down()) {
2733  return;
2734  }
2735 
2736  const GUID_t& guid = data.participantGuid;
2737  const GUID_t guid_participant = make_part_guid(guid);
2738 
2740 
2741  if (ignoring(guid) || ignoring(guid_participant)) {
2742  return;
2743  }
2744 
2745  if (!spdp_.has_discovered_participant(guid_participant)) {
2746  return;
2747  }
2748 
2749  notify_liveliness(data);
2750 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
bool shutting_down()
Definition: Spdp.h:118
OpenDDS_Dcps_Export GUID_t make_part_guid(const GuidPrefix_t &prefix)
Definition: GuidUtils.h:216
void notify_liveliness(const ParticipantMessageData &pmd)
Definition: Sedp.cpp:2671
bool ignoring(const GUID_t &guid) const
Definition: Sedp.h:205
bool has_discovered_participant(const DCPS::GUID_t &guid) const
Definition: Spdp.cpp:3688

◆ received_stateless_message()

void OpenDDS::RTPS::Sedp::received_stateless_message ( DCPS::MessageId  message_id,
const DDS::Security::ParticipantStatelessMessage data 
)
private

Definition at line 2846 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), DDS::Security::GMCLASSID_SECURITY_AUTH_HANDSHAKE, DDS::Security::GMCLASSID_SECURITY_AUTH_REQUEST, OpenDDS::RTPS::Spdp::handle_auth_request(), OpenDDS::RTPS::Spdp::handle_handshake_message(), LM_DEBUG, DDS::Security::ParticipantGenericMessage::message_class_id, OpenDDS::DCPS::security_debug, should_drop_stateless_message(), OpenDDS::RTPS::Spdp::shutting_down(), and spdp_.

Referenced by OpenDDS::RTPS::Sedp::SecurityReader::data_received_i().

2848 {
2849  if (spdp_.shutting_down()) {
2850  return;
2851  }
2852 
2853  if (should_drop_stateless_message(msg)) {
2854  if (DCPS::security_debug.auth_debug) {
2855  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {auth_debug} DEBUG: Sedp::received_stateless_message() - ")
2856  ACE_TEXT("dropping\n")));
2857  }
2858  return;
2859  }
2860 
2861  if (0 == std::strcmp(msg.message_class_id,
2864  } else if (0 == std::strcmp(msg.message_class_id,
2867  } else {
2868  if (DCPS::security_debug.auth_debug) {
2869  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {auth_debug} DEBUG: Sedp::received_stateless_message() - ")
2870  ACE_TEXT("Unknown message class id\n")));
2871  }
2872  }
2873 }
#define ACE_DEBUG(X)
void handle_auth_request(const DDS::Security::ParticipantStatelessMessage &msg)
Definition: Spdp.cpp:1142
bool should_drop_stateless_message(const DDS::Security::ParticipantGenericMessage &msg)
Definition: Sedp.cpp:2752
bool shutting_down()
Definition: Spdp.h:118
ACE_TEXT("TCP_Factory")
const string GMCLASSID_SECURITY_AUTH_HANDSHAKE
void handle_handshake_message(const DDS::Security::ParticipantStatelessMessage &msg)
Definition: Spdp.cpp:1452
const string GMCLASSID_SECURITY_AUTH_REQUEST
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ received_volatile_message_secure()

void OpenDDS::RTPS::Sedp::received_volatile_message_secure ( DCPS::MessageId  message_id,
const DDS::Security::ParticipantVolatileMessageSecure data 
)
private

Definition at line 2876 of file Sedp.cpp.

References ACE_DEBUG, DDS::Security::GMCLASSID_SECURITY_DATAREADER_CRYPTO_TOKENS, DDS::Security::GMCLASSID_SECURITY_DATAWRITER_CRYPTO_TOKENS, DDS::Security::GMCLASSID_SECURITY_PARTICIPANT_CRYPTO_TOKENS, handle_datareader_crypto_tokens(), handle_datawriter_crypto_tokens(), OpenDDS::RTPS::Spdp::handle_participant_crypto_tokens(), LM_DEBUG, DDS::Security::ParticipantGenericMessage::message_class_id, should_drop_volatile_message(), OpenDDS::RTPS::Spdp::shutting_down(), and spdp_.

Referenced by OpenDDS::RTPS::Sedp::SecurityReader::data_received_i().

2878 {
2879  if (spdp_.shutting_down()) {
2880  return;
2881  }
2882 
2883  if (should_drop_volatile_message(msg)) {
2884  return;
2885  }
2886 
2887  if (0 == std::strcmp(msg.message_class_id,
2890  ACE_DEBUG((LM_DEBUG, "Sedp::received_volatile_message_secure handle_participant_crypto_tokens failed\n"));
2891  return;
2892  }
2893  } else if (0 == std::strcmp(msg.message_class_id,
2895  if (!handle_datawriter_crypto_tokens(msg)) {
2896  ACE_DEBUG((LM_DEBUG, "Sedp::received_volatile_message_secure handle_datawriter_crypto_tokens failed\n"));
2897  return;
2898  }
2899  } else if (0 == std::strcmp(msg.message_class_id,
2901  if (!handle_datareader_crypto_tokens(msg)) {
2902  ACE_DEBUG((LM_DEBUG, "Sedp::received_volatile_message_secure handle_datareader_crypto_tokens failed\n"));
2903  return;
2904  }
2905  } else {
2906  return;
2907  }
2908 }
#define ACE_DEBUG(X)
const string GMCLASSID_SECURITY_DATAREADER_CRYPTO_TOKENS
bool handle_datareader_crypto_tokens(const DDS::Security::ParticipantVolatileMessageSecure &msg)
Definition: Sedp.cpp:5476
bool handle_participant_crypto_tokens(const DDS::Security::ParticipantVolatileMessageSecure &msg)
Definition: Spdp.cpp:1885
bool shutting_down()
Definition: Spdp.h:118
bool should_drop_volatile_message(const DDS::Security::ParticipantGenericMessage &msg)
Definition: Sedp.cpp:2779
const string GMCLASSID_SECURITY_DATAWRITER_CRYPTO_TOKENS
bool handle_datawriter_crypto_tokens(const DDS::Security::ParticipantVolatileMessageSecure &msg)
Definition: Sedp.cpp:5413
const string GMCLASSID_SECURITY_PARTICIPANT_CRYPTO_TOKENS

◆ remote_has_local_endpoint_token_i()

bool OpenDDS::RTPS::Sedp::remote_has_local_endpoint_token_i ( const GUID_t local,
bool  local_tokens_sent,
const GUID_t remote 
) const
private

Definition at line 6581 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::RTPS::Spdp::crypto_handle_, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER, OpenDDS::Security::SecurityConfig::get_crypto_key_exchange(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_local_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::get_local_datawriter_crypto_handle(), OpenDDS::Security::HandleRegistry::get_remote_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::get_remote_datawriter_crypto_handle(), DDS::HANDLE_NIL, LM_INFO, OpenDDS::DCPS::make_id(), participant_volatile_message_secure_writer_, OpenDDS::RTPS::Spdp::security_config_, and spdp_.

Referenced by ready().

6583 {
6584  if (DCPS_debug_level > 6) {
6585  ACE_DEBUG((LM_INFO,
6586  ACE_TEXT("(%P|%t) Sedp::remote_has_local_endpoint_token_i: local %C remote %C\n"),
6587  LogGuid(local).c_str(), LogGuid(remote).c_str()));
6588  }
6589 
6591  return true;
6592  }
6593 
6594  if (is_stateless_or_volatile(local)) {
6595  // Don't need the token so okay.
6596  return true;
6597  }
6598 
6599  Security::CryptoKeyExchange_var key_exchange = spdp_.security_config_->get_crypto_key_exchange();
6600  if (DCPS::GuidConverter(local).isWriter()) {
6601  const DDS::Security::DatawriterCryptoHandle local_crypto_handle =
6603  const DDS::Security::DatareaderCryptoHandle remote_crypto_handle =
6605  return !key_exchange->have_local_datawriter_crypto_tokens(local_crypto_handle, remote_crypto_handle) ||
6607  } else {
6608  const DDS::Security::DatareaderCryptoHandle local_crypto_handle =
6610  const DDS::Security::DatawriterCryptoHandle remote_crypto_handle =
6612  return !key_exchange->have_local_datareader_crypto_tokens(local_crypto_handle, remote_crypto_handle) ||
6614  }
6615 }
#define ACE_DEBUG(X)
const InstanceHandle_t HANDLE_NIL
DDS::Security::DatawriterCryptoHandle get_local_datawriter_crypto_handle(const DCPS::GUID_t &id) const
DDS::Security::DatareaderCryptoHandle get_local_datareader_crypto_handle(const DCPS::GUID_t &id) const
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
DDS::Security::ParticipantCryptoHandle crypto_handle_
Definition: Spdp.h:625
NativeCryptoHandle DatawriterCryptoHandle
CryptoKeyExchange_var get_crypto_key_exchange() const
NativeCryptoHandle DatareaderCryptoHandle
bool is_leading(const GUID_t &reader_id) const
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER
Definition: MessageTypes.h:86
DDS::Security::DatawriterCryptoHandle get_remote_datawriter_crypto_handle(const DCPS::GUID_t &id) const
DDS::Security::DatareaderCryptoHandle get_remote_datareader_crypto_handle(const DCPS::GUID_t &id) const
SecurityWriter_rch participant_volatile_message_secure_writer_
Definition: Sedp.h:1290
Security::SecurityConfig_rch security_config_
Definition: Spdp.h:618
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ remote_has_local_participant_token_i()

bool OpenDDS::RTPS::Sedp::remote_has_local_participant_token_i ( const GUID_t local,
const GUID_t remote,
const DiscoveredParticipant participant 
) const
private

Definition at line 6508 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::RTPS::Spdp::crypto_handle_, crypto_handle_, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::Security::SecurityConfig::get_crypto_key_exchange(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_remote_participant_crypto_handle(), DDS::HANDLE_NIL, LM_INFO, OpenDDS::DCPS::make_id(), OpenDDS::RTPS::DiscoveredParticipant::participant_tokens_sent_, participant_volatile_message_secure_writer_, OpenDDS::RTPS::Spdp::security_config_, and spdp_.

Referenced by ready().

6509 {
6510  if (DCPS_debug_level > 6) {
6511  ACE_DEBUG((LM_INFO,
6512  ACE_TEXT("(%P|%t) Sedp::remote_has_local_participant_token_i: local %C remote %C\n"),
6513  LogGuid(local).c_str(), LogGuid(remote).c_str()));
6514  }
6515 
6517  return true;
6518  }
6519 
6520  const GUID_t remote_part = make_id(remote, ENTITYID_PARTICIPANT);
6521 
6522  if (is_stateless_or_volatile(local)) {
6523  // Don't need the token so okay.
6524  return true;
6525  }
6526 
6527  Security::CryptoKeyExchange_var key_exchange = spdp_.security_config_->get_crypto_key_exchange();
6528  const DDS::Security::ParticipantCryptoHandle dp_crypto_handle =
6530 
6531  return !key_exchange->have_local_participant_crypto_tokens(crypto_handle_, dp_crypto_handle) ||
6532  (participant.participant_tokens_sent_ &&
6534 }
#define ACE_DEBUG(X)
const InstanceHandle_t HANDLE_NIL
DDS::Security::ParticipantCryptoHandle crypto_handle_
Definition: Sedp.h:1264
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
DDS::Security::ParticipantCryptoHandle crypto_handle_
Definition: Spdp.h:625
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
CryptoKeyExchange_var get_crypto_key_exchange() const
DDS::Security::ParticipantCryptoHandle get_remote_participant_crypto_handle(const DCPS::GUID_t &id) const
bool is_leading(const GUID_t &reader_id) const
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER
Definition: MessageTypes.h:86
SecurityWriter_rch participant_volatile_message_secure_writer_
Definition: Sedp.h:1290
Security::SecurityConfig_rch security_config_
Definition: Spdp.h:618
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ remote_is_authenticated_i()

bool OpenDDS::RTPS::Sedp::remote_is_authenticated_i ( const GUID_t local,
const GUID_t remote,
const DiscoveredParticipant participant 
) const
private

Definition at line 6455 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), DDS::Security::ParticipantSecurityAttributes::allow_unauthenticated_participants, OpenDDS::RTPS::DiscoveredParticipant::auth_state_, OpenDDS::RTPS::AUTH_STATE_AUTHENTICATED, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::RTPS::DiscoveredParticipant::has_security_data(), OpenDDS::RTPS::Spdp::is_security_enabled(), LM_INFO, participant_sec_attr_, and spdp_.

Referenced by ready().

6456 {
6457  if (DCPS_debug_level > 6) {
6458  ACE_DEBUG((LM_INFO,
6459  ACE_TEXT("(%P|%t) Sedp::remote_is_authenticated_i: local %C remote %C\n"),
6460  LogGuid(local).c_str(), LogGuid(remote).c_str()));
6461  }
6462 
6463  if (!spdp_.is_security_enabled()) {
6464  return true;
6465  }
6466 
6467  if (is_stateless(local)) {
6468  // Don't need authentication.
6469  return true;
6470  }
6471 
6472  if (!participant.has_security_data()) {
6474  } else {
6475  return participant.auth_state_ == AUTH_STATE_AUTHENTICATED;
6476  }
6477 }
#define ACE_DEBUG(X)
DDS::Security::ParticipantSecurityAttributes participant_sec_attr_
Definition: Sedp.h:1256
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
bool is_security_enabled() const
Definition: Spdp.h:159

◆ remote_knows_about_local_i()

bool OpenDDS::RTPS::Sedp::remote_knows_about_local_i ( const GUID_t local,
const GUID_t remote 
) const
private

Definition at line 6408 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER, OpenDDS::DCPS::GuidConverter::isBuiltinDomainEntity(), OpenDDS::DCPS::GuidConverter::isWriter(), LM_ERROR, LM_INFO, local_publications_, local_subscriptions_, OpenDDS::DCPS::make_id(), OPENDDS_ASSERT, publications_secure_writer_, publications_writer_, subscriptions_secure_writer_, and subscriptions_writer_.

Referenced by ready().

6409 {
6410  if (DCPS_debug_level > 6) {
6411  ACE_DEBUG((LM_INFO,
6412  ACE_TEXT("(%P|%t) Sedp::remote_knows_about_local_i: local %C remote %C\n"),
6413  LogGuid(local).c_str(), LogGuid(remote).c_str()));
6414  }
6415 
6416  const DCPS::GuidConverter gc(local);
6417  if (gc.isBuiltinDomainEntity()) {
6418  OPENDDS_ASSERT(DCPS::GuidConverter(remote).isBuiltinDomainEntity());
6419  // One improvement to returning true here would be waiting until
6420  // the remote actually sends confirmation that it knows about the
6421  // local. A directed SPDP message from the remote would work.
6422  return true;
6423  }
6424 
6425  if (gc.isWriter()) {
6426  LocalPublicationCIter pub = local_publications_.find(local);
6427  if (pub != local_publications_.end()) {
6428 #ifdef OPENDDS_SECURITY
6429  if (pub->second.security_attribs_.base.is_discovery_protected) {
6431  }
6432 #endif
6434  } else {
6435  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) Sedp::remote_knows_about_local_i - could not find local publication %C\n"), LogGuid(local).c_str()));
6436  return false;
6437  }
6438  } else {
6439  LocalSubscriptionCIter pub = local_subscriptions_.find(local);
6440  if (pub != local_subscriptions_.end()) {
6441 #ifdef OPENDDS_SECURITY
6442  if (pub->second.security_attribs_.base.is_discovery_protected) {
6444  }
6445 #endif
6447  } else {
6448  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) Sedp::remote_knows_about_local_i - could not find local subscription %C\n"), LogGuid(local).c_str()));
6449  return false;
6450  }
6451  }
6452 }
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
DiscoveryWriter_rch publications_secure_writer_
Definition: Sedp.h:1278
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER
Definition: GuidUtils.h:43
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER
Definition: MessageTypes.h:78
#define OPENDDS_ASSERT(C)
Definition: Definitions.h:72
LocalSubscriptionMap::const_iterator LocalSubscriptionCIter
Definition: Sedp.h:327
LocalPublicationMap::const_iterator LocalPublicationCIter
Definition: Sedp.h:322
DiscoveryWriter_rch subscriptions_writer_
Definition: Sedp.h:1280
bool is_leading(const GUID_t &reader_id) const
ACE_TEXT("TCP_Factory")
DiscoveryWriter_rch subscriptions_secure_writer_
Definition: Sedp.h:1282
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER
Definition: GuidUtils.h:41
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER
Definition: MessageTypes.h:80
DiscoveryWriter_rch publications_writer_
Definition: Sedp.h:1276

◆ remove_assoc()

void OpenDDS::RTPS::Sedp::remove_assoc ( const GUID_t remove_from,
const GUID_t removing 
)
protected

Definition at line 6790 of file Sedp.cpp.

References cleanup_reader_association(), cleanup_writer_association(), discovered_publications_, discovered_subscriptions_, local_publications_, local_subscriptions_, remove_assoc_i(), and write_subscription_data().

Referenced by assign_topic_key(), and match_endpoints().

6791 {
6792  if (DCPS::GuidConverter(remove_from).isReader()) {
6793  const LocalSubscriptionIter lsi = local_subscriptions_.find(remove_from);
6794  if (lsi != local_subscriptions_.end()) {
6795  lsi->second.matched_endpoints_.erase(removing);
6796  const DiscoveredPublicationIter dpi = discovered_publications_.find(removing);
6797  if (dpi != discovered_publications_.end()) {
6798  dpi->second.matched_endpoints_.erase(remove_from);
6799  }
6800  const size_t count = lsi->second.remote_expectant_opendds_associations_.erase(removing);
6801  cleanup_reader_association(lsi->second.subscription_, remove_from, removing);
6802  remove_assoc_i(remove_from, lsi->second, removing);
6803  // Update writer
6804  if (count) {
6805  write_subscription_data(remove_from, lsi->second);
6806  }
6807  }
6808 
6809  } else {
6810  const LocalPublicationIter lpi = local_publications_.find(remove_from);
6811  if (lpi != local_publications_.end()) {
6812  lpi->second.matched_endpoints_.erase(removing);
6813  const DiscoveredSubscriptionIter dsi = discovered_subscriptions_.find(removing);
6814  if (dsi != discovered_subscriptions_.end()) {
6815  dsi->second.matched_endpoints_.erase(remove_from);
6816  }
6817  lpi->second.remote_expectant_opendds_associations_.erase(removing);
6818  cleanup_writer_association(lpi->second.publication_, remove_from, removing);
6819  remove_assoc_i(remove_from, lpi->second, removing);
6820  }
6821  }
6822 }
DiscoveredSubscriptionMap discovered_subscriptions_
Definition: Sedp.h:1235
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
DiscoveredSubscriptionMap::iterator DiscoveredSubscriptionIter
Definition: Sedp.h:272
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
DDS::ReturnCode_t write_subscription_data(const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4982
void cleanup_reader_association(DCPS::DataReaderCallbacks_wrch callbacks, const GUID_t &reader, const GUID_t &writer)
Definition: Sedp.cpp:6759
void remove_assoc_i(const DCPS::GUID_t &local_guid, const LocalPublication &lpub, const DCPS::GUID_t &remote_guid)
Definition: Sedp.cpp:5635
DiscoveredPublicationMap discovered_publications_
Definition: Sedp.h:1234
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
DiscoveredPublicationMap::iterator DiscoveredPublicationIter
Definition: Sedp.h:276
void cleanup_writer_association(DCPS::DataWriterCallbacks_wrch callbacks, const GUID_t &writer, const GUID_t &reader)
Definition: Sedp.cpp:6728
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ remove_assoc_i() [1/2]

void OpenDDS::RTPS::Sedp::remove_assoc_i ( const DCPS::GUID_t local_guid,
const LocalPublication lpub,
const DCPS::GUID_t remote_guid 
)
protected

Definition at line 5635 of file Sedp.cpp.

References ice_agent_, OpenDDS::DCPS::WeakRcHandle< T >::lock(), and OpenDDS::RTPS::LocalPublication::publication_.

Referenced by match_continue(), remove_assoc(), and OpenDDS::RTPS::Sedp::SubscriptionAgentInfoListener::SubscriptionAgentInfoListener().

5636  {
5637 #ifdef OPENDDS_SECURITY
5638  DCPS::DataWriterCallbacks_rch pl = lpub.publication_.lock();
5639  if (pl) {
5640  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = pl->get_ice_endpoint();
5641  if (endpoint) {
5642  ice_agent_->stop_ice(endpoint, local_guid, remote_guid);
5643  }
5644  }
5645 #else
5646  ACE_UNUSED_ARG(local_guid);
5647  ACE_UNUSED_ARG(lpub);
5648  ACE_UNUSED_ARG(remote_guid);
5649 #endif
5650 }
RcHandle< DataWriterCallbacks > DataWriterCallbacks_rch
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321

◆ remove_assoc_i() [2/2]

void OpenDDS::RTPS::Sedp::remove_assoc_i ( const DCPS::GUID_t local_guid,
const LocalSubscription lsub,
const DCPS::GUID_t remote_guid 
)
protected

Definition at line 5672 of file Sedp.cpp.

References ice_agent_, OpenDDS::DCPS::WeakRcHandle< T >::lock(), and OpenDDS::RTPS::LocalSubscription::subscription_.

5673  {
5674 #ifdef OPENDDS_SECURITY
5675  DCPS::DataReaderCallbacks_rch sl = lsub.subscription_.lock();
5676  if (sl) {
5677  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = sl->get_ice_endpoint();
5678  if (endpoint) {
5679  ice_agent_->stop_ice(endpoint, local_guid, remote_guid);
5680  }
5681  }
5682 #else
5683  ACE_UNUSED_ARG(local_guid);
5684  ACE_UNUSED_ARG(lsub);
5685  ACE_UNUSED_ARG(remote_guid);
5686 #endif
5687 }
RcHandle< DataReaderCallbacks > DataReaderCallbacks_rch
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321

◆ remove_entities_belonging_to()

template<typename Map >
void OpenDDS::RTPS::Sedp::remove_entities_belonging_to ( Map &  m,
DCPS::GUID_t  participant,
bool  subscription,
OPENDDS_VECTOR(typename Map::mapped_type)&  to_remove_from_bit 
)
private

Definition at line 1795 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::ENTITYID_UNKNOWN, OpenDDS::DCPS::GUID_t::guidPrefix, LM_DEBUG, match_endpoints(), purge_dead_topic(), OpenDDS::RTPS::Spdp::shutting_down(), spdp_, and topics_.

Referenced by disassociate().

1797 {
1798  participant.entityId = ENTITYID_UNKNOWN;
1799  for (typename Map::iterator i = m.lower_bound(participant);
1800  i != m.end() && 0 == std::memcmp(i->first.guidPrefix,
1801  participant.guidPrefix,
1802  sizeof(GuidPrefix_t));) {
1803  String topic_name = i->second.get_topic_name();
1804  DCPS::TopicDetailsMap::iterator top_it = topics_.find(topic_name);
1805  if (top_it != topics_.end()) {
1806  if (subscription) {
1807  top_it->second.remove_discovered_subscription(i->first);
1808  } else {
1809  top_it->second.remove_discovered_publication(i->first);
1810  }
1811  if (DCPS::DCPS_debug_level > 3) {
1812  ACE_DEBUG((LM_DEBUG,
1813  ACE_TEXT("(%P|%t) Sedp::remove_entities_belonging_to - ")
1814  ACE_TEXT("calling match_endpoints remove\n")));
1815  }
1816  match_endpoints(i->first, top_it->second, true /*remove*/);
1817  if (spdp_.shutting_down()) { return; }
1818  if (top_it->second.is_dead()) {
1819  purge_dead_topic(topic_name);
1820  }
1821  }
1822  to_remove_from_bit.push_back(i->second);
1823  m.erase(i++);
1824  }
1825 }
#define ACE_DEBUG(X)
std::string String
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
void match_endpoints(GUID_t repoId, const DCPS::TopicDetails &td, bool remove=false)
Definition: Sedp.cpp:6673
bool shutting_down()
Definition: Spdp.h:118
void purge_dead_topic(const String &topic_name)
Definition: Sedp.h:307
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
octet GuidPrefix_t[12]
Definition: DdsDcpsGuid.idl:19
const EntityId_t ENTITYID_UNKNOWN
Definition: GuidUtils.h:36

◆ remove_expired_endpoints()

void OpenDDS::RTPS::Sedp::remove_expired_endpoints ( const MonotonicTimePoint &  )
protected

Definition at line 6978 of file Sedp.cpp.

References ACE_DEBUG, ACE_GUARD, OpenDDS::DCPS::LogGuid::c_str(), cleanup_type_lookup_data(), OpenDDS::DCPS::DCPS_debug_level, LM_DEBUG, OpenDDS::DCPS::TransportClient::lock_, matching_data_buffer_, max_type_lookup_service_reply_period_, orig_seq_numbers_, and DDS::RETCODE_TIMEOUT.

Referenced by type_lookup_init().

6979 {
6981  const MonotonicTimePoint now = MonotonicTimePoint::now();
6982 
6983  MatchingDataIter end_iter = matching_data_buffer_.end();
6984  for (MatchingDataIter iter = matching_data_buffer_.begin(); iter != end_iter; ) {
6985  // Do not try to simplify increment: "associative container erase idiom"
6986  if (now - iter->second.time_added_to_map >= max_type_lookup_service_reply_period_) {
6987  if (DCPS_debug_level >= 4) {
6988  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::remove_expired_endpoints: "
6989  "clean up pending pair local: %C remote: %C\n",
6990  LogGuid(iter->first.local).c_str(), LogGuid(iter->first.remote).c_str()));
6991  }
6992  if (iter->first.type_obj_req_cond) {
6993  iter->first.type_obj_req_cond->done(DDS::RETCODE_TIMEOUT);
6994  }
6995  matching_data_buffer_.erase(iter++);
6996  } else {
6997  ++iter;
6998  }
6999  }
7000 
7001  // Clean up internal data used by getTypeDependencies
7002  for (OrigSeqNumberMap::iterator it = orig_seq_numbers_.begin(); it != orig_seq_numbers_.end();) {
7003  if (now - it->second.time_started >= max_type_lookup_service_reply_period_) {
7004  if (DCPS_debug_level >= 4) {
7005  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::remove_expired_endpoints: "
7006  "clean up type lookup data for %C\n",
7007  LogGuid(it->second.participant).c_str()));
7008  }
7009  cleanup_type_lookup_data(it->second.participant, it->second.type_id, it->second.secure);
7010  orig_seq_numbers_.erase(it++);
7011  } else {
7012  ++it;
7013  }
7014  }
7015 }
TimeDuration max_type_lookup_service_reply_period_
Definition: Sedp.h:1244
#define ACE_DEBUG(X)
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
MatchingDataMap matching_data_buffer_
Definition: Sedp.h:1242
OrigSeqNumberMap orig_seq_numbers_
Definition: Sedp.h:1241
MatchingDataMap::iterator MatchingDataIter
Definition: Sedp.h:1119
const ReturnCode_t RETCODE_TIMEOUT
TimePoint_T< MonotonicClock > MonotonicTimePoint
Definition: TimeTypes.h:51
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
void cleanup_type_lookup_data(const DCPS::GUID_t &guid, const XTypes::TypeIdentifier &ti, bool secure)
Definition: Sedp.cpp:4050

◆ remove_from_bit() [1/2]

void OpenDDS::RTPS::Sedp::remove_from_bit ( const DiscoveredPublication pub)
inlineprotected

Definition at line 1144 of file Sedp.h.

References remove_from_bit_i().

Referenced by ignore(), process_discovered_reader_data(), and process_discovered_writer_data().

1145  {
1146  remove_from_bit_i(pub);
1147  }
void remove_from_bit_i(const DiscoveredPublication &pub)
Definition: Sedp.cpp:1828

◆ remove_from_bit() [2/2]

void OpenDDS::RTPS::Sedp::remove_from_bit ( const DiscoveredSubscription sub)
inlineprotected

Definition at line 1149 of file Sedp.h.

References remove_from_bit_i().

1150  {
1151  remove_from_bit_i(sub);
1152  }
void remove_from_bit_i(const DiscoveredPublication &pub)
Definition: Sedp.cpp:1828

◆ remove_from_bit_i() [1/2]

void OpenDDS::RTPS::Sedp::remove_from_bit_i ( const DiscoveredPublication pub)
private

Definition at line 1828 of file Sedp.cpp.

References OpenDDS::RTPS::DiscoveredPublication::bit_ih_, OpenDDS::RTPS::Spdp::bit_subscriber_, and spdp_.

Referenced by disassociate(), and remove_from_bit().

1829 {
1830  spdp_.bit_subscriber_->remove_publication(pub.bit_ih_);
1831 }
DCPS::RcHandle< DCPS::BitSubscriber > bit_subscriber_
Definition: Spdp.h:379

◆ remove_from_bit_i() [2/2]

void OpenDDS::RTPS::Sedp::remove_from_bit_i ( const DiscoveredSubscription sub)
private

Definition at line 1834 of file Sedp.cpp.

References OpenDDS::RTPS::DiscoveredSubscription::bit_ih_, OpenDDS::RTPS::Spdp::bit_subscriber_, and spdp_.

1835 {
1836  spdp_.bit_subscriber_->remove_subscription(sub.bit_ih_);
1837 }
DCPS::RcHandle< DCPS::BitSubscriber > bit_subscriber_
Definition: Spdp.h:379

◆ remove_publication()

void OpenDDS::RTPS::Sedp::remove_publication ( const GUID_t publicationId)

Definition at line 6218 of file Sedp.cpp.

References ACE_ERROR, ACE_GUARD, ACE_TEXT(), cleanup_secure_writer(), is_security_enabled(), LM_ERROR, local_publications_, OpenDDS::DCPS::TransportClient::lock_, match_endpoints(), remove_publication_i(), DDS::RETCODE_OK, topic_names_, and topics_.

Referenced by ignoring().

6219 {
6221  LocalPublicationIter iter = local_publications_.find(publicationId);
6222  if (iter != local_publications_.end()) {
6223  if (DDS::RETCODE_OK == remove_publication_i(publicationId, iter->second)) {
6224  String topic_name = topic_names_[iter->second.topic_id_];
6225 #ifdef OPENDDS_SECURITY
6226  if (is_security_enabled()) {
6227  cleanup_secure_writer(publicationId);
6228  }
6229 #endif
6230  local_publications_.erase(publicationId);
6231  DCPS::TopicDetailsMap::iterator top_it = topics_.find(topic_name);
6232  if (top_it != topics_.end()) {
6233  match_endpoints(publicationId, top_it->second, true /*remove*/);
6234  top_it->second.remove_local_publication(publicationId);
6235  // Local, no need to check for dead topic.
6236  }
6237  } else {
6238  ACE_ERROR((LM_ERROR,
6239  ACE_TEXT("(%P|%t) ERROR: Sedp::remove_publication: ")
6240  ACE_TEXT("Failed to publish dispose msg\n")));
6241  }
6242  }
6243 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_ERROR(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
std::string String
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
void match_endpoints(GUID_t repoId, const DCPS::TopicDetails &td, bool remove=false)
Definition: Sedp.cpp:6673
bool is_security_enabled()
Definition: Sedp.h:1176
virtual DDS::ReturnCode_t remove_publication_i(const DCPS::GUID_t &publicationId, LocalPublication &pub)
Definition: Sedp.cpp:1878
ACE_TEXT("TCP_Factory")
const ReturnCode_t RETCODE_OK
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
TopicNameMap topic_names_
Definition: Sedp.h:1237
void cleanup_secure_writer(const GUID_t &publicationId)
Definition: Sedp.cpp:6617
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ remove_publication_i()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::remove_publication_i ( const DCPS::GUID_t publicationId,
LocalPublication pub 
)
privatevirtual

Definition at line 1878 of file Sedp.cpp.

References DDS::Security::EndpointSecurityAttributes::base, ice_agent_, DDS::Security::TopicSecurityAttributes::is_discovery_protected, is_security_enabled(), OpenDDS::DCPS::WeakRcHandle< T >::lock(), OpenDDS::RTPS::LocalPublication::publication_, publications_secure_writer_, publications_writer_, and OpenDDS::RTPS::LocalEntity::security_attribs_.

Referenced by remove_publication().

1879 {
1880 #ifdef OPENDDS_SECURITY
1881  DCPS::DataWriterCallbacks_rch pl = pub.publication_.lock();
1882  if (pl) {
1883  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = pl->get_ice_endpoint();
1884  if (endpoint) {
1885  ice_agent_->remove_local_agent_info_listener(endpoint, publicationId);
1886  }
1887  }
1888 
1889  if (is_security_enabled() && pub.security_attribs_.base.is_discovery_protected) {
1891  } else {
1892  return publications_writer_->write_unregister_dispose(publicationId);
1893  }
1894 #else
1895  ACE_UNUSED_ARG(pub);
1896  return publications_writer_->write_unregister_dispose(publicationId);
1897 #endif
1898 }
DiscoveryWriter_rch publications_secure_writer_
Definition: Sedp.h:1278
bool is_security_enabled()
Definition: Sedp.h:1176
RcHandle< DataWriterCallbacks > DataWriterCallbacks_rch
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321
DDS::ReturnCode_t write_unregister_dispose(const DCPS::GUID_t &rid, CORBA::UShort pid=PID_ENDPOINT_GUID)
Definition: Sedp.cpp:3469
DiscoveryWriter_rch publications_writer_
Definition: Sedp.h:1276

◆ remove_remote_crypto_handle()

void OpenDDS::RTPS::Sedp::remove_remote_crypto_handle ( const DCPS::GUID_t participant,
const EntityId_t entity 
)

Definition at line 1421 of file Sedp.cpp.

References ACE_ERROR, ACE_TEXT(), DDS::Security::SecurityException::code, OpenDDS::Security::HandleRegistry::erase_remote_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::erase_remote_datawriter_crypto_handle(), OpenDDS::Security::SecurityConfig::get_crypto_key_factory(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_remote_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::get_remote_datawriter_crypto_handle(), OpenDDS::RTPS::Spdp::get_security_config(), DDS::HANDLE_NIL, OpenDDS::DCPS::GuidConverter::isReader(), OpenDDS::DCPS::GuidConverter::isWriter(), LM_ERROR, OpenDDS::DCPS::make_id(), DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, OpenDDS::DCPS::security_debug, and spdp_.

Referenced by cleanup_volatile_crypto(), and disassociate().

1422 {
1423  using namespace DDS::Security;
1424 
1425  const GUID_t remote = make_id(participant, entity);
1426  SecurityException se = {"", 0, 0};
1427  CryptoKeyFactory_var key_factory = spdp_.get_security_config()->get_crypto_key_factory();
1428 
1429  const DCPS::GuidConverter traits(remote);
1430  if (traits.isReader()) {
1433  if (drch == DDS::HANDLE_NIL) {
1434  return;
1435  }
1436  if (!key_factory->unregister_datareader(drch, se)) {
1437  if (DCPS::security_debug.cleanup_error) {
1438  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) {cleanup_error} Sedp::remove_remote_crypto_handle() - ")
1439  ACE_TEXT("Failure calling unregister_datareader() (ch %d). Security Exception[%d.%d]: %C\n"),
1440  drch, se.code, se.minor_code, se.message.in()));
1441  }
1442  }
1444  } else if (traits.isWriter()) {
1447  if (dwch == DDS::HANDLE_NIL) {
1448  return;
1449  }
1450  if (!key_factory->unregister_datawriter(dwch, se)) {
1451  if (DCPS::security_debug.cleanup_error) {
1452  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) {cleanup_error} Sedp::remove_remote_crypto_handle() - ")
1453  ACE_TEXT("Failure calling unregister_datawriter() (ch %d). Security Exception[%d.%d]: %C\n"),
1454  dwch, se.code, se.minor_code, se.message.in()));
1455  }
1456  }
1458  }
1459 }
#define ACE_ERROR(X)
const InstanceHandle_t HANDLE_NIL
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
NativeCryptoHandle DatawriterCryptoHandle
NativeCryptoHandle DatareaderCryptoHandle
ACE_TEXT("TCP_Factory")
void erase_remote_datawriter_crypto_handle(const DCPS::GUID_t &id)
DDS::Security::DatawriterCryptoHandle get_remote_datawriter_crypto_handle(const DCPS::GUID_t &id) const
DDS::Security::DatareaderCryptoHandle get_remote_datareader_crypto_handle(const DCPS::GUID_t &id) const
CryptoKeyFactory_var get_crypto_key_factory() const
Security::SecurityConfig_rch get_security_config() const
Definition: Spdp.h:128
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
void erase_remote_datareader_crypto_handle(const DCPS::GUID_t &id)
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ remove_subscription()

void OpenDDS::RTPS::Sedp::remove_subscription ( const GUID_t subscriptionId)

Definition at line 6364 of file Sedp.cpp.

References ACE_ERROR, ACE_GUARD, ACE_TEXT(), cleanup_secure_reader(), is_security_enabled(), LM_ERROR, local_subscriptions_, OpenDDS::DCPS::TransportClient::lock_, match_endpoints(), remove_subscription_i(), DDS::RETCODE_OK, topic_names_, and topics_.

Referenced by ignoring().

6365 {
6367  LocalSubscriptionIter iter = local_subscriptions_.find(subscriptionId);
6368  if (iter != local_subscriptions_.end()) {
6369  if (DDS::RETCODE_OK == remove_subscription_i(subscriptionId, iter->second)) {
6370  String topic_name = topic_names_[iter->second.topic_id_];
6371 #ifdef OPENDDS_SECURITY
6372  if (is_security_enabled()) {
6373  cleanup_secure_reader(subscriptionId);
6374  }
6375 #endif
6376  local_subscriptions_.erase(subscriptionId);
6377  DCPS::TopicDetailsMap::iterator top_it = topics_.find(topic_name);
6378  if (top_it != topics_.end()) {
6379  match_endpoints(subscriptionId, top_it->second, true /*remove*/);
6380  top_it->second.remove_local_subscription(subscriptionId);
6381  // Local, no need to check for dead topic.
6382  }
6383  } else {
6384  ACE_ERROR((LM_ERROR,
6385  ACE_TEXT("(%P|%t) ERROR: Sedp::remove_subscription - ")
6386  ACE_TEXT("Failed to publish dispose msg\n")));
6387  }
6388  }
6389 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_ERROR(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
std::string String
void cleanup_secure_reader(const GUID_t &subscriptionId)
Definition: Sedp.cpp:6644
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
void match_endpoints(GUID_t repoId, const DCPS::TopicDetails &td, bool remove=false)
Definition: Sedp.cpp:6673
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
bool is_security_enabled()
Definition: Sedp.h:1176
ACE_TEXT("TCP_Factory")
const ReturnCode_t RETCODE_OK
TopicNameMap topic_names_
Definition: Sedp.h:1237
virtual DDS::ReturnCode_t remove_subscription_i(const DCPS::GUID_t &subscriptionId, LocalSubscription &sub)
Definition: Sedp.cpp:1927

◆ remove_subscription_i()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::remove_subscription_i ( const DCPS::GUID_t subscriptionId,
LocalSubscription sub 
)
privatevirtual

Definition at line 1927 of file Sedp.cpp.

References DDS::Security::EndpointSecurityAttributes::base, ice_agent_, DDS::Security::TopicSecurityAttributes::is_discovery_protected, is_security_enabled(), OpenDDS::DCPS::WeakRcHandle< T >::lock(), OpenDDS::RTPS::LocalEntity::security_attribs_, OpenDDS::RTPS::LocalSubscription::subscription_, subscriptions_secure_writer_, and subscriptions_writer_.

Referenced by remove_subscription().

1929 {
1930 #ifdef OPENDDS_SECURITY
1931  DCPS::DataReaderCallbacks_rch sl = sub.subscription_.lock();
1932  if (sl) {
1933  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = sl->get_ice_endpoint();
1934  if (endpoint) {
1935  ice_agent_->remove_local_agent_info_listener(endpoint, subscriptionId);
1936  }
1937  }
1938 
1939  if (is_security_enabled() && sub.security_attribs_.base.is_discovery_protected) {
1941  } else {
1942  return subscriptions_writer_->write_unregister_dispose(subscriptionId);
1943  }
1944 #else
1945  ACE_UNUSED_ARG(sub);
1946  return subscriptions_writer_->write_unregister_dispose(subscriptionId);
1947 #endif
1948 }
RcHandle< DataReaderCallbacks > DataReaderCallbacks_rch
bool is_security_enabled()
Definition: Sedp.h:1176
DiscoveryWriter_rch subscriptions_writer_
Definition: Sedp.h:1280
DiscoveryWriter_rch subscriptions_secure_writer_
Definition: Sedp.h:1282
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321
DDS::ReturnCode_t write_unregister_dispose(const DCPS::GUID_t &rid, CORBA::UShort pid=PID_ENDPOINT_GUID)
Definition: Sedp.cpp:3469

◆ remove_topic()

DCPS::TopicStatus OpenDDS::RTPS::Sedp::remove_topic ( const GUID_t topicId)

Definition at line 6105 of file Sedp.cpp.

References ACE_GUARD_RETURN, OpenDDS::DCPS::INTERNAL_ERROR, OpenDDS::DCPS::TopicDetails::is_dead(), OpenDDS::DCPS::TransportClient::lock_, name, OpenDDS::DCPS::NOT_FOUND, purge_dead_topic(), OpenDDS::DCPS::REMOVED, topic_names_, topics_, and OpenDDS::DCPS::TopicDetails::unset_local().

Referenced by ignoring().

6106 {
6108  TopicNameMap::iterator name_iter = topic_names_.find(topicId);
6109  if (name_iter == topic_names_.end()) {
6110  return DCPS::NOT_FOUND;
6111  }
6112  const String& name = name_iter->second;
6113  DCPS::TopicDetails& td = topics_[name];
6114  td.unset_local();
6115  if (td.is_dead()) {
6116  purge_dead_topic(name);
6117  }
6118 
6119  return DCPS::REMOVED;
6120 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
std::string String
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
const char *const name
Definition: debug.cpp:60
void purge_dead_topic(const String &topic_name)
Definition: Sedp.h:307
TopicNameMap topic_names_
Definition: Sedp.h:1237

◆ replay_durable_data_for()

void OpenDDS::RTPS::Sedp::replay_durable_data_for ( const DCPS::GUID_t remote_sub_id)
protected

Definition at line 1634 of file Sedp.cpp.

References ACE_DEBUG, ACE_GUARD, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER, OpenDDS::RTPS::ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER, LM_DEBUG, lock_, OPENDDS_STRING, write_durable_dcps_participant_secure(), write_durable_participant_message_data(), write_durable_participant_message_data_secure(), write_durable_publication_data(), and write_durable_subscription_data().

Referenced by OpenDDS::RTPS::Sedp::Writer::remove_associations(), OpenDDS::RTPS::Sedp::Writer::replay_durable_data_for(), and OpenDDS::RTPS::Sedp::SubscriptionAgentInfoListener::SubscriptionAgentInfoListener().

1635 {
1636  DCPS::GuidConverter conv(remote_sub_id);
1637  ACE_DEBUG((LM_DEBUG, "Sedp::replay_durable_data_for %C\n", OPENDDS_STRING(conv).c_str()));
1639  if (remote_sub_id.entityId == ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER) {
1640  write_durable_publication_data(remote_sub_id, false);
1641  } else if (remote_sub_id.entityId == ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER) {
1642  write_durable_subscription_data(remote_sub_id, false);
1643  } else if (remote_sub_id.entityId == ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER) {
1645 #ifdef OPENDDS_SECURITY
1646  } else if (remote_sub_id.entityId == ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER) {
1647  write_durable_publication_data(remote_sub_id, true);
1648  } else if (remote_sub_id.entityId == ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER) {
1649  write_durable_subscription_data(remote_sub_id, true);
1650  } else if (remote_sub_id.entityId == ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER) {
1652  } else if (remote_sub_id.entityId == ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER) {
1654 #endif
1655  }
1656 }
#define ACE_DEBUG(X)
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER
Definition: GuidUtils.h:43
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER
Definition: MessageTypes.h:78
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER
Definition: GuidUtils.h:47
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER
Definition: MessageTypes.h:88
void write_durable_dcps_participant_secure(const DCPS::GUID_t &reader)
Definition: Sedp.cpp:4775
#define OPENDDS_STRING
void write_durable_publication_data(const DCPS::GUID_t &reader, bool secure)
Definition: Sedp.cpp:4641
void write_durable_participant_message_data_secure(const DCPS::GUID_t &reader)
Definition: Sedp.cpp:4736
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER
Definition: MessageTypes.h:82
void write_durable_participant_message_data(const DCPS::GUID_t &reader)
Definition: Sedp.cpp:4713
void write_durable_subscription_data(const DCPS::GUID_t &reader, bool secure)
Definition: Sedp.cpp:4677
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER
Definition: GuidUtils.h:41
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER
Definition: MessageTypes.h:80

◆ request_remote_complete_type_objects()

void OpenDDS::RTPS::Sedp::request_remote_complete_type_objects ( const GUID_t remote_entity,
const XTypes::TypeInformation remote_type_info,
DCPS::TypeObjReqCond cond 
)

Definition at line 6925 of file Sedp.cpp.

References ACE_ERROR, discovered_publications_, discovered_subscriptions_, OpenDDS::DCPS::TypeObjReqCond::done(), OpenDDS::DCPS::GuidConverter::isReader(), OpenDDS::DCPS::GuidConverter::isWriter(), LM_NOTICE, OpenDDS::DCPS::log_level, OpenDDS::DCPS::LogLevel::Notice, request_type_objects(), and DDS::RETCODE_BAD_PARAMETER.

Referenced by transport_inst().

6928 {
6929  bool discovered = false;
6930  bool discovery_protected = false;
6931  DCPS::GuidConverter gc(remote_entity);
6932  if (gc.isWriter()) {
6933  DiscoveredPublicationIter dpi = discovered_publications_.find(remote_entity);
6934  if (dpi != discovered_publications_.end()) {
6935  discovered = true;
6936 #ifdef OPENDDS_SECURITY
6937  discovery_protected = dpi->second.security_attribs_.base.is_discovery_protected;
6938 #endif
6939  }
6940  } else if (gc.isReader()) {
6941  DiscoveredSubscriptionIter dsi = discovered_subscriptions_.find(remote_entity);
6942  if (dsi != discovered_subscriptions_.end()) {
6943  discovered = true;
6944 #ifdef OPENDDS_SECURITY
6945  discovery_protected = dsi->second.security_attribs_.base.is_discovery_protected;
6946 #endif
6947  }
6948  }
6949 
6950  if (!discovered) {
6951  if (log_level >= LogLevel::Notice) {
6952  ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: Sedp::request_remote_complete_type_objects: ",
6953  "GUID passed, %C, is not a discovered reader or writer\n",
6954  String(gc).c_str()));
6955  }
6956  cond.done(DDS::RETCODE_BAD_PARAMETER);
6957  return;
6958  }
6959 
6960  request_type_objects(&remote_type_info, MatchingPair(remote_entity, gc.isReader(), &cond),
6961  discovery_protected, false, true);
6962 }
#define ACE_ERROR(X)
std::string String
DiscoveredSubscriptionMap discovered_subscriptions_
Definition: Sedp.h:1235
DiscoveredSubscriptionMap::iterator DiscoveredSubscriptionIter
Definition: Sedp.h:272
OpenDDS_Dcps_Export LogLevel log_level
void request_type_objects(const XTypes::TypeInformation *type_info, const MatchingPair &mp, bool is_discovery_protected, bool get_minimal, bool get_complete)
Definition: Sedp.cpp:7484
DiscoveredPublicationMap discovered_publications_
Definition: Sedp.h:1234
DiscoveredPublicationMap::iterator DiscoveredPublicationIter
Definition: Sedp.h:276
const ReturnCode_t RETCODE_BAD_PARAMETER

◆ request_type_objects()

void OpenDDS::RTPS::Sedp::request_type_objects ( const XTypes::TypeInformation type_info,
const MatchingPair mp,
bool  is_discovery_protected,
bool  get_minimal,
bool  get_complete 
)
protected

Definition at line 7484 of file Sedp.cpp.

References ACE_DEBUG, OpenDDS::DCPS::LogGuid::c_str(), OpenDDS::XTypes::TypeInformation::complete, OpenDDS::DCPS::DCPS_debug_level, get_remote_type_objects(), OpenDDS::DCPS::SequenceNumber::getValue(), OpenDDS::RTPS::Sedp::MatchingData::got_complete, OpenDDS::RTPS::Sedp::MatchingData::got_minimal, LM_DEBUG, matching_data_buffer_, OpenDDS::XTypes::TypeInformation::minimal, OPENDDS_ASSERT, OpenDDS::DCPS::GuidPair::remote, OpenDDS::RTPS::Sedp::MatchingData::rpc_seqnum_complete, OpenDDS::RTPS::Sedp::MatchingData::rpc_seqnum_minimal, OpenDDS::DCPS::SequenceNumber::SEQUENCENUMBER_UNKNOWN(), OpenDDS::RTPS::Sedp::MatchingData::time_added_to_map, and type_lookup_service_sequence_number_.

Referenced by match(), and request_remote_complete_type_objects().

7487 {
7488  OPENDDS_ASSERT(get_minimal || get_complete);
7489  MatchingData md;
7490  md.time_added_to_map = MonotonicTimePoint::now();
7491 
7492  if (get_minimal) {
7493  md.rpc_seqnum_minimal = ++type_lookup_service_sequence_number_;
7494  md.got_minimal = false;
7495  } else {
7496  md.rpc_seqnum_minimal = SequenceNumber::SEQUENCENUMBER_UNKNOWN();
7497  md.got_minimal = true;
7498  }
7499 
7500  if (get_complete) {
7501  md.rpc_seqnum_complete = ++type_lookup_service_sequence_number_;
7502  md.got_complete = false;
7503  } else {
7504  md.rpc_seqnum_complete = SequenceNumber::SEQUENCENUMBER_UNKNOWN();
7505  md.got_complete = true;
7506  }
7507 
7508  matching_data_buffer_[mp] = md;
7509 
7510  // Send a sequence of requests for minimal remote TypeObjects
7511  if (get_minimal) {
7512  if (DCPS_debug_level >= 4) {
7513  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::request_type_objects: minimal remote: %C seq: %q\n",
7514  LogGuid(mp.remote).c_str(), md.rpc_seqnum_minimal.getValue()));
7515  }
7516  get_remote_type_objects(type_info->minimal, md, true, mp.remote, is_discovery_protected);
7517  }
7518 
7519  // Send another sequence of requests for complete remote TypeObjects
7520  if (get_complete) {
7521  if (DCPS_debug_level >= 4) {
7522  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::request_type_objects: complete remote: %C seq: %q\n",
7523  LogGuid(mp.remote).c_str(), md.rpc_seqnum_complete.getValue()));
7524  }
7525  get_remote_type_objects(type_info->complete, md, false, mp.remote, is_discovery_protected);
7526  }
7527 }
#define ACE_DEBUG(X)
MatchingDataMap matching_data_buffer_
Definition: Sedp.h:1242
#define OPENDDS_ASSERT(C)
Definition: Definitions.h:72
DCPS::SequenceNumber type_lookup_service_sequence_number_
Definition: Sedp.h:1245
void get_remote_type_objects(const XTypes::TypeIdentifierWithDependencies &tid_with_deps, MatchingData &md, bool get_minimal, const GUID_t &remote_id, bool is_discovery_protected)
Definition: Sedp.cpp:7529
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
static SequenceNumber SEQUENCENUMBER_UNKNOWN()

◆ resend_user_crypto_tokens()

void OpenDDS::RTPS::Sedp::resend_user_crypto_tokens ( const DCPS::GUID_t remote_participant)

Definition at line 5542 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), create_and_send_datareader_crypto_tokens(), create_and_send_datawriter_crypto_tokens(), OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::DCPS::equal_guid_prefixes(), get_handle_registry(), OpenDDS::Security::HandleRegistry::get_local_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::get_local_datawriter_crypto_handle(), OpenDDS::Security::HandleRegistry::get_remote_datareader_crypto_handle(), OpenDDS::Security::HandleRegistry::get_remote_datawriter_crypto_handle(), DDS::HANDLE_NIL, OpenDDS::DCPS::GuidConverter::isUserDomainEntity(), LM_DEBUG, local_publications_, local_subscriptions_, OpenDDS::DCPS::make_id(), and OpenDDS::DCPS::security_debug.

Referenced by association_complete_i().

5543 {
5544  const GUID_t remote_participant = make_id(id, ENTITYID_PARTICIPANT);
5545 
5546  if (DCPS::security_debug.bookkeeping) {
5547  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
5548  ACE_TEXT("Sedp::resend_user_crypto_tokens(%C)\n"),
5549  DCPS::LogGuid(remote_participant).c_str()));
5550  }
5551 
5552  /*
5553  * For each user DataReader that has a crypto handle, send tokens to matched
5554  * DataWriters that have a crypto handle.
5555  */
5556 
5557  for (LocalSubscriptionCIter reader_pos = local_subscriptions_.begin(),
5558  reader_limit = local_subscriptions_.end();
5559  reader_pos != reader_limit; ++reader_pos) {
5560  if (!DCPS::GuidConverter(reader_pos->first).isUserDomainEntity()) {
5561  continue;
5562  }
5565  if (drch == DDS::HANDLE_NIL) {
5566  continue;
5567  }
5568  for (DCPS::RepoIdSet::const_iterator writer_pos = reader_pos->second.matched_endpoints_.begin(),
5569  writer_limit = reader_pos->second.matched_endpoints_.end();
5570  writer_pos != writer_limit; ++writer_pos) {
5571  if (!DCPS::equal_guid_prefixes(*writer_pos, remote_participant)) {
5572  continue;
5573  }
5576  if (dwch == DDS::HANDLE_NIL) {
5577  continue;
5578  }
5579  create_and_send_datareader_crypto_tokens(drch, reader_pos->first, dwch, *writer_pos);
5580  }
5581  }
5582 
5583  /*
5584  * For each user DataWriter that has a crypto handle, send tokens to matched
5585  * DataReaders that have a crypto handle.
5586  */
5587  for (LocalPublicationCIter writer_pos = local_publications_.begin(),
5588  writer_limit = local_publications_.end();
5589  writer_pos != writer_limit; ++writer_pos) {
5590  if (!DCPS::GuidConverter(writer_pos->first).isUserDomainEntity()) {
5591  continue;
5592  }
5595  if (dwch == DDS::HANDLE_NIL) {
5596  continue;
5597  }
5598  for (DCPS::RepoIdSet::const_iterator reader_pos = writer_pos->second.matched_endpoints_.begin(),
5599  reader_limit = writer_pos->second.matched_endpoints_.end();
5600  reader_pos != reader_limit; ++reader_pos) {
5601  if (!DCPS::equal_guid_prefixes(*reader_pos, remote_participant)) {
5602  continue;
5603  }
5606  if (drch == DDS::HANDLE_NIL) {
5607  continue;
5608  }
5609  create_and_send_datawriter_crypto_tokens(dwch, writer_pos->first, drch, *reader_pos);
5610  }
5611  }
5612 }
#define ACE_DEBUG(X)
const InstanceHandle_t HANDLE_NIL
DDS::Security::DatawriterCryptoHandle get_local_datawriter_crypto_handle(const DCPS::GUID_t &id) const
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
DDS::Security::DatareaderCryptoHandle get_local_datareader_crypto_handle(const DCPS::GUID_t &id) const
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
LocalSubscriptionMap::const_iterator LocalSubscriptionCIter
Definition: Sedp.h:327
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
NativeCryptoHandle DatawriterCryptoHandle
NativeCryptoHandle DatareaderCryptoHandle
LocalPublicationMap::const_iterator LocalPublicationCIter
Definition: Sedp.h:322
void create_and_send_datareader_crypto_tokens(const DDS::Security::DatareaderCryptoHandle &drch, const DCPS::GUID_t &local_reader, const DDS::Security::DatawriterCryptoHandle &dwch, const DCPS::GUID_t &remote_writer)
Definition: Sedp.cpp:1462
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export bool equal_guid_prefixes(const GuidPrefix_t &lhs, const GuidPrefix_t &rhs)
Definition: GuidUtils.h:132
DDS::Security::DatawriterCryptoHandle get_remote_datawriter_crypto_handle(const DCPS::GUID_t &id) const
DDS::Security::DatareaderCryptoHandle get_remote_datareader_crypto_handle(const DCPS::GUID_t &id) const
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
void create_and_send_datawriter_crypto_tokens(const DDS::Security::DatawriterCryptoHandle &dwch, const DCPS::GUID_t &local_writer, const DDS::Security::DatareaderCryptoHandle &drch, const DCPS::GUID_t &remote_reader)
Definition: Sedp.cpp:1481
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ rtps_relay_address()

void OpenDDS::RTPS::Sedp::rtps_relay_address ( const ACE_INET_Addr address)

Definition at line 5958 of file Sedp.cpp.

References ACE_GUARD, OpenDDS::DCPS::static_rchandle_cast(), and transport_inst_.

5959 {
5960  DCPS::RtpsUdpInst_rch rtps_inst = DCPS::static_rchandle_cast<DCPS::RtpsUdpInst>(transport_inst_);
5961  {
5962  ACE_GUARD(ACE_Thread_Mutex, g, rtps_inst->config_lock_);
5963  rtps_inst->rtps_relay_address_ = address;
5964  }
5965  rtps_inst->rtps_relay_address_change();
5966 }
RcHandle< RtpsUdpInst > RtpsUdpInst_rch
#define ACE_GUARD(MUTEX, OBJ, LOCK)
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
RcHandle< T > static_rchandle_cast(const RcHandle< U > &h)
Definition: RcHandle_T.h:202

◆ rtps_relay_only_now()

void OpenDDS::RTPS::Sedp::rtps_relay_only_now ( bool  f)

Definition at line 5905 of file Sedp.cpp.

References OpenDDS::DCPS::TransportInst::rtps_relay_only_now(), and transport_inst_.

5906 {
5908 }
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
void rtps_relay_only_now(bool flag)

◆ send_builtin_crypto_tokens() [1/2]

void OpenDDS::RTPS::Sedp::send_builtin_crypto_tokens ( const DCPS::GUID_t remoteId)

Definition at line 1512 of file Sedp.cpp.

References ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::ENTITYID_PARTICIPANT, LM_ERROR, OpenDDS::RTPS::BuiltinAssociationRecord::local_id(), OpenDDS::RTPS::BuiltinAssociationRecord::local_tokens_sent(), OpenDDS::DCPS::make_id(), OpenDDS::RTPS::Spdp::participants_, OpenDDS::RTPS::BuiltinAssociationRecord::remote_id(), OpenDDS::DCPS::security_debug, OpenDDS::RTPS::BuiltinAssociationRecord::send_local_token(), and spdp_.

Referenced by association_complete_i().

1513 {
1514  const GUID_t remote_part = make_id(remoteId, ENTITYID_PARTICIPANT);
1515  Spdp::DiscoveredParticipantIter iter = spdp_.participants_.find(remote_part);
1516  if (iter == spdp_.participants_.end()) {
1517  if (DCPS::security_debug.bookkeeping) {
1518  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) {bookkeeping} Sedp::send_builtin_crypto_tokens - could not find participant %C\n"), LogGuid(remote_part).c_str()));
1519  }
1520  return;
1521  }
1522 
1523  for (DiscoveredParticipant::BuiltinAssociationRecords::iterator pos = iter->second.builtin_pending_records_.begin(),
1524  limit = iter->second.builtin_pending_records_.end(); pos != limit; ++pos) {
1525  BuiltinAssociationRecord& record = *pos;
1526  if (record.send_local_token()) {
1527  send_builtin_crypto_tokens(record.remote_id(), record.local_id());
1528  record.local_tokens_sent(true);
1529  }
1530  }
1531 
1532  for (DiscoveredParticipant::BuiltinAssociationRecords::iterator pos = iter->second.builtin_associated_records_.begin(),
1533  limit = iter->second.builtin_associated_records_.end(); pos != limit; ++pos) {
1534  BuiltinAssociationRecord& record = *pos;
1535  if (record.send_local_token()) {
1536  send_builtin_crypto_tokens(record.remote_id(), record.local_id());
1537  record.local_tokens_sent(true);
1538  }
1539  }
1540 }
#define ACE_ERROR(X)
DiscoveredParticipantMap::iterator DiscoveredParticipantIter
Definition: Spdp.h:70
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
ACE_TEXT("TCP_Factory")
void send_builtin_crypto_tokens(const DCPS::GUID_t &remoteId)
Definition: Sedp.cpp:1512
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
DiscoveredParticipantMap participants_
Definition: Spdp.h:382
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ send_builtin_crypto_tokens() [2/2]

void OpenDDS::RTPS::Sedp::send_builtin_crypto_tokens ( const DCPS::GUID_t dst,
const DCPS::GUID_t src 
)

Create and send keys for individual endpoints.

Definition at line 1500 of file Sedp.cpp.

References create_and_send_datareader_crypto_tokens(), create_and_send_datawriter_crypto_tokens(), and get_handle_registry().

1501 {
1502  if (DCPS::GuidConverter(src).isReader()) {
1503  create_and_send_datareader_crypto_tokens(get_handle_registry()->get_local_datareader_crypto_handle(src), src,
1504  get_handle_registry()->get_remote_datawriter_crypto_handle(dst), dst);
1505  } else {
1506  create_and_send_datawriter_crypto_tokens(get_handle_registry()->get_local_datawriter_crypto_handle(src), src,
1507  get_handle_registry()->get_remote_datareader_crypto_handle(dst), dst);
1508  }
1509 }
Security::HandleRegistry_rch get_handle_registry() const
Definition: Sedp.h:257
void create_and_send_datareader_crypto_tokens(const DDS::Security::DatareaderCryptoHandle &drch, const DCPS::GUID_t &local_reader, const DDS::Security::DatawriterCryptoHandle &dwch, const DCPS::GUID_t &remote_writer)
Definition: Sedp.cpp:1462
void create_and_send_datawriter_crypto_tokens(const DDS::Security::DatawriterCryptoHandle &dwch, const DCPS::GUID_t &local_writer, const DDS::Security::DatareaderCryptoHandle &drch, const DCPS::GUID_t &remote_reader)
Definition: Sedp.cpp:1481

◆ send_datareader_crypto_tokens()

void OpenDDS::RTPS::Sedp::send_datareader_crypto_tokens ( const DCPS::GUID_t local_reader,
const DCPS::GUID_t remote_writer,
const DDS::Security::DatareaderCryptoTokenSeq drcts 
)
protected

Definition at line 5341 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), DDS::Security::ParticipantGenericMessage::destination_endpoint_guid, DDS::Security::ParticipantGenericMessage::destination_participant_guid, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_PARTICIPANT, DDS::Security::GMCLASSID_SECURITY_DATAREADER_CRYPTO_TOKENS, LM_WARNING, OpenDDS::DCPS::make_id(), DDS::Security::ParticipantGenericMessage::message_class_id, DDS::Security::ParticipantGenericMessage::message_data, DDS::Security::ParticipantGenericMessage::message_identity, participant_id_, DDS::Security::ParticipantGenericMessage::related_message_identity, DDS::RETCODE_OK, DDS::Security::ParticipantGenericMessage::source_endpoint_guid, DDS::Security::MessageIdentity::source_guid, and write_volatile_message().

Referenced by create_and_send_datareader_crypto_tokens().

5344 {
5345  if (drcts.length() != 0) {
5346  const DCPS::GUID_t remote_part = make_id(remote_writer, ENTITYID_PARTICIPANT);
5347  const DCPS::GUID_t local_volatile_writer = make_id(
5349  const DCPS::GUID_t remote_volatile_reader = make_id(
5351 
5353  msg.message_identity.source_guid = local_volatile_writer;
5355  msg.destination_participant_guid = remote_part;
5356  msg.destination_endpoint_guid = remote_writer;
5357  msg.source_endpoint_guid = local_reader;
5358  msg.message_data = reinterpret_cast<const DDS::Security::DataHolderSeq&>(drcts);
5360 
5361  if (write_volatile_message(msg, remote_volatile_reader) != DDS::RETCODE_OK) {
5362  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::send_datareader_crypto_tokens() - ")
5363  ACE_TEXT("Unable to write volatile message.\n")));
5364  }
5365  }
5366 }
#define ACE_DEBUG(X)
const string GMCLASSID_SECURITY_DATAREADER_CRYPTO_TOKENS
DDS::ReturnCode_t write_volatile_message(DDS::Security::ParticipantVolatileMessageSecure &msg, const DCPS::GUID_t &reader)
Definition: Sedp.cpp:4766
OpenDDS::DCPS::GUID_t destination_participant_guid
sequence< DataHolder > DataHolderSeq
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
GUID_t participant_id_
Definition: Sedp.h:1229
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER
Definition: MessageTypes.h:85
ACE_TEXT("TCP_Factory")
OpenDDS::DCPS::GUID_t source_guid
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER
Definition: MessageTypes.h:86
const ReturnCode_t RETCODE_OK
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ send_datawriter_crypto_tokens()

void OpenDDS::RTPS::Sedp::send_datawriter_crypto_tokens ( const DCPS::GUID_t local_writer,
const DCPS::GUID_t remote_reader,
const DDS::Security::DatawriterCryptoTokenSeq dwcts 
)
protected

Definition at line 5385 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), DDS::Security::ParticipantGenericMessage::destination_endpoint_guid, DDS::Security::ParticipantGenericMessage::destination_participant_guid, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_PARTICIPANT, DDS::Security::GMCLASSID_SECURITY_DATAWRITER_CRYPTO_TOKENS, LM_WARNING, OpenDDS::DCPS::make_id(), DDS::Security::ParticipantGenericMessage::message_class_id, DDS::Security::ParticipantGenericMessage::message_data, DDS::Security::ParticipantGenericMessage::message_identity, participant_id_, DDS::Security::ParticipantGenericMessage::related_message_identity, DDS::RETCODE_OK, DDS::Security::ParticipantGenericMessage::source_endpoint_guid, DDS::Security::MessageIdentity::source_guid, and write_volatile_message().

Referenced by create_and_send_datawriter_crypto_tokens().

5388 {
5389  if (dwcts.length() != 0) {
5390  const DCPS::GUID_t remote_part = make_id(remote_reader, ENTITYID_PARTICIPANT);
5391  const DCPS::GUID_t local_volatile_writer = make_id(
5393  const DCPS::GUID_t remote_volatile_reader = make_id(
5395 
5397  msg.message_identity.source_guid = local_volatile_writer;
5399  msg.destination_participant_guid = remote_part;
5400  msg.destination_endpoint_guid = remote_reader;
5401  msg.source_endpoint_guid = local_writer;
5402  msg.message_data = reinterpret_cast<const DDS::Security::DataHolderSeq&>(dwcts);
5404 
5405  if (write_volatile_message(msg, remote_volatile_reader) != DDS::RETCODE_OK) {
5406  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::send_datawriter_crypto_tokens() - ")
5407  ACE_TEXT("Unable to write volatile message.\n")));
5408  }
5409  }
5410 }
#define ACE_DEBUG(X)
DDS::ReturnCode_t write_volatile_message(DDS::Security::ParticipantVolatileMessageSecure &msg, const DCPS::GUID_t &reader)
Definition: Sedp.cpp:4766
OpenDDS::DCPS::GUID_t destination_participant_guid
sequence< DataHolder > DataHolderSeq
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
GUID_t participant_id_
Definition: Sedp.h:1229
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER
Definition: MessageTypes.h:85
ACE_TEXT("TCP_Factory")
OpenDDS::DCPS::GUID_t source_guid
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER
Definition: MessageTypes.h:86
const ReturnCode_t RETCODE_OK
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
const string GMCLASSID_SECURITY_DATAWRITER_CRYPTO_TOKENS

◆ send_type_lookup_request()

bool OpenDDS::RTPS::Sedp::send_type_lookup_request ( const XTypes::TypeIdentifierSeq type_ids,
const DCPS::GUID_t reader,
bool  is_discovery_protected,
bool  send_get_types,
const SequenceNumber seq_num 
)

Definition at line 3064 of file Sedp.cpp.

References OpenDDS::DCPS::ENTITYID_TL_SVC_REQ_READER, OpenDDS::RTPS::ENTITYID_TL_SVC_REQ_READER_SECURE, is_security_enabled(), OpenDDS::DCPS::make_id(), type_lookup_request_secure_writer_, type_lookup_request_writer_, OpenDDS::XTypes::TypeLookup_getDependencies_HashId, and OpenDDS::XTypes::TypeLookup_getTypes_HashId.

Referenced by get_remote_type_objects(), OpenDDS::RTPS::Sedp::TypeLookupReplyReader::process_get_dependencies_reply(), and OpenDDS::RTPS::Sedp::TypeLookupRequestWriter::TypeLookupRequestWriter().

3069 {
3071  DCPS::GUID_t remote_reader = make_id(reader, ENTITYID_TL_SVC_REQ_READER);
3072 #ifdef OPENDDS_SECURITY
3073  if (is_security_enabled() && is_discovery_protected) {
3075  remote_reader = make_id(reader, ENTITYID_TL_SVC_REQ_READER_SECURE);
3076  }
3077 #else
3078  ACE_UNUSED_ARG(is_discovery_protected);
3079 #endif
3080 
3081  return writer->send_type_lookup_request(
3082  type_ids, remote_reader, seq_num,
3083  send_get_types ?
3085 }
TypeLookupRequestWriter_rch type_lookup_request_secure_writer_
Definition: Sedp.h:1295
const long TypeLookup_getTypes_HashId
Definition: TypeLookup.idl:26
bool is_security_enabled()
Definition: Sedp.h:1176
const long TypeLookup_getDependencies_HashId
Definition: TypeLookup.idl:27
const EntityId_t ENTITYID_TL_SVC_REQ_READER
Definition: GuidUtils.h:53
TypeLookupRequestWriter_rch type_lookup_request_writer_
Definition: Sedp.h:1292
DCPS::RcHandle< TypeLookupRequestWriter > TypeLookupRequestWriter_rch
Definition: Sedp.h:584
const EntityId_t ENTITYID_TL_SVC_REQ_READER_SECURE
Definition: MessageTypes.h:91
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ set_access_control()

void OpenDDS::RTPS::Sedp::set_access_control ( DDS::Security::AccessControl_var  acl)
inlineprotected

Definition at line 1191 of file Sedp.h.

References access_control_.

Referenced by init_security().

1192  {
1193  access_control_ = acl;
1194  }
DDS::Security::AccessControl_var access_control_
Definition: Sedp.h:1258

◆ set_crypto_key_exchange()

void OpenDDS::RTPS::Sedp::set_crypto_key_exchange ( DDS::Security::CryptoKeyExchange_var  ckf)
inlineprotected

Definition at line 1211 of file Sedp.h.

References crypto_key_exchange_.

Referenced by init_security().

1212  {
1213  crypto_key_exchange_ = ckf;
1214  }
DDS::Security::CryptoKeyExchange_var crypto_key_exchange_
Definition: Sedp.h:1260

◆ set_crypto_key_factory()

void OpenDDS::RTPS::Sedp::set_crypto_key_factory ( DDS::Security::CryptoKeyFactory_var  ckf)
inlineprotected

Definition at line 1201 of file Sedp.h.

References crypto_key_factory_.

Referenced by init_security().

1202  {
1203  crypto_key_factory_ = ckf;
1204  }
DDS::Security::CryptoKeyFactory_var crypto_key_factory_
Definition: Sedp.h:1259

◆ set_handle_registry()

void OpenDDS::RTPS::Sedp::set_handle_registry ( const Security::HandleRegistry_rch hr)
inlineprotected

Definition at line 1221 of file Sedp.h.

References handle_registry_.

Referenced by init_security().

1222  {
1223  handle_registry_ = hr;
1224  }
Security::HandleRegistry_rch handle_registry_
Definition: Sedp.h:1261

◆ set_inline_qos()

void OpenDDS::RTPS::Sedp::set_inline_qos ( DCPS::TransportLocatorSeq locators)
staticprivate

Definition at line 5159 of file Sedp.cpp.

References OPENDDS_STRING, and OpenDDS::DCPS::push_back().

Referenced by OpenDDS::RTPS::Sedp::DiscoveryReader::data_received_i().

5160 {
5161  const OPENDDS_STRING rtps_udp = "rtps_udp";
5162  for (CORBA::ULong i = 0; i < locators.length(); ++i) {
5163  if (locators[i].transport_type.in() == rtps_udp) {
5164  DCPS::push_back(locators[i].data, CORBA::Octet(1));
5165  }
5166  }
5167 }
#define OPENDDS_STRING
ACE_CDR::ULong ULong
void push_back(Seq &seq, const typename Seq::value_type &val)
std::vector-style push_back() for CORBA Sequences
Definition: Util.h:138
ACE_CDR::Octet Octet

◆ set_permissions_handle()

void OpenDDS::RTPS::Sedp::set_permissions_handle ( DDS::Security::PermissionsHandle  h)
inlineprotected

Definition at line 1181 of file Sedp.h.

References permissions_handle_.

Referenced by init_security().

1182  {
1183  permissions_handle_ = h;
1184  }
DDS::Security::PermissionsHandle permissions_handle_
Definition: Sedp.h:1263

◆ should_drop_message()

bool OpenDDS::RTPS::Sedp::should_drop_message ( const char *  unsecure_topic_name)
private

Definition at line 2825 of file Sedp.cpp.

References get_access_control(), get_permissions_handle(), DDS::Security::TopicSecurityAttributes::is_discovery_protected, and is_security_enabled().

Referenced by data_received().

2826 {
2827  if (is_security_enabled()) {
2829  DDS::Security::SecurityException ex = {"", 0, 0};
2830 
2831  bool ok = get_access_control()->get_topic_sec_attributes(
2833  unsecure_topic_name,
2834  attribs,
2835  ex);
2836 
2837  if (!ok || attribs.is_discovery_protected) {
2838  return true;
2839  }
2840  }
2841 
2842  return false;
2843 }
DDS::Security::PermissionsHandle get_permissions_handle() const
Definition: Sedp.h:1186
bool is_security_enabled()
Definition: Sedp.h:1176
DDS::Security::AccessControl_var get_access_control() const
Definition: Sedp.h:1196

◆ should_drop_stateless_message()

bool OpenDDS::RTPS::Sedp::should_drop_stateless_message ( const DDS::Security::ParticipantGenericMessage msg)
private

Definition at line 2752 of file Sedp.cpp.

References ACE_GUARD_RETURN, DDS::Security::ParticipantGenericMessage::destination_endpoint_guid, DDS::Security::ParticipantGenericMessage::destination_participant_guid, OpenDDS::DCPS::GUID_UNKNOWN, ignoring(), lock_, participant_id_, participant_stateless_message_reader_, and DDS::Security::ParticipantGenericMessage::source_endpoint_guid.

Referenced by received_stateless_message().

2753 {
2754  using DCPS::GUID_UNKNOWN;
2755 
2757 
2758  const GUID_t& src_endpoint = msg.source_endpoint_guid;
2759  const GUID_t& dst_endpoint = msg.destination_endpoint_guid;
2760  const GUID_t& this_endpoint = participant_stateless_message_reader_->get_guid();
2761  const GUID_t& dst_participant = msg.destination_participant_guid;
2762  const GUID_t& this_participant = participant_id_;
2763 
2764  if (ignoring(src_endpoint)) {
2765  return true;
2766  }
2767 
2768  if (dst_participant != GUID_UNKNOWN && dst_participant != this_participant) {
2769  return true;
2770  }
2771 
2772  if (dst_endpoint != GUID_UNKNOWN && dst_endpoint != this_endpoint) {
2773  return true;
2774  }
2775 
2776  return false;
2777 }
DCPS::GUID_t get_guid() const
Definition: Sedp.h:364
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
OpenDDS::DCPS::GUID_t destination_participant_guid
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
GUID_t participant_id_
Definition: Sedp.h:1229
SecurityReader_rch participant_stateless_message_reader_
Definition: Sedp.h:1309
bool ignoring(const GUID_t &guid) const
Definition: Sedp.h:205

◆ should_drop_volatile_message()

bool OpenDDS::RTPS::Sedp::should_drop_volatile_message ( const DDS::Security::ParticipantGenericMessage msg)
private

Definition at line 2779 of file Sedp.cpp.

References ACE_DEBUG, ACE_GUARD_RETURN, ACE_TEXT(), DDS::Security::ParticipantGenericMessage::destination_participant_guid, OpenDDS::DCPS::GUID_UNKNOWN, ignoring(), LM_DEBUG, lock_, DDS::Security::ParticipantGenericMessage::message_data, participant_id_, OpenDDS::DCPS::security_debug, and DDS::Security::ParticipantGenericMessage::source_endpoint_guid.

Referenced by received_volatile_message_secure().

2780 {
2781  using DCPS::GUID_UNKNOWN;
2782 
2784 
2785  const GUID_t src_endpoint = msg.source_endpoint_guid;
2786  const GUID_t dst_participant = msg.destination_participant_guid;
2787  const GUID_t this_participant = participant_id_;
2788 
2789  if (ignoring(src_endpoint)) {
2790  if (DCPS::security_debug.auth_debug) {
2791  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {auth_debug} DEBUG: Sedp::should_drop_volatile_message() - ")
2792  ACE_TEXT("ignoring %C -> %C local %C\n"),
2793  DCPS::LogGuid(src_endpoint).c_str(),
2794  DCPS::LogGuid(dst_participant).c_str(),
2795  DCPS::LogGuid(this_participant).c_str()));
2796  }
2797  return true;
2798  }
2799 
2800  if (!msg.message_data.length()) {
2801  if (DCPS::security_debug.auth_debug) {
2802  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {auth_debug} DEBUG: Sedp::should_drop_volatile_message() - ")
2803  ACE_TEXT("no data %C -> %C local %C\n"),
2804  DCPS::LogGuid(src_endpoint).c_str(),
2805  DCPS::LogGuid(dst_participant).c_str(),
2806  DCPS::LogGuid(this_participant).c_str()));
2807  }
2808  return true;
2809  }
2810 
2811  if (dst_participant != GUID_UNKNOWN && dst_participant != this_participant) {
2812  if (DCPS::security_debug.auth_debug) {
2813  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {auth_debug} DEBUG: Sedp::should_drop_volatile_message() - ")
2814  ACE_TEXT("not for us %C -> %C local %C\n"),
2815  DCPS::LogGuid(src_endpoint).c_str(),
2816  DCPS::LogGuid(dst_participant).c_str(),
2817  DCPS::LogGuid(this_participant).c_str()));
2818  }
2819  return true;
2820  }
2821 
2822  return false;
2823 }
#define ACE_DEBUG(X)
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
OpenDDS::DCPS::GUID_t destination_participant_guid
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
GUID_t participant_id_
Definition: Sedp.h:1229
ACE_TEXT("TCP_Factory")
bool ignoring(const GUID_t &guid) const
Definition: Sedp.h:205
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ shutdown()

void OpenDDS::RTPS::Sedp::shutdown ( void  )

Definition at line 2008 of file Sedp.cpp.

References dcps_participant_secure_reader_, dcps_participant_secure_writer_, participant_message_reader_, participant_message_secure_reader_, participant_message_secure_writer_, participant_message_writer_, participant_stateless_message_reader_, participant_stateless_message_writer_, participant_volatile_message_secure_reader_, participant_volatile_message_secure_writer_, publications_reader_, publications_secure_reader_, publications_secure_writer_, publications_writer_, subscriptions_reader_, subscriptions_secure_reader_, subscriptions_secure_writer_, subscriptions_writer_, type_lookup_reply_reader_, type_lookup_reply_secure_reader_, type_lookup_reply_secure_writer_, type_lookup_reply_writer_, type_lookup_request_reader_, type_lookup_request_secure_reader_, type_lookup_request_secure_writer_, and type_lookup_request_writer_.

2009 {
2015 #ifdef OPENDDS_SECURITY
2024 #endif
2030 #ifdef OPENDDS_SECURITY
2039 #endif
2040 }
DiscoveryWriter_rch dcps_participant_secure_writer_
Definition: Sedp.h:1288
DiscoveryReader_rch subscriptions_secure_reader_
Definition: Sedp.h:1304
DiscoveryWriter_rch publications_secure_writer_
Definition: Sedp.h:1278
TypeLookupReplyWriter_rch type_lookup_reply_writer_
Definition: Sedp.h:1293
DiscoveryReader_rch publications_secure_reader_
Definition: Sedp.h:1300
TypeLookupRequestWriter_rch type_lookup_request_secure_writer_
Definition: Sedp.h:1295
DiscoveryReader_rch subscriptions_reader_
Definition: Sedp.h:1302
TypeLookupReplyReader_rch type_lookup_reply_reader_
Definition: Sedp.h:1314
TypeLookupReplyWriter_rch type_lookup_reply_secure_writer_
Definition: Sedp.h:1296
TypeLookupReplyReader_rch type_lookup_reply_secure_reader_
Definition: Sedp.h:1317
LivelinessReader_rch participant_message_secure_reader_
Definition: Sedp.h:1308
LivelinessWriter_rch participant_message_writer_
Definition: Sedp.h:1284
SecurityReader_rch participant_volatile_message_secure_reader_
Definition: Sedp.h:1310
SecurityReader_rch participant_stateless_message_reader_
Definition: Sedp.h:1309
DiscoveryWriter_rch subscriptions_writer_
Definition: Sedp.h:1280
LivelinessReader_rch participant_message_reader_
Definition: Sedp.h:1306
TypeLookupRequestReader_rch type_lookup_request_secure_reader_
Definition: Sedp.h:1316
DiscoveryReader_rch dcps_participant_secure_reader_
Definition: Sedp.h:1311
LivelinessWriter_rch participant_message_secure_writer_
Definition: Sedp.h:1286
TypeLookupRequestWriter_rch type_lookup_request_writer_
Definition: Sedp.h:1292
DiscoveryWriter_rch subscriptions_secure_writer_
Definition: Sedp.h:1282
SecurityWriter_rch participant_volatile_message_secure_writer_
Definition: Sedp.h:1290
DiscoveryReader_rch publications_reader_
Definition: Sedp.h:1298
TypeLookupRequestReader_rch type_lookup_request_reader_
Definition: Sedp.h:1313
SecurityWriter_rch participant_stateless_message_writer_
Definition: Sedp.h:1287
DiscoveryWriter_rch publications_writer_
Definition: Sedp.h:1276

◆ shutting_down()

bool OpenDDS::RTPS::Sedp::shutting_down ( void  ) const
privatevirtual

Definition at line 5170 of file Sedp.cpp.

References OpenDDS::RTPS::Spdp::shutting_down(), and spdp_.

5171 {
5172  return spdp_.shutting_down();
5173 }
bool shutting_down()
Definition: Spdp.h:118

◆ signal_liveliness()

void OpenDDS::RTPS::Sedp::signal_liveliness ( DDS::LivelinessQosPolicyKind  kind)

Definition at line 2997 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), DDS::Security::SecurityException::code, get_access_control(), get_permissions_handle(), DDS::Security::TopicSecurityAttributes::is_liveliness_protected, is_security_enabled(), LM_WARNING, DDS::Security::SecurityException::message, DDS::Security::SecurityException::minor_code, signal_liveliness_secure(), and signal_liveliness_unsecure().

2998 {
2999 
3000 #ifdef OPENDDS_SECURITY
3001  DDS::Security::SecurityException se = {"", 0, 0};
3003 
3004  if (is_security_enabled()) {
3005  // TODO: Pending issue DDSSEC12-28 Topic security attributes
3006  // may get changed to a different set of security attributes.
3007  bool ok = get_access_control()->get_topic_sec_attributes(
3008  get_permissions_handle(), "DCPSParticipantMessageSecure", attribs, se);
3009 
3010  if (ok) {
3011 
3012  if (attribs.is_liveliness_protected) {
3014 
3015  } else {
3017  }
3018 
3019  } else {
3020  ACE_DEBUG((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: Sedp::signal_liveliness() - ")
3021  ACE_TEXT("Failure calling get_topic_sec_attributes(). Security Exception[%d.%d]: %C\n"),
3022  se.code, se.minor_code, se.message.in()));
3023  }
3024 
3025  } else {
3026 #endif
3027 
3029 
3030 #ifdef OPENDDS_SECURITY
3031  }
3032 #endif
3033 }
#define ACE_DEBUG(X)
DDS::Security::PermissionsHandle get_permissions_handle() const
Definition: Sedp.h:1186
bool is_security_enabled()
Definition: Sedp.h:1176
DDS::Security::AccessControl_var get_access_control() const
Definition: Sedp.h:1196
void signal_liveliness_unsecure(DDS::LivelinessQosPolicyKind kind)
Definition: Sedp.cpp:3036
ACE_TEXT("TCP_Factory")
void signal_liveliness_secure(DDS::LivelinessQosPolicyKind kind)
Definition: Sedp.cpp:3089

◆ signal_liveliness_secure()

void OpenDDS::RTPS::Sedp::signal_liveliness_secure ( DDS::LivelinessQosPolicyKind  kind)

Definition at line 3089 of file Sedp.cpp.

References DDS::AUTOMATIC_LIVELINESS_QOS, OpenDDS::RTPS::Spdp::available_builtin_endpoints(), DDS::Security::BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER, OpenDDS::DCPS::GUID_UNKNOWN, local_participant_automatic_liveliness_sn_secure_, local_participant_manual_liveliness_sn_secure_, OpenDDS::DCPS::make_id(), DDS::MANUAL_BY_PARTICIPANT_LIVELINESS_QOS, DDS::MANUAL_BY_TOPIC_LIVELINESS_QOS, participant_id_, OpenDDS::RTPS::PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE, OpenDDS::RTPS::PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE, spdp_, and write_participant_message_data_secure().

Referenced by signal_liveliness().

3090 {
3092  return;
3093  }
3094 
3095  switch (kind) {
3097  const GUID_t guid = make_id(participant_id_,
3100  break;
3101  }
3102 
3104  const GUID_t guid = make_id(participant_id_,
3107  break;
3108  }
3109 
3111  // Do nothing.
3112  break;
3113  }
3114 }
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
GUID_t participant_id_
Definition: Sedp.h:1229
DCPS::SequenceNumber local_participant_manual_liveliness_sn_secure_
Definition: Sedp.h:1254
DCPS::SequenceNumber local_participant_automatic_liveliness_sn_secure_
Definition: Sedp.h:1253
const DCPS::EntityId_t PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE
Definition: MessageTypes.h:117
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
DDS::ReturnCode_t write_participant_message_data_secure(const DCPS::GUID_t &rid, DCPS::SequenceNumber &sn, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:5135
const DCPS::EntityId_t PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE
Definition: MessageTypes.h:119
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER

◆ signal_liveliness_unsecure()

void OpenDDS::RTPS::Sedp::signal_liveliness_unsecure ( DDS::LivelinessQosPolicyKind  kind)

Definition at line 3036 of file Sedp.cpp.

References DDS::AUTOMATIC_LIVELINESS_QOS, OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::RTPS::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER, OpenDDS::DCPS::GUID_UNKNOWN, local_participant_automatic_liveliness_sn_, local_participant_manual_liveliness_sn_, OpenDDS::DCPS::make_id(), DDS::MANUAL_BY_PARTICIPANT_LIVELINESS_QOS, DDS::MANUAL_BY_TOPIC_LIVELINESS_QOS, participant_id_, OpenDDS::RTPS::PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE, OpenDDS::RTPS::PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE, spdp_, and write_participant_message_data().

Referenced by signal_liveliness().

3037 {
3039  return;
3040  }
3041 
3042  switch (kind) {
3044  const GUID_t guid = make_id(participant_id_,
3047  break;
3048  }
3049 
3051  const GUID_t guid = make_id(participant_id_,
3054  break;
3055  }
3056 
3058  // Do nothing.
3059  break;
3060  }
3061 }
DDS::ReturnCode_t write_participant_message_data(const DCPS::GUID_t &rid, DCPS::SequenceNumber &sn, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:5110
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER
Definition: RtpsCore.idl:218
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
GUID_t participant_id_
Definition: Sedp.h:1229
DCPS::SequenceNumber local_participant_automatic_liveliness_sn_
Definition: Sedp.h:1250
const DCPS::EntityId_t PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE
Definition: MessageTypes.h:117
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
DCPS::SequenceNumber local_participant_manual_liveliness_sn_
Definition: Sedp.h:1251
const DCPS::EntityId_t PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE
Definition: MessageTypes.h:119

◆ start_ice() [1/4]

void OpenDDS::RTPS::Sedp::start_ice ( const DCPS::GUID_t guid,
const LocalPublication lpub 
)
protected

Definition at line 5740 of file Sedp.cpp.

References discovered_subscriptions_, OpenDDS::RTPS::LocalEntity::have_ice_agent_info, ice_agent_, OpenDDS::DCPS::WeakRcHandle< T >::lock(), OpenDDS::RTPS::LocalEntity::matched_endpoints_, and OpenDDS::RTPS::LocalPublication::publication_.

Referenced by add_publication_i(), add_subscription_i(), process_discovered_reader_data(), process_discovered_writer_data(), OpenDDS::RTPS::Sedp::SubscriptionAgentInfoListener::SubscriptionAgentInfoListener(), and use_ice_now().

5740  {
5741 #ifdef OPENDDS_SECURITY
5742  DCPS::DataWriterCallbacks_rch pl = lpub.publication_.lock();
5743  if (pl) {
5744  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = pl->get_ice_endpoint();
5745 
5746  if (!endpoint || !lpub.have_ice_agent_info) {
5747  return;
5748  }
5749 
5750  for (DCPS::RepoIdSet::const_iterator it = lpub.matched_endpoints_.begin(),
5751  end = lpub.matched_endpoints_.end(); it != end; ++it) {
5753  if (dsi != discovered_subscriptions_.end()) {
5754  if (dsi->second.have_ice_agent_info_) {
5755  ice_agent_->start_ice(endpoint, guid, dsi->first, dsi->second.ice_agent_info_);
5756  }
5757  }
5758  }
5759  }
5760 #else
5761  ACE_UNUSED_ARG(guid);
5762  ACE_UNUSED_ARG(lpub);
5763 #endif
5764 }
DiscoveredSubscriptionMap discovered_subscriptions_
Definition: Sedp.h:1235
DiscoveredSubscriptionMap::iterator DiscoveredSubscriptionIter
Definition: Sedp.h:272
RcHandle< DataWriterCallbacks > DataWriterCallbacks_rch
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321

◆ start_ice() [2/4]

void OpenDDS::RTPS::Sedp::start_ice ( const DCPS::GUID_t guid,
const LocalSubscription lsub 
)
protected

Definition at line 5767 of file Sedp.cpp.

References discovered_publications_, OpenDDS::RTPS::LocalEntity::have_ice_agent_info, ice_agent_, OpenDDS::DCPS::WeakRcHandle< T >::lock(), OpenDDS::RTPS::LocalEntity::matched_endpoints_, and OpenDDS::RTPS::LocalSubscription::subscription_.

5767  {
5768 #ifdef OPENDDS_SECURITY
5769  DCPS::DataReaderCallbacks_rch sl = lsub.subscription_.lock();
5770  if (sl) {
5771  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = sl->get_ice_endpoint();
5772 
5773  if (!endpoint || !lsub.have_ice_agent_info) {
5774  return;
5775  }
5776 
5777  for (DCPS::RepoIdSet::const_iterator it = lsub.matched_endpoints_.begin(),
5778  end = lsub.matched_endpoints_.end(); it != end; ++it) {
5780  if (dpi != discovered_publications_.end()) {
5781  if (dpi->second.have_ice_agent_info_) {
5782  ice_agent_->start_ice(endpoint, guid, dpi->first, dpi->second.ice_agent_info_);
5783  }
5784  }
5785  }
5786  }
5787 #else
5788  ACE_UNUSED_ARG(guid);
5789  ACE_UNUSED_ARG(lsub);
5790 #endif
5791 }
RcHandle< DataReaderCallbacks > DataReaderCallbacks_rch
DiscoveredPublicationMap discovered_publications_
Definition: Sedp.h:1234
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321
DiscoveredPublicationMap::iterator DiscoveredPublicationIter
Definition: Sedp.h:276

◆ start_ice() [3/4]

void OpenDDS::RTPS::Sedp::start_ice ( const DCPS::GUID_t guid,
const DiscoveredPublication dpub 
)
protected

Definition at line 5794 of file Sedp.cpp.

References OpenDDS::RTPS::DiscoveredPublication::have_ice_agent_info_, ice_agent_, OpenDDS::RTPS::DiscoveredPublication::ice_agent_info_, local_subscriptions_, and OpenDDS::RTPS::DiscoveredPublication::matched_endpoints_.

5794  {
5795 #ifdef OPENDDS_SECURITY
5796  if (!dpub.have_ice_agent_info_) {
5797  return;
5798  }
5799 
5800  for (DCPS::RepoIdSet::const_iterator it = dpub.matched_endpoints_.begin(),
5801  end = dpub.matched_endpoints_.end(); it != end; ++it) {
5803  if (lsi != local_subscriptions_.end() &&
5804  lsi->second.matched_endpoints_.count(guid)) {
5805  DCPS::DataReaderCallbacks_rch sl = lsi->second.subscription_.lock();
5806  if (sl) {
5807  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = sl->get_ice_endpoint();
5808  if (endpoint) {
5809  ice_agent_->start_ice(endpoint, lsi->first, guid, dpub.ice_agent_info_);
5810  }
5811  }
5812  }
5813  }
5814 #else
5815  ACE_UNUSED_ARG(guid);
5816  ACE_UNUSED_ARG(dpub);
5817 #endif
5818 }
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
RcHandle< DataReaderCallbacks > DataReaderCallbacks_rch
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321

◆ start_ice() [4/4]

void OpenDDS::RTPS::Sedp::start_ice ( const DCPS::GUID_t guid,
const DiscoveredSubscription dsub 
)
protected

Definition at line 5821 of file Sedp.cpp.

References OpenDDS::RTPS::DiscoveredSubscription::have_ice_agent_info_, ice_agent_, OpenDDS::RTPS::DiscoveredSubscription::ice_agent_info_, OpenDDS::DCPS::GuidConverter::isWriter(), local_publications_, and OpenDDS::RTPS::DiscoveredSubscription::matched_endpoints_.

5821  {
5822 #ifdef OPENDDS_SECURITY
5823  if (!dsub.have_ice_agent_info_) {
5824  return;
5825  }
5826 
5827  for (DCPS::RepoIdSet::const_iterator it = dsub.matched_endpoints_.begin(),
5828  end = dsub.matched_endpoints_.end(); it != end; ++it) {
5829  const DCPS::GuidConverter conv(*it);
5830  if (conv.isWriter()) {
5831  LocalPublicationIter lpi = local_publications_.find(*it);
5832  if (lpi != local_publications_.end() &&
5833  lpi->second.matched_endpoints_.count(guid)) {
5834  DCPS::DataWriterCallbacks_rch pl = lpi->second.publication_.lock();
5835  if (pl) {
5836  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = pl->get_ice_endpoint();
5837  if (endpoint) {
5838  ice_agent_->start_ice(endpoint, lpi->first, guid, dsub.ice_agent_info_);
5839  }
5840  }
5841  }
5842  }
5843  }
5844 #else
5845  ACE_UNUSED_ARG(guid);
5846  ACE_UNUSED_ARG(dsub);
5847 #endif
5848 }
RcHandle< DataWriterCallbacks > DataWriterCallbacks_rch
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ stop_ice() [1/2]

void OpenDDS::RTPS::Sedp::stop_ice ( const DCPS::GUID_t guid,
const DiscoveredPublication dpub 
)
protected

Definition at line 5851 of file Sedp.cpp.

References ice_agent_, OpenDDS::DCPS::GuidConverter::isReader(), local_subscriptions_, and OpenDDS::RTPS::DiscoveredPublication::matched_endpoints_.

Referenced by process_discovered_reader_data(), process_discovered_writer_data(), and OpenDDS::RTPS::Sedp::SubscriptionAgentInfoListener::SubscriptionAgentInfoListener().

5852 {
5853 #ifdef OPENDDS_SECURITY
5854  for (DCPS::RepoIdSet::const_iterator it = dpub.matched_endpoints_.begin(),
5855  end = dpub.matched_endpoints_.end(); it != end; ++it) {
5856  const DCPS::GuidConverter conv(*it);
5857  if (conv.isReader()) {
5859  if (lsi != local_subscriptions_.end() &&
5860  lsi->second.matched_endpoints_.count(guid)) {
5861  DCPS::DataReaderCallbacks_rch sl = lsi->second.subscription_.lock();
5862  if (sl) {
5863  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = sl->get_ice_endpoint();
5864  if (endpoint) {
5865  ice_agent_->stop_ice(endpoint, lsi->first, guid);
5866  }
5867  }
5868  }
5869  }
5870  }
5871 #else
5872  ACE_UNUSED_ARG(guid);
5873  ACE_UNUSED_ARG(dpub);
5874 #endif
5875 }
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
RcHandle< DataReaderCallbacks > DataReaderCallbacks_rch
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321

◆ stop_ice() [2/2]

void OpenDDS::RTPS::Sedp::stop_ice ( const DCPS::GUID_t guid,
const DiscoveredSubscription dsub 
)
protected

Definition at line 5878 of file Sedp.cpp.

References ice_agent_, OpenDDS::DCPS::GuidConverter::isWriter(), local_publications_, and OpenDDS::RTPS::DiscoveredSubscription::matched_endpoints_.

5879 {
5880 #ifdef OPENDDS_SECURITY
5881  for (DCPS::RepoIdSet::const_iterator it = dsub.matched_endpoints_.begin(),
5882  end = dsub.matched_endpoints_.end(); it != end; ++it) {
5883  const DCPS::GuidConverter conv(*it);
5884  if (conv.isWriter()) {
5885  LocalPublicationIter lpi = local_publications_.find(*it);
5886  if (lpi != local_publications_.end() &&
5887  lpi->second.matched_endpoints_.count(guid)) {
5888  DCPS::DataWriterCallbacks_rch pl = lpi->second.publication_.lock();
5889  if (pl) {
5890  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = pl->get_ice_endpoint();
5891  if (endpoint) {
5892  ice_agent_->stop_ice(endpoint, lpi->first, guid);
5893  }
5894  }
5895  }
5896  }
5897  }
5898 #else
5899  ACE_UNUSED_ARG(guid);
5900  ACE_UNUSED_ARG(dsub);
5901 #endif
5902 }
RcHandle< DataWriterCallbacks > DataWriterCallbacks_rch
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ stun_server_address()

void OpenDDS::RTPS::Sedp::stun_server_address ( const ACE_INET_Addr address)

Definition at line 5969 of file Sedp.cpp.

References ACE_GUARD, OpenDDS::DCPS::static_rchandle_cast(), and transport_inst_.

5970 {
5971  DCPS::RtpsUdpInst_rch rtps_inst = DCPS::static_rchandle_cast<DCPS::RtpsUdpInst>(transport_inst_);
5972  ACE_GUARD(ACE_Thread_Mutex, g, rtps_inst->config_lock_);
5973  rtps_inst->stun_server_address_ = address;
5974 }
RcHandle< RtpsUdpInst > RtpsUdpInst_rch
#define ACE_GUARD(MUTEX, OBJ, LOCK)
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
RcHandle< T > static_rchandle_cast(const RcHandle< U > &h)
Definition: RcHandle_T.h:202

◆ transport_inst()

RcHandle<DCPS::TransportInst> OpenDDS::RTPS::Sedp::transport_inst ( ) const
inline

Definition at line 263 of file Sedp.h.

References OPENDDS_MAP_CMP(), request_remote_complete_type_objects(), and transport_inst_.

263 { return transport_inst_; }
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770

◆ type_lookup_fini()

void OpenDDS::RTPS::Sedp::type_lookup_fini ( )
inlineprivate

Definition at line 299 of file Sedp.h.

References type_lookup_reply_deadline_processor_.

Referenced by ~Sedp().

300  {
304  }
305  }
RcHandle< EndpointManagerSporadic > type_lookup_reply_deadline_processor_
Definition: Sedp.h:1243

◆ type_lookup_init()

void OpenDDS::RTPS::Sedp::type_lookup_init ( DCPS::ReactorInterceptor_rch  reactor_interceptor)
inlineprivate

Definition at line 290 of file Sedp.h.

References OpenDDS::DCPS::rchandle_from(), remove_expired_endpoints(), TheServiceParticipant, and type_lookup_reply_deadline_processor_.

Referenced by init().

291  {
294  DCPS::make_rch<EndpointManagerSporadic>(TheServiceParticipant->time_source(), reactor_interceptor,
296  }
297  }
RcHandle< T > rchandle_from(T *pointer)
Definition: RcHandle_T.h:310
RcHandle< EndpointManagerSporadic > type_lookup_reply_deadline_processor_
Definition: Sedp.h:1243
void remove_expired_endpoints(const MonotonicTimePoint &)
Definition: Sedp.cpp:6978
#define TheServiceParticipant

◆ unicast_locators()

DCPS::LocatorSeq OpenDDS::RTPS::Sedp::unicast_locators ( ) const

Definition at line 912 of file Sedp.cpp.

References OpenDDS::DCPS::CONNINFO_UNICAST, OpenDDS::DCPS::TransportInst::populate_locator(), transport_inst_, and OpenDDS::RTPS::transport_locator_to_locator_seq().

913 {
914  DCPS::TransportLocator trans_info;
916  return transport_locator_to_locator_seq(trans_info);
917 }
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
virtual size_t populate_locator(OpenDDS::DCPS::TransportLocator &trans_info, ConnectionInfoFlags flags) const =0
Populate a transport locator sequence. Return the number of "locators.".
OpenDDS_Rtps_Export DCPS::LocatorSeq transport_locator_to_locator_seq(const DCPS::TransportLocator &info)
static const ConnectionInfoFlags CONNINFO_UNICAST

◆ update_locators()

void OpenDDS::RTPS::Sedp::update_locators ( const ParticipantData_t pdata)

Definition at line 1659 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::RTPS::ParticipantProxy_t::availableBuiltinEndpoints, OpenDDS::RTPS::ParticipantProxy_t::availableExtendedBuiltinEndpoints, OpenDDS::RTPS::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_READER, OpenDDS::RTPS::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_READER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_WRITER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_READER, OpenDDS::RTPS::BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_WRITER, DDS::Security::BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER, DDS::Security::BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER, DDS::Security::BUILTIN_PARTICIPANT_STATELESS_MESSAGE_READER, DDS::Security::BUILTIN_PARTICIPANT_STATELESS_MESSAGE_WRITER, DDS::Security::BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_READER, DDS::Security::BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_WRITER, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_PARTICIPANT_ANNOUNCER, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_PARTICIPANT_DETECTOR, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_PUBLICATION_DETECTOR, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_DETECTOR, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER, OpenDDS::DCPS::ENTITYID_SPDP_BUILTIN_PARTICIPANT_READER, OpenDDS::DCPS::ENTITYID_SPDP_BUILTIN_PARTICIPANT_WRITER, OpenDDS::RTPS::ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER, OpenDDS::RTPS::ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_TL_SVC_REPLY_READER, OpenDDS::RTPS::ENTITYID_TL_SVC_REPLY_READER_SECURE, OpenDDS::DCPS::ENTITYID_TL_SVC_REPLY_WRITER, OpenDDS::RTPS::ENTITYID_TL_SVC_REPLY_WRITER_SECURE, OpenDDS::DCPS::ENTITYID_TL_SVC_REQ_READER, OpenDDS::RTPS::ENTITYID_TL_SVC_REQ_READER_SECURE, OpenDDS::DCPS::ENTITYID_TL_SVC_REQ_WRITER, OpenDDS::RTPS::ENTITYID_TL_SVC_REQ_WRITER_SECURE, OpenDDS::RTPS::ParticipantProxy_t::guidPrefix, LM_INFO, OpenDDS::DCPS::make_id(), OpenDDS::Security::SPDPdiscoveredParticipantData::participantProxy, OpenDDS::RTPS::populate_locators(), DDS::Security::SEDP_BUILTIN_PUBLICATIONS_SECURE_READER, DDS::Security::SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER, DDS::Security::SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER, DDS::Security::SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER, DDS::Security::SPDP_BUILTIN_PARTICIPANT_SECURE_READER, DDS::Security::SPDP_BUILTIN_PARTICIPANT_SECURE_WRITER, transport_inst_, DDS::Security::TYPE_LOOKUP_SERVICE_REPLY_READER_SECURE, DDS::Security::TYPE_LOOKUP_SERVICE_REPLY_WRITER_SECURE, DDS::Security::TYPE_LOOKUP_SERVICE_REQUEST_READER_SECURE, DDS::Security::TYPE_LOOKUP_SERVICE_REQUEST_WRITER_SECURE, and OpenDDS::DCPS::TransportInst::update_locators().

1660 {
1661  DCPS::TransportLocatorSeq remote_data;
1662  populate_locators(remote_data, pdata);
1663 
1664  DCPS::GUID_t remote_id = make_id(pdata.participantProxy.guidPrefix, ENTITYID_PARTICIPANT);
1665 
1666  if (DCPS::DCPS_debug_level > 3) {
1667  ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) Sedp::update_locators updating locators for %C\n"), DCPS::LogGuid(remote_id).c_str()));
1668  }
1669 
1670  const BuiltinEndpointSet_t& avail =
1671  pdata.participantProxy.availableBuiltinEndpoints;
1672 
1674  remote_id.entityId = ENTITYID_SPDP_BUILTIN_PARTICIPANT_WRITER;
1675  transport_inst_->update_locators(remote_id, remote_data);
1676  }
1678  remote_id.entityId = ENTITYID_SPDP_BUILTIN_PARTICIPANT_READER;
1679  transport_inst_->update_locators(remote_id, remote_data);
1680  }
1682  remote_id.entityId = ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER;
1683  transport_inst_->update_locators(remote_id, remote_data);
1684  }
1686  remote_id.entityId = ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER;
1687  transport_inst_->update_locators(remote_id, remote_data);
1688  }
1690  remote_id.entityId = ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER;
1691  transport_inst_->update_locators(remote_id, remote_data);
1692  }
1694  remote_id.entityId = ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER;
1695  transport_inst_->update_locators(remote_id, remote_data);
1696  }
1699  transport_inst_->update_locators(remote_id, remote_data);
1700  }
1703  transport_inst_->update_locators(remote_id, remote_data);
1704  }
1706  remote_id.entityId = ENTITYID_TL_SVC_REQ_WRITER;
1707  transport_inst_->update_locators(remote_id, remote_data);
1708  }
1710  remote_id.entityId = ENTITYID_TL_SVC_REQ_READER;
1711  transport_inst_->update_locators(remote_id, remote_data);
1712  }
1714  remote_id.entityId = ENTITYID_TL_SVC_REPLY_WRITER;
1715  transport_inst_->update_locators(remote_id, remote_data);
1716  }
1718  remote_id.entityId = ENTITYID_TL_SVC_REPLY_READER;
1719  transport_inst_->update_locators(remote_id, remote_data);
1720  }
1721 
1722 #ifdef OPENDDS_SECURITY
1725  transport_inst_->update_locators(remote_id, remote_data);
1726  }
1729  transport_inst_->update_locators(remote_id, remote_data);
1730  }
1733  transport_inst_->update_locators(remote_id, remote_data);
1734  }
1737  transport_inst_->update_locators(remote_id, remote_data);
1738  }
1741  transport_inst_->update_locators(remote_id, remote_data);
1742  }
1745  transport_inst_->update_locators(remote_id, remote_data);
1746  }
1749  transport_inst_->update_locators(remote_id, remote_data);
1750  }
1753  transport_inst_->update_locators(remote_id, remote_data);
1754  }
1757  transport_inst_->update_locators(remote_id, remote_data);
1758  }
1761  transport_inst_->update_locators(remote_id, remote_data);
1762  }
1765  transport_inst_->update_locators(remote_id, remote_data);
1766  }
1769  transport_inst_->update_locators(remote_id, remote_data);
1770  }
1771 
1772  const DDS::Security::ExtendedBuiltinEndpointSet_t& extended_avail =
1773  pdata.participantProxy.availableExtendedBuiltinEndpoints;
1774 
1776  remote_id.entityId = ENTITYID_TL_SVC_REQ_WRITER_SECURE;
1777  transport_inst_->update_locators(remote_id, remote_data);
1778  }
1780  remote_id.entityId = ENTITYID_TL_SVC_REQ_READER_SECURE;
1781  transport_inst_->update_locators(remote_id, remote_data);
1782  }
1784  remote_id.entityId = ENTITYID_TL_SVC_REPLY_WRITER_SECURE;
1785  transport_inst_->update_locators(remote_id, remote_data);
1786  }
1788  remote_id.entityId = ENTITYID_TL_SVC_REPLY_READER_SECURE;
1789  transport_inst_->update_locators(remote_id, remote_data);
1790  }
1791 #endif
1792 }
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER
Definition: MessageTypes.h:81
#define ACE_DEBUG(X)
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER
Definition: RtpsCore.idl:206
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REPLY_READER_SECURE
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_WRITER
Definition: RtpsCore.idl:223
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PARTICIPANT_ANNOUNCER
Definition: RtpsCore.idl:198
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_READER
Definition: GuidUtils.h:43
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER
Definition: RtpsCore.idl:202
const BuiltinEndpointSet_t SEDP_BUILTIN_PUBLICATIONS_SECURE_READER
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER
Definition: MessageTypes.h:78
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER
Definition: GuidUtils.h:47
const EntityId_t ENTITYID_TL_SVC_REQ_WRITER
Definition: GuidUtils.h:52
const EntityId_t ENTITYID_TL_SVC_REPLY_READER
Definition: GuidUtils.h:55
unsigned long ExtendedBuiltinEndpointSet_t
const EntityId_t ENTITYID_TL_SVC_REQ_WRITER_SECURE
Definition: MessageTypes.h:90
sequence< TransportLocator > TransportLocatorSeq
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER
Definition: MessageTypes.h:88
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REPLY_WRITER_SECURE
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER
Definition: RtpsCore.idl:218
const EntityId_t ENTITYID_TL_SVC_REPLY_READER_SECURE
Definition: MessageTypes.h:93
const BuiltinEndpointSet_t SPDP_BUILTIN_PARTICIPANT_SECURE_READER
const EntityId_t ENTITYID_SPDP_BUILTIN_PARTICIPANT_WRITER
Definition: GuidUtils.h:44
const EntityId_t ENTITYID_SPDP_BUILTIN_PARTICIPANT_READER
Definition: GuidUtils.h:45
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_READER
Definition: RtpsCore.idl:220
void populate_locators(DCPS::TransportLocatorSeq &remote_data, const ParticipantData_t &pdata)
Definition: Sedp.cpp:970
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER
Definition: MessageTypes.h:79
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_WRITER
const EntityId_t ENTITYID_TL_SVC_REPLY_WRITER_SECURE
Definition: MessageTypes.h:92
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_STATELESS_MESSAGE_WRITER
const EntityId_t ENTITYID_TL_SVC_REQ_READER
Definition: GuidUtils.h:53
const EntityId_t ENTITYID_TL_SVC_REPLY_WRITER
Definition: GuidUtils.h:54
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REQUEST_READER_SECURE
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER
Definition: GuidUtils.h:40
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER
Definition: MessageTypes.h:83
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PARTICIPANT_DETECTOR
Definition: RtpsCore.idl:200
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_READER
Definition: RtpsCore.idl:229
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER
Definition: MessageTypes.h:85
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER
Definition: MessageTypes.h:82
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REPLY_DATA_WRITER
Definition: RtpsCore.idl:227
ACE_TEXT("TCP_Factory")
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
Definition: MessageTypes.h:77
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_DETECTOR
Definition: RtpsCore.idl:208
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER
Definition: GuidUtils.h:42
const BuiltinEndpointSet_t SPDP_BUILTIN_PARTICIPANT_SECURE_WRITER
const BuiltinEndpointSet_t SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_READER
Definition: MessageTypes.h:86
const BuiltinEndpointSet_t SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_READER
Definition: MessageTypes.h:84
const EntityId_t ENTITYID_TL_SVC_REQ_READER_SECURE
Definition: MessageTypes.h:91
const ExtendedBuiltinEndpointSet_t TYPE_LOOKUP_SERVICE_REQUEST_WRITER_SECURE
unsigned long BuiltinEndpointSet_t
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PUBLICATION_DETECTOR
Definition: RtpsCore.idl:204
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_VOLATILE_MESSAGE_SECURE_READER
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_STATELESS_MESSAGE_READER
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER
Definition: MessageTypes.h:87
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_TYPE_LOOKUP_REQUEST_DATA_READER
Definition: RtpsCore.idl:225
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_READER
Definition: GuidUtils.h:41
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_MESSAGE_SECURE_READER
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER
Definition: GuidUtils.h:46
const BuiltinEndpointSet_t SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER
Definition: MessageTypes.h:80
virtual void update_locators(const GUID_t &, const TransportLocatorSeq &)
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER

◆ update_publication_locators()

void OpenDDS::RTPS::Sedp::update_publication_locators ( const GUID_t publicationId,
const DCPS::TransportLocatorSeq transInfo 
)

Definition at line 6245 of file Sedp.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, LM_INFO, local_publications_, OpenDDS::DCPS::TransportClient::lock_, and write_publication_data().

Referenced by ignoring().

6247 {
6249  LocalPublicationIter iter = local_publications_.find(publicationId);
6250  if (iter != local_publications_.end()) {
6251  if (DCPS_debug_level > 3) {
6252  ACE_DEBUG((LM_INFO,
6253  ACE_TEXT("(%P|%t) Sedp::update_publication_locators: updating locators for %C\n"),
6254  LogGuid(publicationId).c_str()));
6255  }
6256  iter->second.trans_info_ = transInfo;
6257  write_publication_data(publicationId, iter->second);
6258  }
6259 }
#define ACE_DEBUG(X)
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
DDS::ReturnCode_t write_publication_data(const DCPS::GUID_t &rid, LocalPublication &pub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4830
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ update_publication_qos()

bool OpenDDS::RTPS::Sedp::update_publication_qos ( const DCPS::GUID_t publicationId,
const DDS::DataWriterQos qos,
const DDS::PublisherQos publisherQos 
)

Definition at line 1901 of file Sedp.cpp.

References ACE_GUARD_RETURN, local_publications_, lock_, match_endpoints(), OpenDDS::RTPS::LocalPublication::publisher_qos_, OpenDDS::RTPS::LocalPublication::qos_, DDS::RETCODE_OK, OpenDDS::RTPS::LocalEntity::topic_id_, topic_names_, topics_, and write_publication_data().

1904 {
1906  LocalPublicationIter iter = local_publications_.find(publicationId);
1907  if (iter != local_publications_.end()) {
1908  LocalPublication& pb = iter->second;
1909  pb.qos_ = qos;
1910  pb.publisher_qos_ = publisherQos;
1911 
1912  if (DDS::RETCODE_OK != write_publication_data(publicationId, pb)) {
1913  return false;
1914  }
1915  // Match/unmatch with subscriptions
1916  String topic_name = topic_names_[pb.topic_id_];
1917  TopicDetailsMap::iterator top_it = topics_.find(topic_name);
1918  if (top_it != topics_.end()) {
1919  match_endpoints(publicationId, top_it->second);
1920  }
1921  return true;
1922  }
1923  return false;
1924 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
std::string String
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
void match_endpoints(GUID_t repoId, const DCPS::TopicDetails &td, bool remove=false)
Definition: Sedp.cpp:6673
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
const ReturnCode_t RETCODE_OK
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
TopicNameMap topic_names_
Definition: Sedp.h:1237
DDS::ReturnCode_t write_publication_data(const DCPS::GUID_t &rid, LocalPublication &pub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4830
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ update_subscription_locators()

void OpenDDS::RTPS::Sedp::update_subscription_locators ( const GUID_t subscriptionId,
const DCPS::TransportLocatorSeq transInfo 
)

Definition at line 6391 of file Sedp.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, LM_INFO, local_subscriptions_, OpenDDS::DCPS::TransportClient::lock_, and write_subscription_data().

Referenced by ignoring().

6394 {
6396  LocalSubscriptionIter iter = local_subscriptions_.find(subscriptionId);
6397  if (iter != local_subscriptions_.end()) {
6398  if (DCPS_debug_level > 3) {
6399  ACE_DEBUG((LM_INFO,
6400  ACE_TEXT("(%P|%t) Sedp::update_subscription_locators: updating locators for %C\n"),
6401  LogGuid(subscriptionId).c_str()));
6402  }
6403  iter->second.trans_info_ = transInfo;
6404  write_subscription_data(subscriptionId, iter->second);
6405  }
6406 }
#define ACE_DEBUG(X)
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
DDS::ReturnCode_t write_subscription_data(const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4982
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30

◆ update_subscription_params()

bool OpenDDS::RTPS::Sedp::update_subscription_params ( const DCPS::GUID_t subId,
const DDS::StringSeq params 
)

Definition at line 1977 of file Sedp.cpp.

References ACE_GUARD_RETURN, OpenDDS::DCPS::ContentFilterProperty_t::expressionParameters, OpenDDS::RTPS::LocalSubscription::filterProperties, local_publications_, local_subscriptions_, lock_, DDS::RETCODE_OK, and write_subscription_data().

1979 {
1981  const LocalSubscriptionIter iter = local_subscriptions_.find(subId);
1982  if (iter != local_subscriptions_.end()) {
1983  LocalSubscription& sb = iter->second;
1984  sb.filterProperties.expressionParameters = params;
1985 
1986  if (DDS::RETCODE_OK != write_subscription_data(subId, sb)) {
1987  return false;
1988  }
1989 
1990  // Let any associated local publications know about the change
1991  for (DCPS::RepoIdSet::iterator i = iter->second.matched_endpoints_.begin();
1992  i != iter->second.matched_endpoints_.end(); ++i) {
1993  const LocalPublicationIter lpi = local_publications_.find(*i);
1994  if (lpi != local_publications_.end()) {
1995  DCPS::DataWriterCallbacks_rch pl = lpi->second.publication_.lock();
1996  if (pl) {
1997  pl->update_subscription_params(subId, params);
1998  }
1999  }
2000  }
2001 
2002  return true;
2003  }
2004  return false;
2005 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
DDS::ReturnCode_t write_subscription_data(const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4982
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
RcHandle< DataWriterCallbacks > DataWriterCallbacks_rch
const ReturnCode_t RETCODE_OK
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ update_subscription_qos()

bool OpenDDS::RTPS::Sedp::update_subscription_qos ( const DCPS::GUID_t subscriptionId,
const DDS::DataReaderQos qos,
const DDS::SubscriberQos subscriberQos 
)

Definition at line 1951 of file Sedp.cpp.

References ACE_GUARD_RETURN, local_subscriptions_, lock_, match_endpoints(), OpenDDS::RTPS::LocalSubscription::qos_, DDS::RETCODE_OK, OpenDDS::RTPS::LocalSubscription::subscriber_qos_, OpenDDS::RTPS::LocalEntity::topic_id_, topic_names_, topics_, and write_subscription_data().

1954 {
1956  LocalSubscriptionIter iter = local_subscriptions_.find(subscriptionId);
1957  if (iter != local_subscriptions_.end()) {
1958  LocalSubscription& sb = iter->second;
1959  sb.qos_ = qos;
1960  sb.subscriber_qos_ = subscriberQos;
1961 
1962  if (DDS::RETCODE_OK != write_subscription_data(subscriptionId, sb)) {
1963  return false;
1964  }
1965  // Match/unmatch with subscriptions
1966  String topic_name = topic_names_[sb.topic_id_];
1967  TopicDetailsMap::iterator top_it = topics_.find(topic_name);
1968  if (top_it != topics_.end()) {
1969  match_endpoints(subscriptionId, top_it->second);
1970  }
1971  return true;
1972  }
1973  return false;
1974 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
std::string String
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
void match_endpoints(GUID_t repoId, const DCPS::TopicDetails &td, bool remove=false)
Definition: Sedp.cpp:6673
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
DDS::ReturnCode_t write_subscription_data(const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4982
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
const ReturnCode_t RETCODE_OK
TopicNameMap topic_names_
Definition: Sedp.h:1237

◆ update_topic_qos()

bool OpenDDS::RTPS::Sedp::update_topic_qos ( const DCPS::GUID_t topicId,
const DDS::TopicQos qos 
)

Definition at line 1840 of file Sedp.cpp.

References ACE_GUARD_RETURN, OpenDDS::DCPS::TopicDetails::local_publications(), local_publications_, OpenDDS::DCPS::TopicDetails::local_qos(), OpenDDS::DCPS::TopicDetails::local_subscriptions(), local_subscriptions_, lock_, name, OPENDDS_ASSERT, OPENDDS_MAP_CMP(), OPENDDS_STRING, DDS::TopicQos::topic_data, topic_names_, topics_, OpenDDS::DCPS::TopicDetails::update(), write_publication_data(), and write_subscription_data().

1841 {
1843  OPENDDS_MAP_CMP(GUID_t, OPENDDS_STRING, DCPS::GUID_tKeyLessThan)::iterator iter =
1844  topic_names_.find(topicId);
1845  if (iter == topic_names_.end()) {
1846  return false;
1847  }
1848  const OPENDDS_STRING& name = iter->second;
1849  TopicDetails& topic = topics_[name];
1850  using namespace DCPS;
1851  // If the TOPIC_DATA QoS changed our local endpoints must be resent
1852  // with new QoS
1853  if (qos.topic_data != topic.local_qos().topic_data) {
1854  topic.update(qos);
1855  // For each endpoint associated on this topic
1856  for (RepoIdSet::const_iterator topic_endpoints = topic.local_publications().begin();
1857  topic_endpoints != topic.local_publications().end(); ++topic_endpoints) {
1858 
1859  const GUID_t& rid = *topic_endpoints;
1861  OPENDDS_ASSERT(lp != local_publications_.end());
1862  write_publication_data(rid, lp->second);
1863  }
1864  for (RepoIdSet::const_iterator topic_endpoints = topic.local_subscriptions().begin();
1865  topic_endpoints != topic.local_subscriptions().end(); ++topic_endpoints) {
1866 
1867  const GUID_t& rid = *topic_endpoints;
1869  OPENDDS_ASSERT(ls != local_subscriptions_.end());
1870  write_subscription_data(rid, ls->second);
1871  }
1872  }
1873 
1874  return true;
1875 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
#define OPENDDS_ASSERT(C)
Definition: Definitions.h:72
DCPS::TopicDetailsMap topics_
Definition: Sedp.h:1236
#define OPENDDS_STRING
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
DDS::ReturnCode_t write_subscription_data(const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4982
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
typedef OPENDDS_MAP_CMP(GUID_t, DiscoveredSubscription, GUID_tKeyLessThan) DiscoveredSubscriptionMap
TopicDataQosPolicy topic_data
const char *const name
Definition: debug.cpp:60
int find(const PG_Property_Set &decoder, const ACE_CString &key, TYPE &value)
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
TopicNameMap topic_names_
Definition: Sedp.h:1237
DDS::ReturnCode_t write_publication_data(const DCPS::GUID_t &rid, LocalPublication &pub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4830
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ use_ice_now()

void OpenDDS::RTPS::Sedp::use_ice_now ( bool  f)

Definition at line 5917 of file Sedp.cpp.

References ACE_GUARD, OpenDDS::RTPS::LocalEntity::have_ice_agent_info, ice_agent_, OpenDDS::RTPS::LocalEntity::ice_agent_info, local_publications_, local_subscriptions_, OpenDDS::DCPS::WeakRcHandle< T >::lock(), OpenDDS::DCPS::TransportClient::lock_, OpenDDS::RTPS::LocalPublication::publication_, publication_agent_info_listener_, start_ice(), OpenDDS::RTPS::LocalSubscription::subscription_, subscription_agent_info_listener_, transport_inst_, and OpenDDS::DCPS::TransportInst::use_ice_now().

5918 {
5920 
5921 #ifdef OPENDDS_SECURITY
5922  if (!f) {
5923  return;
5924  }
5925 
5927 
5928  for (LocalPublicationIter pos = local_publications_.begin(), limit = local_publications_.end(); pos != limit; ++pos) {
5929  LocalPublication& pub = pos->second;
5930  DCPS::DataWriterCallbacks_rch pl = pub.publication_.lock();
5931  if (pl) {
5932  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = pl->get_ice_endpoint();
5933  if (endpoint) {
5934  pub.have_ice_agent_info = true;
5935  pub.ice_agent_info = ice_agent_->get_local_agent_info(endpoint);
5936  ice_agent_->add_local_agent_info_listener(endpoint, pos->first, DCPS::static_rchandle_cast<ICE::AgentInfoListener>(publication_agent_info_listener_));
5937  start_ice(pos->first, pub);
5938  }
5939  }
5940  }
5941  for (LocalSubscriptionIter pos = local_subscriptions_.begin(), limit = local_subscriptions_.end(); pos != limit; ++pos) {
5942  LocalSubscription& sub = pos->second;
5943  DCPS::DataReaderCallbacks_rch sl = sub.subscription_.lock();
5944  if (sl) {
5945  DCPS::WeakRcHandle<ICE::Endpoint> endpoint = sl->get_ice_endpoint();
5946  if (endpoint) {
5947  sub.have_ice_agent_info = true;
5948  sub.ice_agent_info = ice_agent_->get_local_agent_info(endpoint);
5949  ice_agent_->add_local_agent_info_listener(endpoint, pos->first, DCPS::static_rchandle_cast<ICE::AgentInfoListener>(subscription_agent_info_listener_));
5950  start_ice(pos->first, sub);
5951  }
5952  }
5953  }
5954 #endif
5955 }
ACE_Thread_Mutex & lock_
Definition: Sedp.h:1228
#define ACE_GUARD(MUTEX, OBJ, LOCK)
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
RcHandle< DataReaderCallbacks > DataReaderCallbacks_rch
RcHandle< PublicationAgentInfoListener > publication_agent_info_listener_
Definition: Sedp.h:1322
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
RcHandle< DataWriterCallbacks > DataWriterCallbacks_rch
DCPS::RcHandle< ICE::Agent > ice_agent_
Definition: Sedp.h:1321
RcHandle< SubscriptionAgentInfoListener > subscription_agent_info_listener_
Definition: Sedp.h:1323
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
void start_ice(const DCPS::GUID_t &guid, const LocalPublication &lpub)
Definition: Sedp.cpp:5740
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ use_rtps_relay_now()

void OpenDDS::RTPS::Sedp::use_rtps_relay_now ( bool  f)

Definition at line 5911 of file Sedp.cpp.

References transport_inst_, and OpenDDS::DCPS::TransportInst::use_rtps_relay_now().

5912 {
5914 }
DCPS::TransportInst_rch transport_inst_
Definition: Sedp.h:770
void use_rtps_relay_now(bool flag)

◆ write_dcps_participant_dispose()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_dcps_participant_dispose ( const DCPS::GUID_t part)

Definition at line 4799 of file Sedp.cpp.

References dcps_participant_secure_writer_, and OpenDDS::RTPS::PID_PARTICIPANT_GUID.

4800 {
4802 }
DiscoveryWriter_rch dcps_participant_secure_writer_
Definition: Sedp.h:1288
const ParameterId_t PID_PARTICIPANT_GUID
Definition: RtpsCore.idl:289
DDS::ReturnCode_t write_unregister_dispose(const DCPS::GUID_t &rid, CORBA::UShort pid=PID_ENDPOINT_GUID)
Definition: Sedp.cpp:3469

◆ write_dcps_participant_secure()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_dcps_participant_secure ( const Security::SPDPdiscoveredParticipantData msg,
const DCPS::GUID_t part 
)

Definition at line 4787 of file Sedp.cpp.

References dcps_participant_secure_writer_, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::RTPS::ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER, OpenDDS::DCPS::GUID_UNKNOWN, and participant_secure_sequence_.

Referenced by OpenDDS::RTPS::Sedp::DiscoveryWriter::DiscoveryWriter(), and write_durable_dcps_participant_secure().

4789 {
4790  DCPS::GUID_t remote_reader(part);
4791  if (part != GUID_UNKNOWN) {
4793  }
4794 
4796 }
DiscoveryWriter_rch dcps_participant_secure_writer_
Definition: Sedp.h:1288
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_READER
Definition: MessageTypes.h:88
SequenceNumber participant_secure_sequence_
Definition: Sedp.h:1273
DDS::ReturnCode_t write_dcps_participant_secure(const Security::SPDPdiscoveredParticipantData &msg, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence)
Definition: Sedp.cpp:3433

◆ write_durable_dcps_participant_secure()

void OpenDDS::RTPS::Sedp::write_durable_dcps_participant_secure ( const DCPS::GUID_t reader)

Definition at line 4775 of file Sedp.cpp.

References OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::RTPS::Spdp::build_local_pdata(), dcps_participant_secure_writer_, OpenDDS::Security::DPDK_SECURE, spdp_, DDS::Security::SPDP_BUILTIN_PARTICIPANT_SECURE_WRITER, and write_dcps_participant_secure().

Referenced by association_complete_i(), and replay_durable_data_for().

4776 {
4778  return;
4779  }
4780 
4784 }
DiscoveryWriter_rch dcps_participant_secure_writer_
Definition: Sedp.h:1288
void end_historic_samples(const DCPS::GUID_t &reader)
Definition: Sedp.cpp:3513
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
ParticipantData_t build_local_pdata(bool always_in_the_clear, Security::DiscoveredParticipantDataKind kind)
Definition: Spdp.cpp:2201
const BuiltinEndpointSet_t SPDP_BUILTIN_PARTICIPANT_SECURE_WRITER
DDS::ReturnCode_t write_dcps_participant_secure(const Security::SPDPdiscoveredParticipantData &msg, const DCPS::GUID_t &part)
Definition: Sedp.cpp:4787

◆ write_durable_participant_message_data()

void OpenDDS::RTPS::Sedp::write_durable_participant_message_data ( const DCPS::GUID_t reader)
private

Definition at line 4713 of file Sedp.cpp.

References OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::RTPS::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER, local_participant_automatic_liveliness_sn_, local_participant_manual_liveliness_sn_, OpenDDS::DCPS::make_id(), participant_id_, OpenDDS::RTPS::PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE, OpenDDS::RTPS::PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE, participant_message_writer_, OpenDDS::DCPS::SequenceNumber::SEQUENCENUMBER_UNKNOWN(), spdp_, and write_participant_message_data().

Referenced by association_complete_i(), and replay_durable_data_for().

4714 {
4716  return;
4717  }
4718 
4720  const GUID_t guid = make_id(participant_id_,
4723  }
4724 
4726  const GUID_t guid = make_id(participant_id_,
4729  }
4730 
4732 }
DDS::ReturnCode_t write_participant_message_data(const DCPS::GUID_t &rid, DCPS::SequenceNumber &sn, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:5110
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER
Definition: RtpsCore.idl:218
void end_historic_samples(const DCPS::GUID_t &reader)
Definition: Sedp.cpp:3513
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
LivelinessWriter_rch participant_message_writer_
Definition: Sedp.h:1284
GUID_t participant_id_
Definition: Sedp.h:1229
DCPS::SequenceNumber local_participant_automatic_liveliness_sn_
Definition: Sedp.h:1250
const DCPS::EntityId_t PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE
Definition: MessageTypes.h:117
static SequenceNumber SEQUENCENUMBER_UNKNOWN()
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
DCPS::SequenceNumber local_participant_manual_liveliness_sn_
Definition: Sedp.h:1251
const DCPS::EntityId_t PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE
Definition: MessageTypes.h:119

◆ write_durable_participant_message_data_secure()

void OpenDDS::RTPS::Sedp::write_durable_participant_message_data_secure ( const DCPS::GUID_t reader)
private

Definition at line 4736 of file Sedp.cpp.

References OpenDDS::RTPS::Spdp::available_builtin_endpoints(), DDS::Security::BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER, local_participant_automatic_liveliness_sn_secure_, local_participant_manual_liveliness_sn_secure_, OpenDDS::DCPS::make_id(), participant_id_, OpenDDS::RTPS::PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE, OpenDDS::RTPS::PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE, participant_message_secure_writer_, OpenDDS::DCPS::SequenceNumber::SEQUENCENUMBER_UNKNOWN(), spdp_, and write_participant_message_data_secure().

Referenced by association_complete_i(), and replay_durable_data_for().

4737 {
4739  return;
4740  }
4741 
4743  const GUID_t guid = make_id(participant_id_,
4746  }
4747 
4749  const GUID_t guid = make_id(participant_id_,
4752  }
4753 
4755 }
void end_historic_samples(const DCPS::GUID_t &reader)
Definition: Sedp.cpp:3513
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
GUID_t participant_id_
Definition: Sedp.h:1229
DCPS::SequenceNumber local_participant_manual_liveliness_sn_secure_
Definition: Sedp.h:1254
DCPS::SequenceNumber local_participant_automatic_liveliness_sn_secure_
Definition: Sedp.h:1253
const DCPS::EntityId_t PARTICIPANT_MESSAGE_DATA_KIND_AUTOMATIC_LIVELINESS_UPDATE
Definition: MessageTypes.h:117
LivelinessWriter_rch participant_message_secure_writer_
Definition: Sedp.h:1286
static SequenceNumber SEQUENCENUMBER_UNKNOWN()
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
DDS::ReturnCode_t write_participant_message_data_secure(const DCPS::GUID_t &rid, DCPS::SequenceNumber &sn, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:5135
const DCPS::EntityId_t PARTICIPANT_MESSAGE_DATA_KIND_MANUAL_LIVELINESS_UPDATE
Definition: MessageTypes.h:119
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER

◆ write_durable_publication_data()

void OpenDDS::RTPS::Sedp::write_durable_publication_data ( const DCPS::GUID_t reader,
bool  secure 
)
private

Definition at line 4641 of file Sedp.cpp.

References OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER, local_publications_, publications_secure_writer_, publications_writer_, DDS::Security::SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER, spdp_, write_publication_data(), and write_publication_data_secure().

Referenced by association_complete_i(), and replay_durable_data_for().

4642 {
4644 #ifdef OPENDDS_SECURITY
4646 #endif
4647  ))) {
4648  return;
4649  }
4650 
4651  if (secure) {
4652 #ifdef OPENDDS_SECURITY
4653  LocalPublicationIter pub, end = local_publications_.end();
4654  for (pub = local_publications_.begin(); pub != end; ++pub) {
4655  if (pub->second.security_attribs_.base.is_discovery_protected) {
4656  write_publication_data_secure(pub->first, pub->second, reader);
4657  }
4658  }
4660 #endif
4661  } else {
4662  LocalPublicationIter pub, end = local_publications_.end();
4663  for (pub = local_publications_.begin(); pub != end; ++pub) {
4664 #ifdef OPENDDS_SECURITY
4665  if (!pub->second.security_attribs_.base.is_discovery_protected) {
4666  write_publication_data(pub->first, pub->second, reader);
4667  }
4668 #else
4669  write_publication_data(pub->first, pub->second, reader);
4670 #endif
4671  }
4673  }
4674 }
DiscoveryWriter_rch publications_secure_writer_
Definition: Sedp.h:1278
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER
Definition: RtpsCore.idl:202
DDS::ReturnCode_t write_publication_data_secure(const DCPS::GUID_t &rid, LocalPublication &pub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4904
void end_historic_samples(const DCPS::GUID_t &reader)
Definition: Sedp.cpp:3513
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
const BuiltinEndpointSet_t SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
LocalPublicationMap local_publications_
Definition: Sedp.h:1232
DDS::ReturnCode_t write_publication_data(const DCPS::GUID_t &rid, LocalPublication &pub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4830
DiscoveryWriter_rch publications_writer_
Definition: Sedp.h:1276
LocalPublicationMap::iterator LocalPublicationIter
Definition: Sedp.h:321

◆ write_durable_subscription_data()

void OpenDDS::RTPS::Sedp::write_durable_subscription_data ( const DCPS::GUID_t reader,
bool  secure 
)
private

Definition at line 4677 of file Sedp.cpp.

References OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER, is_security_enabled(), local_subscriptions_, DDS::Security::SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER, spdp_, subscriptions_secure_writer_, subscriptions_writer_, write_subscription_data(), and write_subscription_data_secure().

Referenced by association_complete_i(), and replay_durable_data_for().

4678 {
4680 #ifdef OPENDDS_SECURITY
4682 #endif
4683  ))) {
4684  return;
4685  }
4686 
4687  if (secure) {
4688 #ifdef OPENDDS_SECURITY
4690  for (sub = local_subscriptions_.begin(); sub != end; ++sub) {
4691  if (is_security_enabled() && sub->second.security_attribs_.base.is_discovery_protected) {
4692  write_subscription_data_secure(sub->first, sub->second, reader);
4693  }
4694  }
4696 #endif
4697  } else {
4699  for (sub = local_subscriptions_.begin(); sub != end; ++sub) {
4700 #ifdef OPENDDS_SECURITY
4701  if (!(is_security_enabled() && sub->second.security_attribs_.base.is_discovery_protected)) {
4702  write_subscription_data(sub->first, sub->second, reader);
4703  }
4704 #else
4705  write_subscription_data(sub->first, sub->second, reader);
4706 #endif
4707  }
4709  }
4710 }
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER
Definition: RtpsCore.idl:206
LocalSubscriptionMap local_subscriptions_
Definition: Sedp.h:1233
LocalSubscriptionMap::iterator LocalSubscriptionIter
Definition: Sedp.h:326
bool is_security_enabled()
Definition: Sedp.h:1176
DDS::ReturnCode_t write_subscription_data(const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4982
DDS::ReturnCode_t write_subscription_data_secure(const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:5056
void end_historic_samples(const DCPS::GUID_t &reader)
Definition: Sedp.cpp:3513
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
DiscoveryWriter_rch subscriptions_writer_
Definition: Sedp.h:1280
DiscoveryWriter_rch subscriptions_secure_writer_
Definition: Sedp.h:1282
const BuiltinEndpointSet_t SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER

◆ write_participant_message_data()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_participant_message_data ( const DCPS::GUID_t rid,
DCPS::SequenceNumber sn,
const DCPS::GUID_t reader = GUID_UNKNOWN 
)
private

Definition at line 5110 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::RTPS::Spdp::associated(), associated_participants_, OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::RTPS::BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::GUID_UNKNOWN, LM_INFO, notify_liveliness(), participant_message_writer_, OpenDDS::RTPS::ParticipantMessageData::participantGuid, DDS::RETCODE_OK, DDS::RETCODE_PRECONDITION_NOT_MET, and spdp_.

Referenced by signal_liveliness_unsecure(), and write_durable_participant_message_data().

5114 {
5117  }
5119  //Update liveliness for local subscriptions
5120  ParticipantMessageData pmd;
5121  pmd.participantGuid = rid;
5122  notify_liveliness(pmd);
5123  if (spdp_.associated() && (reader != GUID_UNKNOWN ||
5124  !associated_participants_.empty())) {
5125  result = participant_message_writer_->write_participant_message(pmd, reader, sn);
5126  } else if (DCPS::DCPS_debug_level > 3) {
5127  ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) Sedp::write_participant_message_data - ")
5128  ACE_TEXT("not currently associated, dropping msg.\n")));
5129  }
5130  return result;
5131 }
#define ACE_DEBUG(X)
const ReturnCode_t RETCODE_PRECONDITION_NOT_MET
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
bool associated() const
Definition: Spdp.cpp:3682
const BuiltinEndpointSet_t BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER
Definition: RtpsCore.idl:218
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
LivelinessWriter_rch participant_message_writer_
Definition: Sedp.h:1284
DCPS::RepoIdSet associated_participants_
Definition: Sedp.h:864
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
void notify_liveliness(const ParticipantMessageData &pmd)
Definition: Sedp.cpp:2671
const ReturnCode_t RETCODE_OK
DDS::ReturnCode_t write_participant_message(const ParticipantMessageData &pmd, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence)
Definition: Sedp.cpp:3346

◆ write_participant_message_data_secure()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_participant_message_data_secure ( const DCPS::GUID_t rid,
DCPS::SequenceNumber sn,
const DCPS::GUID_t reader = GUID_UNKNOWN 
)
private

Definition at line 5135 of file Sedp.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::RTPS::Spdp::associated(), associated_participants_, OpenDDS::RTPS::Spdp::available_builtin_endpoints(), DDS::Security::BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::GUID_UNKNOWN, LM_INFO, participant_message_secure_writer_, OpenDDS::RTPS::ParticipantMessageData::participantGuid, DDS::RETCODE_OK, DDS::RETCODE_PRECONDITION_NOT_MET, and spdp_.

Referenced by signal_liveliness_secure(), and write_durable_participant_message_data_secure().

5139 {
5142  }
5143 
5145  if (spdp_.associated() && (reader != GUID_UNKNOWN ||
5146  !associated_participants_.empty())) {
5147  ParticipantMessageData pmd;
5148  pmd.participantGuid = rid;
5150  } else if (DCPS::DCPS_debug_level > 3) {
5151  ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) Sedp::write_participant_message_data_secure - ")
5152  ACE_TEXT("not currently associated, dropping msg.\n")));
5153  }
5154  return result;
5155 }
#define ACE_DEBUG(X)
const ReturnCode_t RETCODE_PRECONDITION_NOT_MET
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
bool associated() const
Definition: Spdp.cpp:3682
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
DCPS::RepoIdSet associated_participants_
Definition: Sedp.h:864
ACE_TEXT("TCP_Factory")
LivelinessWriter_rch participant_message_secure_writer_
Definition: Sedp.h:1286
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const ReturnCode_t RETCODE_OK
DDS::ReturnCode_t write_participant_message(const ParticipantMessageData &pmd, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence)
Definition: Sedp.cpp:3346
const BuiltinEndpointSet_t BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER

◆ write_publication_data()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_publication_data ( const DCPS::GUID_t rid,
LocalPublication pub,
const DCPS::GUID_t reader = GUID_UNKNOWN 
)
private

Definition at line 4830 of file Sedp.cpp.

References DDS::Security::EndpointSecurityAttributes::base, DDS::Security::TopicSecurityAttributes::is_discovery_protected, is_security_enabled(), DDS::RETCODE_OK, OpenDDS::RTPS::LocalEntity::security_attribs_, write_publication_data_secure(), and write_publication_data_unsecure().

Referenced by add_publication(), update_publication_locators(), update_publication_qos(), update_topic_qos(), and write_durable_publication_data().

4834 {
4836 
4837 #ifdef OPENDDS_SECURITY
4838  if (is_security_enabled() && lp.security_attribs_.base.is_discovery_protected) {
4839  result = write_publication_data_secure(rid, lp, reader);
4840 
4841  } else {
4842 #endif
4843 
4844  result = write_publication_data_unsecure(rid, lp, reader);
4845 
4846 #ifdef OPENDDS_SECURITY
4847  }
4848 #endif
4849 
4850  return result;
4851 }
DDS::ReturnCode_t write_publication_data_unsecure(const DCPS::GUID_t &rid, LocalPublication &pub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4854
DDS::ReturnCode_t write_publication_data_secure(const DCPS::GUID_t &rid, LocalPublication &pub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:4904
bool is_security_enabled()
Definition: Sedp.h:1176
const ReturnCode_t RETCODE_OK

◆ write_publication_data_secure()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_publication_data_secure ( const DCPS::GUID_t rid,
LocalPublication pub,
const DCPS::GUID_t reader = GUID_UNKNOWN 
)
private

Definition at line 4904 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::RTPS::Spdp::associated(), associated_participants_, OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::RTPS::ParameterListConverter::DiscoveredPublication_SecurityWrapper::data, OpenDDS::DCPS::DCPS_debug_level, DDS::Security::EndpointSecurityInfo::endpoint_security_attributes, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER, OpenDDS::DCPS::GUID_UNKNOWN, OpenDDS::RTPS::LocalEntity::have_ice_agent_info, OpenDDS::RTPS::LocalEntity::ice_agent_info, LM_ERROR, LM_INFO, DDS::Security::EndpointSecurityAttributes::plugin_endpoint_attributes, DDS::Security::EndpointSecurityInfo::plugin_endpoint_security_attributes, populate_discovered_writer_msg(), publications_secure_writer_, DDS::RETCODE_ERROR, DDS::RETCODE_OK, DDS::RETCODE_PRECONDITION_NOT_MET, OpenDDS::RTPS::LocalEntity::security_attribs_, OpenDDS::RTPS::security_attributes_to_bitmask(), OpenDDS::RTPS::ParameterListConverter::DiscoveredPublication_SecurityWrapper::security_info, DDS::Security::SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER, OpenDDS::RTPS::LocalEntity::sequence_, spdp_, OpenDDS::RTPS::ParameterListConverter::to_param_list(), OpenDDS::RTPS::LocalEntity::type_info_, and use_xtypes_.

Referenced by write_durable_publication_data(), and write_publication_data().

4908 {
4911  }
4912 
4914  if (spdp_.associated() && (reader != GUID_UNKNOWN ||
4915  !associated_participants_.empty())) {
4916 
4917  ParameterListConverter::DiscoveredPublication_SecurityWrapper dwd;
4918  ParameterList plist;
4919  populate_discovered_writer_msg(dwd.data, rid, lp);
4920 
4921  dwd.security_info.endpoint_security_attributes = security_attributes_to_bitmask(lp.security_attribs_);
4922  dwd.security_info.plugin_endpoint_security_attributes = lp.security_attribs_.plugin_endpoint_attributes;
4923 
4924  // Convert to parameter list
4925  if (!ParameterListConverter::to_param_list(dwd, plist, use_xtypes_, lp.type_info_, false)) {
4926  ACE_ERROR((LM_ERROR,
4927  ACE_TEXT("(%P|%t) ERROR: Sedp::write_publication_data_secure - ")
4928  ACE_TEXT("Failed to convert DiscoveredWriterData ")
4929  ACE_TEXT("to ParameterList\n")));
4930  result = DDS::RETCODE_ERROR;
4931  }
4932  if (lp.have_ice_agent_info) {
4933  ICE::AgentInfoMap ai_map;
4934  ai_map["DATA"] = lp.ice_agent_info;
4935  if (!ParameterListConverter::to_param_list(ai_map, plist)) {
4936  ACE_ERROR((LM_ERROR,
4937  ACE_TEXT("(%P|%t) ERROR: Sedp::write_publication_data_secure - ")
4938  ACE_TEXT("Failed to convert ICE Agent info ")
4939  ACE_TEXT("to ParameterList\n")));
4940  result = DDS::RETCODE_ERROR;
4941  }
4942  }
4943  if (DDS::RETCODE_OK == result) {
4944  GUID_t effective_reader = reader;
4945  if (reader != GUID_UNKNOWN)
4946  effective_reader.entityId = ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER;
4947  result = publications_secure_writer_->write_parameter_list(plist, effective_reader, lp.sequence_);
4948  }
4949  } else if (DCPS::DCPS_debug_level > 3) {
4950  ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) Sedp::write_publication_data_secure - ")
4951  ACE_TEXT("not currently associated, dropping msg.\n")));
4952  }
4953  return result;
4954 }
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
DiscoveryWriter_rch publications_secure_writer_
Definition: Sedp.h:1278
const ReturnCode_t RETCODE_PRECONDITION_NOT_MET
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_READER
Definition: MessageTypes.h:78
bool associated() const
Definition: Spdp.cpp:3682
const bool use_xtypes_
Definition: Sedp.h:1246
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
DCPS::RepoIdSet associated_participants_
Definition: Sedp.h:864
sequence< Parameter > ParameterList
ACE_TEXT("TCP_Factory")
void populate_discovered_writer_msg(DCPS::DiscoveredWriterData &dwd, const DCPS::GUID_t &publication_id, const LocalPublication &pub)
Definition: Sedp.cpp:4551
const BuiltinEndpointSet_t SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const ReturnCode_t RETCODE_ERROR
bool to_param_list(const DDS::ParticipantBuiltinTopicData &pbtd, ParameterList &param_list)
const ReturnCode_t RETCODE_OK
DDS::ReturnCode_t write_parameter_list(const ParameterList &plist, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence)
Definition: Sedp.cpp:3308
DDS::Security::ParticipantSecurityAttributesMask security_attributes_to_bitmask(const DDS::Security::ParticipantSecurityAttributes &sec_attr)
Definition: MessageUtils.h:177

◆ write_publication_data_unsecure()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_publication_data_unsecure ( const DCPS::GUID_t rid,
LocalPublication pub,
const DCPS::GUID_t reader = GUID_UNKNOWN 
)
private

Definition at line 4854 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::RTPS::Spdp::associated(), associated_participants_, OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER, OpenDDS::DCPS::GUID_UNKNOWN, OpenDDS::RTPS::LocalEntity::have_ice_agent_info, OpenDDS::RTPS::LocalEntity::ice_agent_info, LM_ERROR, LM_INFO, populate_discovered_writer_msg(), publications_writer_, DDS::RETCODE_ERROR, DDS::RETCODE_OK, DDS::RETCODE_PRECONDITION_NOT_MET, OpenDDS::RTPS::LocalEntity::sequence_, spdp_, OpenDDS::RTPS::ParameterListConverter::to_param_list(), OpenDDS::RTPS::LocalEntity::type_info_, and use_xtypes_.

Referenced by write_publication_data().

4858 {
4861  }
4862 
4864  if (spdp_.associated() && (reader != GUID_UNKNOWN ||
4865  !associated_participants_.empty())) {
4866  DCPS::DiscoveredWriterData dwd;
4867  ParameterList plist;
4868  populate_discovered_writer_msg(dwd, rid, lp);
4869 
4870  // Convert to parameter list
4871  if (!ParameterListConverter::to_param_list(dwd, plist, use_xtypes_, lp.type_info_, false)) {
4872  ACE_ERROR((LM_ERROR,
4873  ACE_TEXT("(%P|%t) ERROR: Sedp::write_publication_data_unsecure - ")
4874  ACE_TEXT("Failed to convert DiscoveredWriterData ")
4875  ACE_TEXT(" to ParameterList\n")));
4876  result = DDS::RETCODE_ERROR;
4877  }
4878 #ifdef OPENDDS_SECURITY
4879  if (lp.have_ice_agent_info) {
4880  ICE::AgentInfoMap ai_map;
4881  ai_map["DATA"] = lp.ice_agent_info;
4882  if (!ParameterListConverter::to_param_list(ai_map, plist)) {
4883  ACE_ERROR((LM_ERROR,
4884  ACE_TEXT("(%P|%t) ERROR: Sedp::write_publication_data_unsecure - ")
4885  ACE_TEXT("Failed to convert ICE Agent info ")
4886  ACE_TEXT("to ParameterList\n")));
4887  result = DDS::RETCODE_ERROR;
4888  }
4889  }
4890 #endif
4891 
4892  if (DDS::RETCODE_OK == result) {
4893  result = publications_writer_->write_parameter_list(plist, reader, lp.sequence_);
4894  }
4895  } else if (DCPS::DCPS_debug_level > 3) {
4896  ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) Sedp::write_publication_data_unsecure - ")
4897  ACE_TEXT("not currently associated, dropping msg.\n")));
4898  }
4899  return result;
4900 }
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
const ReturnCode_t RETCODE_PRECONDITION_NOT_MET
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER
Definition: RtpsCore.idl:202
bool associated() const
Definition: Spdp.cpp:3682
const bool use_xtypes_
Definition: Sedp.h:1246
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
DCPS::RepoIdSet associated_participants_
Definition: Sedp.h:864
sequence< Parameter > ParameterList
ACE_TEXT("TCP_Factory")
void populate_discovered_writer_msg(DCPS::DiscoveredWriterData &dwd, const DCPS::GUID_t &publication_id, const LocalPublication &pub)
Definition: Sedp.cpp:4551
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const ReturnCode_t RETCODE_ERROR
bool to_param_list(const DDS::ParticipantBuiltinTopicData &pbtd, ParameterList &param_list)
const ReturnCode_t RETCODE_OK
DDS::ReturnCode_t write_parameter_list(const ParameterList &plist, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence)
Definition: Sedp.cpp:3308
DiscoveryWriter_rch publications_writer_
Definition: Sedp.h:1276

◆ write_stateless_message()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_stateless_message ( const DDS::Security::ParticipantStatelessMessage msg,
const DCPS::GUID_t reader 
)

Definition at line 4758 of file Sedp.cpp.

References participant_stateless_message_writer_, and OpenDDS::DCPS::SequenceNumber::SEQUENCENUMBER_UNKNOWN().

Referenced by OpenDDS::RTPS::Sedp::SecurityWriter::SecurityWriter().

4760 {
4761  DCPS::SequenceNumber sequence = DCPS::SequenceNumber::SEQUENCENUMBER_UNKNOWN();
4762  return participant_stateless_message_writer_->write_stateless_message(msg, reader, sequence);
4763 }
DDS::ReturnCode_t write_stateless_message(const DDS::Security::ParticipantStatelessMessage &msg, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence)
Definition: Sedp.cpp:3377
static SequenceNumber SEQUENCENUMBER_UNKNOWN()
SecurityWriter_rch participant_stateless_message_writer_
Definition: Sedp.h:1287

◆ write_subscription_data()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_subscription_data ( const DCPS::GUID_t rid,
LocalSubscription sub,
const DCPS::GUID_t reader = GUID_UNKNOWN 
)
private

Definition at line 4982 of file Sedp.cpp.

References DDS::Security::EndpointSecurityAttributes::base, DDS::Security::TopicSecurityAttributes::is_discovery_protected, is_security_enabled(), DDS::RETCODE_OK, OpenDDS::RTPS::LocalEntity::security_attribs_, write_subscription_data_secure(), and write_subscription_data_unsecure().

Referenced by add_subscription(), association_complete_i(), remove_assoc(), update_subscription_locators(), update_subscription_params(), update_subscription_qos(), update_topic_qos(), and write_durable_subscription_data().

4986 {
4988 
4989 #ifdef OPENDDS_SECURITY
4990  if (is_security_enabled() && ls.security_attribs_.base.is_discovery_protected) {
4991  result = write_subscription_data_secure(rid, ls, reader);
4992 
4993  } else {
4994 #endif
4995 
4996  result = write_subscription_data_unsecure(rid, ls, reader);
4997 
4998 #ifdef OPENDDS_SECURITY
4999  }
5000 #endif
5001 
5002  return result;
5003 }
bool is_security_enabled()
Definition: Sedp.h:1176
DDS::ReturnCode_t write_subscription_data_secure(const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:5056
DDS::ReturnCode_t write_subscription_data_unsecure(const DCPS::GUID_t &rid, LocalSubscription &sub, const DCPS::GUID_t &reader=GUID_UNKNOWN)
Definition: Sedp.cpp:5006
const ReturnCode_t RETCODE_OK

◆ write_subscription_data_secure()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_subscription_data_secure ( const DCPS::GUID_t rid,
LocalSubscription sub,
const DCPS::GUID_t reader = GUID_UNKNOWN 
)
private

Definition at line 5056 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::RTPS::Spdp::associated(), associated_participants_, OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::RTPS::ParameterListConverter::DiscoveredSubscription_SecurityWrapper::data, OpenDDS::DCPS::DCPS_debug_level, DDS::Security::EndpointSecurityInfo::endpoint_security_attributes, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER, OpenDDS::DCPS::GUID_UNKNOWN, OpenDDS::RTPS::LocalEntity::have_ice_agent_info, OpenDDS::RTPS::LocalEntity::ice_agent_info, LM_ERROR, LM_INFO, DDS::Security::EndpointSecurityAttributes::plugin_endpoint_attributes, DDS::Security::EndpointSecurityInfo::plugin_endpoint_security_attributes, populate_discovered_reader_msg(), DDS::RETCODE_ERROR, DDS::RETCODE_OK, DDS::RETCODE_PRECONDITION_NOT_MET, OpenDDS::RTPS::LocalEntity::security_attribs_, OpenDDS::RTPS::security_attributes_to_bitmask(), OpenDDS::RTPS::ParameterListConverter::DiscoveredSubscription_SecurityWrapper::security_info, DDS::Security::SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER, OpenDDS::RTPS::LocalEntity::sequence_, spdp_, subscriptions_secure_writer_, OpenDDS::RTPS::ParameterListConverter::to_param_list(), OpenDDS::RTPS::LocalEntity::type_info_, and use_xtypes_.

Referenced by write_durable_subscription_data(), and write_subscription_data().

5060 {
5063  }
5064 
5066  if (spdp_.associated() && (reader != GUID_UNKNOWN ||
5067  !associated_participants_.empty())) {
5068 
5069  ParameterListConverter::DiscoveredSubscription_SecurityWrapper drd;
5070  ParameterList plist;
5071  populate_discovered_reader_msg(drd.data, rid, ls);
5072 
5073  drd.security_info.endpoint_security_attributes = security_attributes_to_bitmask(ls.security_attribs_);
5074  drd.security_info.plugin_endpoint_security_attributes = ls.security_attribs_.plugin_endpoint_attributes;
5075 
5076  // Convert to parameter list
5077  if (!ParameterListConverter::to_param_list(drd, plist, use_xtypes_, ls.type_info_, false)) {
5078  ACE_ERROR((LM_ERROR,
5079  ACE_TEXT("(%P|%t) ERROR: Sedp::write_subscription_data_secure - ")
5080  ACE_TEXT("Failed to convert DiscoveredReaderData ")
5081  ACE_TEXT("to ParameterList\n")));
5082  result = DDS::RETCODE_ERROR;
5083  }
5084  if (ls.have_ice_agent_info) {
5085  ICE::AgentInfoMap ai_map;
5086  ai_map["DATA"] = ls.ice_agent_info;
5087  if (!ParameterListConverter::to_param_list(ai_map, plist)) {
5088  ACE_ERROR((LM_ERROR,
5089  ACE_TEXT("(%P|%t) ERROR: Sedp::write_subscription_data_secure - ")
5090  ACE_TEXT("Failed to convert ICE Agent info ")
5091  ACE_TEXT("to ParameterList\n")));
5092  result = DDS::RETCODE_ERROR;
5093  }
5094  }
5095  if (DDS::RETCODE_OK == result) {
5096  GUID_t effective_reader = reader;
5097  if (reader != GUID_UNKNOWN)
5098  effective_reader.entityId = ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER;
5099  result = subscriptions_secure_writer_->write_parameter_list(plist, effective_reader, ls.sequence_);
5100  }
5101  } else if (DCPS::DCPS_debug_level > 3) {
5102  ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) Sedp::write_subscription_data_secure - ")
5103  ACE_TEXT("not currently associated, dropping msg.\n")));
5104  }
5105  return result;
5106 }
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
const ReturnCode_t RETCODE_PRECONDITION_NOT_MET
void populate_discovered_reader_msg(DCPS::DiscoveredReaderData &drd, const DCPS::GUID_t &subscription_id, const LocalSubscription &sub)
Definition: Sedp.cpp:4586
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
bool associated() const
Definition: Spdp.cpp:3682
const bool use_xtypes_
Definition: Sedp.h:1246
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
DCPS::RepoIdSet associated_participants_
Definition: Sedp.h:864
sequence< Parameter > ParameterList
ACE_TEXT("TCP_Factory")
DiscoveryWriter_rch subscriptions_secure_writer_
Definition: Sedp.h:1282
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const ReturnCode_t RETCODE_ERROR
bool to_param_list(const DDS::ParticipantBuiltinTopicData &pbtd, ParameterList &param_list)
const ReturnCode_t RETCODE_OK
const BuiltinEndpointSet_t SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_READER
Definition: MessageTypes.h:80
DDS::ReturnCode_t write_parameter_list(const ParameterList &plist, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence)
Definition: Sedp.cpp:3308
DDS::Security::ParticipantSecurityAttributesMask security_attributes_to_bitmask(const DDS::Security::ParticipantSecurityAttributes &sec_attr)
Definition: MessageUtils.h:177

◆ write_subscription_data_unsecure()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_subscription_data_unsecure ( const DCPS::GUID_t rid,
LocalSubscription sub,
const DCPS::GUID_t reader = GUID_UNKNOWN 
)
private

Definition at line 5006 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::RTPS::Spdp::associated(), associated_participants_, OpenDDS::RTPS::Spdp::available_builtin_endpoints(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::RTPS::DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER, OpenDDS::DCPS::GUID_UNKNOWN, OpenDDS::RTPS::LocalEntity::have_ice_agent_info, OpenDDS::RTPS::LocalEntity::ice_agent_info, LM_ERROR, LM_INFO, populate_discovered_reader_msg(), DDS::RETCODE_ERROR, DDS::RETCODE_OK, DDS::RETCODE_PRECONDITION_NOT_MET, OpenDDS::RTPS::LocalEntity::sequence_, spdp_, subscriptions_writer_, OpenDDS::RTPS::ParameterListConverter::to_param_list(), OpenDDS::RTPS::LocalEntity::type_info_, and use_xtypes_.

Referenced by write_subscription_data().

5010 {
5013  }
5014 
5016  if (spdp_.associated() && (reader != GUID_UNKNOWN ||
5017  !associated_participants_.empty())) {
5018  DCPS::DiscoveredReaderData drd;
5019  ParameterList plist;
5020  populate_discovered_reader_msg(drd, rid, ls);
5021 
5022  // Convert to parameter list
5023  if (!ParameterListConverter::to_param_list(drd, plist, use_xtypes_, ls.type_info_, false)) {
5024  ACE_ERROR((LM_ERROR,
5025  ACE_TEXT("(%P|%t) ERROR: Sedp::write_subscription_data_unsecure - ")
5026  ACE_TEXT("Failed to convert DiscoveredReaderData ")
5027  ACE_TEXT("to ParameterList\n")));
5028  result = DDS::RETCODE_ERROR;
5029  }
5030 
5031 #ifdef OPENDDS_SECURITY
5032  if (ls.have_ice_agent_info) {
5033  ICE::AgentInfoMap ai_map;
5034  ai_map["DATA"] = ls.ice_agent_info;
5035  if (!ParameterListConverter::to_param_list(ai_map, plist)) {
5036  ACE_ERROR((LM_ERROR,
5037  ACE_TEXT("(%P|%t) ERROR: Sedp::write_subscription_data_unsecure - ")
5038  ACE_TEXT("Failed to convert ICE Agent info ")
5039  ACE_TEXT("to ParameterList\n")));
5040  result = DDS::RETCODE_ERROR;
5041  }
5042  }
5043 #endif
5044  if (DDS::RETCODE_OK == result) {
5045  result = subscriptions_writer_->write_parameter_list(plist, reader, ls.sequence_);
5046  }
5047  } else if (DCPS::DCPS_debug_level > 3) {
5048  ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) Sedp::write_subscription_data_unsecure - ")
5049  ACE_TEXT("not currently associated, dropping msg.\n")));
5050  }
5051  return result;
5052 }
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER
Definition: RtpsCore.idl:206
const ReturnCode_t RETCODE_PRECONDITION_NOT_MET
void populate_discovered_reader_msg(DCPS::DiscoveredReaderData &drd, const DCPS::GUID_t &subscription_id, const LocalSubscription &sub)
Definition: Sedp.cpp:4586
const GUID_t GUID_UNKNOWN
Nil value for GUID.
Definition: GuidUtils.h:59
bool associated() const
Definition: Spdp.cpp:3682
const bool use_xtypes_
Definition: Sedp.h:1246
BuiltinEndpointSet_t available_builtin_endpoints() const
Definition: Spdp.h:201
DiscoveryWriter_rch subscriptions_writer_
Definition: Sedp.h:1280
DCPS::RepoIdSet associated_participants_
Definition: Sedp.h:864
sequence< Parameter > ParameterList
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const ReturnCode_t RETCODE_ERROR
bool to_param_list(const DDS::ParticipantBuiltinTopicData &pbtd, ParameterList &param_list)
const ReturnCode_t RETCODE_OK
DDS::ReturnCode_t write_parameter_list(const ParameterList &plist, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence)
Definition: Sedp.cpp:3308

◆ write_volatile_message()

DDS::ReturnCode_t OpenDDS::RTPS::Sedp::write_volatile_message ( DDS::Security::ParticipantVolatileMessageSecure msg,
const DCPS::GUID_t reader 
)

Definition at line 4766 of file Sedp.cpp.

References DDS::Security::ParticipantGenericMessage::message_identity, participant_volatile_message_secure_writer_, DDS::Security::MessageIdentity::sequence_number, and OpenDDS::DCPS::SequenceNumber::SEQUENCENUMBER_UNKNOWN().

Referenced by send_datareader_crypto_tokens(), and send_datawriter_crypto_tokens().

4768 {
4770  DCPS::SequenceNumber sequence = DCPS::SequenceNumber::SEQUENCENUMBER_UNKNOWN();
4772 }
const DCPS::SequenceNumber & get_seq() const
Definition: Sedp.h:460
SecurityWriter_rch participant_volatile_message_secure_writer_
Definition: Sedp.h:1290
DDS::ReturnCode_t write_volatile_message_secure(const DDS::Security::ParticipantVolatileMessageSecure &msg, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence)
Definition: Sedp.cpp:3405
static SequenceNumber SEQUENCENUMBER_UNKNOWN()

Friends And Related Function Documentation

◆ Spdp

friend class Spdp
friend

Definition at line 1289 of file Sedp.h.

Member Data Documentation

◆ access_control_

DDS::Security::AccessControl_var OpenDDS::RTPS::Sedp::access_control_
protected

Definition at line 1258 of file Sedp.h.

Referenced by get_access_control(), is_security_enabled(), and set_access_control().

◆ associated_participants_

DCPS::RepoIdSet OpenDDS::RTPS::Sedp::associated_participants_
private

◆ crypto_handle_

DDS::Security::ParticipantCryptoHandle OpenDDS::RTPS::Sedp::crypto_handle_
protected

◆ crypto_key_exchange_

DDS::Security::CryptoKeyExchange_var OpenDDS::RTPS::Sedp::crypto_key_exchange_
protected

Definition at line 1260 of file Sedp.h.

Referenced by get_crypto_key_exchange(), and set_crypto_key_exchange().

◆ crypto_key_factory_

DDS::Security::CryptoKeyFactory_var OpenDDS::RTPS::Sedp::crypto_key_factory_
protected

Definition at line 1259 of file Sedp.h.

Referenced by get_crypto_key_factory(), and set_crypto_key_factory().

◆ dcps_participant_secure_reader_

DiscoveryReader_rch OpenDDS::RTPS::Sedp::dcps_participant_secure_reader_
protected

Definition at line 1311 of file Sedp.h.

Referenced by associate(), init(), init_security(), shutdown(), and ~Sedp().

◆ dcps_participant_secure_writer_

DiscoveryWriter_rch OpenDDS::RTPS::Sedp::dcps_participant_secure_writer_
protected

◆ discovered_publications_

DiscoveredPublicationMap OpenDDS::RTPS::Sedp::discovered_publications_
protected

◆ discovered_subscriptions_

DiscoveredSubscriptionMap OpenDDS::RTPS::Sedp::discovered_subscriptions_
protected

◆ event_dispatcher_

DCPS::EventDispatcher_rch OpenDDS::RTPS::Sedp::event_dispatcher_
private

◆ handle_registry_

Security::HandleRegistry_rch OpenDDS::RTPS::Sedp::handle_registry_
protected

Definition at line 1261 of file Sedp.h.

Referenced by get_handle_registry(), and set_handle_registry().

◆ ice_agent_

DCPS::RcHandle<ICE::Agent> OpenDDS::RTPS::Sedp::ice_agent_
protected

◆ ignored_guids_

RepoIdSet OpenDDS::RTPS::Sedp::ignored_guids_
protected

Definition at line 1230 of file Sedp.h.

Referenced by ignore(), and ignoring().

◆ job_queue_

DCPS::JobQueue_rch OpenDDS::RTPS::Sedp::job_queue_
private

Definition at line 773 of file Sedp.h.

Referenced by init(), job_queue(), and ~Sedp().

◆ local_participant_automatic_liveliness_sn_

DCPS::SequenceNumber OpenDDS::RTPS::Sedp::local_participant_automatic_liveliness_sn_
protected

Definition at line 1250 of file Sedp.h.

Referenced by signal_liveliness_unsecure(), and write_durable_participant_message_data().

◆ local_participant_automatic_liveliness_sn_secure_

DCPS::SequenceNumber OpenDDS::RTPS::Sedp::local_participant_automatic_liveliness_sn_secure_
protected

◆ local_participant_manual_liveliness_sn_

DCPS::SequenceNumber OpenDDS::RTPS::Sedp::local_participant_manual_liveliness_sn_
protected

Definition at line 1251 of file Sedp.h.

Referenced by signal_liveliness_unsecure(), and write_durable_participant_message_data().

◆ local_participant_manual_liveliness_sn_secure_

DCPS::SequenceNumber OpenDDS::RTPS::Sedp::local_participant_manual_liveliness_sn_secure_
protected

◆ local_publications_

LocalPublicationMap OpenDDS::RTPS::Sedp::local_publications_
protected

◆ local_subscriptions_

LocalSubscriptionMap OpenDDS::RTPS::Sedp::local_subscriptions_
protected

◆ lock_

ACE_Thread_Mutex& OpenDDS::RTPS::Sedp::lock_
protected

◆ matching_data_buffer_

MatchingDataMap OpenDDS::RTPS::Sedp::matching_data_buffer_
protected

◆ max_type_lookup_service_reply_period_

TimeDuration OpenDDS::RTPS::Sedp::max_type_lookup_service_reply_period_
protected

Definition at line 1244 of file Sedp.h.

Referenced by get_remote_type_objects(), init(), and remove_expired_endpoints().

◆ orig_seq_numbers_

OrigSeqNumberMap OpenDDS::RTPS::Sedp::orig_seq_numbers_
protected

◆ participant_id_

GUID_t OpenDDS::RTPS::Sedp::participant_id_
protected

◆ participant_message_reader_

LivelinessReader_rch OpenDDS::RTPS::Sedp::participant_message_reader_
protected

Definition at line 1306 of file Sedp.h.

Referenced by associate(), init(), and shutdown().

◆ participant_message_secure_reader_

LivelinessReader_rch OpenDDS::RTPS::Sedp::participant_message_secure_reader_
protected

Definition at line 1308 of file Sedp.h.

Referenced by associate(), init(), init_security(), shutdown(), and ~Sedp().

◆ participant_message_secure_writer_

LivelinessWriter_rch OpenDDS::RTPS::Sedp::participant_message_secure_writer_
protected

◆ participant_message_writer_

LivelinessWriter_rch OpenDDS::RTPS::Sedp::participant_message_writer_
protected

◆ participant_sec_attr_

DDS::Security::ParticipantSecurityAttributes OpenDDS::RTPS::Sedp::participant_sec_attr_
protected

◆ participant_secure_sequence_

SequenceNumber OpenDDS::RTPS::Sedp::participant_secure_sequence_
protected

Definition at line 1273 of file Sedp.h.

Referenced by write_dcps_participant_secure().

◆ participant_stateless_message_reader_

SecurityReader_rch OpenDDS::RTPS::Sedp::participant_stateless_message_reader_
protected

Definition at line 1309 of file Sedp.h.

Referenced by associate(), init(), should_drop_stateless_message(), and shutdown().

◆ participant_stateless_message_writer_

SecurityWriter_rch OpenDDS::RTPS::Sedp::participant_stateless_message_writer_
protected

Definition at line 1287 of file Sedp.h.

Referenced by associate(), init(), shutdown(), and write_stateless_message().

◆ participant_volatile_message_secure_reader_

SecurityReader_rch OpenDDS::RTPS::Sedp::participant_volatile_message_secure_reader_
protected

Definition at line 1310 of file Sedp.h.

Referenced by associate(), associate_volatile(), init(), init_security(), shutdown(), and ~Sedp().

◆ participant_volatile_message_secure_writer_

SecurityWriter_rch OpenDDS::RTPS::Sedp::participant_volatile_message_secure_writer_
protected

◆ pending_remote_reader_crypto_tokens_

DatareaderCryptoTokenSeqMap OpenDDS::RTPS::Sedp::pending_remote_reader_crypto_tokens_
protected

Definition at line 1268 of file Sedp.h.

Referenced by handle_datareader_crypto_tokens(), and match_continue_security_enabled().

◆ pending_remote_writer_crypto_tokens_

DatawriterCryptoTokenSeqMap OpenDDS::RTPS::Sedp::pending_remote_writer_crypto_tokens_
protected

Definition at line 1271 of file Sedp.h.

Referenced by handle_datawriter_crypto_tokens(), and match_continue_security_enabled().

◆ permissions_handle_

DDS::Security::PermissionsHandle OpenDDS::RTPS::Sedp::permissions_handle_
protected

Definition at line 1263 of file Sedp.h.

Referenced by get_permissions_handle(), is_security_enabled(), and set_permissions_handle().

◆ publication_agent_info_listener_

RcHandle<PublicationAgentInfoListener> OpenDDS::RTPS::Sedp::publication_agent_info_listener_
protected

Definition at line 1322 of file Sedp.h.

Referenced by add_publication_i(), and use_ice_now().

◆ publication_counter_

unsigned int OpenDDS::RTPS::Sedp::publication_counter_
protected

Definition at line 1231 of file Sedp.h.

Referenced by assign_publication_key().

◆ publications_reader_

DiscoveryReader_rch OpenDDS::RTPS::Sedp::publications_reader_
protected

Definition at line 1298 of file Sedp.h.

Referenced by associate(), init(), and shutdown().

◆ publications_secure_reader_

DiscoveryReader_rch OpenDDS::RTPS::Sedp::publications_secure_reader_
protected

Definition at line 1300 of file Sedp.h.

Referenced by associate(), init(), init_security(), shutdown(), and ~Sedp().

◆ publications_secure_writer_

DiscoveryWriter_rch OpenDDS::RTPS::Sedp::publications_secure_writer_
protected

◆ publications_writer_

DiscoveryWriter_rch OpenDDS::RTPS::Sedp::publications_writer_
protected

◆ reactor_task_

DCPS::ReactorTask_rch OpenDDS::RTPS::Sedp::reactor_task_
private

Definition at line 772 of file Sedp.h.

Referenced by init(), reactor_task(), and ~Sedp().

◆ spdp_

Spdp& OpenDDS::RTPS::Sedp::spdp_
protected

Definition at line 1227 of file Sedp.h.

Referenced by add_publication_i(), add_subscription_i(), associate(), associate_volatile(), association_complete_i(), cleanup_reader_association(), cleanup_writer_association(), create_datareader_crypto_tokens(), create_datawriter_crypto_tokens(), data_acked_i(), data_received(), OpenDDS::RTPS::Sedp::DiscoveryReader::data_received_i(), disassociate(), generate_remote_matched_reader_crypto_handle(), generate_remote_matched_writer_crypto_handle(), get_domain_id(), handle_datareader_crypto_tokens(), handle_datawriter_crypto_tokens(), init(), init_security(), is_expectant_opendds(), local_has_remote_endpoint_token_i(), local_has_remote_participant_token_i(), match_continue(), populate_origination_locator(), populate_transport_locator_sequence(), process_discovered_reader_data(), process_discovered_writer_data(), OpenDDS::RTPS::Sedp::TypeLookupReplyReader::process_type_lookup_reply(), received_participant_message_data_secure(), received_stateless_message(), received_volatile_message_secure(), remote_has_local_endpoint_token_i(), remote_has_local_participant_token_i(), remote_is_authenticated_i(), remove_entities_belonging_to(), remove_from_bit_i(), remove_remote_crypto_handle(), send_builtin_crypto_tokens(), OpenDDS::RTPS::Sedp::TypeLookupRequestWriter::send_type_lookup_request(), shutting_down(), signal_liveliness_secure(), signal_liveliness_unsecure(), OpenDDS::RTPS::Sedp::DiscoveryWriter::write_dcps_participant_secure(), write_durable_dcps_participant_secure(), write_durable_participant_message_data(), write_durable_participant_message_data_secure(), write_durable_publication_data(), write_durable_subscription_data(), write_participant_message_data(), write_participant_message_data_secure(), write_publication_data_secure(), write_publication_data_unsecure(), write_subscription_data_secure(), write_subscription_data_unsecure(), and ~Sedp().

◆ subscription_agent_info_listener_

RcHandle<SubscriptionAgentInfoListener> OpenDDS::RTPS::Sedp::subscription_agent_info_listener_
protected

Definition at line 1323 of file Sedp.h.

Referenced by add_subscription_i(), and use_ice_now().

◆ subscription_counter_

unsigned int OpenDDS::RTPS::Sedp::subscription_counter_
protected

Definition at line 1231 of file Sedp.h.

Referenced by assign_subscription_key().

◆ subscriptions_reader_

DiscoveryReader_rch OpenDDS::RTPS::Sedp::subscriptions_reader_
protected

Definition at line 1302 of file Sedp.h.

Referenced by associate(), init(), and shutdown().

◆ subscriptions_secure_reader_

DiscoveryReader_rch OpenDDS::RTPS::Sedp::subscriptions_secure_reader_
protected

Definition at line 1304 of file Sedp.h.

Referenced by associate(), init(), init_security(), shutdown(), and ~Sedp().

◆ subscriptions_secure_writer_

DiscoveryWriter_rch OpenDDS::RTPS::Sedp::subscriptions_secure_writer_
protected

◆ subscriptions_writer_

DiscoveryWriter_rch OpenDDS::RTPS::Sedp::subscriptions_writer_
protected

◆ topic_counter_

unsigned int OpenDDS::RTPS::Sedp::topic_counter_
protected

Definition at line 1231 of file Sedp.h.

Referenced by assign_topic_key().

◆ topic_names_

TopicNameMap OpenDDS::RTPS::Sedp::topic_names_
protected

◆ topics_

DCPS::TopicDetailsMap OpenDDS::RTPS::Sedp::topics_
protected

◆ transport_cfg_

DCPS::TransportConfig_rch OpenDDS::RTPS::Sedp::transport_cfg_
private

Definition at line 771 of file Sedp.h.

Referenced by init(), and ~Sedp().

◆ transport_inst_

DCPS::TransportInst_rch OpenDDS::RTPS::Sedp::transport_inst_
private

◆ type_lookup_reply_deadline_processor_

RcHandle<EndpointManagerSporadic> OpenDDS::RTPS::Sedp::type_lookup_reply_deadline_processor_
protected

Definition at line 1243 of file Sedp.h.

Referenced by get_remote_type_objects(), type_lookup_fini(), and type_lookup_init().

◆ type_lookup_reply_reader_

TypeLookupReplyReader_rch OpenDDS::RTPS::Sedp::type_lookup_reply_reader_
protected

◆ type_lookup_reply_secure_reader_

TypeLookupReplyReader_rch OpenDDS::RTPS::Sedp::type_lookup_reply_secure_reader_
protected

Definition at line 1317 of file Sedp.h.

Referenced by associate(), cleanup_type_lookup_data(), init(), init_security(), and shutdown().

◆ type_lookup_reply_secure_writer_

TypeLookupReplyWriter_rch OpenDDS::RTPS::Sedp::type_lookup_reply_secure_writer_
protected

◆ type_lookup_reply_writer_

TypeLookupReplyWriter_rch OpenDDS::RTPS::Sedp::type_lookup_reply_writer_
protected

◆ type_lookup_request_reader_

TypeLookupRequestReader_rch OpenDDS::RTPS::Sedp::type_lookup_request_reader_
protected

Definition at line 1313 of file Sedp.h.

Referenced by associate(), init(), and shutdown().

◆ type_lookup_request_secure_reader_

TypeLookupRequestReader_rch OpenDDS::RTPS::Sedp::type_lookup_request_secure_reader_
protected

Definition at line 1316 of file Sedp.h.

Referenced by associate(), init(), init_security(), and shutdown().

◆ type_lookup_request_secure_writer_

TypeLookupRequestWriter_rch OpenDDS::RTPS::Sedp::type_lookup_request_secure_writer_
protected

◆ type_lookup_request_writer_

TypeLookupRequestWriter_rch OpenDDS::RTPS::Sedp::type_lookup_request_writer_
protected

Definition at line 1292 of file Sedp.h.

Referenced by associate(), association_complete_i(), init(), send_type_lookup_request(), and shutdown().

◆ type_lookup_service_

XTypes::TypeLookupService_rch OpenDDS::RTPS::Sedp::type_lookup_service_
protected

◆ type_lookup_service_sequence_number_

DCPS::SequenceNumber OpenDDS::RTPS::Sedp::type_lookup_service_sequence_number_
protected

◆ use_xtypes_

const bool OpenDDS::RTPS::Sedp::use_xtypes_
protected

◆ use_xtypes_complete_

const bool OpenDDS::RTPS::Sedp::use_xtypes_complete_
protected

Definition at line 1247 of file Sedp.h.

Referenced by init(), match_continue(), and need_minimal_and_or_complete_types().


The documentation for this class was generated from the following files: