Mixe for Privacy and Anonymity in the Internet
Macros | Functions
CAFirstMixChannelList.cpp File Reference
#include "StdAfx.h"
#include "CAFirstMixChannelList.hpp"
#include "CAUtil.hpp"
#include "CAMsg.hpp"
#include "CAThread.hpp"
#include "CAAccountingInstance.hpp"
Include dependency graph for CAFirstMixChannelList.cpp:

Go to the source code of this file.

Macros

#define MAX_HASH_KEY   8200
 
#define MAX_NUMBER_OF_CHANNELS   CHANNELS_PER_CLIENT
 The maximum number of channels allowed per connection. More...
 
#define ERR_MSG_TO_MANY_CHANNELS   "More than " STR(MAX_NUMBER_OF_CHANNELS) " channels!\n"
 

Functions

THREAD_RETURN fml_loopDelayBuckets (void *param)
 

Macro Definition Documentation

◆ ERR_MSG_TO_MANY_CHANNELS

#define ERR_MSG_TO_MANY_CHANNELS   "More than " STR(MAX_NUMBER_OF_CHANNELS) " channels!\n"

◆ MAX_HASH_KEY

#define MAX_HASH_KEY   8200

Definition at line 34 of file CAFirstMixChannelList.cpp.

◆ MAX_NUMBER_OF_CHANNELS

#define MAX_NUMBER_OF_CHANNELS   CHANNELS_PER_CLIENT

The maximum number of channels allowed per connection.

Definition at line 223 of file CAFirstMixChannelList.cpp.

Function Documentation

◆ fml_loopDelayBuckets()

THREAD_RETURN fml_loopDelayBuckets ( void *  param)

Definition at line 1175 of file CAFirstMixChannelList.cpp.

1176  {
1177  INIT_STACK;
1178  BEGIN_STACK("CAFirstMixChannelList::fml_loopDelayBuckets");
1179 
1180  CAFirstMixChannelList* pChannelList=(CAFirstMixChannelList*)param;
1181  volatile UINT32** pDelayBuckets=pChannelList->m_pDelayBuckets;
1182  while(pChannelList->m_bDelayBucketsLoopRun)
1183  {
1184  pChannelList->m_pMutexDelayChannel->lock();
1185  UINT32 u32BucketGrow=pChannelList->m_u32DelayChannelBucketGrow;
1186  UINT32 u32MaxBucket=u32BucketGrow*10;
1187  for(UINT32 i=0;i<MAX_POLLFD;i++)
1188  {
1189  if(pDelayBuckets[i]!=NULL&&*(pDelayBuckets[i])<u32MaxBucket)
1190  {
1191  *(pDelayBuckets[i])+=u32BucketGrow;
1192  }
1193  }
1194  pChannelList->m_pMutexDelayChannel->unlock();
1196  }
1197 
1198  FINISH_STACK("CAFirstMixChannelList::fml_loopDelayBuckets");
1199 
1201  }
#define INIT_STACK
Definition: CAThread.hpp:48
#define BEGIN_STACK(methodName)
Definition: CAThread.hpp:49
#define FINISH_STACK(methodName)
Definition: CAThread.hpp:50
SINT32 msSleep(UINT32 ms)
Sleeps ms milliseconds.
Definition: CAUtil.cpp:406
#define THREAD_RETURN_SUCCESS
Definition: StdAfx.h:542
#define MAX_POLLFD
Definition: StdAfx.h:192
unsigned int UINT32
Definition: basetypedefs.h:131
Data structure that stores all information about the currently open Mix channels.
volatile UINT32 ** m_pDelayBuckets
volatile UINT32 m_u32DelayChannelBucketGrowIntervall
volatile UINT32 m_u32DelayChannelBucketGrow
SINT32 unlock()
Definition: CAMutex.hpp:52
SINT32 lock()
Definition: CAMutex.hpp:41