Mixes for Privacy and Anonymity in the Internet
Protected Member Functions | List of all members
CAFirstMixB Class Reference
Inheritance diagram for CAFirstMixB:
CAFirstMix CAMixWithReplayDB CAMix

Protected Member Functions

SINT32 loop ()
 
- Protected Member Functions inherited from CAFirstMix
bool isShuttingDown ()
 
SINT32 init ()
 
SINT32 clean ()
 
virtual SINT32 initOnce ()
 
virtual SINT32 processKeyExchange ()
 
SINT32 initMixParameters (DOMElement *elemMixes)
 Initialises the MixParameters info for each mix form the <Mixes> element received from the second mix. More...
 
SINT32 incUsers (LP_fmHashTableEntry pHashEntry)
 
SINT32 decUsers (LP_fmHashTableEntry pHashEntry)
 
SINT32 incMixedPackets ()
 
SINT32 doUserLogin (CAMuxSocket *pNewUSer, UINT8 perrIP[4])
 
SINT32 reconfigure ()
 
SINT32 deleteCountryStats ()
 
- Protected Member Functions inherited from CAMix
SINT32 checkCompatibility (DOMNode *a_parent, const char *a_mixPosition)
 
SINT32 appendCompatibilityInfo (DOMNode *a_parent)
 
SINT32 addMixInfo (DOMNode *a_element, bool a_bForceFirstNode)
 
virtual SINT32 initMixCascadeInfo (DOMElement *elemMixes)
 This will initialize the XML Cascade Info struct XMLFirstMixToInfoService that is sent to the InfoService in CAInfoService::sendCascadeHelo() More...
 
SINT32 signXML (DOMNode *a_element)
 

Additional Inherited Members

- Public Types inherited from CAMix
enum  tMixType { FIRST_MIX , MIDDLE_MIX , LAST_MIX , JAP }
 
- Public Member Functions inherited from CAFirstMix
 CAFirstMix ()
 
virtual ~CAFirstMix ()
 
tMixType getType () const
 
bool forceKickout (fmHashTableEntry *pHashTableEntry, const XERCES_CPP_NAMESPACE::DOMDocument *pErrDoc=NULL)
 
CAMutexgetLoginMutex ()
 
SINT32 connectToNextMix (CASocketAddr *a_pAddrNext)
 
SINT32 getMixedPackets (UINT64 &ppackets)
 
UINT32 getNrOfUsers ()
 
SINT32 getLevel (SINT32 *puser, SINT32 *prisk, SINT32 *ptraffic)
 
TermsAndConditionsgetTermsAndConditions (const UINT8 *opSki)
 
DOMNode * getTermsAndConditionsTemplate (UINT8 *templateRefID)
 
SINT32 getMixCount ()
 
tMixParametersgetMixParameters ()
 Returns the ordered list of the mix parameters from the first mix to the last mix. More...
 
SINT32 setMixParameters (const tMixParameters &params)
 Sets the parameters for the mix specified in the params.m_strMixID field. More...
 
SINT32 handleKeyInfoExtensions (DOMElement *root)
 
SINT32 handleTermsAndConditionsExtension (DOMElement *extensionRoot)
 
- Public Member Functions inherited from CAMixWithReplayDB
 CAMixWithReplayDB ()
 
CADatabasegetReplayDB () const
 
- Public Member Functions inherited from CAMix
 CAMix ()
 
virtual ~CAMix ()
 
SINT32 start ()
 
virtual void shutDown ()
 
virtual bool isShutDown ()
 
SINT32 getMixCascadeInfo (XERCES_CPP_NAMESPACE::DOMDocument *&docMixCascadeInfo)
 Returns the Mix-Cascade info which should be send to the InfoService. More...
 
bool acceptsReconfiguration ()
 
CAControlChannelDispatchergetDownstreamControlChannelDispatcher () const
 
CAControlChannelDispatchergetUpstreamControlChannelDispatcher () const
 
UINT32 getLastConnectionTime ()
 
bool isConnected ()
 
- Public Attributes inherited from CAFirstMix
UINT64 m_u64LastTimestampReceived
 
- Public Attributes inherited from CAMixWithReplayDB
UINT64 m_u64ReferenceTime
 
- Static Public Attributes inherited from CAMix
static const UINT32 TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT = 60000
 
- Protected Attributes inherited from CAFirstMix
CAIPListm_pIPList
 
CATempIPBlockListm_pIPBlockList
 
CAQueuem_pQueueSendToMix
 
CAQueuem_pQueueReadFromMix
 
volatile UINT32 m_nUser
 
UINT32 m_nSocketsIn
 
volatile bool m_bRestart
 
CASocket ** m_arrSocketsIn
 
UINT32 m_u32MixCount
 
tMixParametersm_arMixParameters
 
CAFirstMixChannelListm_pChannelList
 
CASocketGroupEpollm_psocketgroupUsersRead
 
CASocketGroupEpollm_psocketgroupUsersWrite
 
CAMuxSocketm_pMuxOut
 
UINT8m_xmlKeyInfoBuff
 
UINT16 m_xmlKeyInfoSize
 
XERCES_CPP_NAMESPACE::DOMDocument * m_docMixCascadeInfo
 
UINT64 m_nMixedPackets
 
CAASymCipherm_pRSA
 
CAMutexm_pmutexUser
 
CAMutexm_pmutexMixedPackets
 
CAMutexm_pmutexLoginThreads
 
CAThreadm_pthreadAcceptUsers
 
CAThreadPoolm_pthreadsLogin
 
CAThreadm_pthreadSendToMix
 
CAThreadm_pthreadReadFromMix
 
UINT32 m_nrOfTermsAndConditionsDefs
 
TermsAndConditions ** m_tnCDefs
 
UINT32 m_nrOfTermsAndConditionsTemplates
 
DOMNode ** m_tcTemplates
 
XERCES_CPP_NAMESPACE::DOMDocument * m_templatesOwner
 
const XMLCh * TNC_REQUEST
 
const XMLCh * TNC_CONFIRM
 
const XMLCh * TNC_INTERRUPT
 
tUINT32withLockm_PacketsPerCountryIN
 
tUINT32withLockm_PacketsPerCountryOUT
 
bool m_bIsShuttingDown
 
volatile bool m_bRunLog
 
CAMutexm_pmutexLogin
 
- Protected Attributes inherited from CAMixWithReplayDB
CADatabasem_pReplayDB
 
CAReplayCtrlChannelMsgProcm_pReplayMsgProc
 
- Protected Attributes inherited from CAMix
volatile bool m_bLoop
 
bool m_bReconfiguring
 
volatile bool m_bShutDown
 
CAMultiSignaturem_pMultiSignature
 
CAInfoServicem_pInfoService
 
UINT32 m_u32KeepAliveRecvInterval
 
UINT32 m_u32KeepAliveSendInterval
 
bool m_acceptReconfiguration
 
volatile bool m_bConnected
 
volatile UINT32 m_lLastConnectionTime
 
XERCES_CPP_NAMESPACE::DOMDocument * m_docMixCascadeInfo
 
CAControlChannelDispatcherm_pMuxOutControlChannelDispatcher
 
CAControlChannelDispatcherm_pMuxInControlChannelDispatcher
 

Member Function Documentation

◆ loop()

SINT32 CAFirstMixB::loop ( )
protectedvirtual

Implements CAFirstMix.

References CASocketGroupEpoll::add(), CAQueue::add(), CAFirstMixChannelList::addChannel(), ASSERT, t_fmhashtableentry::bCountPacket, t_MixPacket::channel, CHANNEL_CLOSE, CHANNEL_DATA, CHANNEL_DUMMY, CHANNEL_OPEN, CHANNEL_SIG_CRIME, t_firstmixchannellist::channelIn, t_firstmixchannellist::channelOut, CAMuxSocket::close(), t_fmhashtableentry::countryID, CASymChannelCipher::crypt1(), CASymChannelCipher::crypt2(), t_MixPacket::data, DATA_SIZE, CAFirstMix::decUsers(), t_fmhashtableentry::delayBucket, CAThreadPool::destroy(), diff64(), E_SUCCESS, E_UNKNOWN, t_MixPacket::flags, CAFirstMixChannelList::get(), CAQueue::get(), CAMuxSocket::getCASocket(), getcurrentTimeMicros(), getcurrentTimeMillis(), CAFirstMixChannelList::getFirst(), CAFirstMixChannelList::getFirstChannelForSocket(), CASocketGroupEpoll::getFirstSignaledSocketData(), getMemoryUsage(), CAFirstMixChannelList::getNext(), CAFirstMixChannelList::getNextChannel(), CASocketGroupEpoll::getNextSignaledSocketData(), getRandom(), CAQueue::getSize(), CAMuxSocket::getSocket(), CAAccountingInstance::handleJapPacket(), t_fmhashtableentry::id, tUINT32withLock::inc(), CAFirstMix::incMixedPackets(), CASocketGroupEpoll::isSignaled(), isZero64(), CAThread::join(), KEY_SIZE, len, LOG_ENCRYPTED, CAFirstMix::m_arrSocketsIn, CAFirstMix::m_bRestart, CAFirstMix::m_nSocketsIn, CAFirstMix::m_nUser, CAFirstMix::m_PacketsPerCountryIN, CAFirstMix::m_PacketsPerCountryOUT, CAFirstMix::m_pChannelList, CAFirstMix::m_pIPList, CAFirstMix::m_pMuxOut, CAFirstMix::m_pQueueReadFromMix, CAFirstMix::m_pQueueSendToMix, CAFirstMix::m_psocketgroupUsersRead, CAFirstMix::m_psocketgroupUsersWrite, CAFirstMix::m_pthreadAcceptUsers, CAFirstMix::m_pthreadReadFromMix, CAFirstMix::m_pthreadSendToMix, CAFirstMix::m_pthreadsLogin, MAX_NEXT_MIX_QUEUE_SIZE, MIXPACKET_SIZE, msSleep(), t_fmhashtableentry::oQueueEntry, t_queue_entry::packet, t_firstmixchannellist::pCipher, t_fmhashtableentry::pControlChannelDispatcher, t_fmhashtableentry::peerIP, t_firstmixchannellist::pHead, t_fmhashtableentry::pMuxSocket, t_fmhashtableentry::pQueueSend, CAMuxSocket::prepareForSend(), CAMsg::printMsg(), CAControlChannelDispatcher::proccessMixPacket(), t_fmhashtableentry::pSymCipher, CAMuxSocket::receive(), CAFirstMixChannelList::remove(), CASocketGroupEpoll::remove(), CAFirstMixChannelList::removeChannel(), CAIPList::removeIP(), RSA_SIZE, CASocketGroupEpoll::select(), CASocket::send(), set64(), CAFirstMixChannelList::setDelayParameters(), CASymCipher::setKey(), setZero64(), SOCKET_ERROR, and t_fmhashtableentry::uAlreadySendPacketSize.