Mixes for Privacy and Anonymity in the Internet
Macros | Functions
CAMiddleMix.cpp File Reference

Macros

#define MIDDLE_MIX_SIZE_OF_SYMMETRIC_KEYS   2*KEY_SIZE
 
#define MIDDLE_MIX_ASYM_PADDING_SIZE   42
 
#define RETRIES   100
 
#define RETRYTIME   10
 

Functions

THREAD_RETURN mm_loopSendToMixAfter (void *param)
 UPSTREAM (to WEB) Take the packets from the Queue and write them to the Socket. More...
 
THREAD_RETURN mm_loopSendToMixBefore (void *param)
 DOWNSTREAM (to Client) Take the packets from the Queue and write them to the Socket. More...
 
THREAD_RETURN mm_loopReadFromMixBefore (void *param)
 
THREAD_RETURN mm_loopReadFromMixAfter (void *param)
 

Macro Definition Documentation

◆ MIDDLE_MIX_ASYM_PADDING_SIZE

#define MIDDLE_MIX_ASYM_PADDING_SIZE   42

◆ MIDDLE_MIX_SIZE_OF_SYMMETRIC_KEYS

#define MIDDLE_MIX_SIZE_OF_SYMMETRIC_KEYS   2*KEY_SIZE

◆ RETRIES

#define RETRIES   100

◆ RETRYTIME

#define RETRYTIME   10

Function Documentation

◆ mm_loopReadFromMixAfter()

THREAD_RETURN mm_loopReadFromMixAfter ( void *  param)

SGX MIX locksem(downstreamSemPreId, SN_EMPTY); memcpy(downstreamPreBuffer,pPoolEntry, sizeof(tPoolEntry)); unlocksem(downstreamSemPreId, SN_FULL);

locksem(downstreamSemPostId, SN_FULL); memcpy(pPoolEntry,downstreamPostBuffer, sizeof(tPoolEntry)); unlocksem(downstreamSemPostId, SN_EMPTY); getRandom(pMixPacket->data,DATA_SIZE);

SGX MIX locksem(pMix->downstreamSemPreId, SN_EMPTY); memcpy(pMix->downstreamPreBuffer,pPoolEntry, sizeof(tPoolEntry)); unlocksem(pMix->downstreamSemPreId, SN_FULL);

locksem(pMix->downstreamSemPostId, SN_FULL); memcpy(pPoolEntry,pMix->downstreamPostBuffer, sizeof(tPoolEntry)); unlocksem(pMix->downstreamSemPostId, SN_EMPTY);

References CASocketGroup::add(), CAQueue::add(), t_MixPacket::channel, CHANNEL_ALLOWED_FLAGS, CHANNEL_CLOSE, CHANNEL_DUMMY, CHANNEL_SIG_CRIME, CASymCipher::crypt2(), t_MixPacket::data, DATA_SIZE, DUMMY_CHANNEL, E_SUCCESS, E_TIMEDOUT, ev_net_nextConnectionClosed, t_MixPacket::flags, GET_NET_ERROR, GET_NET_ERROR_STR, CAMiddleMixChannelList::getOutToIn(), getRandom(), CAQueue::getSize(), CAMiddleMix::m_bRun, CAMiddleMix::m_pMiddleMixChannelList, CAMiddleMix::m_pMuxIn, CAMiddleMix::m_pMuxOut, CAMiddleMix::m_pQueueSendToMixAfter, CAMiddleMix::m_pQueueSendToMixBefore, MAX_READ_FROM_NEXT_MIX_QUEUE_SIZE, MIX_POOL_SIZE, MIX_POOL_TIMEOUT, MONITORING_FIRE_NET_EVENT, msSleep(), t_queue_entry::packet, pMix, CAPool::pool(), CAMsg::printMsg(), CAMuxSocket::receive(), CAMiddleMixChannelList::remove(), REPLAY_CONTROL_CHANNEL_ID, CASocketGroup::select(), CAMuxSocket::send(), SOCKET_ERROR, THREAD_RETURN_SUCCESS, and CALockAble::unlock().

◆ mm_loopReadFromMixBefore()

THREAD_RETURN mm_loopReadFromMixBefore ( void *  param)

◆ mm_loopSendToMixAfter()

THREAD_RETURN mm_loopSendToMixAfter ( void *  param)

◆ mm_loopSendToMixBefore()

THREAD_RETURN mm_loopSendToMixBefore ( void *  param)