int ctt_start (Domain_t *dp) { #if defined (DDS_TRACE) && defined (CTT_TRACE_RTPS) Writer_t *wp; #endif Reader_t *rp; int error; CTT_ASSERT (dp); error = create_builtin_endpoint (dp, EPB_PARTICIPANT_VOL_SEC_W, 1, 1, 1, 1, 0, NULL, dp->participant.p_meta_ucast, dp->participant.p_meta_mcast, NULL); if (error) return (error); error = create_builtin_endpoint (dp, EPB_PARTICIPANT_VOL_SEC_R, 0, 1, 1, 1, 0, NULL, dp->participant.p_meta_ucast, dp->participant.p_meta_mcast, NULL); if (error) return (error); rp = (Reader_t *) dp->participant.p_builtin_ep [EPB_PARTICIPANT_VOL_SEC_R]; error = hc_request_notification (rp->r_cache, disc_data_available, (uintptr_t) rp); if (error) { fatal_printf ("SPDP: can't register Crypto Token listener!"); return (error); } #if defined (DDS_TRACE) && defined (CTT_TRACE_RTPS) rtps_trace_set (&rp->r_ep, DDS_TRACE_ALL); wp = (Writer_t *) dp->participant.p_builtin_ep [EPB_PARTICIPANT_VOL_SEC_W]; rtps_trace_set (&wp->w_ep, DDS_TRACE_ALL); #endif CTT_ASSERT (dp); return (DDS_RETCODE_OK); }
int msg_start (Domain_t *dp) { Reader_t *rp; TopicType_t *tp; int error; error = DDS_DomainParticipant_register_type ((DDS_DomainParticipant) dp, dds_participant_msg_ts, "ParticipantMessageData"); if (error) { warn_printf ("disc_start: can't register ParticipantMessageData type!"); return (error); } if (lock_take (dp->lock)) { warn_printf ("disc_start: domain lock error (2)"); return (DDS_RETCODE_ERROR); } tp = type_lookup (dp, "ParticipantMessageData"); if (tp) tp->flags |= EF_BUILTIN; lock_release (dp->lock); /* Create builtin Participant Message Reader. */ error = create_builtin_endpoint (dp, EPB_PARTICIPANT_MSG_R, 0, 1, 1, 0, 1, NULL, dp->participant.p_meta_ucast, dp->participant.p_meta_mcast, NULL); if (error) return (error); /* Attach to builtin Participant Message Reader. */ rp = (Reader_t *) dp->participant.p_builtin_ep [EPB_PARTICIPANT_MSG_R]; error = hc_request_notification (rp->r_cache, disc_data_available, (uintptr_t) rp); if (error) { fatal_printf ("msg_start: can't register Message Reader!"); return (error); } /* Create builtin Participant Message Writer. */ error = create_builtin_endpoint (dp, EPB_PARTICIPANT_MSG_W, 1, 1, 1, 0, 1, NULL, dp->participant.p_meta_ucast, dp->participant.p_meta_mcast, NULL); if (error) return (error); #if defined (DDS_SECURITY) && defined (DDS_NATIVE_SECURITY) if (NATIVE_SECURITY (dp)) { /* Create builtin Participant Secure Message Reader. */ error = create_builtin_endpoint (dp, EPB_PARTICIPANT_MSG_SEC_R, 0, 1, 1, 0, 1, NULL, dp->participant.p_meta_ucast, dp->participant.p_meta_mcast, NULL); if (error) return (error); /* Attach to builtin Participant Secure Message Reader. */ rp = (Reader_t *) dp->participant.p_builtin_ep [EPB_PARTICIPANT_MSG_SEC_R]; error = hc_request_notification (rp->r_cache, disc_data_available, (uintptr_t) rp); if (error) { fatal_printf ("msg_start: can't register secure Message Reader!"); return (error); } /* Create builtin Participant Secure Message Writer. */ error = create_builtin_endpoint (dp, EPB_PARTICIPANT_MSG_SEC_W, 1, 1, 1, 0, 1, NULL, dp->participant.p_meta_ucast, dp->participant.p_meta_mcast, NULL); if (error) return (error); } #endif return (DDS_RETCODE_OK); }