|
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. | |
| 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) |
| DOMNode * | appendTermsAndConditionsExtension (XERCES_CPP_NAMESPACE::DOMDocument *doc, DOMElement *root) |
| convenience function: returns an already prepared and signed TermsAndCondition node which can be appended as a KeyInfoExtension. | |
| DOMNode * | termsAndConditionsInfoNode (XERCES_CPP_NAMESPACE::DOMDocument *ownerDoc) |
| convenience function: creates a node for the KeyInfo structure for indicating the clients which Terms And Conditions are valid. | |
| 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() | |
| SINT32 | signXML (DOMNode *a_element) |
Protected Attributes | |
| 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. | |
| enum CAMix::tMixType |
| CAMix::CAMix | ( | ) |
References CACmdLnOptions::acceptReconfiguration(), CALibProxytest::getOptions(), m_acceptReconfiguration, m_bConnected, m_bReconfiguring, m_bShutDown, m_docMixCascadeInfo, m_lLastConnectionTime, m_pInfoService, m_pMultiSignature, m_pMuxInControlChannelDispatcher, m_pMuxOutControlChannelDispatcher, m_u32KeepAliveRecvInterval, and m_u32KeepAliveSendInterval.
| CAMix::~CAMix | ( | ) | [virtual] |
| bool CAMix::acceptsReconfiguration | ( | ) |
References m_acceptReconfiguration.
| SINT32 CAMix::addMixInfo | ( | DOMNode * | a_element, |
| bool | a_bForceFirstNode | ||
| ) | [protected] |
References E_SUCCESS, E_UNKNOWN, and CALibProxytest::getOptions().
Referenced by initMixCascadeInfo(), CAMiddleMix::processKeyExchange(), CALastMix::processKeyExchange(), and CAFirstMix::processKeyExchange().
| SINT32 CAMix::appendCompatibilityInfo | ( | DOMNode * | a_parent | ) | [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 CAMiddleMix::processKeyExchange(), CALastMix::processKeyExchange(), and CAFirstMix::processKeyExchange().
| DOMNode * CAMix::appendTermsAndConditionsExtension | ( | XERCES_CPP_NAMESPACE::DOMDocument * | doc, |
| DOMElement * | root | ||
| ) | [protected] |
convenience function: returns an already prepared and signed TermsAndCondition node which can be appended as a KeyInfoExtension.
if elemTnCExtensions is null it will be created by this function. returns the TNCExtension root element.
References createDOMElement(), CACmdLnOptions::getAllTermsAndConditionsTemplates(), getDOMChildByName(), getElementsByTagName(), CACmdLnOptions::getNumberOfTermsAndConditionsTemplates(), CACmdLnOptions::getOperatorSubjectKeyIdentifier(), CALibProxytest::getOptions(), getTermsAndConditionsTemplateRefId(), KEYINFO_NODE_EXTENSIONS, KEYINFO_NODE_TNC_EXTENSION, m_pMultiSignature, OPTIONS_ATTRIBUTE_TNC_ID, OPTIONS_NODE_TNCS_TEMPLATES, OPTIONS_NODE_TNCS_TRANSLATION, CAMsg::printMsg(), setDOMElementAttribute(), CAMultiSignature::signXML(), TEMPLATE_REFID_MAXLEN, and TMP_BUFF_SIZE.
Referenced by CAMiddleMix::processKeyExchange(), CALastMix::processKeyExchange(), and CAFirstMix::processKeyExchange().
| SINT32 CAMix::checkCompatibility | ( | DOMNode * | a_parent, |
| const char * | a_mixPosition | ||
| ) | [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 CAMiddleMix::processKeyExchange(), CALastMix::processKeyExchange(), and CAFirstMix::processKeyExchange().
| virtual SINT32 CAMix::clean | ( | ) | [protected, pure virtual] |
Implemented in CAFirstMix, CALastMix, and CAMiddleMix.
Referenced by start().
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().
| virtual tMixType CAMix::getType | ( | ) | const [pure virtual] |
Implemented in CAFirstMix, CALastMix, and CAMiddleMix.
Referenced by CAReplayCtrlChannelMsgProc::initTimestampsMessageTemplate(), CAReplayCtrlChannelMsgProc::proccessGetTimestamp(), and CAReplayCtrlChannelMsgProc::proccessGotTimestamp().
| virtual SINT32 CAMix::init | ( | ) | [protected, pure virtual] |
Implemented in CAFirstMix, CALastMix, and CAMiddleMix.
Referenced by start().
| SINT32 CAMix::initMixCascadeInfo | ( | DOMElement * | mixes | ) | [protected, virtual] |
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 CALastMix.
References addMixInfo(), 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, setDOMElementAttribute(), setDOMElementValue(), signXML(), and CAListenerInterface::toDOMElement().
Referenced by CAFirstMix::processKeyExchange().
| SINT32 CAMix::initOnce | ( | ) | [protected, virtual] |
Reimplemented in CAFirstMix, CALastMix, and CAMiddleMix.
References E_SUCCESS, E_UNKNOWN, CALibProxytest::getOptions(), and CAMsg::printMsg().
Referenced by start().
| bool CAMix::isConnected | ( | ) |
References m_bConnected.
Referenced by CAInfoService::InfoLoop(), CAInfoService::sendCascadeHelo(), and CAInfoService::sendStatus().
| virtual bool CAMix::isShutDown | ( | ) | [virtual] |
References m_bShutDown.
Referenced by my_terminate().
| virtual SINT32 CAMix::loop | ( | ) | [protected, pure virtual] |
Implemented in CAFirstMix, CALastMix, CAMiddleMix, CALastMixB, CAFirstMixA, CAFirstMixB, and CALastMixA.
Referenced by start().
| bool CAMix::needAutoConfig | ( | ) | [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().
| virtual SINT32 CAMix::processKeyExchange | ( | ) | [protected, pure virtual] |
Implemented in CAFirstMix, CALastMix, and CAMiddleMix.
| virtual SINT32 CAMix::reconfigure | ( | ) | [virtual] |
Reimplemented in CAFirstMix, and CALastMix.
References E_SUCCESS.
Referenced by threadReConfigure().
| virtual void CAMix::shutDown | ( | ) | [virtual] |
| SINT32 CAMix::signXML | ( | DOMNode * | a_element | ) | [protected] |
References m_pMultiSignature, and CAMultiSignature::signXML().
Referenced by initMixCascadeInfo(), CAMiddleMix::processKeyExchange(), CALastMix::processKeyExchange(), and CAFirstMix::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_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().
| DOMNode * CAMix::termsAndConditionsInfoNode | ( | XERCES_CPP_NAMESPACE::DOMDocument * | ownerDoc | ) | [protected] |
convenience function: creates a node for the KeyInfo structure for indicating the clients which Terms And Conditions are valid.
References createDOMElement(), getDOMElementAttribute(), getElementsByTagName(), CACmdLnOptions::getOperatorSubjectKeyIdentifier(), CALibProxytest::getOptions(), KEYINFO_NODE_TNC_INFO, KEYINFO_NODE_TNC_INFOS, OPTIONS_ATTRIBUTE_TNC_DATE, OPTIONS_ATTRIBUTE_TNC_DEFAULT_LANG, OPTIONS_ATTRIBUTE_TNC_DEFAULT_LANG_DEFINED, OPTIONS_ATTRIBUTE_TNC_ID, OPTIONS_ATTRIBUTE_TNC_LOCALE, OPTIONS_ATTRIBUTE_TNC_TEMPLATE_REFID, OPTIONS_NODE_TNCS_TRANSLATION, setDOMElementAttribute(), and TMP_BUFF_SIZE.
Referenced by CAMiddleMix::processKeyExchange(), CALastMix::processKeyExchange(), and CAFirstMix::processKeyExchange().
bool CAMix::m_acceptReconfiguration [protected] |
Referenced by acceptsReconfiguration(), and CAMix().
volatile bool CAMix::m_bConnected [protected] |
Referenced by CAMix(), isConnected(), and start().
bool CAMix::m_bReconfiguring [protected] |
volatile bool CAMix::m_bShutDown [protected] |
Referenced by CAMix(), isShutDown(), and shutDown().
XERCES_CPP_NAMESPACE::DOMDocument* CAMix::m_docMixCascadeInfo [protected] |
Reimplemented in CAFirstMix.
Referenced by CAMix(), getMixCascadeInfo(), CALastMix::initMixCascadeInfo(), and initMixCascadeInfo().
volatile UINT32 CAMix::m_lLastConnectionTime [protected] |
Referenced by CAMix(), getLastConnectionTime(), and start().
CAInfoService* CAMix::m_pInfoService [protected] |
Referenced by CAFirstMix::CAFirstMix(), CALastMix::CALastMix(), CAMiddleMix::CAMiddleMix(), CAMix(), CAFirstMixA::shutDown(), and start().
CAMultiSignature* CAMix::m_pMultiSignature [protected] |
Referenced by appendTermsAndConditionsExtension(), CALastMix::CALastMix(), CAMiddleMix::CAMiddleMix(), CAMix(), CAFirstMix::doUserLogin_internal(), CAMiddleMix::initOnce(), CALastMix::initOnce(), CAFirstMix::initOnce(), CAMiddleMix::processKeyExchange(), CAFirstMix::processKeyExchange(), signXML(), and start().
Referenced by CAMix(), CAFirstMix::clean(), fm_loopReadFromMix(), getUpstreamControlChannelDispatcher(), and CAFirstMix::init().
UINT32 CAMix::m_u32KeepAliveRecvInterval [protected] |
UINT32 CAMix::m_u32KeepAliveSendInterval [protected] |
const UINT32 CAMix::TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT = 60000 [static] |
1.7.6.1