Mixe for Privacy and Anonymity in the Internet
CAReplayCtrlChannelMsgProc.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2000, The JAP-Team
3 All rights reserved.
4 Redistribution and use in source and binary forms, with or without modification,
5 are permitted provided that the following conditions are met:
6 
7  - Redistributions of source code must retain the above copyright notice,
8  this list of conditions and the following disclaimer.
9 
10  - Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation and/or
12  other materials provided with the distribution.
13 
14  - Neither the name of the University of Technology Dresden, Germany nor the names of its contributors
15  may be used to endorse or promote products derived from this software without specific
16  prior written permission.
17 
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
20 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
22 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
27 */
28 #ifndef CA_REPLAY_CONTROL_CHANNEL_MSG_PROC
29 #define CA_REPLAY_CONTROL_CHANNEL_MSG_PROC
30 #include "CAThread.hpp"
31 class CAMix;
32 class CAMixWithReplayDB;
34 
36 
38 {
39  public:
43 
46 
47 
52  SINT32 startTimeStampPorpagation(UINT32 minutesPropagationIntervall);
53 
56 
63 // SINT32 proccessGetTimestamps(const CAReplayControlChannel* pReceiver) const;
64 
72  SINT32 proccessGetTimestamp(const CAReplayControlChannel* pReceiver,const UINT8* strMixID) const;
73 
82  SINT32 proccessGotTimestamp(const CAReplayControlChannel* pReceiver,const UINT8* strMixID,const UINT32 offset) const;
83 
85  SINT32 sendGetTimestamp(const UINT8* strMixID);
86 
87 private:
88  friend THREAD_RETURN rp_loopPropagateTimestamp(void* param);
94  //UINT8* m_strGetTimestampsRepsonseMessageTemplate;
95  //UINT32 m_u32GetTimestampsRepsonseMessageTemplateLen;
96  volatile bool m_bRun;
97  XERCES_CPP_NAMESPACE::DOMDocument* m_docTemplate;
99 };
100 #endif
THREAD_RETURN rp_loopPropagateTimestamp(void *param)
#define THREAD_RETURN
Definition: StdAfx.h:540
signed int SINT32
Definition: basetypedefs.h:132
unsigned char UINT8
Definition: basetypedefs.h:135
unsigned int UINT32
Definition: basetypedefs.h:131
Definition: CAMix.hpp:49
This class (interface) adds the functionality used by last and middle mixes to detecte replays.
A Control channel for the exchange of the current replay detection timestamps.
SINT32 proccessGotTimestamp(const CAReplayControlChannel *pReceiver, const UINT8 *strMixID, const UINT32 offset) const
Proccesses a received replay timestamp rt from mix strMixID.
SINT32 initTimestampsMessageTemplate()
We initialise the template used to generate the idividual responses to gettimestamps requests accordi...
CAReplayControlChannel * m_pDownstreamReplayControlChannel
SINT32 stopTimeStampPorpagation()
Stops the timestamp propagation.
SINT32 propagateCurrentReplayTimestamp()
Propagates downstream the current replay timestamp.
CAReplayCtrlChannelMsgProc(const CAMixWithReplayDB *pMix)
Initialises the replay control channel messages processor with the necessary information.
friend THREAD_RETURN rp_loopPropagateTimestamp(void *param)
SINT32 proccessGetTimestamp(const CAReplayControlChannel *pReceiver, const UINT8 *strMixID) const
Proccesses a getTimeStamps request on a reply control channel.
XERCES_CPP_NAMESPACE::DOMDocument * m_docTemplate
CAReplayControlChannel * m_pUpstreamReplayControlChannel
SINT32 sendGetTimestamp(const UINT8 *strMixID)
Sends upstram a request for the replay timestamp for the given mix.
SINT32 startTimeStampPorpagation(UINT32 minutesPropagationIntervall)
Sends the current replay timestamp periodically on the downstream replay control channel.
CAMix * pMix
Definition: proxytest.cpp:75