|
Mixes for Privacy and Anonymity in the Internet
|
Public Member Functions | |
| CAReplayCtrlChannelMsgProc (const CAMixWithReplayDB *pMix) | |
| Initialises the replay control channel messages processor with the necessary information. | |
| ~CAReplayCtrlChannelMsgProc () | |
| SINT32 | propagateCurrentReplayTimestamp () |
| Propagates downstream the current replay timestamp. | |
| SINT32 | startTimeStampPorpagation (UINT32 minutesPropagationIntervall) |
| Sends the current replay timestamp periodically on the downstream replay control channel. | |
| SINT32 | stopTimeStampPorpagation () |
| Stops the timestamp propagation. | |
| SINT32 | proccessGetTimestamp (const CAReplayControlChannel *pReceiver, const UINT8 *strMixID) const |
| Proccesses a getTimeStamps request on a reply control channel. | |
| SINT32 | proccessGotTimestamp (const CAReplayControlChannel *pReceiver, const UINT8 *strMixID, const UINT32 offset) const |
| Proccesses a received replay timestamp rt from mix strMixID. | |
| SINT32 | sendGetTimestamp (const UINT8 *strMixID) |
| Sends upstram a request for the replay timestamp for the given mix. | |
Private Member Functions | |
| SINT32 | initTimestampsMessageTemplate () |
| We initialise the template used to generate the idividual responses to gettimestamps requests according to the mix ids of the cascade. | |
Private Attributes | |
| const CAMixWithReplayDB * | m_pMix |
| CAReplayControlChannel * | m_pDownstreamReplayControlChannel |
| CAReplayControlChannel * | m_pUpstreamReplayControlChannel |
| UINT32 | m_u32PropagationInterval |
| CAThread * | m_pThreadTimestampPropagation |
| volatile bool | m_bRun |
| XERCES_CPP_NAMESPACE::DOMDocument * | m_docTemplate |
Friends | |
| THREAD_RETURN | rp_loopPropagateTimestamp (void *param) |
Initialises the replay control channel messages processor with the necessary information.
References CAMix::getDownstreamControlChannelDispatcher(), CAMix::getUpstreamControlChannelDispatcher(), initTimestampsMessageTemplate(), m_docTemplate, m_pDownstreamReplayControlChannel, m_pMix, m_pThreadTimestampPropagation, m_pUpstreamReplayControlChannel, pMix, CAMsg::printMsg(), and CAControlChannelDispatcher::registerControlChannel().
References CAMix::getDownstreamControlChannelDispatcher(), CAAbstractControlChannel::getID(), CAMix::getUpstreamControlChannelDispatcher(), m_pDownstreamReplayControlChannel, m_pMix, m_pUpstreamReplayControlChannel, CAMsg::printMsg(), CAControlChannelDispatcher::removeControlChannel(), and stopTimeStampPorpagation().
We initialise the template used to generate the idividual responses to gettimestamps requests according to the mix ids of the cascade.
We later use this template to generate the responses quickly.
References createDOMDocument(), createDOMElement(), E_SUCCESS, E_UNKNOWN, CAMix::FIRST_MIX, CAMix::getType(), m_docTemplate, m_pMix, REPLAY_BASE, setDOMElementAttribute(), and setDOMElementValue().
Referenced by CAReplayCtrlChannelMsgProc().
| SINT32 CAReplayCtrlChannelMsgProc::proccessGetTimestamp | ( | const CAReplayControlChannel * | pReceiver, |
| const UINT8 * | strMixID | ||
| ) | const |
Proccesses a getTimeStamps request on a reply control channel.
| pReceiver | the control chanel which receives the getTimeStamps request |
| E_SUCCESS | if the request could be processed successfully |
| E_UNKNOWN | otherwise Proccesses a getTimeStamp request on a reply control channel. |
| pReceiver | the control channel which receives the request |
| strMixID | the mix id for which the timestamp is requested. If NULL we timestamp of this mix is requested. |
| E_SUCCESS | if the request could be processed successfully |
| E_UNKNOWN | otherwise |
References createDOMDocument(), createDOMElement(), E_SUCCESS, E_UNKNOWN, CAMix::FIRST_MIX, getDOMChildByName(), CAMix::getType(), m_docTemplate, m_pMix, m_pUpstreamReplayControlChannel, CAMixWithReplayDB::m_u64ReferenceTime, pMix, CAAbstractControlChannel::sendXMLMessage(), setDOMElementAttribute(), and setDOMElementValue().
Referenced by CAReplayControlChannel::processXMLMessage().
| SINT32 CAReplayCtrlChannelMsgProc::proccessGotTimestamp | ( | const CAReplayControlChannel * | pReceiver, |
| const UINT8 * | strMixID, | ||
| const UINT32 | offset | ||
| ) | const |
Proccesses a received replay timestamp rt from mix strMixID.
| pReceiver | the control channel which receives the timestamp |
| strMixID | the mix id of the mix which sends the timestamp |
| rt | the timestamp |
| E_SUCCESS | if the timestamp was preocessed successfully |
| E_UNKNOWN | otherwise |
References createDOMDocument(), createDOMElement(), E_SUCCESS, CAMix::FIRST_MIX, CAMix::getType(), len, m_pDownstreamReplayControlChannel, m_pMix, t_mix_parameters::m_strMixID, t_mix_parameters::m_u32ReplayOffset, CAFirstMix::m_u64LastTimestampReceived, pMix, CAMsg::printMsg(), CAAbstractControlChannel::sendXMLMessage(), setDOMElementAttribute(), setDOMElementValue(), and CAFirstMix::setMixParameters().
Referenced by CAReplayControlChannel::processXMLMessage().
Propagates downstream the current replay timestamp.
References E_SUCCESS, E_UNKNOWN, getDOMChildByName(), m_docTemplate, m_pDownstreamReplayControlChannel, m_pMix, CAMixWithReplayDB::m_u64ReferenceTime, CAMsg::printMsg(), CAAbstractControlChannel::sendXMLMessage(), and setDOMElementValue().
Referenced by rp_loopPropagateTimestamp().
| SINT32 CAReplayCtrlChannelMsgProc::sendGetTimestamp | ( | const UINT8 * | strMixID | ) |
Sends upstram a request for the replay timestamp for the given mix.
References createDOMDocument(), createDOMElement(), E_UNKNOWN, m_pUpstreamReplayControlChannel, CAAbstractControlChannel::sendXMLMessage(), and setDOMElementAttribute().
Referenced by CAFirstMix::sendReplayTimestampRequestsToAllMixes().
| SINT32 CAReplayCtrlChannelMsgProc::startTimeStampPorpagation | ( | UINT32 | minutesPropagationIntervall | ) |
Sends the current replay timestamp periodically on the downstream replay control channel.
| minutesPropagationIntervall | says, how often (in minutes) should the timestamp information be sent |
References m_bRun, m_pThreadTimestampPropagation, m_u32PropagationInterval, rp_loopPropagateTimestamp, CAThread::setMainLoop(), and CAThread::start().
Referenced by CAMiddleMix::init(), and CALastMix::init().
Stops the timestamp propagation.
References E_SUCCESS, CAThread::join(), m_bRun, and m_pThreadTimestampPropagation.
Referenced by ~CAReplayCtrlChannelMsgProc().
| THREAD_RETURN rp_loopPropagateTimestamp | ( | void * | param | ) | [friend] |
Referenced by startTimeStampPorpagation().
volatile bool CAReplayCtrlChannelMsgProc::m_bRun [private] |
Referenced by rp_loopPropagateTimestamp(), startTimeStampPorpagation(), and stopTimeStampPorpagation().
XERCES_CPP_NAMESPACE::DOMDocument* CAReplayCtrlChannelMsgProc::m_docTemplate [private] |
const CAMixWithReplayDB* CAReplayCtrlChannelMsgProc::m_pMix [private] |
Referenced by CAReplayCtrlChannelMsgProc(), startTimeStampPorpagation(), and stopTimeStampPorpagation().
Referenced by CAReplayCtrlChannelMsgProc(), proccessGetTimestamp(), sendGetTimestamp(), and ~CAReplayCtrlChannelMsgProc().
Referenced by rp_loopPropagateTimestamp(), and startTimeStampPorpagation().
1.7.6.1