28 #ifndef __CALASTMIXCHANNELLIST__
29 #define __CALASTMIXCHANNELLIST__
30 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_LAST_MIX
35 #ifdef WITH_INTEGRITY_CHECK
42 #define HASHTABLE_SIZE 0x00010000
43 #define HASH_MASK 0x0000FFFF
50 #ifdef WITH_INTEGRITY_CHECK
63 #if defined (LOG_CHANNEL)
66 #if defined (DELAY_CHANNELS_LATENCY)
71 UINT32 packetsDataOutToUser;
72 UINT32 packetsDataInFromUser;
78 time_t timeChannelOpened;
80 #ifdef ANON_DEBUG_MODE
103 #ifdef DELAY_CHANNELS
114 #ifdef WITH_INTEGRITY_CHECK
123 #
if defined(DELAY_CHANNELS_LATENCY)
127 ,
bool bIsCrime,
bool bLogPayload, time_t timeChannelOpend
129 #ifdef ANON_DEBUG_MODE
147 SINT32 getChannelAndSetCrime(
UINT8 lastMixToProxyConnectionSrcIP[4],
148 UINT16 lastMixToProxyConnectionSrcPort,
149 UINT8 lastMixToProxyConnectionDstIP[4],
154 while (pEntry != NULL)
157 if (pSocket->
getLocalPort() == lastMixToProxyConnectionSrcPort &&
158 pSocket->
getPeerPort() == lastMixToProxyConnectionDstPort)
161 if (pSocket->
getPeerIP(ip) ==
E_SUCCESS && memcmp(ip, lastMixToProxyConnectionDstIP,4) == 0)
163 if (pSocket->
getLocalIP(ip) ==
E_SUCCESS && memcmp(ip, lastMixToProxyConnectionSrcIP,4) == 0)
166 pEntry->bIsCrime =
true;
213 #ifdef DELAY_CHANNELS
215 CAThread* m_pThreadDelayBucketsLoop;
217 bool m_bDelayBucketsLoopRun;
220 volatile UINT32 m_u32DelayChannelUnlimitTraffic;
221 volatile UINT32 m_u32DelayChannelBucketGrow;
222 volatile UINT32 m_u32DelayChannelBucketGrowIntervall;
226 void reduceDelayBuckets(
UINT32 delayBucketID,
UINT32 amount);
230 #ifdef DELAY_CHANNELS_LATENCY
232 volatile UINT32 m_u32DelayChannelLatency;
234 void setDelayLatencyParameters(
UINT32 latency);
lmChannelListEntry * LP_lmChannelListEntry
lmChannelListEntry * get(HCHANNEL channelIn)
SINT32 add(HCHANNEL id, CASocket *pSocket, CASymChannelCipher *pCipher, CAQueue *pQueue)
lmChannelList * m_listSockets
Pointer to the head of a list of all sockets.
lmChannelListEntry * getFirstSocket()
lmChannelListEntry * getNextSocket()
lmChannelList * m_listSocketsNext
Next Element in the enumeration of all sockets.
SINT32 removeChannel(HCHANNEL channelIn)
LP_lmChannelListEntry * m_HashTable
The Hash-Table of all channels.
This is a simple FIFO-Queue.
virtual SINT32 getPeerPort()
virtual SINT32 getPeerIP(UINT8 ip[4])
virtual SINT32 getLocalIP(UINT8 r_Ip[4])
LERNGRUPPE Returns the source address of the socket.
virtual SINT32 getLocalPort()
This class could be used for encryption/decryption of data (streams) with AES using 128bit GCM mode.
struct t_lastmixchannellist::@4 list_Channels
CASymChannelCipher * pCipher
SINT32 sendmeCounterDownstream
struct t_lastmixchannellist::@5 list_Sockets
SINT32 sendmeCounterUpstream
struct t_lastmixchannellist * next
struct t_lastmixchannellist * prev