Mixe for Privacy and Anonymity in the Internet
|
#include <CAFirstMix.hpp>
Public Member Functions | |
CAFirstMix () | |
virtual | ~CAFirstMix () |
tMixType | getType () const |
bool | forceKickout (fmHashTableEntry *pHashTableEntry, const XERCES_CPP_NAMESPACE::DOMDocument *pErrDoc=NULL) |
CAMutex * | getLoginMutex () |
SINT32 | connectToNextMix (CASocketAddr *a_pAddrNext) |
SINT32 | getMixedPackets (UINT64 &ppackets) |
UINT32 | getNrOfUsers () |
SINT32 | getLevel (SINT32 *puser, SINT32 *prisk, SINT32 *ptraffic) |
TermsAndConditions * | getTermsAndConditions (const UINT8 *opSki) |
DOMNode * | getTermsAndConditionsTemplate (UINT8 *templateRefID) |
SINT32 | getMixCount () |
tMixParameters * | getMixParameters () |
Returns the ordered list of the mix parameters from the first mix to the last mix. More... | |
SINT32 | setMixParameters (const tMixParameters ¶ms) |
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 () | |
CADatabase * | getReplayDB () 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 () |
CAControlChannelDispatcher * | getDownstreamControlChannelDispatcher () const |
CAControlChannelDispatcher * | getUpstreamControlChannelDispatcher () const |
UINT32 | getLastConnectionTime () |
bool | isConnected () |
Public Attributes | |
UINT64 | m_u64LastTimestampReceived |
Public Attributes inherited from CAMixWithReplayDB | |
UINT64 | m_u64ReferenceTime |
Protected Member Functions | |
virtual SINT32 | loop ()=0 |
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) |
Private Member Functions | |
SINT32 | initCountryStats (char *db_host, char *db_user, char *db_passwd) |
SINT32 | updateCountryStats (const UINT8 ip[4], UINT32 a_countryID, bool bRemove) |
Update the statisitics of the countries users come from. More... | |
SINT32 | sendReplayTimestampRequestsToAllMixes () |
SINT32 | doUserLogin_internal (CAMuxSocket *pNewUSer, UINT8 perrIP[4]) |
Sends and receives all data neccessary for a User to "login". More... | |
SINT32 | isAllowedToPassRestrictions (CASocket *pNewMuxSocket) |
termsAndConditionMixAnswer_t * | handleTermsAndConditionsLogin (XERCES_CPP_NAMESPACE::DOMDocument *request) |
void | incNewConnections () |
void | decNewConnections () |
Private Attributes | |
volatile bool | m_bRunLogCountries |
volatile UINT32 * | m_CountryStats |
CAThread * | m_threadLogLoop |
MYSQL * | m_mysqlCon |
volatile UINT32 | m_newConnections |
CAMutex * | m_pmutexNewConnections |
Static Private Attributes | |
static const UINT32 | MAX_CONCURRENT_NEW_CONNECTIONS = NUM_LOGIN_WORKER_TRHEADS * 2 |
Friends | |
THREAD_RETURN | fm_loopSendToMix (void *) |
How to end this thread: 0. More... | |
THREAD_RETURN | fm_loopReadFromMix (void *) |
THREAD_RETURN | fm_loopAcceptUsers (void *) |
THREAD_RETURN | fm_loopDoUserLogin (void *param) |
THREAD_RETURN | iplist_loopDoLogCountries (void *param) |
THREAD_RETURN | fm_loopLog (void *) |
Additional Inherited Members | |
Public Types inherited from CAMix | |
enum | tMixType { FIRST_MIX , MIDDLE_MIX , LAST_MIX , JAP } |
Static Public Attributes inherited from CAMix | |
static const UINT32 | TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT = 60000 |
Definition at line 229 of file CAFirstMix.hpp.
|
inline |
Definition at line 237 of file CAFirstMix.hpp.
References m_arMixParameters, m_arrSocketsIn, m_bIsShuttingDown, m_CountryStats, m_docMixCascadeInfo, m_mysqlCon, m_nMixedPackets, m_nrOfTermsAndConditionsDefs, m_nrOfTermsAndConditionsTemplates, m_nSocketsIn, m_nUser, m_PacketsPerCountryIN, m_PacketsPerCountryOUT, m_pChannelList, CAMix::m_pInfoService, m_pIPBlockList, m_pIPList, m_pmutexLogin, m_pmutexLoginThreads, m_pmutexMixedPackets, m_pmutexNewConnections, m_pmutexUser, m_pMuxOut, m_pQueueReadFromMix, m_pQueueSendToMix, m_pRSA, m_psocketgroupUsersRead, m_psocketgroupUsersWrite, m_pthreadAcceptUsers, m_pthreadReadFromMix, m_pthreadSendToMix, m_pthreadsLogin, m_tcTemplates, m_templatesOwner, m_threadLogLoop, m_tnCDefs, m_xmlKeyInfoBuff, TNC_CONFIRM, TNC_CONFIRM_REQ, TNC_INTERRUPT, TNC_REQUEST, TNC_SINTERRUPT, and TNC_SREQUEST.
|
inlinevirtual |
Definition at line 303 of file CAFirstMix.hpp.
References clean(), m_pmutexLogin, m_pmutexLoginThreads, m_pmutexMixedPackets, m_pmutexNewConnections, and m_pmutexUser.
|
protectedvirtual |
Implements CAMix.
Definition at line 2622 of file CAFirstMix.cpp.
References CAQueue::add(), CAAccountingInstance::clean(), CAAccountingDBInterface::cleanup(), CAMuxSocket::close(), CASocket::close(), deleteCountryStats(), E_SUCCESS, CAFirstMixChannelList::getFirst(), CAFirstMixChannelList::getFirstChannelForSocket(), getMemoryUsage(), CAFirstMixChannelList::getNext(), CAFirstMixChannelList::getNextChannel(), CAThread::join(), m_arMixParameters, m_arrSocketsIn, m_bRestart, m_bRunLog, m_docMixCascadeInfo, m_nMixedPackets, m_nrOfTermsAndConditionsDefs, m_nrOfTermsAndConditionsTemplates, m_nSocketsIn, m_nUser, m_pChannelList, CAMix::m_pInfoService, m_pIPBlockList, m_pIPList, m_pMuxOut, CAMix::m_pMuxOutControlChannelDispatcher, m_pQueueReadFromMix, m_pQueueSendToMix, CAMixWithReplayDB::m_pReplayMsgProc, m_pRSA, m_psocketgroupUsersRead, m_psocketgroupUsersWrite, m_pthreadAcceptUsers, m_pthreadReadFromMix, m_pthreadSendToMix, m_pthreadsLogin, t_mix_parameters::m_strMixID, m_tcTemplates, m_templatesOwner, m_tnCDefs, m_u32MixCount, m_xmlKeyInfoBuff, t_firstmixchannellist::pCipher, t_fmhashtableentry::pMuxSocket, t_fmhashtableentry::pQueueSend, CAMsg::printMsg(), t_fmhashtableentry::pSymCipher, CAFirstMixChannelList::remove(), and CAInfoService::stop().
Referenced by CAFirstMixA::loop(), and ~CAFirstMix().
SINT32 CAFirstMix::connectToNextMix | ( | CASocketAddr * | a_pAddrNext | ) |
Definition at line 307 of file CAFirstMix.cpp.
References CAMuxSocket::connect(), E_SUCCESS, E_UNKNOWN, ERR_INTERN_CONNREFUSED, ERR_INTERN_TIMEDOUT, GET_NET_ERROR, GET_NET_ERROR_STR, m_pMuxOut, CAMsg::printMsg(), sSleep(), and CASocketAddr::toString().
Referenced by init().
|
inlineprivate |
Definition at line 578 of file CAFirstMix.hpp.
References CAMutex::lock(), m_newConnections, m_pmutexNewConnections, and CAMutex::unlock().
|
inlineprotected |
Definition at line 415 of file CAFirstMix.hpp.
References t_fmhashtableentry::countryID, E_SUCCESS, CAMutex::lock(), m_nUser, m_pmutexUser, CAMutex::unlock(), and updateCountryStats().
Referenced by CAFirstMixA::closeConnection(), and CAFirstMixB::loop().
|
protected |
Definition at line 2979 of file CAFirstMix.cpp.
References E_SUCCESS, CAThread::join(), m_bRunLogCountries, m_CountryStats, m_mysqlCon, m_PacketsPerCountryIN, m_PacketsPerCountryOUT, and m_threadLogLoop.
Referenced by clean().
|
protected |
Definition at line 1742 of file CAFirstMix.cpp.
References doUserLogin_internal(), FINISH_STACK, INIT_STACK, T_UserLoginData::peerIP, and T_UserLoginData::pNewUser.
|
private |
Sends and receives all data neccessary for a User to "login".
This means sending the public key of the Mixes and receiving the sym keys of JAP. This is done in a thread on a per user basis
TODO: move to the if-statement above
Definition at line 1755 of file CAFirstMix.cpp.
References CAFirstMixChannelList::add(), AI_LOGIN_SO_TIMEOUT, AUTH_LOGIN_FAILED, AUTH_LOGIN_NOT_FINISHED, AUTH_LOGIN_SKIP_SETTLEMENT, AUTH_WAITING_FOR_FIRST_SETTLED_CC, BEGIN_STACK, t_MixPacket::channel, cleanupTnCMixAnswer(), CASymChannelCipherFactory::createCipher(), createDOMDocument(), createDOMElement(), CABase64::decode(), decryptXMLElement(), DOM_Output::dumpToMem(), E_SOCKETCLOSED, E_SUCCESS, E_TIMEDOUT, E_UNKNOWN, CABase64::encode(), equals(), CAAccountingInstance::finishLoginProcess(), FIRST_MIX_RECEIVE_SYM_KEY_FROM_JAP_TIME_OUT, CAQueue::get(), GET_NET_ERROR, GET_NET_ERROR_STR, CAMuxSocket::getCASocket(), getDOMChildByName(), getDOMElementValue(), CAMuxSocket::getHashKey(), getMixCount(), CACmdLnOptions::getMixId(), CALibProxytest::getOptions(), CAQueue::getSize(), handleTermsAndConditionsLogin(), INIT_STACK, CATempIPBlockList::insertIP(), CASocket::isClosed(), CAAccountingInstance::loginProcessStatus(), m_arMixParameters, m_pChannelList, m_pIPBlockList, m_pIPList, CAMix::m_pMultiSignature, m_pRSA, m_u64LastTimestampReceived, CAMixWithReplayDB::m_u64ReferenceTime, m_xmlKeyInfoBuff, m_xmlKeyInfoSize, MIXPACKET_SIZE, CAAccountingInstance::newSettlementTransaction(), parseDOMDocument(), t_fmhashtableentry::pControlChannelDispatcher, t_fmhashtableentry::pControlMessageQueue, T_UserLoginData::peerIP, T_UserLoginData::pNewUser, CAMuxSocket::prepareForSend(), CAMsg::printMsg(), CAControlChannelDispatcher::proccessMixPacket(), t_fmhashtableentry::pSymCipher, CAMuxSocket::receive(), CASocket::receiveFullyT(), CAControlChannelDispatcher::registerControlChannel(), CAFirstMixChannelList::remove(), CAIPList::removeIP(), REPLAY_BASE, termsAndConditionMixAnswer_t::result, SAVE_STACK, CASocket::sendFullyTimeOut(), SET_NET_ERROR, CAMuxSocket::setCrypt(), setDOMElementAttribute(), setDOMElementValue(), CASymChannelCipher::setIVs(), CASocket::setKeepAlive(), CASymChannelCipher::setKey(), CASocket::setNonBlocking(), CAMuxSocket::setReceiveKey(), CAMuxSocket::setSendKey(), CAMultiSignature::sign(), TC_FAILED, TC_UNFINISHED, and termsAndConditionMixAnswer_t::xmlAnswer.
Referenced by doUserLogin().
bool CAFirstMix::forceKickout | ( | fmHashTableEntry * | pHashTableEntry, |
const XERCES_CPP_NAMESPACE::DOMDocument * | pErrDoc = NULL |
||
) |
Definition at line 2482 of file CAFirstMix.cpp.
References CAFirstMixChannelList::forceKickout(), and m_pChannelList.
Referenced by CAAccountingInstance::handleChallengeResponse_internal().
Definition at line 2901 of file CAFirstMix.cpp.
References E_SUCCESS, and getNrOfUsers().
|
inline |
Definition at line 325 of file CAFirstMix.hpp.
References m_pmutexLogin.
Referenced by CAAccountingInstance::handleChallengeResponse_internal().
|
inline |
Definition at line 374 of file CAFirstMix.hpp.
References m_u32MixCount.
Referenced by doUserLogin_internal().
Definition at line 2895 of file CAFirstMix.cpp.
References E_SUCCESS, m_nMixedPackets, and set64().
|
inline |
Returns the ordered list of the mix parameters from the first mix to the last mix.
Definition at line 379 of file CAFirstMix.hpp.
References m_arMixParameters.
UINT32 CAFirstMix::getNrOfUsers | ( | ) |
Definition at line 2886 of file CAFirstMix.cpp.
References CAAccountingInstance::getNrOfUsers(), and m_nUser.
Referenced by getLevel().
TermsAndConditions * CAFirstMix::getTermsAndConditions | ( | const UINT8 * | opSki | ) |
Definition at line 932 of file CAFirstMix.cpp.
References m_nrOfTermsAndConditionsDefs, and m_tnCDefs.
Referenced by handleTermsAndConditionsLogin().
DOMNode * CAFirstMix::getTermsAndConditionsTemplate | ( | UINT8 * | templateRefID | ) |
Definition at line 953 of file CAFirstMix.cpp.
References getTermsAndConditionsTemplateRefId(), m_nrOfTermsAndConditionsTemplates, m_tcTemplates, and TEMPLATE_REFID_MAXLEN.
Referenced by handleTermsAndConditionsExtension().
|
inlinevirtual |
SINT32 CAFirstMix::handleKeyInfoExtensions | ( | DOMElement * | root | ) |
Definition at line 805 of file CAFirstMix.cpp.
References E_SUCCESS, E_UNKNOWN, getDOMChildByName(), handleTermsAndConditionsExtension(), and KEYINFO_NODE_EXTENSIONS.
SINT32 CAFirstMix::handleTermsAndConditionsExtension | ( | DOMElement * | extensionRoot | ) |
Definition at line 825 of file CAFirstMix.cpp.
References TermsAndConditions::addTranslation(), E_SUCCESS, E_UNKNOWN, getDOMChildByName(), getDOMElementAttribute(), getElementsByTagName(), getTermsAndConditionsTemplate(), KEYINFO_NODE_TNC_EXTENSION, m_nrOfTermsAndConditionsDefs, m_nrOfTermsAndConditionsTemplates, m_tcTemplates, m_templatesOwner, m_tnCDefs, OPTIONS_ATTRIBUTE_TNC_ID, OPTIONS_ATTRIBUTE_TNC_LOCALE, OPTIONS_ATTRIBUTE_TNC_TEMPLATE_REFID, OPTIONS_NODE_TNCS, OPTIONS_NODE_TNCS_TEMPLATES, OPTIONS_NODE_TNCS_TRANSLATION, CAMsg::printMsg(), TMP_BUFF_SIZE, TMP_LOCALE_SIZE, and TNC_TEMPLATE_ROOT_ELEMENT.
Referenced by handleKeyInfoExtensions().
|
private |
Definition at line 1573 of file CAFirstMix.cpp.
References createDOMDocument(), createDOMElement(), E_SUCCESS, equals(), getDOMChildByName(), getDOMElementAttribute(), getElementsByTagName(), getTermsAndConditions(), TermsAndConditions::getTranslation(), OPTIONS_ATTRIBUTE_TNC_ID, OPTIONS_ATTRIBUTE_TNC_LOCALE, CAMsg::printMsg(), termsAndConditionMixAnswer_t::result, TC_CONFIRMED, TC_FAILED, TC_UNFINISHED, TMP_BUFF_SIZE, TMP_LOCALE_SIZE, TNC_CONFIRM, termsAndConditionsTranslation_t::tnc_customized, TNC_INTERRUPT, TNC_REQ_TRANSLATION, TNC_REQUEST, TNC_RESOURCE_CUSTOMIZED_SECT, TNC_RESOURCE_TEMPLATE, TNC_RESOURCES, TNC_RESPONSE, TNC_RESPONSE_INVALID_REQUEST, termsAndConditionsTranslation_t::tnc_template, and termsAndConditionMixAnswer_t::xmlAnswer.
Referenced by doUserLogin_internal().
|
inlineprotected |
Definition at line 427 of file CAFirstMix.hpp.
References E_SUCCESS, inc64(), CAMutex::lock(), m_nMixedPackets, m_pmutexMixedPackets, and CAMutex::unlock().
Referenced by CAFirstMixA::loop(), and CAFirstMixB::loop().
|
inlineprivate |
Definition at line 571 of file CAFirstMix.hpp.
References CAMutex::lock(), m_newConnections, m_pmutexNewConnections, and CAMutex::unlock().
|
inlineprotected |
Definition at line 400 of file CAFirstMix.hpp.
References t_fmhashtableentry::countryID, E_SUCCESS, CAMutex::lock(), m_nUser, m_pmutexUser, t_fmhashtableentry::peerIP, CAMutex::unlock(), and updateCountryStats().
|
protectedvirtual |
Connect to the next mix
Implements CAMix.
Definition at line 108 of file CAFirstMix.cpp.
References CATargetInterface::cleanAddr(), connectToNextMix(), CASocket::create(), createDOMDocument(), CACmdLnOptions::createSockets(), E_SHUTDOWN, E_SUCCESS, E_UNKNOWN, ev_net_keyExchangeNextSuccessful, ev_net_nextConnected, ev_net_nextConnectionClosed, fm_loopAcceptUsers, fm_loopReadFromMix, fm_loopSendToMix, FM_PACKET_STATS_LOG_INTERVALL, GET_NET_ERROR_STR, CATargetInterface::getAddr(), CAMuxSocket::getCASocket(), CACmdLnOptions::getCountryStatsDBConnectionLoginData(), CALibProxytest::getOptions(), CASocket::getRecvBuff(), CASocket::getSendBuff(), CACmdLnOptions::getTargetInterface(), CACmdLnOptions::getTargetInterfaceCount(), CATargetInterface::getTargetType(), CASocketAddr::getType(), CAAccountingDBInterface::init(), CAAccountingInstance::init(), initCountryStats(), isShuttingDown(), m_arrSocketsIn, m_bRestart, m_nMixedPackets, m_nSocketsIn, m_pChannelList, m_pIPBlockList, m_pIPList, m_pMuxOut, CAMix::m_pMuxOutControlChannelDispatcher, m_pQueueReadFromMix, m_pQueueSendToMix, CAMixWithReplayDB::m_pReplayDB, CAMixWithReplayDB::m_pReplayMsgProc, m_psocketgroupUsersRead, m_psocketgroupUsersWrite, m_pthreadAcceptUsers, m_pthreadReadFromMix, m_pthreadSendToMix, m_pthreadsLogin, m_templatesOwner, m_u64LastTimestampReceived, CAMixWithReplayDB::m_u64ReferenceTime, MAX_LOGIN_QUEUE, MIXPACKET_SIZE, MONITORING_FIRE_NET_EVENT, NUM_LOGIN_WORKER_TRHEADS, OFB, CAMsg::printMsg(), processKeyExchange(), CASocket::setKeepAlive(), CAThread::setMainLoop(), CASocket::setNonBlocking(), CASocket::setRecvBuff(), CASocket::setSendBuff(), CADatabase::start(), CAThread::start(), and TARGET_MIX.
|
private |
Definition at line 2937 of file CAFirstMix.cpp.
References COUNTRY_STATS_DB, E_SUCCESS, E_UNKNOWN, CACmdLnOptions::getCascadeName(), CALibProxytest::getOptions(), iplist_loopDoLogCountries, m_bRunLogCountries, m_CountryStats, m_mysqlCon, m_PacketsPerCountryIN, m_PacketsPerCountryOUT, m_threadLogLoop, mysqlEscapeTableName(), NR_OF_COUNTRIES, CAMsg::printMsg(), CAThread::setMainLoop(), and CAThread::start().
Referenced by init().
|
protected |
Initialises the MixParameters info for each mix form the <Mixes> element received from the second mix.
set u32MixCount and m_arMixParameters from the <Mixes> element received from the second mix.
Definition at line 2862 of file CAFirstMix.cpp.
References E_SUCCESS, getDOMElementAttribute(), getElementsByTagName(), CACmdLnOptions::getMixId(), CALibProxytest::getOptions(), len, m_arMixParameters, t_mix_parameters::m_strMixID, and m_u32MixCount.
|
protectedvirtual |
Reimplemented from CAMix.
Definition at line 69 of file CAFirstMix.cpp.
References E_SUCCESS, E_UNKNOWN, CACmdLnOptions::getListenerInterface(), CACmdLnOptions::getListenerInterfaceCount(), CACmdLnOptions::getMultiSigner(), CALibProxytest::getOptions(), CAMix::initOnce(), CAListenerInterface::isVirtual(), m_nSocketsIn, CAMix::m_pMultiSignature, and CAMsg::printMsg().
|
protected |
Definition at line 64 of file CAFirstMix.cpp.
References m_bIsShuttingDown.
Referenced by init().
|
protectedpure virtual |
Implements CAMix.
Implemented in CAFirstMixB, and CAFirstMixA.
|
protectedvirtual |
Getting the KeepAlive Traffic...
initialises MixParameters struct
Implements CAMix.
Definition at line 362 of file CAFirstMix.cpp.
Referenced by init().
|
protectedvirtual |
Reimplemented from CAMix.
Definition at line 2845 of file CAFirstMix.cpp.
References E_SUCCESS, CALibProxytest::getOptions(), m_pChannelList, CAMsg::printMsg(), and CAFirstMixChannelList::setDelayParameters().
|
private |
Definition at line 2910 of file CAFirstMix.cpp.
References E_SUCCESS, m_arMixParameters, CAMixWithReplayDB::m_pReplayMsgProc, m_u32MixCount, and CAReplayCtrlChannelMsgProc::sendGetTimestamp().
SINT32 CAFirstMix::setMixParameters | ( | const tMixParameters & | params | ) |
Sets the parameters for the mix specified in the params.m_strMixID field.
Only the values which are set are copied to the stored parameters of the mixes of this cascade.
Definition at line 784 of file CAFirstMix.cpp.
References E_SUCCESS, m_arMixParameters, t_mix_parameters::m_strMixID, m_u32MixCount, t_mix_parameters::m_u32ReplayBase, t_mix_parameters::m_u32ReplayOffset, and m_u64LastTimestampReceived.
|
private |
Update the statisitics of the countries users come from.
The dependency between the argumenst is as follow:
bRemove | if true the number of users of a given country is decreased, if false it is increased |
a_countryID | the country the user comes from. Must be set if bRemove==true. If bRemove==false and ip==NULL, than if also must be set to the country the user comes from. In case ip!=NULL if holdes the default country id, if no country for the ip could be found |
ip | the ip the user comes from. this ip is looked up in the databse to find the corresponding country. it is only used if bRemove==false. If no country for that ip could be found a_countryID is used as default value |
Definition at line 3014 of file CAFirstMix.cpp.
References m_CountryStats, m_mysqlCon, NR_OF_COUNTRIES, and CAMsg::printMsg().
Referenced by decUsers(), and incUsers().
|
friend |
Definition at line 1276 of file CAFirstMix.cpp.
Referenced by init().
|
friend |
Definition at line 1549 of file CAFirstMix.cpp.
|
friend |
Definition at line 1494 of file CAFirstMix.cpp.
Referenced by CAFirstMixA::loop().
|
friend |
ToDo: check if keep-alive is really correct here - should it not be moved upwards?
Definition at line 1092 of file CAFirstMix.cpp.
Referenced by init().
|
friend |
How to end this thread: 0.
set bRestart=true;
Definition at line 978 of file CAFirstMix.cpp.
Referenced by init().
|
friend |
Definition at line 3067 of file CAFirstMix.cpp.
Referenced by initCountryStats().
|
protected |
Definition at line 461 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), doUserLogin_internal(), getMixParameters(), initMixParameters(), sendReplayTimestampRequestsToAllMixes(), and setMixParameters().
|
protected |
Definition at line 457 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), init(), and CAFirstMixB::loop().
|
protected |
Definition at line 550 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), isShuttingDown(), and CAFirstMixA::shutDown().
|
protected |
Definition at line 456 of file CAFirstMix.hpp.
Referenced by clean(), init(), CAFirstMixA::loop(), CAFirstMixB::loop(), and CAFirstMixA::shutDown().
|
protected |
Definition at line 552 of file CAFirstMix.hpp.
Referenced by clean(), and CAFirstMixA::loop().
|
private |
Definition at line 532 of file CAFirstMix.hpp.
Referenced by deleteCountryStats(), and initCountryStats().
|
private |
Definition at line 533 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), deleteCountryStats(), initCountryStats(), and updateCountryStats().
|
protected |
Definition at line 495 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), and clean().
|
private |
Definition at line 540 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), deleteCountryStats(), initCountryStats(), and updateCountryStats().
|
private |
Definition at line 568 of file CAFirstMix.hpp.
Referenced by decNewConnections(), and incNewConnections().
|
protected |
Definition at line 496 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), getMixedPackets(), incMixedPackets(), and init().
|
protected |
Definition at line 509 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), getTermsAndConditions(), and handleTermsAndConditionsExtension().
|
protected |
Definition at line 511 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), getTermsAndConditionsTemplate(), and handleTermsAndConditionsExtension().
|
protected |
Definition at line 455 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), init(), initOnce(), and CAFirstMixB::loop().
|
protected |
Definition at line 454 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), decUsers(), getNrOfUsers(), incUsers(), CAFirstMixA::loop(), and CAFirstMixB::loop().
|
protected |
Definition at line 536 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), deleteCountryStats(), initCountryStats(), CAFirstMixA::loop(), and CAFirstMixB::loop().
|
protected |
Definition at line 537 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), deleteCountryStats(), initCountryStats(), CAFirstMixA::loop(), and CAFirstMixB::loop().
|
protected |
Definition at line 464 of file CAFirstMix.hpp.
Referenced by CAFirstMixA::accountTrafficDownstream(), CAFirstMixA::accountTrafficUpstream(), CAFirstMix(), CAFirstMixA::checkUserConnections(), clean(), CAFirstMixA::closeConnection(), doUserLogin_internal(), CAFirstMixA::finishPacket(), forceKickout(), init(), CAFirstMixA::loop(), CAFirstMixB::loop(), CAFirstMixA::notifyAllUserChannels(), reconfigure(), CAFirstMixA::sendToUsers(), and CAFirstMixA::shutDown().
|
protected |
Definition at line 447 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), doUserLogin_internal(), and init().
|
protected |
Definition at line 446 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), CAFirstMixA::closeConnection(), doUserLogin_internal(), init(), and CAFirstMixB::loop().
|
protected |
Definition at line 555 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), getLoginMutex(), CAFirstMixA::loop(), and ~CAFirstMix().
|
protected |
Definition at line 502 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), and ~CAFirstMix().
|
protected |
Definition at line 501 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), incMixedPackets(), and ~CAFirstMix().
|
private |
Definition at line 569 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), decNewConnections(), incNewConnections(), and ~CAFirstMix().
|
protected |
Definition at line 500 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), decUsers(), incUsers(), and ~CAFirstMix().
|
protected |
Definition at line 490 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), connectToNextMix(), init(), and CAFirstMixB::loop().
|
protected |
Definition at line 449 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), init(), CAFirstMixA::loop(), and CAFirstMixB::loop().
|
protected |
Definition at line 448 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), CAFirstMixA::closeConnection(), init(), CAFirstMixA::loop(), CAFirstMixB::loop(), and CAFirstMixA::notifyAllUserChannels().
|
protected |
Definition at line 497 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), and doUserLogin_internal().
|
protected |
Definition at line 466 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), CAFirstMixA::closeConnection(), init(), CAFirstMixA::loop(), and CAFirstMixB::loop().
|
protected |
Definition at line 467 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), CAFirstMixA::closeConnection(), init(), CAFirstMixA::loop(), CAFirstMixB::loop(), and CAFirstMixA::sendToUsers().
|
protected |
Definition at line 504 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), init(), CAFirstMixB::loop(), and CAFirstMixA::shutDown().
|
protected |
Definition at line 507 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), init(), and CAFirstMixB::loop().
|
protected |
Definition at line 506 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), init(), and CAFirstMixB::loop().
|
protected |
Definition at line 505 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), init(), and CAFirstMixB::loop().
|
protected |
Definition at line 512 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), getTermsAndConditionsTemplate(), and handleTermsAndConditionsExtension().
|
protected |
Definition at line 513 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), handleTermsAndConditionsExtension(), and init().
|
private |
Definition at line 539 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), deleteCountryStats(), and initCountryStats().
|
protected |
Definition at line 510 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), getTermsAndConditions(), and handleTermsAndConditionsExtension().
|
protected |
Definition at line 459 of file CAFirstMix.hpp.
Referenced by clean(), getMixCount(), initMixParameters(), sendReplayTimestampRequestsToAllMixes(), and setMixParameters().
UINT64 CAFirstMix::m_u64LastTimestampReceived |
Definition at line 393 of file CAFirstMix.hpp.
Referenced by doUserLogin_internal(), init(), and setMixParameters().
|
protected |
Definition at line 492 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), clean(), and doUserLogin_internal().
|
protected |
Definition at line 493 of file CAFirstMix.hpp.
Referenced by doUserLogin_internal().
|
staticprivate |
Definition at line 566 of file CAFirstMix.hpp.
|
protected |
Definition at line 517 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), and handleTermsAndConditionsLogin().
|
protected |
Definition at line 518 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), and handleTermsAndConditionsLogin().
|
protected |
Definition at line 516 of file CAFirstMix.hpp.
Referenced by CAFirstMix(), and handleTermsAndConditionsLogin().