|
Mixes for Privacy and Anonymity in the Internet
|
Public Member Functions | |
| CAMiddleMix () | |
| virtual | ~CAMiddleMix () |
| tMixType | getType () const |
Protected Attributes | |
| CAQueue * | m_pQueueSendToMixBefore |
| CAQueue * | m_pQueueSendToMixAfter |
| UINT32 | m_u32KeepAliveRecvInterval2 |
| UINT32 | m_u32KeepAliveSendInterval2 |
Private Member Functions | |
| SINT32 | loop () |
| Processes Upstream-MixPackets. | |
| SINT32 | init () |
| SINT32 | initOnce () |
| SINT32 | clean () |
| SINT32 | connectToNextMix (CASocketAddr *a_pAddrNext) |
| virtual SINT32 | initMixCascadeInfo (DOMElement *&) |
| This method is not applicable to middle mixes; it does nothing. | |
| virtual SINT32 | processKeyExchange () |
| Processes key exchange with Mix n+1 and Mix n-1. | |
Private Attributes | |
| CAMuxSocket * | m_pMuxIn |
| CAMuxSocket * | m_pMuxOut |
| CAASymCipher * | m_pRSA |
| volatile bool | m_bRun |
| CAMiddleMixChannelList * | m_pMiddleMixChannelList |
Friends | |
| THREAD_RETURN | mm_loopSendToMixBefore (void *) |
| DOWNSTREAM (to Client) Take the packets from the Queue and write them to the Socket. | |
| THREAD_RETURN | mm_loopSendToMixAfter (void *) |
| UPSTREAM (to WEB) Take the packets from the Queue and write them to the Socket. | |
| THREAD_RETURN | mm_loopReadFromMixBefore (void *) |
| THREAD_RETURN | mm_loopReadFromMixAfter (void *) |
| THREAD_RETURN | mm_loopDownStream (void *) |
| virtual CAMiddleMix::~CAMiddleMix | ( | ) | [virtual] |
References clean().
| SINT32 CAMiddleMix::clean | ( | ) | [private, virtual] |
Implements CAMix.
References CAMuxSocket::close(), E_SUCCESS, m_pMiddleMixChannelList, m_pMuxIn, m_pMuxOut, m_pQueueSendToMixAfter, m_pQueueSendToMixBefore, CAMixWithReplayDB::m_pReplayMsgProc, and m_pRSA.
Referenced by ~CAMiddleMix().
| SINT32 CAMiddleMix::connectToNextMix | ( | CASocketAddr * | a_pAddrNext | ) | [private] |
References CAMuxSocket::connect(), E_SUCCESS, E_UNKNOWN, ERR_INTERN_CONNREFUSED, ERR_INTERN_TIMEDOUT, GET_NET_ERROR, GET_NET_ERROR_STR, m_pMuxOut, CAMsg::printMsg(), RETRIES, RETRYTIME, sSleep(), and CASocketAddr::toString().
Referenced by init().
| tMixType CAMiddleMix::getType | ( | ) | const [virtual] |
Implements CAMix.
References CAMix::MIDDLE_MIX.
| SINT32 CAMiddleMix::init | ( | ) | [private, virtual] |
Connect to next mix
Implements CAMix.
References CAMuxSocket::accept(), CATargetInterface::cleanAddr(), connectToNextMix(), CASocket::create(), E_SUCCESS, E_UNKNOWN, ev_net_nextConnected, ev_net_prevConnected, ev_net_prevConnectionClosed, CAASymCipher::generateKeyPair(), CAListenerInterface::getAddr(), CATargetInterface::getAddr(), CAMuxSocket::getCASocket(), CACmdLnOptions::getListenerInterface(), CACmdLnOptions::getListenerInterfaceCount(), CALibProxytest::getOptions(), CACmdLnOptions::getTargetInterface(), CACmdLnOptions::getTargetInterfaceCount(), CATargetInterface::getTargetType(), CASocketAddr::getType(), CAListenerInterface::isVirtual(), m_pMiddleMixChannelList, m_pMuxIn, CAMix::m_pMuxInControlChannelDispatcher, m_pMuxOut, m_pQueueSendToMixAfter, m_pQueueSendToMixBefore, CAMixWithReplayDB::m_pReplayDB, CAMixWithReplayDB::m_pReplayMsgProc, m_pRSA, CAMixWithReplayDB::m_u64ReferenceTime, MIXPACKET_SIZE, MONITORING_FIRE_NET_EVENT, CAMsg::printMsg(), processKeyExchange(), readFile(), REPLAY_TIMESTAMP_PROPAGATION_INTERVALL, saveFile(), CASocket::setKeepAlive(), CASocket::setRecvBuff(), CASocket::setSendBuff(), CADatabase::start(), CAReplayCtrlChannelMsgProc::startTimeStampPorpagation(), TARGET_MIX, and CASocketAddr::toString().
| virtual SINT32 CAMiddleMix::initMixCascadeInfo | ( | DOMElement *& | ) | [private, virtual] |
This method is not applicable to middle mixes; it does nothing.
| d | ignored |
| E_SUCCESS | in any case |
References E_SUCCESS.
| SINT32 CAMiddleMix::initOnce | ( | ) | [private, virtual] |
Reimplemented from CAMix.
References E_SUCCESS, E_UNKNOWN, CACmdLnOptions::getMultiSigner(), CALibProxytest::getOptions(), CAMix::m_pMultiSignature, and CAMsg::printMsg().
| SINT32 CAMiddleMix::loop | ( | ) | [private, virtual] |
Processes Upstream-MixPackets.
Implements CAMix.
References CASocketGroup::add(), CAMuxSocket::close(), E_UNKNOWN, CAThread::join(), m_bRun, m_pMuxIn, m_pMuxOut, mm_loopReadFromMixAfter, mm_loopReadFromMixBefore, mm_loopSendToMixAfter, mm_loopSendToMixBefore, CAMsg::printMsg(), CAMuxSocket::setCrypt(), CAThread::setMainLoop(), and CAThread::start().
| SINT32 CAMiddleMix::processKeyExchange | ( | ) | [private, virtual] |
Processes key exchange with Mix n+1 and Mix n-1.
| E_SUCCESS | if KeyExchange with Mix n+1 and Mix n-1 was succesful |
| E_UNKNOWN | otherwise |
Getting the KeepAlive Traffice...
Getting and calculating the KeepAlive Traffice...
Implements CAMix.
References CAMix::addMixInfo(), CAMix::appendCompatibilityInfo(), CAMix::appendTermsAndConditionsExtension(), CAMix::checkCompatibility(), createDOMDocument(), createDOMElement(), CABase64::decode(), decodeXMLEncryptedKey(), DOM_Output::dumpToMem(), E_SUCCESS, E_UNKNOWN, CABase64::encode(), encodeXMLEncryptedKey(), equals(), ev_net_keyExchangeNextFailed, ev_net_keyExchangeNextSuccessful, ev_net_keyExchangePrevFailed, ev_net_keyExchangePrevSuccessful, GET_NET_ERROR, GET_NET_ERROR_STR, CAMuxSocket::getCASocket(), getDOMChildByName(), getDOMElementAttribute(), getDOMElementValue(), CACmdLnOptions::getKeepAliveRecvInterval(), CACmdLnOptions::getKeepAliveSendInterval(), CACmdLnOptions::getMixId(), CACmdLnOptions::getNextMixTestCertificate(), CALibProxytest::getOptions(), CACmdLnOptions::getPrevMixTestCertificate(), CAASymCipher::getPublicKeyAsDOMElement(), getRandom(), CACmdLnOptions::getTrustedCertificateStore(), len, CAMix::m_pMultiSignature, m_pMuxIn, m_pMuxOut, m_pRSA, CAMix::m_u32KeepAliveRecvInterval, m_u32KeepAliveRecvInterval2, CAMix::m_u32KeepAliveSendInterval, m_u32KeepAliveSendInterval2, MONITORING_FIRE_NET_EVENT, parseDOMDocument(), CAMsg::printMsg(), CAMuxSocket::receiveFully(), CASocket::send(), setDOMElementAttribute(), setDOMElementValue(), CACmdLnOptions::setNextMixTestCertificate(), CACmdLnOptions::setPrevMixTestCertificate(), CAASymCipher::setPublicKeyAsDOMNode(), CAMuxSocket::setReceiveKey(), CAMuxSocket::setSendKey(), CAMultiSignature::signXML(), CAMix::signXML(), CAMix::termsAndConditionsInfoNode(), CAMix::TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT, CACertStore::verifyMixCert(), CACmdLnOptions::verifyMixCertificates(), and CAMultiSignature::verifyXML().
Referenced by init().
| THREAD_RETURN mm_loopDownStream | ( | void * | ) | [friend] |
| THREAD_RETURN mm_loopReadFromMixAfter | ( | void * | param | ) | [friend] |
Referenced by loop().
| THREAD_RETURN mm_loopReadFromMixBefore | ( | void * | param | ) | [friend] |
Referenced by loop().
| THREAD_RETURN mm_loopSendToMixAfter | ( | void * | param | ) | [friend] |
UPSTREAM (to WEB) Take the packets from the Queue and write them to the Socket.
Referenced by loop().
| THREAD_RETURN mm_loopSendToMixBefore | ( | void * | param | ) | [friend] |
DOWNSTREAM (to Client) Take the packets from the Queue and write them to the Socket.
Referenced by loop().
volatile bool CAMiddleMix::m_bRun [private] |
Referenced by loop(), mm_loopReadFromMixAfter(), mm_loopReadFromMixBefore(), mm_loopSendToMixAfter(), and mm_loopSendToMixBefore().
Referenced by CAMiddleMix(), clean(), init(), mm_loopReadFromMixAfter(), and mm_loopReadFromMixBefore().
CAMuxSocket* CAMiddleMix::m_pMuxIn [private] |
Referenced by CAMiddleMix(), clean(), init(), loop(), mm_loopReadFromMixAfter(), mm_loopReadFromMixBefore(), mm_loopSendToMixBefore(), and processKeyExchange().
CAMuxSocket* CAMiddleMix::m_pMuxOut [private] |
CAQueue* CAMiddleMix::m_pQueueSendToMixAfter [protected] |
Referenced by CAMiddleMix(), clean(), init(), mm_loopReadFromMixAfter(), and mm_loopReadFromMixBefore().
CAQueue* CAMiddleMix::m_pQueueSendToMixBefore [protected] |
Referenced by CAMiddleMix(), clean(), init(), mm_loopReadFromMixAfter(), and mm_loopReadFromMixBefore().
CAASymCipher* CAMiddleMix::m_pRSA [private] |
Referenced by CAMiddleMix(), clean(), init(), mm_loopReadFromMixBefore(), and processKeyExchange().
UINT32 CAMiddleMix::m_u32KeepAliveRecvInterval2 [protected] |
Referenced by processKeyExchange().
UINT32 CAMiddleMix::m_u32KeepAliveSendInterval2 [protected] |
Referenced by mm_loopSendToMixAfter(), and processKeyExchange().
1.7.6.1