OpenDDS  Snapshot(2023/04/07-19:43)
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
OpenDDS::Security::HandleRegistry Class Reference

#include <HandleRegistry.h>

Inheritance diagram for OpenDDS::Security::HandleRegistry:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::Security::HandleRegistry:
Collaboration graph
[legend]

Public Types

typedef std::pair< DCPS::GUID_t, DDS::Security::DatareaderCryptoHandleGUID_tDrch
 
typedef std::pair< DCPS::GUID_t, DDS::Security::DatawriterCryptoHandleGUID_tDwch
 

Public Member Functions

typedef OPENDDS_VECTOR (GUID_tDrch) DatareaderCryptoHandleList
 
typedef OPENDDS_VECTOR (GUID_tDwch) DatawriterCryptoHandleList
 
 HandleRegistry ()
 
 ~HandleRegistry ()
 
const DDS::Security::EndpointSecurityAttributesdefault_endpoint_security_attributes () const
 
void insert_local_datareader_crypto_handle (const DCPS::GUID_t &id, DDS::Security::DatareaderCryptoHandle handle, const DDS::Security::EndpointSecurityAttributes &attributes)
 
DDS::Security::DatareaderCryptoHandle get_local_datareader_crypto_handle (const DCPS::GUID_t &id) const
 
const DDS::Security::EndpointSecurityAttributesget_local_datareader_security_attributes (const DCPS::GUID_t &id) const
 
void erase_local_datareader_crypto_handle (const DCPS::GUID_t &id)
 
void insert_local_datawriter_crypto_handle (const DCPS::GUID_t &id, DDS::Security::DatawriterCryptoHandle handle, const DDS::Security::EndpointSecurityAttributes &attributes)
 
DDS::Security::DatawriterCryptoHandle get_local_datawriter_crypto_handle (const DCPS::GUID_t &id) const
 
const DDS::Security::EndpointSecurityAttributesget_local_datawriter_security_attributes (const DCPS::GUID_t &id) const
 
void erase_local_datawriter_crypto_handle (const DCPS::GUID_t &id)
 
void insert_remote_participant_crypto_handle (const DCPS::GUID_t &id, DDS::Security::ParticipantCryptoHandle handle)
 
DDS::Security::ParticipantCryptoHandle get_remote_participant_crypto_handle (const DCPS::GUID_t &id) const
 
void erase_remote_participant_crypto_handle (const DCPS::GUID_t &id)
 
void insert_remote_participant_permissions_handle (const DCPS::GUID_t &id, DDS::Security::PermissionsHandle handle)
 
DDS::Security::PermissionsHandle get_remote_participant_permissions_handle (const DCPS::GUID_t &id) const
 
void erase_remote_participant_permissions_handle (const DCPS::GUID_t &id)
 
void insert_remote_datareader_crypto_handle (const DCPS::GUID_t &id, DDS::Security::DatareaderCryptoHandle handle, const DDS::Security::EndpointSecurityAttributes &attributes)
 
DDS::Security::DatareaderCryptoHandle get_remote_datareader_crypto_handle (const DCPS::GUID_t &id) const
 
const DDS::Security::EndpointSecurityAttributesget_remote_datareader_security_attributes (const DCPS::GUID_t &id) const
 
DatareaderCryptoHandleList get_all_remote_datareaders (const DCPS::GUID_t &prefix) const
 
void erase_remote_datareader_crypto_handle (const DCPS::GUID_t &id)
 
void insert_remote_datawriter_crypto_handle (const DCPS::GUID_t &id, DDS::Security::DatawriterCryptoHandle handle, const DDS::Security::EndpointSecurityAttributes &attributes)
 
DDS::Security::DatawriterCryptoHandle get_remote_datawriter_crypto_handle (const DCPS::GUID_t &id) const
 
const DDS::Security::EndpointSecurityAttributesget_remote_datawriter_security_attributes (const DCPS::GUID_t &id) const
 
DatawriterCryptoHandleList get_all_remote_datawriters (const DCPS::GUID_t &prefix) const
 
void erase_remote_datawriter_crypto_handle (const DCPS::GUID_t &id)
 
- 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
 

Private Types

typedef std::pair< DDS::Security::DatareaderCryptoHandle, DDS::Security::EndpointSecurityAttributesP1
 
typedef std::pair< DDS::Security::DatawriterCryptoHandle, DDS::Security::EndpointSecurityAttributesP2
 

Private Member Functions

typedef OPENDDS_MAP_CMP (DCPS::GUID_t, DDS::Security::ParticipantCryptoHandle, DCPS::GUID_tKeyLessThan) ParticipantCryptoHandleMap
 
typedef OPENDDS_MAP_CMP (DCPS::GUID_t, DDS::Security::PermissionsHandle, DCPS::GUID_tKeyLessThan) PermissionsHandleMap
 
typedef OPENDDS_MAP_CMP (DCPS::GUID_t, P1, DCPS::GUID_tKeyLessThan) DatareaderCryptoHandleMap
 
typedef OPENDDS_MAP_CMP (DCPS::GUID_t, P2, DCPS::GUID_tKeyLessThan) DatawriterCryptoHandleMap
 

Private Attributes

DDS::Security::EndpointSecurityAttributes default_endpoint_security_attributes_
 
ACE_Thread_Mutex mutex_
 
ParticipantCryptoHandleMap remote_participant_crypto_handles_
 
PermissionsHandleMap remote_participant_permissions_handles_
 
DatareaderCryptoHandleMap local_datareader_crypto_handles_
 
DatawriterCryptoHandleMap local_datawriter_crypto_handles_
 
DatareaderCryptoHandleMap remote_datareader_crypto_handles_
 
DatawriterCryptoHandleMap remote_datawriter_crypto_handles_
 

Additional Inherited Members

- Protected Member Functions inherited from OpenDDS::DCPS::RcObject
 RcObject ()
 

Detailed Description

Definition at line 27 of file HandleRegistry.h.

Member Typedef Documentation

◆ GUID_tDrch

Definition at line 29 of file HandleRegistry.h.

◆ GUID_tDwch

Definition at line 31 of file HandleRegistry.h.

◆ P1

Definition at line 87 of file HandleRegistry.h.

◆ P2

Definition at line 90 of file HandleRegistry.h.

Constructor & Destructor Documentation

◆ HandleRegistry()

OpenDDS::Security::HandleRegistry::HandleRegistry ( )

Definition at line 20 of file HandleRegistry.cpp.

References DDS::Security::EndpointSecurityAttributes::base, default_endpoint_security_attributes_, DDS::Security::TopicSecurityAttributes::is_discovery_protected, DDS::Security::EndpointSecurityAttributes::is_key_protected, DDS::Security::TopicSecurityAttributes::is_liveliness_protected, DDS::Security::EndpointSecurityAttributes::is_payload_protected, DDS::Security::TopicSecurityAttributes::is_read_protected, DDS::Security::EndpointSecurityAttributes::is_submessage_protected, DDS::Security::TopicSecurityAttributes::is_write_protected, and DDS::Security::EndpointSecurityAttributes::plugin_endpoint_attributes.

21 {
30 }
PluginEndpointSecurityAttributesMask plugin_endpoint_attributes
DDS::Security::EndpointSecurityAttributes default_endpoint_security_attributes_

◆ ~HandleRegistry()

OpenDDS::Security::HandleRegistry::~HandleRegistry ( )

Definition at line 32 of file HandleRegistry.cpp.

References ACE_DEBUG, LM_DEBUG, local_datareader_crypto_handles_, local_datawriter_crypto_handles_, remote_datareader_crypto_handles_, remote_datawriter_crypto_handles_, remote_participant_crypto_handles_, and OpenDDS::DCPS::security_debug.

33 {
34  if (DCPS::security_debug.bookkeeping) {
35  ACE_DEBUG((LM_DEBUG, "(%P|%t) {bookkeeping} "
36  "HandleRegistry::~HandleRegistry local datareader %B local datawriter %B "
37  "remote participant %B remote datareader %B remote datawriter %B\n",
43  }
44 }
#define ACE_DEBUG(X)
DatawriterCryptoHandleMap local_datawriter_crypto_handles_
DatareaderCryptoHandleMap remote_datareader_crypto_handles_
ParticipantCryptoHandleMap remote_participant_crypto_handles_
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32
DatawriterCryptoHandleMap remote_datawriter_crypto_handles_
DatareaderCryptoHandleMap local_datareader_crypto_handles_

Member Function Documentation

◆ default_endpoint_security_attributes()

const DDS::Security::EndpointSecurityAttributes& OpenDDS::Security::HandleRegistry::default_endpoint_security_attributes ( ) const
inline

Definition at line 37 of file HandleRegistry.h.

References OPENDDS_MAP_CMP.

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

38  {
40  }
DDS::Security::EndpointSecurityAttributes default_endpoint_security_attributes_

◆ erase_local_datareader_crypto_handle()

void OpenDDS::Security::HandleRegistry::erase_local_datareader_crypto_handle ( const DCPS::GUID_t id)

Definition at line 88 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), LM_DEBUG, local_datareader_crypto_handles_, mutex_, and OpenDDS::DCPS::security_debug.

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

89 {
92 
93  if (DCPS::security_debug.bookkeeping) {
94  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
95  ACE_TEXT("HandleRegistry::erase_local_datareader_crypto_handle %C (%B)\n"),
96  DCPS::LogGuid(id).c_str(),
98  }
99 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32
DatareaderCryptoHandleMap local_datareader_crypto_handles_

◆ erase_local_datawriter_crypto_handle()

void OpenDDS::Security::HandleRegistry::erase_local_datawriter_crypto_handle ( const DCPS::GUID_t id)

Definition at line 143 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), LM_DEBUG, local_datawriter_crypto_handles_, mutex_, and OpenDDS::DCPS::security_debug.

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

144 {
147 
148  if (DCPS::security_debug.bookkeeping) {
149  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
150  ACE_TEXT("HandleRegistry::erase_local_datawriter_crypto_handle %C (total %B)\n"),
151  DCPS::LogGuid(id).c_str(),
153  }
154 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
DatawriterCryptoHandleMap local_datawriter_crypto_handles_
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ erase_remote_datareader_crypto_handle()

void OpenDDS::Security::HandleRegistry::erase_remote_datareader_crypto_handle ( const DCPS::GUID_t id)

Definition at line 298 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), LM_DEBUG, mutex_, remote_datareader_crypto_handles_, and OpenDDS::DCPS::security_debug.

Referenced by OpenDDS::RTPS::Sedp::disassociate(), and OpenDDS::RTPS::Sedp::remove_remote_crypto_handle().

299 {
302 
303  if (DCPS::security_debug.bookkeeping) {
304  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
305  ACE_TEXT("HandleRegistry::erase_remote_datareader_crypto_handle %C (total %B)\n"),
306  DCPS::LogGuid(id).c_str(),
308  }
309 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
DatareaderCryptoHandleMap remote_datareader_crypto_handles_
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ erase_remote_datawriter_crypto_handle()

void OpenDDS::Security::HandleRegistry::erase_remote_datawriter_crypto_handle ( const DCPS::GUID_t id)

Definition at line 368 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), LM_DEBUG, mutex_, OPENDDS_END_VERSIONED_NAMESPACE_DECL, remote_datawriter_crypto_handles_, and OpenDDS::DCPS::security_debug.

Referenced by OpenDDS::RTPS::Sedp::disassociate(), and OpenDDS::RTPS::Sedp::remove_remote_crypto_handle().

369 {
372 
373  if (DCPS::security_debug.bookkeeping) {
374  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
375  ACE_TEXT("HandleRegistry::erase_remote_datawriter_crypto_handle %C (total %B)\n"),
376  DCPS::LogGuid(id).c_str(),
378  }
379 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32
DatawriterCryptoHandleMap remote_datawriter_crypto_handles_

◆ erase_remote_participant_crypto_handle()

void OpenDDS::Security::HandleRegistry::erase_remote_participant_crypto_handle ( const DCPS::GUID_t id)

Definition at line 186 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), LM_DEBUG, mutex_, remote_participant_crypto_handles_, and OpenDDS::DCPS::security_debug.

187 {
190 
191  if (DCPS::security_debug.bookkeeping) {
192  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
193  ACE_TEXT("HandleRegistry::erase_remote_participant_crypto_handle %C (total %B)\n"),
194  DCPS::LogGuid(id).c_str(),
196  }
197 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
ParticipantCryptoHandleMap remote_participant_crypto_handles_
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ erase_remote_participant_permissions_handle()

void OpenDDS::Security::HandleRegistry::erase_remote_participant_permissions_handle ( const DCPS::GUID_t id)

Definition at line 229 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), LM_DEBUG, mutex_, remote_participant_permissions_handles_, and OpenDDS::DCPS::security_debug.

230 {
233 
234  if (DCPS::security_debug.bookkeeping) {
235  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
236  ACE_TEXT("HandleRegistry::erase_remote_participant_permissions_handle %C (total %B)\n"),
237  DCPS::LogGuid(id).c_str(),
239  }
240 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32
PermissionsHandleMap remote_participant_permissions_handles_

◆ get_all_remote_datareaders()

HandleRegistry::DatareaderCryptoHandleList OpenDDS::Security::HandleRegistry::get_all_remote_datareaders ( const DCPS::GUID_t prefix) const

Definition at line 284 of file HandleRegistry.cpp.

References ACE_GUARD_RETURN, OpenDDS::DCPS::ENTITYID_UNKNOWN, OpenDDS::DCPS::equal_guid_prefixes(), OpenDDS::DCPS::make_id(), mutex_, and remote_datareader_crypto_handles_.

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

285 {
286  DatareaderCryptoHandleList retval;
287  ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, mutex_, retval);
288  for (DatareaderCryptoHandleMap::const_iterator pos =
290  limit = remote_datareader_crypto_handles_.end();
291  pos != limit && DCPS::equal_guid_prefixes(pos->first, prefix); ++pos) {
292  retval.push_back(std::make_pair(pos->first, pos->second.first));
293  }
294  return retval;
295 }
OpenDDS_Dcps_Export bool equal_guid_prefixes(const GuidPrefix_t &lhs, const GuidPrefix_t &rhs)
Definition: GuidUtils.h:132
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
DatareaderCryptoHandleMap remote_datareader_crypto_handles_
const EntityId_t ENTITYID_UNKNOWN
Definition: GuidUtils.h:36
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ get_all_remote_datawriters()

HandleRegistry::DatawriterCryptoHandleList OpenDDS::Security::HandleRegistry::get_all_remote_datawriters ( const DCPS::GUID_t prefix) const

Definition at line 354 of file HandleRegistry.cpp.

References ACE_GUARD_RETURN, OpenDDS::DCPS::ENTITYID_UNKNOWN, OpenDDS::DCPS::equal_guid_prefixes(), OpenDDS::DCPS::make_id(), mutex_, and remote_datawriter_crypto_handles_.

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

355 {
356  DatawriterCryptoHandleList retval;
357  ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, mutex_, retval);
358  for (DatawriterCryptoHandleMap::const_iterator pos =
360  limit = remote_datawriter_crypto_handles_.end();
361  pos != limit && DCPS::equal_guid_prefixes(pos->first, prefix); ++pos) {
362  retval.push_back(std::make_pair(pos->first, pos->second.first));
363  }
364  return retval;
365 }
OpenDDS_Dcps_Export bool equal_guid_prefixes(const GuidPrefix_t &lhs, const GuidPrefix_t &rhs)
Definition: GuidUtils.h:132
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
const EntityId_t ENTITYID_UNKNOWN
Definition: GuidUtils.h:36
DatawriterCryptoHandleMap remote_datawriter_crypto_handles_
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ get_local_datareader_crypto_handle()

DDS::Security::DatareaderCryptoHandle OpenDDS::Security::HandleRegistry::get_local_datareader_crypto_handle ( const DCPS::GUID_t id) const

◆ get_local_datareader_security_attributes()

const DDS::Security::EndpointSecurityAttributes & OpenDDS::Security::HandleRegistry::get_local_datareader_security_attributes ( const DCPS::GUID_t id) const

Definition at line 77 of file HandleRegistry.cpp.

References ACE_GUARD_RETURN, default_endpoint_security_attributes_, local_datareader_crypto_handles_, and mutex_.

Referenced by OpenDDS::RTPS::Sedp::generate_remote_matched_writer_crypto_handle(), and OpenDDS::RTPS::Sedp::match_continue_security_enabled().

78 {
80  DatareaderCryptoHandleMap::const_iterator pos = local_datareader_crypto_handles_.find(id);
81  if (pos != local_datareader_crypto_handles_.end()) {
82  return pos->second.second;
83  }
85 }
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
DDS::Security::EndpointSecurityAttributes default_endpoint_security_attributes_
DatareaderCryptoHandleMap local_datareader_crypto_handles_

◆ get_local_datawriter_crypto_handle()

DDS::Security::DatawriterCryptoHandle OpenDDS::Security::HandleRegistry::get_local_datawriter_crypto_handle ( const DCPS::GUID_t id) const

◆ get_local_datawriter_security_attributes()

const DDS::Security::EndpointSecurityAttributes & OpenDDS::Security::HandleRegistry::get_local_datawriter_security_attributes ( const DCPS::GUID_t id) const

Definition at line 132 of file HandleRegistry.cpp.

References ACE_GUARD_RETURN, default_endpoint_security_attributes_, local_datawriter_crypto_handles_, and mutex_.

Referenced by OpenDDS::RTPS::Sedp::generate_remote_matched_reader_crypto_handle(), and OpenDDS::RTPS::Sedp::match_continue_security_enabled().

133 {
135  DatawriterCryptoHandleMap::const_iterator pos = local_datawriter_crypto_handles_.find(id);
136  if (pos != local_datawriter_crypto_handles_.end()) {
137  return pos->second.second;
138  }
140 }
DatawriterCryptoHandleMap local_datawriter_crypto_handles_
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
DDS::Security::EndpointSecurityAttributes default_endpoint_security_attributes_

◆ get_remote_datareader_crypto_handle()

DDS::Security::DatareaderCryptoHandle OpenDDS::Security::HandleRegistry::get_remote_datareader_crypto_handle ( const DCPS::GUID_t id) const

◆ get_remote_datareader_security_attributes()

const DDS::Security::EndpointSecurityAttributes & OpenDDS::Security::HandleRegistry::get_remote_datareader_security_attributes ( const DCPS::GUID_t id) const

Definition at line 273 of file HandleRegistry.cpp.

References ACE_GUARD_RETURN, default_endpoint_security_attributes_, mutex_, and remote_datareader_crypto_handles_.

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

274 {
276  DatareaderCryptoHandleMap::const_iterator pos = remote_datareader_crypto_handles_.find(id);
277  if (pos != remote_datareader_crypto_handles_.end()) {
278  return pos->second.second;
279  }
281 }
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
DatareaderCryptoHandleMap remote_datareader_crypto_handles_
DDS::Security::EndpointSecurityAttributes default_endpoint_security_attributes_

◆ get_remote_datawriter_crypto_handle()

DDS::Security::DatawriterCryptoHandle OpenDDS::Security::HandleRegistry::get_remote_datawriter_crypto_handle ( const DCPS::GUID_t id) const

◆ get_remote_datawriter_security_attributes()

const DDS::Security::EndpointSecurityAttributes & OpenDDS::Security::HandleRegistry::get_remote_datawriter_security_attributes ( const DCPS::GUID_t id) const

Definition at line 343 of file HandleRegistry.cpp.

References ACE_GUARD_RETURN, default_endpoint_security_attributes_, mutex_, and remote_datawriter_crypto_handles_.

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

344 {
346  DatawriterCryptoHandleMap::const_iterator pos = remote_datawriter_crypto_handles_.find(id);
347  if (pos != remote_datawriter_crypto_handles_.end()) {
348  return pos->second.second;
349  }
351 }
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
DDS::Security::EndpointSecurityAttributes default_endpoint_security_attributes_
DatawriterCryptoHandleMap remote_datawriter_crypto_handles_

◆ get_remote_participant_crypto_handle()

DDS::Security::ParticipantCryptoHandle OpenDDS::Security::HandleRegistry::get_remote_participant_crypto_handle ( const DCPS::GUID_t id) const

Definition at line 175 of file HandleRegistry.cpp.

References ACE_GUARD_RETURN, DDS::HANDLE_NIL, mutex_, and remote_participant_crypto_handles_.

Referenced by OpenDDS::RTPS::Sedp::local_has_remote_participant_token_i(), and OpenDDS::RTPS::Sedp::remote_has_local_participant_token_i().

176 {
178  ParticipantCryptoHandleMap::const_iterator pos = remote_participant_crypto_handles_.find(id);
179  if (pos != remote_participant_crypto_handles_.end()) {
180  return pos->second;
181  }
182  return DDS::HANDLE_NIL;
183 }
const InstanceHandle_t HANDLE_NIL
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
ParticipantCryptoHandleMap remote_participant_crypto_handles_

◆ get_remote_participant_permissions_handle()

DDS::Security::PermissionsHandle OpenDDS::Security::HandleRegistry::get_remote_participant_permissions_handle ( const DCPS::GUID_t id) const

Definition at line 218 of file HandleRegistry.cpp.

References ACE_GUARD_RETURN, DDS::HANDLE_NIL, mutex_, and remote_participant_permissions_handles_.

219 {
221  PermissionsHandleMap::const_iterator pos = remote_participant_permissions_handles_.find(id);
222  if (pos != remote_participant_permissions_handles_.end()) {
223  return pos->second;
224  }
225  return DDS::HANDLE_NIL;
226 }
const InstanceHandle_t HANDLE_NIL
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
PermissionsHandleMap remote_participant_permissions_handles_

◆ insert_local_datareader_crypto_handle()

void OpenDDS::Security::HandleRegistry::insert_local_datareader_crypto_handle ( const DCPS::GUID_t id,
DDS::Security::DatareaderCryptoHandle  handle,
const DDS::Security::EndpointSecurityAttributes attributes 
)

Definition at line 47 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), DDS::HANDLE_NIL, LM_DEBUG, local_datareader_crypto_handles_, mutex_, and OpenDDS::DCPS::security_debug.

Referenced by OpenDDS::RTPS::Sedp::add_subscription(), and OpenDDS::RTPS::Sedp::init_security().

50 {
51  if (handle != DDS::HANDLE_NIL) {
53  local_datareader_crypto_handles_[id] = std::make_pair(handle, attributes);
54 
55  if (DCPS::security_debug.bookkeeping) {
56  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
57  ACE_TEXT("HandleRegistry::insert_local_datareader_crypto_handle %C %d (total %B)\n"),
58  DCPS::LogGuid(id).c_str(),
59  handle,
61  }
62  }
63 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
const InstanceHandle_t HANDLE_NIL
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32
DatareaderCryptoHandleMap local_datareader_crypto_handles_

◆ insert_local_datawriter_crypto_handle()

void OpenDDS::Security::HandleRegistry::insert_local_datawriter_crypto_handle ( const DCPS::GUID_t id,
DDS::Security::DatawriterCryptoHandle  handle,
const DDS::Security::EndpointSecurityAttributes attributes 
)

Definition at line 102 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), DDS::HANDLE_NIL, LM_DEBUG, local_datawriter_crypto_handles_, mutex_, and OpenDDS::DCPS::security_debug.

Referenced by OpenDDS::RTPS::Sedp::add_publication(), and OpenDDS::RTPS::Sedp::init_security().

105 {
106  if (handle != DDS::HANDLE_NIL) {
108  local_datawriter_crypto_handles_[id] = std::make_pair(handle, attributes);
109 
110  if (DCPS::security_debug.bookkeeping) {
111  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
112  ACE_TEXT("HandleRegistry::insert_local_datawriter_crypto_handle %C %d (total %B)\n"),
113  DCPS::LogGuid(id).c_str(),
114  handle,
116  }
117  }
118 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
DatawriterCryptoHandleMap local_datawriter_crypto_handles_
const InstanceHandle_t HANDLE_NIL
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ insert_remote_datareader_crypto_handle()

void OpenDDS::Security::HandleRegistry::insert_remote_datareader_crypto_handle ( const DCPS::GUID_t id,
DDS::Security::DatareaderCryptoHandle  handle,
const DDS::Security::EndpointSecurityAttributes attributes 
)

Definition at line 243 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), DDS::HANDLE_NIL, LM_DEBUG, mutex_, remote_datareader_crypto_handles_, and OpenDDS::DCPS::security_debug.

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

246 {
247  if (handle != DDS::HANDLE_NIL) {
249  remote_datareader_crypto_handles_[id] = std::make_pair(handle, attributes);
250  }
251 
252  if (DCPS::security_debug.bookkeeping) {
253  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
254  ACE_TEXT("HandleRegistry::insert_remote_datareader_crypto_handle %C %d (total %B)\n"),
255  DCPS::LogGuid(id).c_str(),
256  handle,
258  }
259 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
const InstanceHandle_t HANDLE_NIL
DatareaderCryptoHandleMap remote_datareader_crypto_handles_
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ insert_remote_datawriter_crypto_handle()

void OpenDDS::Security::HandleRegistry::insert_remote_datawriter_crypto_handle ( const DCPS::GUID_t id,
DDS::Security::DatawriterCryptoHandle  handle,
const DDS::Security::EndpointSecurityAttributes attributes 
)

Definition at line 312 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), OpenDDS::DCPS::ENTITYID_UNKNOWN, DDS::HANDLE_NIL, LM_DEBUG, mutex_, OPENDDS_ASSERT, remote_datawriter_crypto_handles_, and OpenDDS::DCPS::security_debug.

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

315 {
316  OPENDDS_ASSERT(id.entityId != DCPS::ENTITYID_UNKNOWN);
317  if (handle != DDS::HANDLE_NIL) {
319  remote_datawriter_crypto_handles_[id] = std::make_pair(handle, attributes);
320 
321  if (DCPS::security_debug.bookkeeping) {
322  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
323  ACE_TEXT("HandleRegistry::insert_remote_datawriter_crypto_handle %C %d (total %B)\n"),
324  DCPS::LogGuid(id).c_str(),
325  handle,
327  }
328  }
329 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
const InstanceHandle_t HANDLE_NIL
#define OPENDDS_ASSERT(C)
Definition: Definitions.h:66
ACE_TEXT("TCP_Factory")
const EntityId_t ENTITYID_UNKNOWN
Definition: GuidUtils.h:36
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32
DatawriterCryptoHandleMap remote_datawriter_crypto_handles_

◆ insert_remote_participant_crypto_handle()

void OpenDDS::Security::HandleRegistry::insert_remote_participant_crypto_handle ( const DCPS::GUID_t id,
DDS::Security::ParticipantCryptoHandle  handle 
)

Definition at line 157 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), DDS::HANDLE_NIL, LM_DEBUG, mutex_, remote_participant_crypto_handles_, and OpenDDS::DCPS::security_debug.

159 {
160  if (handle != DDS::HANDLE_NIL) {
163 
164  if (DCPS::security_debug.bookkeeping) {
165  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
166  ACE_TEXT("HandleRegistry::insert_remote_participant_crypto_handle %C %d (total %B)\n"),
167  DCPS::LogGuid(id).c_str(),
168  handle,
170  }
171  }
172 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
const InstanceHandle_t HANDLE_NIL
ParticipantCryptoHandleMap remote_participant_crypto_handles_
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32

◆ insert_remote_participant_permissions_handle()

void OpenDDS::Security::HandleRegistry::insert_remote_participant_permissions_handle ( const DCPS::GUID_t id,
DDS::Security::PermissionsHandle  handle 
)

Definition at line 200 of file HandleRegistry.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT(), DDS::HANDLE_NIL, LM_DEBUG, mutex_, remote_participant_permissions_handles_, and OpenDDS::DCPS::security_debug.

202 {
203  if (handle != DDS::HANDLE_NIL) {
206 
207  if (DCPS::security_debug.bookkeeping) {
208  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) {bookkeeping} ")
209  ACE_TEXT("HandleRegistry::insert_remote_participant_permissions_handle %C %d (total %B)\n"),
210  DCPS::LogGuid(id).c_str(),
211  handle,
213  }
214  }
215 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
const InstanceHandle_t HANDLE_NIL
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32
PermissionsHandleMap remote_participant_permissions_handles_

◆ OPENDDS_MAP_CMP() [1/4]

typedef OpenDDS::Security::HandleRegistry::OPENDDS_MAP_CMP ( DCPS::GUID_t  ,
DDS::Security::ParticipantCryptoHandle  ,
DCPS::GUID_tKeyLessThan   
)
private

◆ OPENDDS_MAP_CMP() [2/4]

typedef OpenDDS::Security::HandleRegistry::OPENDDS_MAP_CMP ( DCPS::GUID_t  ,
DDS::Security::PermissionsHandle  ,
DCPS::GUID_tKeyLessThan   
)
private

◆ OPENDDS_MAP_CMP() [3/4]

typedef OpenDDS::Security::HandleRegistry::OPENDDS_MAP_CMP ( DCPS::GUID_t  ,
P1  ,
DCPS::GUID_tKeyLessThan   
)
private

◆ OPENDDS_MAP_CMP() [4/4]

typedef OpenDDS::Security::HandleRegistry::OPENDDS_MAP_CMP ( DCPS::GUID_t  ,
P2  ,
DCPS::GUID_tKeyLessThan   
)
private

◆ OPENDDS_VECTOR() [1/2]

typedef OpenDDS::Security::HandleRegistry::OPENDDS_VECTOR ( GUID_tDrch  )

◆ OPENDDS_VECTOR() [2/2]

typedef OpenDDS::Security::HandleRegistry::OPENDDS_VECTOR ( GUID_tDwch  )

Member Data Documentation

◆ default_endpoint_security_attributes_

DDS::Security::EndpointSecurityAttributes OpenDDS::Security::HandleRegistry::default_endpoint_security_attributes_
private

◆ local_datareader_crypto_handles_

DatareaderCryptoHandleMap OpenDDS::Security::HandleRegistry::local_datareader_crypto_handles_
private

◆ local_datawriter_crypto_handles_

DatawriterCryptoHandleMap OpenDDS::Security::HandleRegistry::local_datawriter_crypto_handles_
private

◆ mutex_

ACE_Thread_Mutex OpenDDS::Security::HandleRegistry::mutex_
mutableprivate

◆ remote_datareader_crypto_handles_

DatareaderCryptoHandleMap OpenDDS::Security::HandleRegistry::remote_datareader_crypto_handles_
private

◆ remote_datawriter_crypto_handles_

DatawriterCryptoHandleMap OpenDDS::Security::HandleRegistry::remote_datawriter_crypto_handles_
private

◆ remote_participant_crypto_handles_

ParticipantCryptoHandleMap OpenDDS::Security::HandleRegistry::remote_participant_crypto_handles_
private

◆ remote_participant_permissions_handles_

PermissionsHandleMap OpenDDS::Security::HandleRegistry::remote_participant_permissions_handles_
private

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