Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
CAMiddleMixChannelList Class Reference

Data structure that stores all information about the currently open Mix channels. More...

Public Member Functions

 CAMiddleMixChannelList ()
 
 ~CAMiddleMixChannelList ()
 
SINT32 add (HCHANNEL channelIn, CASymChannelCipher *pCipher, HCHANNEL *channelOut)
 Adds a new Channel to the Channellist. More...
 
SINT32 getInToOut (HCHANNEL channelIn, HCHANNEL *channelOut, CASymChannelCipher **ppCipher)
 
SINT32 remove (HCHANNEL channelIn)
 Removes a channel form the channellist. More...
 
SINT32 getOutToIn (HCHANNEL *channelIn, HCHANNEL channelOut, CASymChannelCipher **ppCipher)
 

Static Public Member Functions

static SINT32 test ()
 

Private Member Functions

SINT32 getOutToIn_intern_without_lock (HCHANNEL *channelIn, HCHANNEL channelOut, CASymChannelCipher **ppCipher)
 

Private Attributes

LP_mmHashTableEntrym_pHashTableIn
 
LP_mmHashTableEntrym_pHashTableOut
 
CAMutex m_Mutex
 

Detailed Description

Data structure that stores all information about the currently open Mix channels.

See [MiddleMixChannelList] for more information.

Constructor & Destructor Documentation

◆ CAMiddleMixChannelList()

CAMiddleMixChannelList::CAMiddleMixChannelList ( )

References m_pHashTableIn, and m_pHashTableOut.

◆ ~CAMiddleMixChannelList()

CAMiddleMixChannelList::~CAMiddleMixChannelList ( )

Member Function Documentation

◆ add()

SINT32 CAMiddleMixChannelList::add ( HCHANNEL  channelIn,
CASymChannelCipher pCipher,
HCHANNEL channelOut 
)

Adds a new Channel to the Channellist.

Parameters
channelInincoming Channel-ID
pCipherCipher for recoding
channelOuton return holds a newly created random outgoing Channel-ID
Return values
E_SUCCESSif Channel was successfully added to the list

References t_middlemixchannellist::channelIn, t_middlemixchannellist::channelOut, E_SUCCESS, getOutToIn_intern_without_lock(), getRandom(), t_middlemixchannellist::list_HashTableIn, t_middlemixchannellist::list_HashTableOut, CAMutex::lock(), m_Mutex, m_pHashTableIn, m_pHashTableOut, t_middlemixchannellist::dl_in::next, t_middlemixchannellist::dl_out::next, t_middlemixchannellist::pCipher, t_middlemixchannellist::dl_in::prev, t_middlemixchannellist::dl_out::prev, and CAMutex::unlock().

Referenced by test().

◆ getInToOut()

SINT32 CAMiddleMixChannelList::getInToOut ( HCHANNEL  channelIn,
HCHANNEL channelOut,
CASymChannelCipher **  ppCipher 
)

◆ getOutToIn()

SINT32 CAMiddleMixChannelList::getOutToIn ( HCHANNEL channelIn,
HCHANNEL  channelOut,
CASymChannelCipher **  ppCipher 
)

◆ getOutToIn_intern_without_lock()

SINT32 CAMiddleMixChannelList::getOutToIn_intern_without_lock ( HCHANNEL channelIn,
HCHANNEL  channelOut,
CASymChannelCipher **  ppCipher 
)
private

◆ remove()

SINT32 CAMiddleMixChannelList::remove ( HCHANNEL  channelIn)

◆ test()

SINT32 CAMiddleMixChannelList::test ( )
static

References add(), getRandom(), and remove().

Member Data Documentation

◆ m_Mutex

CAMutex CAMiddleMixChannelList::m_Mutex
private

◆ m_pHashTableIn

LP_mmHashTableEntry* CAMiddleMixChannelList::m_pHashTableIn
private

◆ m_pHashTableOut

LP_mmHashTableEntry* CAMiddleMixChannelList::m_pHashTableOut
private