29 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_LAST_MIX
42 #ifdef HAVE_UNIX_DOMAIN_PROTOCOL
76 #ifndef INCLUDE_LAST_MIX
87 #ifdef EXPORT_ASYM_PRIVATE_KEY
90 UINT32 keyFileBuffLen=8096;
94 m_pRSA->setPrivateKeyAsXML(keyBuff,keyFileBuffLen);
107 #ifdef EXPORT_ASYM_PRIVATE_KEY
110 UINT32 keyFileBuffLen=8096;
114 m_pRSA->getPrivateKeyAsXML(keyBuff,&keyFileBuffLen);
115 saveFile(keyFileBuff,keyBuff,keyFileBuffLen);
116 delete[] keyFileBuff;
123 for(
UINT32 i=1;i<=interfaces;i++)
133 CAMsg::printMsg(LOG_CRIT,
"Initialization failed! Reason: No usable (non virtual) interface was found! Hint: Virtual interfaces only needed if you are behind a NAT/network address translation, and therefore have to publish other external IP addresses to the InfoServices than your internal/hidden IP addresses.\n");
144 CAMsg::printMsg(LOG_INFO,
"Waiting for connection from previous Mix on %s...\n", buff);
148 #ifdef __BUILD_AS_SHADOW_PLUGIN__
155 CAMsg::printMsg(LOG_CRIT,
"Initialization failed! Reason: Call to accept() failed with error '%s' (%i)\n",
168 m_nCrimeRegExpsURL=0;
170 m_nCrimeRegExpsPayload = 0;
172 m_pSquidLogHelper =
new CASquidLogHelper(
this,1);
173 if (m_pSquidLogHelper->start()!=
E_SUCCESS)
188 #ifdef REPLAY_DETECTION
196 #ifdef REPLAY_DETECTION
214 #ifdef LOG_PACKET_TIMES
215 m_pLogPacketStats=
new CALogPacketStats();
217 m_pLogPacketStats->start();
244 doc->appendChild(elemMixes);
247 DOMElement* elemMix=NULL;
256 DOMElement* elemMixProtocolVersion=
createDOMElement(doc,
"MixProtocolVersion");
257 elemMix->appendChild(elemMixProtocolVersion);
260 DOM_Element elemDownstreamPackets = doc.createElement(
"DownstreamPackets");
262 elemMixProtocolVersion.appendChild(elemDownstreamPackets);
263 DOM_Element elemChannelTimeout = doc.createElement(
"ChannelTimeout");
266 elemMixProtocolVersion.appendChild(elemChannelTimeout);
267 DOM_Element elemChainTimeout = doc.createElement(
"ChainTimeout");
270 elemMixProtocolVersion.appendChild(elemChainTimeout);
276 elemMix->appendChild(elemFlowControl);
277 elemFlowControl->appendChild(elemUpstreamSendMe);
278 elemFlowControl->appendChild(elemDownstreamSendMe);
284 DOMElement* nodeRsaKey=NULL;
286 elemMix->appendChild(nodeRsaKey);
299 elemMix->appendChild(elemNonce);
304 DOMElement* elemKeepAlive=NULL;
308 DOMElement* elemKeepAliveSendInterval=NULL;
309 DOMElement* elemKeepAliveRecvInterval=NULL;
312 elemKeepAlive->appendChild(elemKeepAliveSendInterval);
313 elemKeepAlive->appendChild(elemKeepAliveRecvInterval);
316 elemMix->appendChild(elemKeepAlive);
318 CAMsg::printMsg(LOG_DEBUG,
"KeepAlive-Traffic: Offering -- SendInterval %u -- Receive Interval %u\n",u32KeepAliveSendInterval,u32KeepAliveRecvInterval);
327 appendTermsAndConditionsExtension(doc, elemMixes);
328 elemMix->appendChild(termsAndConditionsInfoNode(doc));
335 CAMsg::printMsg(LOG_DEBUG,
"Could not sign KeyInfo sent to users...\n");
346 CAMsg::printMsg(LOG_INFO,
"Sending Infos (chain length and RSA-Key, Message-Size %u)\n",
len);
350 CAMsg::printMsg(LOG_WARNING,
"Unrealistic length for key info: %u We might not be able to get a connection.\n",
len);
357 delete []messageBuff;
361 delete[] messageBuff;
366 CAMsg::printMsg(LOG_INFO,
"Waiting for length of symmetric key from previous Mix...\n");
367 #ifdef __BUILD_AS_SHADOW_PLUGIN__
375 CAMsg::printMsg(LOG_CRIT,
"Error receiving symmetric key info length! Reason: '%s' (%i)\n",
380 CAMsg::printMsg(LOG_CRIT,
"Error receiving symmetric key info length!\n");
388 CAMsg::printMsg(LOG_WARNING,
"Unrealistic length for key info: %u We might not be able to get a connection.\n",
len);
392 CAMsg::printMsg(LOG_INFO,
"Waiting for symmetric key from previous Mix with length %i...\n",
len);
397 CAMsg::printMsg(LOG_ERR,
"Socket error occurred while receiving the symmetric key from the previous mix! Reason: '%s' (%i) The previous mix might be unable to verify our Mix certificate(s) and therefore closed the connection. Please ask the operator for the log, and exchange your certificates if necessary.\n",
402 CAMsg::printMsg(LOG_ERR,
"Socket error occurred while receiving the symmetric key from the previous mix! The previous mix might be unable to verify our Mix certificate(s) and therefore closed the connection. Please ask the operator for the log, and exchange your certificates if necessary.\n");
404 delete []messageBuff;
409 CAMsg::printMsg(LOG_INFO,
"Symmetric Key Info received from previous mix is:\n");
415 CAMsg::printMsg(LOG_CRIT,
"Could not parse symmetric key of the previous mix!\n");
416 delete []messageBuff;
420 DOMElement* elemRoot=doc->getDocumentElement();
423 CAMsg::printMsg(LOG_CRIT,
"Symmetric key XML structure of previous mix is invalid!\n");
424 delete []messageBuff;
437 if(prevMixCert != NULL)
439 CAMsg::printMsg(LOG_DEBUG,
"Previous mix certificate was verified by a trusted root CA.\n");
444 CAMsg::printMsg(LOG_ERR,
"Could not verify certificate received from previous mix!\n");
459 delete []messageBuff;
466 delete []messageBuff;
480 memset(tmpBuff,0,tmpLen);
483 tmpLen!=SHA_DIGEST_LENGTH ||
484 memcmp(SHA1(arNonce,16,NULL),tmpBuff,SHA_DIGEST_LENGTH)!=0
487 CAMsg::printMsg(LOG_CRIT,
"Could not verify the nonce from previous mix!\n");
488 delete []messageBuff;
497 CAMsg::printMsg(LOG_INFO,
"Verified the symmetric key from previous mix!\n");
502 delete []messageBuff;
506 CAMsg::printMsg(LOG_CRIT,
"Could not decrypt the symmetric key from previous mix!\n");
516 CAMsg::printMsg(LOG_CRIT,
"Could not set the symmetric key to be used by the MuxSocket!\n");
527 elemKeepAliveSendInterval=NULL;
528 elemKeepAliveRecvInterval=NULL;
532 UINT32 tmpSendInterval,tmpRecvInterval;
535 CAMsg::printMsg(LOG_DEBUG,
"KeepAlive-Traffic: Getting offer -- SendInterval %u -- Receive Interval %u\n",tmpSendInterval,tmpRecvInterval);
556 void CALastMix::reconfigureMix() {
571 #if defined (DELAY_CHANNELS)||defined (DELAY_CHANNELS_LATENCY)
572 CAMsg::printMsg(LOG_DEBUG,
"Set new resources limitation parameters\n");
574 #if defined (DELAY_CHANNELS)
579 #if defined (DELAY_CHANNELS_LATENCY)
625 #ifdef ENABLE_GPERFTOOLS_CPU_PROFILER
626 ProfilerRegisterThread();
651 CAMsg::printMsg(LOG_ERR,
"CALastMix::lm_loopSendToMix - Error in dequeueing MixPaket\n");
656 #ifdef ANON_DEBUG_MODE
661 CAMsg::printMsg(LOG_DEBUG,
"Send Downstream AN.ON packet to previous Mix debug: %s\n", base64Payload);
666 CAMsg::printMsg(LOG_ERR,
"CALastMix::lm_loopSendToMix - Error in sending MixPaket\n");
670 #ifdef LOG_PACKET_TIMES
671 if(!
isZero64(pQueueEntry->timestamp_proccessing_start))
674 pLastMix->m_pLogPacketStats->addToTimeingStats(*pQueueEntry,
CHANNEL_DATA,
false);
693 #ifdef LOG_PACKET_TIMES
694 setZero64(pPoolEntry->timestamp_proccessing_start);
701 #ifdef LOG_PACKET_TIMES
704 pPool->
pool(pPoolEntry);
705 #ifdef LOG_PACKET_TIMES
710 #ifdef LOG_PACKET_TIMES
711 if(!
isZero64(pPoolEntry->timestamp_proccessing_start))
714 pLastMix->m_pLogPacketStats->addToTimeingStats(*pPoolEntry,
CHANNEL_DATA,
false);
733 #ifdef ENABLE_GPERFTOOLS_CPU_PROFILER
734 ProfilerRegisterThread();
742 pSocketGroup->
add(*pMuxSocket);
746 UINT64 keepaliveNow,keepaliveLast;
762 UINT32 keepaliveDiff=
diff64(keepaliveNow,keepaliveLast);
763 if(keepaliveDiff>u32KeepAliveRecvInterval)
765 CAMsg::printMsg(LOG_ERR,
"CALastMix::loopReadFromMix() -- restart because of KeepAlive-Traffic Timeout!\n");
779 #ifdef LOG_PACKET_TIMES
780 setZero64(pQueueEntry->timestamp_proccessing_start);
799 ret=pMuxSocket->
receive(pMixPacket);
800 #ifdef LOG_PACKET_TIMES
803 #ifdef DATA_RETENTION_LOG
804 pQueueEntry->dataRetentionLogEntry.t_in=htonl(time(NULL));
808 CAMsg::printMsg(LOG_ERR,
"CALastMix::lm_loopReadFromMix - received returned: %i\n",ret);
815 #ifdef LOG_PACKET_TIMES
819 #ifdef LOG_PACKET_TIMES
839 UINT8* CALastMix::parseDomainFromPayload(
const UINT8 *payloadData,
UINT32 payloadDataLength)
841 if( (payloadDataLength < 5) ||
847 if( (payloadData[0] == 0x05) && (payloadData[1] & 0x03) )
850 UINT32 tempUrlLength = 0, urlStartOffset = 0;
852 switch(payloadData[3])
863 tempUrlLength = payloadData[4];
881 if(payloadDataLength < (urlStartOffset + tempUrlLength) )
886 memcpy(address, payloadData+urlStartOffset, tempUrlLength);
887 address[tempUrlLength] = 0;
903 tre_regmatch_t theMatches[3];
904 int ret=tre_regnexec(m_pregexpRequestLine,(
const char*)payloadData,payloadDataLength,3,theMatches,0);
908 const UINT8* httpVerb=payloadData+theMatches[1].rm_so;
909 UINT8* domainName=NULL;
910 if((payloadData+theMatches[1].rm_eo-payloadData+theMatches[1].rm_so)>6 && strncasecmp(
"CONNECT",(
const char*)httpVerb,7)==0)
912 UINT32 matchLen=theMatches[2].rm_eo-theMatches[2].rm_so;
913 domainName=
new UINT8[matchLen+1];
914 memcpy(domainName,payloadData+theMatches[2].rm_so,matchLen);
915 domainName[matchLen]=0;
916 strtok((
char*)domainName,
":");
921 tre_regmatch_t theDomainMatches[2];
922 ret=tre_regnexec(m_pregexpDomainOfURI,(
const char*)payloadData+theMatches[2].rm_so,theMatches[2].rm_eo-theMatches[2].rm_so,2,theDomainMatches,0);
925 UINT32 matchLen=theDomainMatches[1].rm_eo-theDomainMatches[1].rm_so;
926 domainName=
new UINT8[matchLen+1];
927 memcpy(domainName,payloadData+theMatches[2].rm_so+theDomainMatches[1].rm_so,matchLen);
928 domainName[matchLen]=0;
934 bool CALastMix::checkCrime(
const UINT8* payLoad,
UINT32 payLen,
bool bURLCheck)
939 if(bURLCheck&&m_nCrimeRegExpsURL>0)
941 UINT8 *startOfUrl = parseDomainFromPayload(payLoad, payLen);
944 UINT32 strLen = strlen((
char *)startOfUrl);
945 for(
UINT32 i = 0; i < m_nCrimeRegExpsURL; i++)
947 if(tre_regnexec(&m_pCrimeRegExpsURL[i],(
char*)startOfUrl,strLen,0,NULL,0)==0)
949 delete [] startOfUrl;
953 delete [] startOfUrl;
956 for(
UINT32 i = 0; i < m_nCrimeRegExpsPayload; i++)
958 if (tre_regnexec(&m_pCrimeRegExpsPayload[i],(
const char*)payLoad ,payLen,0,NULL,0)==0)
983 for(i=1;i<=cntTargets;i++)
1001 CAMsg::printMsg(LOG_DEBUG,
"This mix will use the following proxies:\n");
1008 CAMsg::printMsg(LOG_DEBUG,
"%u. HTTP Proxy's Address: %u.%u.%u.%u:%u\n",i+1,ip[0],ip[1],ip[2],ip[3],port);
1016 CAMsg::printMsg(LOG_DEBUG,
"%u. SOCKS Proxy's Address: %u.%u.%u.%u:%u\n",i+1,ip[0],ip[1],ip[2],ip[3],port);
1024 CAMsg::printMsg(LOG_DEBUG,
"%u. VPN Proxy's Address: %u.%u.%u.%u:%u\n", i + 1, ip[0], ip[1], ip[2], ip[3], port);
1034 if (m_pSquidLogHelper != NULL)
1036 m_pSquidLogHelper->stop();
1037 delete m_pSquidLogHelper;
1038 m_pSquidLogHelper = NULL;
1045 #ifdef REPLAY_DETECTION
1084 CAMsg::printMsg(LOG_CRIT,
"Thread LoopReadFromMix joind successful!\n");
1090 #ifdef LOG_PACKET_TIMES
1091 CAMsg::printMsg(LOG_CRIT,
"Wait for LoopLogPacketStats to terminate!\n");
1092 if(m_pLogPacketStats!=NULL)
1094 m_pLogPacketStats->stop();
1095 delete m_pLogPacketStats;
1096 m_pLogPacketStats = NULL;
1098 m_pLogPacketStats=NULL;
1103 while(pChannelListEntry!=NULL)
1105 delete pChannelListEntry->
pCipher;
1106 pChannelListEntry->
pCipher = NULL;
1109 if (pChannelListEntry->
pSocket != NULL)
1112 delete pChannelListEntry->
pSocket;
1113 pChannelListEntry->
pSocket = NULL;
1122 #ifndef NEW_MIX_TYPE
1150 void CALastMix::externalCrimeNotifier(
UINT8 lastMixToProxyConnectionSrcIP[4],
1151 UINT16 lastMixToProxyConnectionSrcPort,
1152 UINT8 lastMixToProxyConnectionDstIP[4],
1153 UINT16 lastMixToProxyConnectionDstPort,
UINT8* pstrExternalLogEntry)
1161 if (
m_pChannelList->getChannelAndSetCrime(lastMixToProxyConnectionSrcIP, lastMixToProxyConnectionSrcPort, lastMixToProxyConnectionDstIP, lastMixToProxyConnectionDstPort,
channel) !=
E_SUCCESS)
1163 CAMsg::printMsg(log,
"Crime detected (external notification) -- but channel already closed! "
1164 " -- External Log Entry: \n%s\n", pstrExternalLogEntry);
1172 delete pQueueEntryCrime;
1173 CAMsg::printMsg(log,
"Crime detected (external notification) -- previous mix channel: "
1174 "%u -- Proxy Connection source port: %u -- External Log Entry: \n%s\n",
channel, lastMixToProxyConnectionSrcPort,
1175 pstrExternalLogEntry);
THREAD_RETURN lm_loopReadFromMix(void *pParam)
THREAD_RETURN lm_loopSendToMix(void *param)
How to end this thread: 0.
THREAD_RETURN lm_loopLog(void *param)
#define MONITORING_FIRE_NET_EVENT(e_type)
SINT32 setDOMElementAttribute(DOMNode *pElem, const char *attrName, const char *value)
SINT32 getcurrentTimeMillis(UINT64 &u64Time)
Gets the current Systemtime in milli seconds.
SINT32 getDOMElementValue(const DOMNode *const pElem, UINT8 *value, UINT32 *valuelen)
Returns the content of the text node(s) under elem as null-terminated C String.
UINT8 * readFile(const UINT8 *const name, UINT32 *size)
ONLY_LOCAL_PROXY or first.
SINT32 setDOMElementValue(DOMElement *pElem, SINT32 value)
SINT32 getcurrentTimeMicros(UINT64 &u64Time)
Gets the current Systemtime in micros seconds.
SINT32 sSleep(UINT32 sec)
Sleeps sec Seconds.
XERCES_CPP_NAMESPACE::DOMDocument * parseDOMDocument(const UINT8 *const buff, UINT32 len)
Parses a buffer containing an XML document and returns this document.
SINT32 getRandom(UINT32 *val)
Gets 32 random bits.
XERCES_CPP_NAMESPACE::DOMDocument * createDOMDocument()
Parses a timestamp in JDBC timestamp escape format (as it comes from the BI) and outputs the value in...
DOMElement * createDOMElement(XERCES_CPP_NAMESPACE::DOMDocument *pOwnerDoc, const char *const name)
Creates a new DOMElement with the given name which belongs to the DOMDocument owernDoc.
SINT32 getDOMChildByName(const DOMNode *pNode, const char *const name, DOMElement *&child, bool deep)
void logMemoryUsage()
Log information about the current memory (heap) usage.
SINT32 saveFile(const UINT8 *const name, const UINT8 *const buff, UINT32 buffSize)
SINT32 decodeXMLEncryptedKey(UINT8 *key, UINT32 *keylen, const UINT8 *const xml, UINT32 xmllen, CAASymCipher *pRSA)
SINT32 msSleep(UINT32 ms)
Sleeps ms milliseconds.
UINT32 diff64(const UINT64 &bigop, const UINT64 &smallop)
void setZero64(UINT64 &op1)
bool isZero64(UINT64 &op1)
void print64(UINT8 *buff, UINT64 num)
#define LM_PACKET_STATS_LOG_INTERVALL
#define MAX_READ_FROM_PREV_MIX_QUEUE_SIZE
#define GET_NET_ERROR_STR(x)
#define REPLAY_TIMESTAMP_PROPAGATION_INTERVALL
#define THREAD_RETURN_SUCCESS
#define FLOW_CONTROL_SENDME_SOFT_LIMIT
SINT32 getPublicKeyAsDOMElement(DOMElement *&elemRoot, XERCES_CPP_NAMESPACE::DOMDocument *docOwner)
SINT32 generateKeyPair(UINT32 size)
Generates a new random key-pair of size bits.
static SINT32 encode(const UINT8 *in, UINT32 len, UINT8 *out, UINT32 *outlen)
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
static SINT32 decode(const UINT8 *in, UINT32 len, UINT8 *out, UINT32 *outlen)
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
SINT32 add(CASocketAddr *const pAddr)
CASocketAddrINet * get()
Gets the 'next' Address according to the Load-Balancing algorithm.
SINT32 clean()
Deletes all information.
CACertificate * verifyMixCert(DOMNode *mixNode)
This function parses the certificates from a <Mix>-node and tries to build a certPath to the trusted ...
UINT32 getListenerInterfaceCount()
SINT32 setPrevMixTestCertificate(CACertificate *cert)
UINT32 getKeepAliveRecvInterval()
CAMultiSignature * getMultiSigner()
CAListenerInterface * getListenerInterface(UINT32 nr)
UINT32 getKeepAliveSendInterval()
CACertStore * getTrustedCertificateStore()
UINT32 getTargetInterfaceCount()
CACertificate * getPrevMixTestCertificate()
SINT32 getTargetInterface(CATargetInterface &oTargetInterface, UINT32 nr)
Fills a TargetInterface struct with the values which belongs to the target interface nr.
This class "dispatches" messages which it receives via proccessMixPacket() to the associated control ...
lmChannelListEntry * getFirstSocket()
lmChannelListEntry * getNextSocket()
volatile UINT32 m_logDownloadedPackets
CAQueue * m_pQueueSendToMix
volatile UINT64 m_logDownloadedBytes
SINT32 initMixCascadeInfo(DOMElement *)
This will initialize the XML Cascade Info struct XMLFirstMixToInfoService that is sent to the InfoSer...
SINT32 setTargets()
Reads the configured proxies from options.
friend THREAD_RETURN lm_loopReadFromMix(void *pParam)
volatile UINT64 m_logUploadedBytes
virtual SINT32 processKeyExchange()
Processes the startup communication with the preceeding mix.
CACacheLoadBalancing * m_pVPNLB
CALastMixChannelList * m_pChannelList
virtual SINT32 initOnce()
friend THREAD_RETURN lm_loopSendToMix(void *param)
How to end this thread: 0.
CAQueue * m_pQueueReadFromMix
CAThread * m_pthreadReadFromMix
CAThread * m_pthreadSendToMix
CACacheLoadBalancing * m_pCacheLB
volatile UINT32 m_logUploadedPackets
CACacheLoadBalancing * m_pSocksLB
static CACmdLnOptions * getOptions()
CASocketAddr * getAddr() const
SINT32 appendCompatibilityInfo(DOMNode *a_parent)
SINT32 checkCompatibility(DOMNode *a_parent, const char *a_mixPosition)
SINT32 signXML(DOMNode *a_element)
static const UINT32 TIMEOUT_MIX_CONNECTION_ESTABLISHEMENT
SINT32 addMixInfo(DOMNode *a_element, bool a_bForceFirstNode)
CAControlChannelDispatcher * m_pMuxInControlChannelDispatcher
UINT32 m_u32KeepAliveRecvInterval
CAMultiSignature * m_pMultiSignature
virtual SINT32 initMixCascadeInfo(DOMElement *elemMixes)
This will initialize the XML Cascade Info struct XMLFirstMixToInfoService that is sent to the InfoSer...
virtual SINT32 initOnce()
XERCES_CPP_NAMESPACE::DOMDocument * m_docMixCascadeInfo
UINT32 m_u32KeepAliveSendInterval
UINT64 m_u64ReferenceTime
CAReplayCtrlChannelMsgProc * m_pReplayMsgProc
static SINT32 printMsg(UINT32 typ, const char *format,...)
Writes a given message to the log.
static SINT32 verifyXML(const UINT8 *const in, UINT32 inlen, CACertificate *a_cert)
SINT32 close()
Closes the underlying socket.
SINT32 accept(UINT16 port)
SINT32 receive(MIXPACKET *pPacket)
Receives a whole MixPacket.
SINT32 setSendKey(UINT8 *key, UINT32 keyLen)
SINT32 setReceiveKey(UINT8 *key, UINT32 keyLen)
SINT32 send(MIXPACKET *pPacket)
Sends a MixPacket over the Network.
SINT32 receiveFully(UINT8 *buff, UINT32 len)
Receives some "plain" bytes from the underlying socket - just a convenient function....
This class implements the pool strategie of a Mix.
SINT32 pool(tPoolEntry *pPoolEntry)
This is a simple FIFO-Queue.
SINT32 add(const void *buff, UINT32 size)
Adds data to the Queue.
SINT32 getOrWait(UINT8 *pbuff, UINT32 *psize)
Gets data from the Queue or waits until some data is available, if the Queue is empty.
UINT32 getSize()
Returns the size of stored data in byte.
SINT32 startTimeStampPorpagation(UINT32 minutesPropagationIntervall)
Sends the current replay timestamp periodically on the downstream replay control channel.
This is an abstract class for representing a socket address used in CASocket, CADatagramSocket and CA...
virtual SINT32 toString(UINT8 *buff, UINT32 bufflen) const =0
Returns a string which describes this address in a human readable form.
This class represents a socket address for Internet (IP) connections.
UINT16 getPort() const
Returns the port value of the address.
SINT32 getIP(UINT8 buff[4]) const
Returns the IP-Numbers for this address.
virtual SINT32 send(const UINT8 *buff, UINT32 len)
Sends some data over the network.
virtual SINT32 setKeepAlive(bool b)
Enables/disables the socket keep-alive option.
virtual SINT32 setRecvBuff(UINT32 r)
virtual SINT32 setNonBlocking(bool b)
virtual SINT32 setSendBuff(SINT32 r)
Returns < 0 on error, otherwise the new sendbuffersize (which may be less than r)
TargetType getTargetType() const
CASocketAddr * getAddr() const
SINT32 start(void *param, bool bDaemon=false, bool bSilent=false)
Starts the execution of the main function of this thread.
SINT32 setMainLoop(THREAD_MAIN_TYP fnc)
Sets the main function which will be executed within this thread.
SINT32 join()
Waits for the main function to finish execution.
static SINT32 dumpToMem(const DOMNode *node, UINT8 *buff, UINT32 *size)
Dumps the node and all childs into buff.
@ ev_net_keyExchangePrevSuccessful
@ ev_net_prevConnectionClosed
@ ev_net_keyExchangePrevFailed
CASymChannelCipher * pCipher
struct t_queue_entry tQueueEntry
#define CHANNEL_DOWNSTREAM_PACKETS