Mixes for Privacy and Anonymity in the Internet
|
Public Types | |
enum | tMixType { FIRST_MIX , MIDDLE_MIX , LAST_MIX , JAP } |
Public Member Functions | |
CAMix () | |
virtual | ~CAMix () |
SINT32 | start () |
virtual SINT32 | reconfigure () |
virtual tMixType | getType () const =0 |
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 () |
Static Public Attributes | |
static const UINT32 | TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT = 60000 |
Protected Member Functions | |
virtual SINT32 | clean ()=0 |
virtual SINT32 | initOnce () |
virtual SINT32 | init ()=0 |
virtual SINT32 | loop ()=0 |
SINT32 | checkCompatibility (DOMNode *a_parent, const char *a_mixPosition) |
SINT32 | appendCompatibilityInfo (DOMNode *a_parent) |
SINT32 | addMixInfo (DOMNode *a_element, bool a_bForceFirstNode) |
virtual SINT32 | processKeyExchange ()=0 |
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) |
Protected Attributes | |
volatile bool | m_bLoop |
bool | m_bReconfiguring |
volatile bool | m_bShutDown |
CAMultiSignature * | m_pMultiSignature |
CAInfoService * | m_pInfoService |
UINT32 | m_u32KeepAliveRecvInterval |
UINT32 | m_u32KeepAliveSendInterval |
bool | m_acceptReconfiguration |
volatile bool | m_bConnected |
volatile UINT32 | m_lLastConnectionTime |
XERCES_CPP_NAMESPACE::DOMDocument * | m_docMixCascadeInfo |
CAControlChannelDispatcher * | m_pMuxOutControlChannelDispatcher |
CAControlChannelDispatcher * | m_pMuxInControlChannelDispatcher |
Private Member Functions | |
bool | needAutoConfig () |
This method checks if target interfaces (network adress and port of next mix) have been specified in the config file. More... | |
enum CAMix::tMixType |
CAMix::CAMix | ( | ) |
References CACmdLnOptions::acceptReconfiguration(), CALibProxytest::getOptions(), m_acceptReconfiguration, m_bConnected, m_bLoop, m_bReconfiguring, m_bShutDown, m_docMixCascadeInfo, m_lLastConnectionTime, m_pInfoService, m_pMultiSignature, m_pMuxInControlChannelDispatcher, m_pMuxOutControlChannelDispatcher, m_u32KeepAliveRecvInterval, and m_u32KeepAliveSendInterval.
|
virtual |
bool CAMix::acceptsReconfiguration | ( | ) |
References m_acceptReconfiguration.
|
protected |
References E_SUCCESS, E_UNKNOWN, and CALibProxytest::getOptions().
Referenced by initMixCascadeInfo(), CALastMix::processKeyExchange(), and CAMiddleMix::processKeyExchange().
|
protected |
EDIT HERE FOR INTRODUCING NEW FLAGS!
References createDOMElement(), E_SUCCESS, MIX_VERSION, NEW_CHANNEL_ENCRYPTION_COMPATIBILITY, NEW_FLOW_CONTROL_COMPATIBILITY, PAYMENT_COMPATIBILITY, setDOMElementAttribute(), and WITH_INTEGRITY_CHECK_COMPATIBILITY.
Referenced by CALastMix::processKeyExchange(), and CAMiddleMix::processKeyExchange().
|
protected |
EDIT HERE FOR ADDING INCOMPATIBLE VERSIONS!
EDIT HERE FOR INTRODUCING NEW FLAGS!
EDIT HERE FOR INTRODUCING NEW FLAGS!
References E_SUCCESS, E_UNKNOWN, flags, getDOMChildByName(), getDOMElementAttribute(), getNodeName(), len, MIX_VERSION, MIX_VERSION_COMPATIBILITY, NEW_CHANNEL_ENCRYPTION_COMPATIBILITY, NEW_FLOW_CONTROL_COMPATIBILITY, PAYMENT_COMPATIBILITY, CAMsg::printMsg(), and WITH_INTEGRITY_CHECK_COMPATIBILITY.
Referenced by CALastMix::processKeyExchange(), and CAMiddleMix::processKeyExchange().
|
protectedpure virtual |
Implemented in CAMiddleMix, CALastMix, and CAFirstMix.
Referenced by start().
CAControlChannelDispatcher* CAMix::getDownstreamControlChannelDispatcher | ( | ) | const |
UINT32 CAMix::getLastConnectionTime | ( | ) |
References m_lLastConnectionTime.
Referenced by CAInfoService::InfoLoop().
SINT32 CAMix::getMixCascadeInfo | ( | XERCES_CPP_NAMESPACE::DOMDocument *& | docMixCascadeInfo | ) |
Returns the Mix-Cascade info which should be send to the InfoService.
This is NOT a copy!
docMixCascadeInfo | where the XML struct would be stored |
E_SUCCESS |
References E_SUCCESS, E_UNKNOWN, and m_docMixCascadeInfo.
Referenced by CAInfoService::getCascadeHeloXMLAsString(), and CAAccountingInstance::prepareCCRequest().
|
pure virtual |
Implemented in CAMiddleMix, CALastMix, and CAFirstMix.
Referenced by CAReplayCtrlChannelMsgProc::initTimestampsMessageTemplate(), CAReplayCtrlChannelMsgProc::proccessGetTimestamp(), and CAReplayCtrlChannelMsgProc::proccessGotTimestamp().
CAControlChannelDispatcher* CAMix::getUpstreamControlChannelDispatcher | ( | ) | const |
|
protectedpure virtual |
Implemented in CAMiddleMix, CALastMix, and CAFirstMix.
Referenced by start().
|
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 in CAMiddleMix, and CALastMix.
References addMixInfo(), CHANNELS_PER_CLIENT, createDOMDocument(), createDOMElement(), E_SUCCESS, equals(), getDOMChildByName(), getLastDOMChildByName(), CACmdLnOptions::getListenerInterface(), CACmdLnOptions::getListenerInterfaceCount(), CACmdLnOptions::getMaxNrOfUsers(), CACmdLnOptions::getMixId(), CALibProxytest::getOptions(), CAListenerInterface::getType(), CAListenerInterface::isHidden(), m_docMixCascadeInfo, PAYMENT_VERSION, CAMsg::printMsg(), RAW_TCP, RAW_UDP, setDOMElementAttribute(), setDOMElementValue(), signXML(), and CAListenerInterface::toDOMElement().
Referenced by CALastMix::initMixCascadeInfo().
|
protectedvirtual |
Reimplemented in CAMiddleMix, CALastMix, and CAFirstMix.
References E_SUCCESS, E_UNKNOWN, CALibProxytest::getOptions(), and CAMsg::printMsg().
Referenced by CAFirstMix::initOnce(), CALastMix::initOnce(), and start().
bool CAMix::isConnected | ( | ) |
References m_bConnected.
Referenced by CAInfoService::InfoLoop(), CAInfoService::sendCascadeHelo(), and CAInfoService::sendStatus().
|
virtual |
References m_bShutDown.
Referenced by my_terminate().
|
protectedpure virtual |
Implemented in CALastMix, CAFirstMix, CALastMixB, CAFirstMixB, CALastMixA, CAFirstMixA, and CAMiddleMix.
Referenced by start().
|
private |
This method checks if target interfaces (network adress and port of next mix) have been specified in the config file.
A return value of true means that necessary information to bring the cascade online is missing and must be downloaded from the InfoService (if available).
false | if the target interfaces are configured one way or another |
true | if config file contains no target interface info and InfoService is unavailable |
References CATargetInterface::cleanAddr(), CALibProxytest::getOptions(), CACmdLnOptions::getTargetInterface(), CACmdLnOptions::getTargetInterfaceCount(), CATargetInterface::getTargetType(), and TARGET_MIX.
Referenced by start().
|
protectedpure virtual |
Implemented in CAMiddleMix, CALastMix, and CAFirstMix.
|
virtual |
Reimplemented in CALastMix, and CAFirstMix.
References E_SUCCESS.
|
virtual |
|
protected |
References m_pMultiSignature, and CAMultiSignature::signXML().
Referenced by initMixCascadeInfo(), CALastMix::processKeyExchange(), and CAMiddleMix::processKeyExchange().
SINT32 CAMix::start | ( | ) |
References CACmdLnOptions::acceptReconfiguration(), clean(), E_SHUTDOWN, E_SUCCESS, E_UNKNOWN, ev_sys_enterMainLoop, ev_sys_leavingMainLoop, getcurrentTimeMillis(), CALibProxytest::getOptions(), init(), initOnce(), CAInfoService::isRunning(), loop(), m_bConnected, m_bLoop, m_bReconfiguring, m_lLastConnectionTime, m_pInfoService, m_pMultiSignature, MONITORING_FIRE_SYS_EVENT, needAutoConfig(), CAMsg::printMsg(), CAInfoService::sendCascadeHelo(), CAInfoService::setConfiguring(), CAInfoService::setMultiSignature(), CAInfoService::setSerial(), CAInfoService::signal(), sSleep(), CAInfoService::start(), and CAInfoService::stop().
Referenced by main().
|
protected |
Referenced by acceptsReconfiguration(), and CAMix().
|
protected |
Referenced by CAMix(), isConnected(), and start().
|
protected |
Referenced by CAMix(), shutDown(), CAFirstMixA::shutDown(), and start().
|
protected |
Referenced by CAMix(), CAMiddleMix::clean(), isShutDown(), and shutDown().
|
protected |
Referenced by CAMix(), getMixCascadeInfo(), CALastMix::initMixCascadeInfo(), and initMixCascadeInfo().
|
protected |
Referenced by CAMix(), getLastConnectionTime(), and start().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by CAMix(), CAFirstMix::clean(), getUpstreamControlChannelDispatcher(), and CAFirstMix::init().
|
protected |
Referenced by CAMix(), CALastMix::processKeyExchange(), and CAMiddleMix::processKeyExchange().
|
protected |
Referenced by CAMix(), CALastMix::processKeyExchange(), and CAMiddleMix::processKeyExchange().
|
static |
Referenced by CALastMix::processKeyExchange(), and CAMiddleMix::processKeyExchange().