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. More... | |
~CAReplayCtrlChannelMsgProc () | |
SINT32 | propagateCurrentReplayTimestamp () |
Propagates downstream the current replay timestamp. More... | |
SINT32 | startTimeStampPorpagation (UINT32 minutesPropagationIntervall) |
Sends the current replay timestamp periodically on the downstream replay control channel. More... | |
SINT32 | stopTimeStampPorpagation () |
Stops the timestamp propagation. More... | |
SINT32 | proccessGetTimestamp (const CAReplayControlChannel *pReceiver, const UINT8 *strMixID) const |
Proccesses a getTimeStamps request on a reply control channel. More... | |
SINT32 | proccessGotTimestamp (const CAReplayControlChannel *pReceiver, const UINT8 *strMixID, const UINT32 offset) const |
Proccesses a received replay timestamp rt from mix strMixID. More... | |
SINT32 | sendGetTimestamp (const UINT8 *strMixID) |
Sends upstram a request for the replay timestamp for the given mix. More... | |
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. More... | |
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) |
CAReplayCtrlChannelMsgProc::CAReplayCtrlChannelMsgProc | ( | const CAMixWithReplayDB * | pMix | ) |
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().
CAReplayCtrlChannelMsgProc::~CAReplayCtrlChannelMsgProc | ( | ) |
References CAMix::getDownstreamControlChannelDispatcher(), CAAbstractControlChannel::getID(), CAMix::getUpstreamControlChannelDispatcher(), m_pDownstreamReplayControlChannel, m_pMix, m_pUpstreamReplayControlChannel, CAMsg::printMsg(), CAControlChannelDispatcher::removeControlChannel(), and stopTimeStampPorpagation().
|
private |
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, pMix, CAMsg::printMsg(), CAAbstractControlChannel::sendXMLMessage(), setDOMElementAttribute(), and setDOMElementValue().
Referenced by CAReplayControlChannel::processXMLMessage().
SINT32 CAReplayCtrlChannelMsgProc::propagateCurrentReplayTimestamp | ( | ) |
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().
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().
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().
SINT32 CAReplayCtrlChannelMsgProc::stopTimeStampPorpagation | ( | ) |
Stops the timestamp propagation.
References E_SUCCESS, CAThread::join(), m_bRun, and m_pThreadTimestampPropagation.
Referenced by ~CAReplayCtrlChannelMsgProc().
|
friend |
Referenced by startTimeStampPorpagation().
|
private |
Referenced by startTimeStampPorpagation(), and stopTimeStampPorpagation().
|
private |
|
private |
|
private |
|
private |
Referenced by CAReplayCtrlChannelMsgProc(), startTimeStampPorpagation(), and stopTimeStampPorpagation().
|
private |
Referenced by CAReplayCtrlChannelMsgProc(), proccessGetTimestamp(), sendGetTimestamp(), and ~CAReplayCtrlChannelMsgProc().
|
private |
Referenced by startTimeStampPorpagation().