Mixe for Privacy and Anonymity in the Internet
|
#include <CALastMix.hpp>
Public Member Functions | |
CALastMix () | |
virtual | ~CALastMix () |
SINT32 | reconfigure () |
tMixType | getType () const |
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 () |
Protected Member Functions | |
virtual SINT32 | loop ()=0 |
SINT32 | init () |
virtual SINT32 | initOnce () |
SINT32 | clean () |
SINT32 | initMixCascadeInfo (DOMElement *) |
This will initialize the XML Cascade Info struct XMLFirstMixToInfoService that is sent to the InfoService in CAInfoService::sendCascadeHelo() More... | |
virtual SINT32 | processKeyExchange () |
Processes the startup communication with the preceeding mix. More... | |
SINT32 | setTargets () |
Reads the configured proxies from options . More... | |
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) |
SINT32 | signXML (DOMNode *a_element) |
Friends | |
THREAD_RETURN | lm_loopSendToMix (void *param) |
How to end this thread: 0. More... | |
THREAD_RETURN | lm_loopReadFromMix (void *pParam) |
THREAD_RETURN | lm_loopLog (void *) |
Additional Inherited Members | |
Public Types inherited from CAMix | |
enum | tMixType { FIRST_MIX , MIDDLE_MIX , LAST_MIX , JAP } |
Public Attributes inherited from CAMixWithReplayDB | |
UINT64 | m_u64ReferenceTime |
Static Public Attributes inherited from CAMix | |
static const UINT32 | TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT = 60000 |
Definition at line 58 of file CALastMix.hpp.
|
inline |
Definition at line 66 of file CALastMix.hpp.
References m_pCacheLB, m_pChannelList, CAMix::m_pInfoService, CAMix::m_pMultiSignature, m_pMuxIn, m_pQueueReadFromMix, m_pQueueSendToMix, m_pRSA, m_pSocksLB, m_pthreadReadFromMix, m_pthreadSendToMix, and m_pVPNLB.
|
inlinevirtual |
Definition at line 99 of file CALastMix.hpp.
References clean(), m_pCacheLB, m_pSocksLB, and m_pVPNLB.
|
protectedvirtual |
Implements CAMix.
Definition at line 1031 of file CALastMix.cpp.
References CAQueue::add(), CAMuxSocket::close(), CASocket::close(), E_SUCCESS, ev_net_prevConnectionClosed, CALastMixChannelList::getFirstSocket(), CALastMixChannelList::getNextSocket(), CAThread::join(), m_bRestart, m_bRunLog, m_pChannelList, m_pMuxIn, CAMix::m_pMuxInControlChannelDispatcher, m_pQueueReadFromMix, m_pQueueSendToMix, CAMixWithReplayDB::m_pReplayMsgProc, m_pRSA, m_pthreadReadFromMix, m_pthreadSendToMix, MONITORING_FIRE_NET_EVENT, t_lastmixchannellist::pCipher, t_lastmixchannellist::pQueueSend, CAMsg::printMsg(), and t_lastmixchannellist::pSocket.
Referenced by CALastMixA::loop(), and ~CALastMix().
|
inlinevirtual |
|
protectedvirtual |
Implements CAMix.
Definition at line 84 of file CALastMix.cpp.
References CAMuxSocket::accept(), E_SUCCESS, E_UNKNOWN, ev_net_keyExchangePrevFailed, ev_net_prevConnected, CAASymCipher::generateKeyPair(), GET_NET_ERROR, GET_NET_ERROR_STR, CAListenerInterface::getAddr(), CAMuxSocket::getCASocket(), CACmdLnOptions::getListenerInterface(), CACmdLnOptions::getListenerInterfaceCount(), CALibProxytest::getOptions(), CAListenerInterface::isVirtual(), m_pMuxIn, m_pRSA, MIXPACKET_SIZE, MONITORING_FIRE_NET_EVENT, OFB, CAMsg::printMsg(), processKeyExchange(), readFile(), saveFile(), CASocket::setKeepAlive(), CASocket::setNonBlocking(), CASocket::setRecvBuff(), CASocket::setSendBuff(), and CASocketAddr::toString().
|
protectedvirtual |
This will initialize the XML Cascade Info struct XMLFirstMixToInfoService that is sent to the InfoService in CAInfoService::sendCascadeHelo()
mixes | the <Mixes> element of the XML struct we received from the succeeding mix. |
E_UNKNOWN | if processing produces an error |
E_SUCCESS | otherwise |
Reimplemented from CAMix.
Definition at line 1140 of file CALastMix.cpp.
References CAMix::initMixCascadeInfo(), CAMix::m_docMixCascadeInfo, and setDOMElementAttribute().
Referenced by initOnce().
|
protectedvirtual |
TODO: Check what is done her and if this is important for any last mix or only in case of dynamic mixes...
Reimplemented from CAMix.
Definition at line 56 of file CALastMix.cpp.
References E_SUCCESS, E_UNKNOWN, CACmdLnOptions::getMultiSigner(), CALibProxytest::getOptions(), initMixCascadeInfo(), CAMix::initOnce(), CAMix::m_pMultiSignature, CAMsg::printMsg(), and setTargets().
|
protectedpure virtual |
Implements CAMix.
Implemented in CALastMixB, and CALastMixA.
|
protectedvirtual |
Processes the startup communication with the preceeding mix.
Getting and calculating the KeepAlive Traffice...
Implements CAMix.
Definition at line 236 of file CALastMix.cpp.
References CAMix::addMixInfo(), CAMix::appendCompatibilityInfo(), CHAIN_TIMEOUT, CHANNEL_DOWNSTREAM_PACKETS, CHANNEL_TIMEOUT, CAMix::checkCompatibility(), createDOMDocument(), createDOMElement(), CABase64::decode(), decodeXMLEncryptedKey(), DOM_Output::dumpToMem(), E_SUCCESS, E_UNKNOWN, CABase64::encode(), FLOW_CONTROL_SENDME_SOFT_LIMIT, GET_NET_ERROR, GET_NET_ERROR_STR, CAMuxSocket::getCASocket(), getDOMChildByName(), getDOMElementValue(), CACmdLnOptions::getKeepAliveRecvInterval(), CACmdLnOptions::getKeepAliveSendInterval(), CALibProxytest::getOptions(), CACmdLnOptions::getPrevMixTestCertificate(), CAASymCipher::getPublicKeyAsDOMElement(), getRandom(), CACmdLnOptions::getTrustedCertificateStore(), len, m_pMuxIn, m_pRSA, CAMix::m_u32KeepAliveRecvInterval, CAMix::m_u32KeepAliveSendInterval, max, parseDOMDocument(), CAMsg::printMsg(), CAMuxSocket::receiveFully(), CASocket::send(), CAMuxSocket::setCrypt(), setDOMElementAttribute(), setDOMElementValue(), CACmdLnOptions::setPrevMixTestCertificate(), CAMuxSocket::setReceiveKey(), CAMuxSocket::setSendKey(), CAMix::signXML(), CAMix::TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT, CACertStore::verifyMixCert(), and CAMultiSignature::verifyXML().
Referenced by init().
|
virtual |
Reimplemented from CAMix.
Definition at line 560 of file CALastMix.cpp.
References E_SUCCESS, CALibProxytest::getOptions(), m_pChannelList, CAMsg::printMsg(), and setTargets().
|
protected |
Reads the configured proxies from options
.
E_UNKNOWN | if no proxies are specified |
E_SUCCESS | if successfully configured the proxies |
Definition at line 971 of file CALastMix.cpp.
References CACacheLoadBalancing::add(), CACacheLoadBalancing::clean(), CATargetInterface::cleanAddr(), E_SUCCESS, E_UNKNOWN, CACacheLoadBalancing::get(), CATargetInterface::getAddr(), CACacheLoadBalancing::getElementCount(), CASocketAddrINet::getIP(), CALibProxytest::getOptions(), CASocketAddrINet::getPort(), CACmdLnOptions::getTargetInterface(), CACmdLnOptions::getTargetInterfaceCount(), CATargetInterface::getTargetType(), m_pCacheLB, m_pSocksLB, m_pVPNLB, CAMsg::printMsg(), TARGET_HTTP_PROXY, TARGET_SOCKS_PROXY, and TARGET_VPN_PROXY.
Referenced by initOnce(), and reconfigure().
|
friend |
Definition at line 591 of file CALastMix.cpp.
Referenced by CALastMixA::loop(), and CALastMixB::loop().
|
friend |
ToDo: check if keep-alive is really correct here - should it not be moved upwards?
Definition at line 731 of file CALastMix.cpp.
|
friend |
How to end this thread: 0.
set m_bRestart=true;
Definition at line 623 of file CALastMix.cpp.
|
protected |
Definition at line 151 of file CALastMix.hpp.
Referenced by clean(), CALastMixA::loop(), and CALastMixB::loop().
|
protected |
Definition at line 189 of file CALastMix.hpp.
Referenced by clean(), CALastMixA::loop(), and CALastMixB::loop().
|
protected |
Definition at line 193 of file CALastMix.hpp.
Referenced by CALastMixA::loop(), and CALastMixB::loop().
|
protected |
Definition at line 192 of file CALastMix.hpp.
Referenced by CALastMixA::loop(), and CALastMixB::loop().
|
protected |
Definition at line 191 of file CALastMix.hpp.
Referenced by CALastMixA::loop(), and CALastMixB::loop().
|
protected |
Definition at line 190 of file CALastMix.hpp.
Referenced by CALastMixA::loop(), and CALastMixB::loop().
|
protected |
Definition at line 158 of file CALastMix.hpp.
Referenced by CALastMix(), CALastMixA::loop(), CALastMixB::loop(), setTargets(), and ~CALastMix().
|
protected |
Definition at line 166 of file CALastMix.hpp.
Referenced by CALastMix(), clean(), CALastMixA::loop(), and reconfigure().
|
protected |
Definition at line 152 of file CALastMix.hpp.
Referenced by CALastMix(), clean(), init(), CALastMixA::loop(), CALastMixB::loop(), and processKeyExchange().
|
protected |
Definition at line 154 of file CALastMix.hpp.
Referenced by CALastMix(), clean(), CALastMixA::loop(), and CALastMixB::loop().
|
protected |
Definition at line 153 of file CALastMix.hpp.
Referenced by CALastMix(), clean(), CALastMixA::loop(), and CALastMixB::loop().
|
protected |
Definition at line 161 of file CALastMix.hpp.
Referenced by CALastMix(), clean(), init(), CALastMixA::loop(), CALastMixB::loop(), and processKeyExchange().
|
protected |
Definition at line 159 of file CALastMix.hpp.
Referenced by CALastMix(), CALastMixA::loop(), CALastMixB::loop(), setTargets(), and ~CALastMix().
|
protected |
Definition at line 163 of file CALastMix.hpp.
Referenced by CALastMix(), clean(), and CALastMixB::loop().
|
protected |
Definition at line 162 of file CALastMix.hpp.
Referenced by CALastMix(), clean(), and CALastMixB::loop().
|
protected |
Definition at line 160 of file CALastMix.hpp.
Referenced by CALastMix(), CALastMixA::loop(), setTargets(), and ~CALastMix().