Mixes for Privacy and Anonymity in the Internet
|
Public Member Functions | |
virtual void | shutDown () |
Public Member Functions inherited from CAFirstMix | |
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 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 () |
Protected Member Functions | |
SINT32 | loop () |
SINT32 | closeConnection (fmHashTableEntry *pHashEntry) |
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) |
Private Member Functions | |
bool | sendToUsers () |
void | notifyAllUserChannels (fmHashTableEntry *pfmHashEntry, UINT16 flags) |
void | finishPacket (fmHashTableEntry *pfmHashEntry) |
void | checkUserConnections () |
SINT32 | accountTrafficUpstream (fmHashTableEntry *pHashEntry) |
SINT32 | accountTrafficDownstream (fmHashTableEntry *pfmHashEntry) |
Friends | |
THREAD_RETURN | fm_loopPacketProcessing (void *params) |
|
private |
References t_fmhashtableentry::bCountPacket, closeConnection(), E_SUCCESS, ERR_INTERN_SOCKET_CLOSED, CAAccountingInstance::HANDLE_PACKET_CLOSE_CONNECTION, CAAccountingInstance::HANDLE_PACKET_CONNECTION_OK, CAAccountingInstance::HANDLE_PACKET_PREPARE_FOR_CLOSING_CONNECTION, CAAccountingInstance::handleJapPacket(), KICKOUT_FORCED, CAFirstMix::m_pChannelList, CAMsg::printMsg(), CAFirstMixChannelList::pushTimeoutEntry(), and CAFirstMixChannelList::setKickoutForced().
Referenced by sendToUsers().
|
private |
References t_fmhashtableentry::bRecoverTimeout, closeConnection(), E_SUCCESS, E_UNKNOWN, CAAccountingInstance::HANDLE_PACKET_CLOSE_CONNECTION, CAAccountingInstance::HANDLE_PACKET_CONNECTION_OK, CAAccountingInstance::HANDLE_PACKET_PREPARE_FOR_CLOSING_CONNECTION, CAAccountingInstance::handleJapPacket(), KICKOUT_FORCED, CAFirstMix::m_pChannelList, CAMsg::printMsg(), CAFirstMixChannelList::pushTimeoutEntry(), and CAFirstMixChannelList::setKickoutForced().
Referenced by loop().
|
private |
References CAQueue::clean(), closeConnection(), CAAccountingInstance::getAuthFlags(), CAQueue::getSize(), CAFirstMixChannelList::isKickoutForced(), CAFirstMixChannelList::isTimedOut(), t_fmhashtableentry::kickoutSendRetries, CAFirstMix::m_pChannelList, t_fmhashtableentry::pControlMessageQueue, CAFirstMixChannelList::popTimeoutEntry(), t_fmhashtableentry::pQueueSend, CAMsg::printMsg(), and CAFirstMixChannelList::pushTimeoutEntry().
Referenced by loop().
|
protected |
References CAQueue::add(), ASSERT, BEGIN_STACK, t_MixPacket::channel, CHANNEL_CLOSE, t_firstmixchannellist::channelOut, t_MixPacket::data, DATA_SIZE, CAFirstMix::decUsers(), E_SUCCESS, E_UNKNOWN, FINISH_STACK, t_MixPacket::flags, getcurrentTimeMillis(), CAFirstMixChannelList::getFirstChannelForSocket(), CAFirstMixChannelList::getNextChannel(), getRandom(), t_fmhashtableentry::id, INIT_STACK, CAFirstMix::m_pChannelList, CAFirstMix::m_pIPList, CAFirstMix::m_pQueueSendToMix, CAFirstMix::m_psocketgroupUsersRead, CAFirstMix::m_psocketgroupUsersWrite, t_queue_entry::packet, t_firstmixchannellist::pCipher, t_fmhashtableentry::peerIP, t_fmhashtableentry::pMuxSocket, t_fmhashtableentry::pQueueSend, CAMsg::printMsg(), t_fmhashtableentry::pSymCipher, CAFirstMixChannelList::remove(), CASocketGroupEpoll::remove(), CAIPList::removeIP(), and setZero64().
Referenced by accountTrafficDownstream(), accountTrafficUpstream(), checkUserConnections(), loop(), sendToUsers(), and shutDown().
|
private |
References t_MixPacket::channel, CHANNEL_CLOSE, t_firstmixchannellist::channelIn, t_firstmixchannellist::channelOut, t_MixPacket::flags, CAFirstMixChannelList::get(), CAFirstMix::m_pChannelList, t_fmhashtableentry::oQueueEntry, t_queue_entry::packet, t_firstmixchannellist::pCipher, t_fmhashtableentry::pMuxSocket, CAMsg::printMsg(), and CAFirstMixChannelList::removeChannel().
Referenced by sendToUsers().
|
protectedvirtual |
Implements CAFirstMix.
References accountTrafficUpstream(), CASocketGroupEpoll::add(), CAQueue::add(), CAFirstMixChannelList::addChannel(), t_fmhashtableentry::bRecoverTimeout, t_MixPacket::channel, CHANNEL_CLOSE, CHANNEL_DATA, CHANNEL_DEBUG, CHANNEL_DUMMY, CHANNEL_OPEN, CHANNEL_SIG_CRIME, t_firstmixchannellist::channelIn, t_firstmixchannellist::channelOut, checkUserConnections(), CAFirstMix::clean(), closeConnection(), t_fmhashtableentry::countryID, CASymChannelCipherFactory::createCipher(), CASymChannelCipher::crypt1(), CASymChannelCipher::crypt2(), t_MixPacket::data, DATA_SIZE, diff64(), E_SUCCESS, E_UNKNOWN, FIRST_MIX_SIZE_OF_SYMMETRIC_KEYS, t_MixPacket::flags, CAFirstMix::fm_loopLog, CAFirstMixChannelList::get(), CAQueue::get(), getcurrentTimeMicros(), CAFirstMixChannelList::getFirst(), CASocketGroupEpoll::getFirstSignaledSocketData(), CAFirstMixChannelList::getNext(), CASocketGroupEpoll::getNextSignaledSocketData(), CALibProxytest::getOptions(), getRandom(), CAQueue::getSize(), t_fmhashtableentry::id, tUINT32withLock::inc(), CAFirstMix::incMixedPackets(), CADatabase::insert(), CASocketGroupEpoll::isSignaled(), CAThread::join(), CALockAble::lock(), CAMutex::lock(), LOG_ENCRYPTED, CAFirstMix::m_bRestart, CAFirstMix::m_bRunLog, CAFirstMix::m_nUser, CAFirstMix::m_PacketsPerCountryIN, CAFirstMix::m_PacketsPerCountryOUT, CAFirstMix::m_pChannelList, CAFirstMix::m_pmutexLogin, CAFirstMix::m_pQueueReadFromMix, CAFirstMix::m_pQueueSendToMix, CAMixWithReplayDB::m_pReplayDB, CAFirstMix::m_psocketgroupUsersRead, CAFirstMix::m_psocketgroupUsersWrite, MAX_NEXT_MIX_QUEUE_SIZE, MIXPACKET_SIZE, msSleep(), t_queue_entry::packet, t_firstmixchannellist::pCipher, t_fmhashtableentry::pControlChannelDispatcher, t_fmhashtableentry::peerIP, t_firstmixchannellist::pHead, t_fmhashtableentry::pMuxSocket, t_fmhashtableentry::pQueueSend, CAMsg::printMsg(), CAControlChannelDispatcher::proccessMixPacket(), t_fmhashtableentry::pSymCipher, CAFirstMixChannelList::pushTimeoutEntry(), CAMuxSocket::receive(), CAFirstMixChannelList::removeChannel(), RSA_SIZE, CASocketGroupEpoll::select(), sendToUsers(), set64(), CAFirstMixChannelList::setDelayParameters(), CASymChannelCipher::setIV2(), CASymChannelCipher::setKeys(), CAThread::setMainLoop(), setZero64(), CAThread::start(), and CAMutex::unlock().
|
private |
References CAQueue::add(), t_firstmixchannellist::bIsSuspended, t_MixPacket::channel, t_firstmixchannellist::channelOut, t_fmhashtableentry::cSuspend, t_MixPacket::data, DATA_SIZE, flags, t_MixPacket::flags, CAFirstMixChannelList::getFirstChannelForSocket(), CAFirstMixChannelList::getNextChannel(), getRandom(), CAFirstMix::m_pChannelList, CAFirstMix::m_pQueueSendToMix, MIXPACKET_SIZE, t_queue_entry::packet, t_fmhashtableentry::pMuxSocket, and CAMsg::printMsg().
|
private |
References accountTrafficDownstream(), t_fmhashtableentry::bCountPacket, CHANNEL_DATA, CHANNEL_DEBUG, closeConnection(), t_MixPacket::data, DATA_SIZE, CAFirstMixChannelList::decDelayBuckets(), DELAY_USERS, t_fmhashtableentry::delayBucketID, E_AGAIN, E_SUCCESS, finishPacket(), t_MixPacket::flags, CAQueue::get(), GET_NET_ERROR, GET_NET_ERROR_STR, CAMuxSocket::getCASocket(), getcurrentTimeMicros(), CAFirstMixChannelList::getFirst(), CASocketGroupEpoll::getFirstSignaledSocketData(), CAFirstMixChannelList::getNext(), CASocketGroupEpoll::getNextSignaledSocketData(), CAQueue::getSize(), CAFirstMixChannelList::hasDelayBuckets(), CASocketGroupEpoll::isSignaled(), isZero64(), len, CAFirstMix::m_pChannelList, CAFirstMix::m_psocketgroupUsersWrite, MIXPACKET_SIZE, t_fmhashtableentry::oQueueEntry, t_queue_entry::packet, t_fmhashtableentry::pControlMessageQueue, t_fmhashtableentry::pMuxSocket, t_fmhashtableentry::pQueueSend, CAMuxSocket::prepareForSend(), CAMsg::printMsg(), CASocketGroupEpoll::select(), CASocket::send(), SOCKET, and t_fmhashtableentry::uAlreadySendPacketSize.
Referenced by loop().
|
virtual |
Reimplemented from CAMix.
References closeConnection(), CAThread::join(), CAFirstMix::m_bIsShuttingDown, CAMix::m_bLoop, CAFirstMix::m_bRestart, CAFirstMix::m_pChannelList, CAMix::m_pInfoService, CAFirstMix::m_pthreadAcceptUsers, CAFirstMixChannelList::popTimeoutEntry(), CAMsg::printMsg(), and CAInfoService::stop().
|
friend |