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

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

List of all members.

Public Member Functions

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

Static Public Member Functions

static SINT32 test ()

Private Member Functions

SINT32 getOutToIn_intern_without_lock (HCHANNEL *channelIn, HCHANNEL channelOut, CASymCipher **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

References m_pHashTableIn, and m_pHashTableOut.


Member Function Documentation

SINT32 CAMiddleMixChannelList::add ( HCHANNEL  channelIn,
CASymCipher 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 mm_loopReadFromMixBefore(), and test().

SINT32 CAMiddleMixChannelList::getInToOut ( HCHANNEL  channelIn,
HCHANNEL channelOut,
CASymCipher **  ppCipher 
)
SINT32 CAMiddleMixChannelList::getOutToIn ( HCHANNEL channelIn,
HCHANNEL  channelOut,
CASymCipher **  ppCipher 
)
SINT32 CAMiddleMixChannelList::getOutToIn_intern_without_lock ( HCHANNEL channelIn,
HCHANNEL  channelOut,
CASymCipher **  ppCipher 
) [private]

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


Member Data Documentation