Mixe for Privacy and Anonymity in the Internet
CAFirstMix.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 
29 #ifndef __CAFIRSTMIX__
30 #define __CAFIRSTMIX__
31 #include "doxygen.h"
32 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_FIRST_MIX
33 #include "CAMix.hpp"
34 #include "CAMuxSocket.hpp"
35 #include "CAASymCipher.hpp"
36 //#include "CASignature.hpp"
38 #include "CAIPList.hpp"
39 #include "CASocketGroup.hpp"
40 #include "CAQueue.hpp"
41 #include "CAUtil.hpp"
42 #include "CAThread.hpp"
43 #include "CAThreadPool.hpp"
44 #include "TermsAndConditions.hpp"
45 #include "CALogPacketStats.hpp"
46 #include "CAConditionVariable.hpp"
47 #include "CATempIPBlockList.hpp"
48 #ifdef HAVE_EPOLL
49  #include "CASocketGroupEpoll.hpp"
50 #endif
51 
52 #ifdef REPLAY_DETECTION
53  #include "CAMixWithReplayDB.hpp"
54 #endif
55 #ifdef COUNTRY_STATS
56  #include "CAMutex.hpp"
57 #endif
58 
59 #define TNC_SREQUEST "TermsAndConditionsRequest"
60 #define TNC_RESPONSE "TermsAndConditionsResponse"
61 #define TNC_SINTERRUPT "TermsAndConditionsInterrupt"
62 #define TNC_REQ_TRANSLATION "Translation"
63 #define TNC_RESOURCES "Resources"
64 #define TNC_RESOURCE_TEMPLATE "Template"
65 #define TNC_TEMPLATE_ROOT_ELEMENT "TermsAndConditionsTemplate"
66 #define TNC_RESOURCE_CUSTOMIZED_SECT "CustomizedSections"
67 
68 #define TNC_RESPONSE_INVALID_REQUEST "InvalidTermsAndConditionsRequest"
69 #define TNC_CONFIRM_REQ "TermsAndConditionsConfirm"
70 
71 class CAInfoService;
72 
78 #ifdef CH_LOG_STUDY
79 THREAD_RETURN fm_loopLogChannelsOpened(void* param);
80 #endif //CH_LOG_STUDY
82 
83 #ifdef COUNTRY_STATS
86  {
87  private:
88  volatile UINT32 value;
90  public:
92  {
93  value=0;
94  }
95  void inc()
96  {
97  lock.lock();
98  value++;
99  lock.unlock();
100  }
101 
103  {
104  UINT32 tmp;
105  lock.lock();
106  tmp=value;
107  value=0;
108  lock.unlock();
109  return tmp;
110  }
111  };
112 #endif
113 
115  {
120 
121 //#define LOCK_FREE_LIST
122 
124  {
125  public:
127  {
128  m_pMutex = new CAMutex();
130  memset(m_pHeads, 0, sizeof(t_FirstMixChannelToQueueList_entry*) * 0x10000);
131  }
132 
134  {
135  m_pMutex->lock();
137  pNewEntry->channel = channel;
138  pNewEntry->pQueue = pQueue;
139  UINT32 hashkey = channel & 0x0FFFF;
140  pNewEntry->next = m_pHeads[hashkey];
141  m_pHeads[hashkey] = pNewEntry;
142  m_pMutex->unlock();
143  return E_SUCCESS;
144  }
145 
147  {
148 #ifndef LOCK_FREE_LIST
149  m_pMutex->lock();
150 #endif
151  tFirstMixChannelToQueueListEntry* pEntry = m_pHeads[channel & 0x0FFFF ];
152  while (pEntry != NULL)
153  {
154  if (pEntry->channel == channel)
155  {
156  CAQueue* pQueue = pEntry->pQueue;
157 #ifndef LOCK_FREE_LIST
158  m_pMutex->unlock();
159 #endif
160  return pQueue;
161  }
162  pEntry=pEntry->next;
163  }
164 #ifndef LOCK_FREE_LIST
165  m_pMutex->unlock();
166 #endif
167  return NULL;
168  }
169 
171  {
172  m_pMutex->lock();
174  tFirstMixChannelToQueueListEntry* pLastEntry = NULL;
175  while (pEntry != NULL)
176  {
177  if (pEntry->channel == channel)
178  {
179  if (pLastEntry != NULL)
180  {
181  pLastEntry->next = pEntry->next;
182  }
183  else
184  {
185  m_pHeads[channel & 0x0FFFF] = pEntry->next;
186  }
187  delete pEntry;
188  m_pMutex->unlock();
189  return E_SUCCESS;
190  }
191  pEntry=pEntry->next;
192  }
193  m_pMutex->unlock();
194  return E_UNKNOWN;
195  }
196 
198  {
199  UINT32 nrChannels = 10000;
200  UINT32 nrAccess = 10000000;
201  HCHANNEL* pChannels = new HCHANNEL[nrChannels];
202  printf("%u Channel test - %u accesses\n",nrChannels,nrAccess);
203  for (UINT32 i = 0; i < nrChannels; i++)
204  {
205  getRandom(&pChannels[i]);
206  add(pChannels[i], NULL);
207  }
208 
209  UINT64 startTime;
210  getcurrentTimeMillis(startTime);
211  for (UINT32 i = 0; i < nrAccess; i++)
212  {
213  UINT32 r;
214  getRandom(&r);
215  r %= 10000;
216  get(pChannels[r]);
217  }
218  UINT64 endTime;
219  getcurrentTimeMillis(endTime);
220 
221  printf("Duration: %u ms\n", diff64(endTime, startTime));
222  }
223  private:
226  };
227 
228 
229 class CAFirstMix:public
230 #ifdef REPLAY_DETECTION
232 #else
233  CAMix
234 #endif
235 {
236 public:
238  {
239  m_pmutexUser=new CAMutex();
243 #ifdef CH_LOG_STUDY
244  //log nr of opened channels per minute
245  nrOfChOpMutex = new CAMutex();
246  nrOfChThread = NULL;
247  nrOfOpenedChannels = 0;
248  currentOpenedChannels = 0;
249  lastLogTime = 0;
250 #endif //CH_LOG_STUDY
251  m_nMixedPackets=0;
252  m_nUser=0;
253  m_nSocketsIn=0;
254  m_pQueueSendToMix=NULL;
255  m_pQueueReadFromMix=NULL;
256  m_pIPList=NULL;
257  m_arrSocketsIn=NULL;
258  m_pRSA=NULL;
259  m_pInfoService=NULL;
260 #ifndef MULTI_THREADED_PACKET_PROCESSING
263  m_pChannelList=NULL;
264 #else
265  m_numThreads = 10;
266 #endif
267  m_pMuxOut=NULL;
268  m_docMixCascadeInfo=NULL;
269  m_xmlKeyInfoBuff=NULL;
270  m_pthreadSendToMix=NULL;
273  m_pthreadsLogin=NULL;
275  m_tnCDefs = NULL;
277  m_templatesOwner = NULL;
278  m_tcTemplates = NULL;
279  m_bIsShuttingDown=false;
280  m_pIPBlockList = NULL;
281 #ifdef LOG_PACKET_TIMES
282  m_pLogPacketStats=NULL;
283 #endif
284 #ifdef COUNTRY_STATS
286  m_CountryStats=NULL;
287  m_mysqlCon=NULL;
288  m_threadLogLoop=NULL;
289 #endif
290  m_arMixParameters=NULL;
291 #ifdef DYNAMIC_MIX
292  m_bBreakNeeded = false;
293 #endif
294  TNC_REQUEST = XMLString::transcode(TNC_SREQUEST);
295  TNC_CONFIRM = XMLString::transcode(TNC_CONFIRM_REQ);
296  TNC_INTERRUPT = XMLString::transcode(TNC_SINTERRUPT);
297 #ifdef PAYMENT
298  m_pmutexLogin=new CAMutex();
299 #endif
300  }
301 
302 
303  virtual ~CAFirstMix()
304  {
305  clean(); // speeds up shutdown
306  delete m_pmutexUser;
307  m_pmutexUser = NULL;
308  delete m_pmutexMixedPackets;
309  m_pmutexMixedPackets = NULL;
310  delete m_pmutexLoginThreads;
311  m_pmutexLoginThreads = NULL;
312  delete m_pmutexNewConnections ;
314 #ifdef PAYMENT
315  delete m_pmutexLogin;
316 #endif
317  }
318 
320  {
321  return CAMix::FIRST_MIX;
322  }
323 #ifdef PAYMENT
324  bool forceKickout(fmHashTableEntry* pHashTableEntry, const XERCES_CPP_NAMESPACE::DOMDocument *pErrDoc=NULL);
326  {
327  return m_pmutexLogin;
328  }
329 #endif
330 
331 #ifdef DYNAMIC_MIX
332 private:
333  bool m_bBreakNeeded;
334 #endif
335  SINT32 connectToNextMix(CASocketAddr* a_pAddrNext);
336 protected:
337  virtual SINT32 loop()=0;
338  bool isShuttingDown();
339  SINT32 init();
340  SINT32 clean();
341  virtual SINT32 initOnce();
342 #ifdef DYNAMIC_MIX
343  void stopCascade()
344  {
345  m_bRestart = true;
346  }
347 #endif
348  //added by ronin <ronin2@web.de>
349  virtual SINT32 processKeyExchange();
350 
352  SINT32 initMixParameters(DOMElement* elemMixes);
353 
354 
355 public:
356  SINT32 getMixedPackets(UINT64& ppackets);
358  SINT32 getLevel(SINT32* puser,SINT32* prisk,SINT32* ptraffic);
359 
361  DOMNode *getTermsAndConditionsTemplate(UINT8 *templateRefID);
362 
363  friend THREAD_RETURN fm_loopSendToMix(void*);
364  friend THREAD_RETURN fm_loopReadFromMix(void*);
365  friend THREAD_RETURN fm_loopAcceptUsers(void*);
366  //friend THREAD_RETURN fm_loopReadFromUsers(void*);
367  friend THREAD_RETURN fm_loopDoUserLogin(void* param);
368 #ifdef CH_LOG_STUDY
369  friend THREAD_RETURN fm_loopLogChannelsOpened(void* param);
370 #endif //CH_LOG_STUDY
371 
372 
373  //How many mixes are in the cascade?
375  {
376  return m_u32MixCount;
377  }
380  {
381  return m_arMixParameters;
382  }
383 
387  SINT32 setMixParameters(const tMixParameters& params);
388 
389  SINT32 handleKeyInfoExtensions(DOMElement *root);
390  SINT32 handleTermsAndConditionsExtension(DOMElement *extensionRoot);
391 
392 #ifdef REPLAY_DETECTION
394 #endif
395 
396 protected:
397 #ifndef COUNTRY_STATS
398  SINT32 incUsers()
399 #else
401 #endif
402  {
403  m_pmutexUser->lock();
404  m_nUser++;
405  #ifdef COUNTRY_STATS
406  pHashEntry->countryID=updateCountryStats(pHashEntry->peerIP,0,false);
407  #endif
408  m_pmutexUser->unlock();
409  return E_SUCCESS;
410  }
411 
412 #ifndef COUNTRY_STATS
413  SINT32 decUsers()
414 #else
416 #endif
417  {
418  m_pmutexUser->lock();
419  m_nUser--;
420  #ifdef COUNTRY_STATS
421  updateCountryStats(NULL,pHashEntry->countryID,true);
422  #endif
423  m_pmutexUser->unlock();
424  return E_SUCCESS;
425  }
426 
428  {
432  return E_SUCCESS;
433  }
434 
435  /*bool getRestart() const
436  {
437  return m_bRestart;
438  }*/
439  SINT32 doUserLogin(CAMuxSocket* pNewUSer,UINT8 perrIP[4]);
440 
441 #ifdef DELAY_USERS
443 #endif
444 
445 protected:
450 #ifdef LOG_PACKET_TIMES
451  CALogPacketStats* m_pLogPacketStats;
452 #endif
453 
454  volatile UINT32 m_nUser;
455  UINT32 m_nSocketsIn; //number of usable ListenerInterface (non 'virtual')
456  volatile bool m_bRestart;
458  //how many mixes are in the cascade?
460  //stores the mix parameters for each mix
462 
463 #ifndef MULTI_THREADED_PACKET_PROCESSING
465 #ifdef HAVE_EPOLL
468 #else
469 
472 #endif
473 #else // with MULTI_THREADED_PACKET_PROCESSING
474  UINT32 m_numThreads;
475  CAThreadPool* m_pthreadsPacketProccessingLoop;
476  CAFirstMixChannelList** m_arpChannelList;
477  CAFirstMixChannelToQueueList* m_pChannelToQueueList;
478 #ifdef HAVE_EPOLL
479  CASocketGroupEpoll** m_arpsocketgroupUsersRead;
480  CASocketGroupEpoll** m_arpsocketgroupUsersWrite;
481 #else
482  CASocketGroup** m_arpsocketgroupUsersRead;
483  CASocketGroup** m_arpsocketgroupUsersWrite;
484 #endif
485 
486 
487 #endif
488  // moved to CAMix
489  //CAInfoService* m_pInfoService;
491 
494 
495  XERCES_CPP_NAMESPACE::DOMDocument* m_docMixCascadeInfo;
498  // moved to CAMix
499  //CASignature* m_pSignature;
503 
508 
512  DOMNode **m_tcTemplates;
513  XERCES_CPP_NAMESPACE::DOMDocument *m_templatesOwner; //owner for the TC templates stored in tcTemplates
514 
515  /* constants for the XML root tags received from the client */
516  const XMLCh *TNC_REQUEST;
517  const XMLCh *TNC_CONFIRM;
518  const XMLCh *TNC_INTERRUPT;
519 #ifdef CH_LOG_STUDY
520 protected:
521  CAMutex *nrOfChOpMutex;
522  UINT32 nrOfOpenedChannels;
523  UINT32 currentOpenedChannels;
524  CAThread *nrOfChThread;
525  time_t lastLogTime;
526 #endif //CH_LOG_STUDY
527 
528 #ifdef COUNTRY_STATS
529  private:
530  SINT32 initCountryStats(char* db_host,char* db_user,char*db_passwd);
531  SINT32 updateCountryStats(const UINT8 ip[4],UINT32 a_countryID,bool bRemove);
532  volatile bool m_bRunLogCountries;
534  protected:
538  private:
540  MYSQL* m_mysqlCon;
541  friend THREAD_RETURN iplist_loopDoLogCountries(void* param);
542 #endif
543 
544 #ifdef REPLAY_DETECTION
545  private:
547 #endif
548 
549 protected:
551  friend THREAD_RETURN fm_loopLog(void*);
552  volatile bool m_bRunLog;
553 
554 #ifdef PAYMENT
556 #endif
557 
558 private:
559  SINT32 doUserLogin_internal(CAMuxSocket* pNewUSer,UINT8 perrIP[4]);
561 
562 
563  /* handlerFunction for Terms And Conditions invoked during user Login */
564  termsAndConditionMixAnswer_t *handleTermsAndConditionsLogin(XERCES_CPP_NAMESPACE::DOMDocument *request);
565 
567 
570 
572  {
576  }
577 
579  {
583  }
584 
585 };
586 
587 #endif
588 #endif //ONLY_LOCAL_PROXY
struct t_FirstMixChannelToQueueList_entry tFirstMixChannelToQueueListEntry
#define TNC_CONFIRM_REQ
Definition: CAFirstMix.hpp:69
THREAD_RETURN fm_loopSendToMix(void *)
How to end this thread: 0.
Definition: CAFirstMix.cpp:978
THREAD_RETURN fm_loopDoUserLogin(void *param)
THREAD_RETURN fm_loopLog(void *)
THREAD_RETURN iplist_loopDoLogCountries(void *param)
#define TNC_SINTERRUPT
Definition: CAFirstMix.hpp:61
#define TNC_SREQUEST
Definition: CAFirstMix.hpp:59
THREAD_RETURN fm_loopAcceptUsers(void *)
THREAD_RETURN fm_loopReadFromMix(void *)
THREAD_RETURN fm_loopReadFromUsers(void *)
SINT32 getcurrentTimeMillis(UINT64 &u64Time)
Gets the current Systemtime in milli seconds.
Definition: CAUtil.cpp:252
SINT32 getRandom(UINT32 *val)
Gets 32 random bits.
Definition: CAUtil.cpp:346
UINT32 diff64(const UINT64 &bigop, const UINT64 &smallop)
Definition: CAUtil.hpp:398
void inc64(UINT64 &op1)
Definition: CAUtil.hpp:387
#define THREAD_RETURN
Definition: StdAfx.h:540
unsigned short UINT16
Definition: basetypedefs.h:133
signed int SINT32
Definition: basetypedefs.h:132
unsigned char UINT8
Definition: basetypedefs.h:135
unsigned int UINT32
Definition: basetypedefs.h:131
Data structure that stores all information about the currently open Mix channels.
SINT32 add(HCHANNEL channel, CAQueue *pQueue)
Definition: CAFirstMix.hpp:133
tFirstMixChannelToQueueListEntry ** m_pHeads
Definition: CAFirstMix.hpp:225
CAQueue * get(HCHANNEL channel)
Definition: CAFirstMix.hpp:146
SINT32 removeChannel(HCHANNEL channel)
Definition: CAFirstMix.hpp:170
CAThread * m_pthreadReadFromMix
Definition: CAFirstMix.hpp:507
CASocket ** m_arrSocketsIn
Definition: CAFirstMix.hpp:457
SINT32 updateCountryStats(const UINT8 ip[4], UINT32 a_countryID, bool bRemove)
Update the statisitics of the countries users come from.
const XMLCh * TNC_CONFIRM
Definition: CAFirstMix.hpp:517
friend THREAD_RETURN fm_loopSendToMix(void *)
How to end this thread: 0.
Definition: CAFirstMix.cpp:978
UINT32 m_nrOfTermsAndConditionsTemplates
Definition: CAFirstMix.hpp:511
virtual SINT32 processKeyExchange()
Definition: CAFirstMix.cpp:362
SINT32 init()
Definition: CAFirstMix.cpp:108
SINT32 doUserLogin(CAMuxSocket *pNewUSer, UINT8 perrIP[4])
tMixParameters * getMixParameters()
Returns the ordered list of the mix parameters from the first mix to the last mix.
Definition: CAFirstMix.hpp:379
CAMutex * getLoginMutex()
Definition: CAFirstMix.hpp:325
termsAndConditionMixAnswer_t * handleTermsAndConditionsLogin(XERCES_CPP_NAMESPACE::DOMDocument *request)
friend THREAD_RETURN fm_loopDoUserLogin(void *param)
SINT32 getLevel(SINT32 *puser, SINT32 *prisk, SINT32 *ptraffic)
SINT32 incMixedPackets()
Definition: CAFirstMix.hpp:427
SINT32 getMixedPackets(UINT64 &ppackets)
volatile bool m_bRestart
Definition: CAFirstMix.hpp:456
SINT32 initCountryStats(char *db_host, char *db_user, char *db_passwd)
CAMutex * m_pmutexNewConnections
Definition: CAFirstMix.hpp:569
tMixParameters * m_arMixParameters
Definition: CAFirstMix.hpp:461
DOMNode ** m_tcTemplates
Definition: CAFirstMix.hpp:512
CAMuxSocket * m_pMuxOut
Definition: CAFirstMix.hpp:490
CAThread * m_pthreadAcceptUsers
Definition: CAFirstMix.hpp:504
UINT64 m_nMixedPackets
Definition: CAFirstMix.hpp:496
CAQueue * m_pQueueSendToMix
Definition: CAFirstMix.hpp:448
volatile bool m_bRunLog
Definition: CAFirstMix.hpp:552
CAIPList * m_pIPList
Definition: CAFirstMix.hpp:446
tMixType getType() const
Definition: CAFirstMix.hpp:319
DOMNode * getTermsAndConditionsTemplate(UINT8 *templateRefID)
Definition: CAFirstMix.cpp:953
volatile UINT32 m_newConnections
Definition: CAFirstMix.hpp:568
friend THREAD_RETURN fm_loopLog(void *)
bool m_bIsShuttingDown
Definition: CAFirstMix.hpp:550
friend THREAD_RETURN iplist_loopDoLogCountries(void *param)
SINT32 incUsers(LP_fmHashTableEntry pHashEntry)
Definition: CAFirstMix.hpp:400
volatile bool m_bRunLogCountries
Definition: CAFirstMix.hpp:532
CASocketGroupEpoll * m_psocketgroupUsersWrite
Definition: CAFirstMix.hpp:467
UINT32 m_nrOfTermsAndConditionsDefs
Definition: CAFirstMix.hpp:509
XERCES_CPP_NAMESPACE::DOMDocument * m_templatesOwner
Definition: CAFirstMix.hpp:513
static const UINT32 MAX_CONCURRENT_NEW_CONNECTIONS
Definition: CAFirstMix.hpp:566
CAThread * m_threadLogLoop
Definition: CAFirstMix.hpp:539
volatile UINT32 m_nUser
Definition: CAFirstMix.hpp:454
const XMLCh * TNC_INTERRUPT
Definition: CAFirstMix.hpp:518
void incNewConnections()
Definition: CAFirstMix.hpp:571
CAThread * m_pthreadSendToMix
Definition: CAFirstMix.hpp:506
CAMutex * m_pmutexLogin
Definition: CAFirstMix.hpp:555
UINT64 m_u64LastTimestampReceived
Definition: CAFirstMix.hpp:393
virtual SINT32 loop()=0
UINT32 m_u32MixCount
Definition: CAFirstMix.hpp:459
SINT32 getMixCount()
Definition: CAFirstMix.hpp:374
CASocketGroupEpoll * m_psocketgroupUsersRead
Definition: CAFirstMix.hpp:466
CATempIPBlockList * m_pIPBlockList
Definition: CAFirstMix.hpp:447
tUINT32withLock * m_PacketsPerCountryOUT
Definition: CAFirstMix.hpp:537
SINT32 doUserLogin_internal(CAMuxSocket *pNewUSer, UINT8 perrIP[4])
Sends and receives all data neccessary for a User to "login".
CAMutex * m_pmutexUser
Definition: CAFirstMix.hpp:500
CAMutex * m_pmutexMixedPackets
Definition: CAFirstMix.hpp:501
friend THREAD_RETURN fm_loopAcceptUsers(void *)
bool isShuttingDown()
Definition: CAFirstMix.cpp:64
SINT32 reconfigure()
void decNewConnections()
Definition: CAFirstMix.hpp:578
SINT32 setMixParameters(const tMixParameters &params)
Sets the parameters for the mix specified in the params.m_strMixID field.
Definition: CAFirstMix.cpp:784
friend THREAD_RETURN fm_loopReadFromMix(void *)
SINT32 sendReplayTimestampRequestsToAllMixes()
virtual SINT32 initOnce()
Definition: CAFirstMix.cpp:69
SINT32 isAllowedToPassRestrictions(CASocket *pNewMuxSocket)
SINT32 decUsers(LP_fmHashTableEntry pHashEntry)
Definition: CAFirstMix.hpp:415
virtual ~CAFirstMix()
Definition: CAFirstMix.hpp:303
MYSQL * m_mysqlCon
Definition: CAFirstMix.hpp:540
CAFirstMixChannelList * m_pChannelList
Definition: CAFirstMix.hpp:464
TermsAndConditions * getTermsAndConditions(const UINT8 *opSki)
Definition: CAFirstMix.cpp:932
tUINT32withLock * m_PacketsPerCountryIN
Definition: CAFirstMix.hpp:536
SINT32 handleTermsAndConditionsExtension(DOMElement *extensionRoot)
Definition: CAFirstMix.cpp:825
bool forceKickout(fmHashTableEntry *pHashTableEntry, const XERCES_CPP_NAMESPACE::DOMDocument *pErrDoc=NULL)
UINT32 m_nSocketsIn
Definition: CAFirstMix.hpp:455
SINT32 clean()
UINT8 * m_xmlKeyInfoBuff
Definition: CAFirstMix.hpp:492
CAASymCipher * m_pRSA
Definition: CAFirstMix.hpp:497
CAThreadPool * m_pthreadsLogin
Definition: CAFirstMix.hpp:505
TermsAndConditions ** m_tnCDefs
Definition: CAFirstMix.hpp:510
const XMLCh * TNC_REQUEST
Definition: CAFirstMix.hpp:516
CAQueue * m_pQueueReadFromMix
Definition: CAFirstMix.hpp:449
volatile UINT32 * m_CountryStats
Definition: CAFirstMix.hpp:533
UINT32 getNrOfUsers()
UINT16 m_xmlKeyInfoSize
Definition: CAFirstMix.hpp:493
SINT32 initMixParameters(DOMElement *elemMixes)
Initialises the MixParameters info for each mix form the <Mixes> element received from the second mix...
CAMutex * m_pmutexLoginThreads
Definition: CAFirstMix.hpp:502
SINT32 deleteCountryStats()
SINT32 connectToNextMix(CASocketAddr *a_pAddrNext)
Definition: CAFirstMix.cpp:307
SINT32 handleKeyInfoExtensions(DOMElement *root)
Definition: CAFirstMix.cpp:805
XERCES_CPP_NAMESPACE::DOMDocument * m_docMixCascadeInfo
Definition: CAFirstMix.hpp:495
The purpose of this class is to store a list of IP-Addresses.
Definition: CAIPList.hpp:62
Definition: CAMix.hpp:49
CAInfoService * m_pInfoService
Definition: CAMix.hpp:184
tMixType
Definition: CAMix.hpp:52
@ FIRST_MIX
Definition: CAMix.hpp:53
This class (interface) adds the functionality used by last and middle mixes to detecte replays.
SINT32 unlock()
Definition: CAMutex.hpp:52
SINT32 lock()
Definition: CAMutex.hpp:41
This is a simple FIFO-Queue.
Definition: CAQueue.hpp:50
This is an abstract class for representing a socket address used in CASocket, CADatagramSocket and CA...
The purpose of this class is storing the IPs of JAP users who tried to hack/attack the payment system...
This class bla bla.
volatile UINT32 value
Definition: CAFirstMix.hpp:88
const SINT32 E_SUCCESS
Definition: errorcodes.hpp:2
#define E_UNKNOWN
Definition: errorcodes.hpp:3
Definition: CAFirstMix.hpp:115
HCHANNEL channel
Definition: CAFirstMix.hpp:116
t_FirstMixChannelToQueueList_entry * next
Definition: CAFirstMix.hpp:118
CAQueue * pQueue
Definition: CAFirstMix.hpp:117
HCHANNEL channel
Definition: typedefs.hpp:0
UINT32 HCHANNEL
Definition: typedefs.hpp:34