Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
CALastMix Class Reference
Inheritance diagram for CALastMix:
CAMixWithReplayDB CAMix CALastMixA CALastMixB

List of all members.

Public Member Functions

 CALastMix ()
virtual ~CALastMix ()
SINT32 reconfigure ()
tMixType getType () const

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()
virtual SINT32 processKeyExchange ()
 Processes the startup communication with the preceeding mix.
SINT32 setTargets ()
 Reads the configured proxies from options.

Protected Attributes

volatile bool m_bRestart
CAMuxSocketm_pMuxIn
CAQueuem_pQueueSendToMix
CAQueuem_pQueueReadFromMix
CACacheLoadBalancingm_pCacheLB
CACacheLoadBalancingm_pSocksLB
CAASymCipherm_pRSA
CAThreadm_pthreadSendToMix
CAThreadm_pthreadReadFromMix
CALastMixChannelListm_pChannelList
volatile bool m_bRunLog
volatile UINT32 m_logUploadedPackets
volatile UINT64 m_logUploadedBytes
volatile UINT32 m_logDownloadedPackets
volatile UINT64 m_logDownloadedBytes

Friends

THREAD_RETURN lm_loopSendToMix (void *param)
 How to end this thread: 0.
THREAD_RETURN lm_loopReadFromMix (void *pParam)
THREAD_RETURN lm_loopLog (void *)

Constructor & Destructor Documentation

virtual CALastMix::~CALastMix ( ) [virtual]

References clean(), m_pCacheLB, and m_pSocksLB.


Member Function Documentation

SINT32 CALastMix::clean ( ) [protected, virtual]
tMixType CALastMix::getType ( ) const [virtual]

Implements CAMix.

References CAMix::LAST_MIX.

SINT32 CALastMix::init ( ) [protected, virtual]
SINT32 CALastMix::initMixCascadeInfo ( DOMElement *  mixes) [protected, virtual]

This will initialize the XML Cascade Info struct XMLFirstMixToInfoService that is sent to the InfoService in CAInfoService::sendCascadeHelo()

Parameters:
mixesthe <Mixes> element of the XML struct we received from the succeeding mix.
Return values:
E_UNKNOWNif processing produces an error
E_SUCCESSotherwise

Reimplemented from CAMix.

References CAMix::m_docMixCascadeInfo, and setDOMElementAttribute().

Referenced by initOnce().

SINT32 CALastMix::initOnce ( ) [protected, virtual]
virtual SINT32 CALastMix::loop ( ) [protected, pure virtual]

Implements CAMix.

Implemented in CALastMixB, and CALastMixA.

SINT32 CALastMix::processKeyExchange ( ) [protected, virtual]

Processes the startup communication with the preceeding mix.

  • Step 1: Mix n-1 open a TCP/IP Connection
  • Step 2: LastMix sends XML struct describing itself, containing PubKey of LastMix, signed by LastMix (see XML structs)
  • Step 3: Mix n-1 sends XML struct containing encrpyted (with PubKey) Symetric Key used for interlink encryption between Mix n-1 <---> LastMix, signed by Mix n-1 (see XML structs)

Getting and calculating the KeepAlive Traffice...

Implements CAMix.

References CAMix::addMixInfo(), CAMix::appendCompatibilityInfo(), CAMix::appendTermsAndConditionsExtension(), 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, parseDOMDocument(), CAMsg::printMsg(), CAMuxSocket::receiveFully(), CASocket::send(), CAMuxSocket::setCrypt(), setDOMElementAttribute(), setDOMElementValue(), CACmdLnOptions::setPrevMixTestCertificate(), CAMuxSocket::setReceiveKey(), CAMuxSocket::setSendKey(), CAMix::signXML(), CAMix::termsAndConditionsInfoNode(), CAMix::TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT, CACertStore::verifyMixCert(), and CAMultiSignature::verifyXML().

Referenced by init().

SINT32 CALastMix::setTargets ( ) [protected]

Friends And Related Function Documentation

THREAD_RETURN lm_loopLog ( void *  ) [friend]
THREAD_RETURN lm_loopReadFromMix ( void *  pParam) [friend]

Referenced by init().

THREAD_RETURN lm_loopSendToMix ( void *  param) [friend]

How to end this thread: 0.

set m_bRestart=true; 1. Close connection to next mix 2. put a byte in the Mix-Output-Queue

Referenced by init().


Member Data Documentation

volatile bool CALastMix::m_bRestart [protected]
volatile bool CALastMix::m_bRunLog [protected]
volatile UINT64 CALastMix::m_logUploadedBytes [protected]