35 #define MIX_PAYLOAD_HTTP 0
36 #define MIX_PAYLOAD_SOCKS 1
37 #define MIX_PAYLOAD_VPN 2
40 #define MIXPACKET_SIZE 998
42 #define CHANNEL_DATA 0x00
43 #define CHANNEL_OPEN 0x08
45 #define CHANNEL_TIMESTAMPS_UP 0x60
46 #define CHANNEL_TIMESTAMPS_DOWN 0x90
47 #define CHANNEL_CLOSE 0x01
50 #define CHANNEL_DUMMY 0x10
51 #define CHANNEL_DEBUG 0x20
53 #if defined (LOG_CRIME) | defined (ANON_DEBUG_MODE)
54 #define CHANNEL_SIG_CRIME 0x20
55 #define CHANNEL_SIG_CRIME_ID_MASK 0x0000FF00
56 #define CHANNEL_ALLOWED_FLAGS (CHANNEL_OPEN|CHANNEL_CLOSE|CHANNEL_TIMESTAMPS_UP|CHANNEL_TIMESTAMPS_DOWN|CHANNEL_SIG_CRIME|CHANNEL_SIG_CRIME_ID_MASK)
58 #define CHANNEL_SIG_CRIME 0x0
59 #define CHANNEL_SIG_CRIME_ID_MASK 0x0
60 #define CHANNEL_ALLOWED_FLAGS (CHANNEL_OPEN|CHANNEL_CLOSE|CHANNEL_TIMESTAMPS_UP|CHANNEL_TIMESTAMPS_DOWN)
63 #define NEW_FLOW_CONTROL_FLAG 0x8000
65 #define INTEGRITY_ERROR_FLAG 0x4000
67 #define CONNECTION_ERROR_FLAG 0x01
70 #ifdef WITH_INTEGRITY_CHECK
71 #define PAYLOAD_SIZE 973
73 #define PAYLOAD_SIZE 989
76 #define PAYLOAD_HEADER_SIZE 3
78 #define GCM_MAC_SIZE 16
79 #define PAYLOAD_LEN_MASK 0x03FF;
81 #if (defined(WIN32) ||defined(__sgi))&&!defined(__GNUC__)
84 #define DO_PACKED __attribute__ ((__packed__))
88 #if (defined(WIN32) ||defined(__sgi))&&!defined(__GNUC__)
89 #pragma pack( push, t_MixPacket )
107 #pragma pack( pop, t_MixPacket )
129 #ifdef DATA_RETENTION_LOG
130 #if (defined(WIN32) ||defined(__sgi))&&!defined(__GNUC__)
131 #pragma pack( push, t_DataRetentionLogEntry )
134 struct __t__data_retention_log_entry
140 struct t_first_mix_data_retention_log_entry
146 struct t_last_mix_data_retention_log_entry
154 #if (defined(WIN32) ||defined(__sgi))&&!defined(__GNUC__)
156 #pragma pack( pop, t_DataRetentionLogEntry )
161 typedef struct __t__data_retention_log_entry t_dataretentionLogEntry;
171 #if defined(DATA_RETENTION_LOG)
172 t_dataretentionLogEntry dataRetentionLogEntry;
174 #if defined (LOG_PACKET_TIMES) || defined (LOG_CHANNEL)
175 UINT64 timestamp_proccessing_start;
176 UINT64 timestamp_proccessing_start_OP;
177 UINT64 timestamp_proccessing_end;
179 #if defined (LOG_PACKET_TIMES)
181 UINT64 timestamp_proccessing_end_OP;
184 UINT64 pool_timestamp_out;
233 #define AUTH_GOT_ACCOUNTCERT 0x1
236 #define AUTH_ACCOUNT_OK 0x2
239 #define AUTH_WAITING_FOR_FIRST_SETTLED_CC 0x4
242 #define AUTH_SENT_CC_REQUEST 0x20
245 #define AUTH_DATABASE 0x40
248 #define AUTH_BLOCKED 0x80
251 #define AUTH_SENT_ACCOUNT_REQUEST 0x100
253 #define AUTH_HARD_LIMIT_REACHED 0x200
256 #define AUTH_FAKE 0x400
259 #define AUTH_CHALLENGE_SENT 0x800
262 #define AUTH_ACCOUNT_EMPTY 0x1000
265 #define AUTH_FATAL_ERROR 0x2000
267 #define AUTH_OUTDATED_CC 0x4000
270 #define AUTH_INVALID_ACCOUNT 0x8000
273 #define AUTH_TIMEOUT_STARTED 0x10000
275 #define AUTH_MULTIPLE_LOGIN 0x20000
277 #define AUTH_UNKNOWN 0x40000
280 #define AUTH_SETTLED_ONCE 0x80000
286 #define AUTH_DELETE_ENTRY 0x80000
288 #define AUTH_LOGIN_NOT_FINISHED 0x100000
289 #define AUTH_LOGIN_FAILED 0x200000
290 #define AUTH_LOGIN_SKIP_SETTLEMENT 0x400000
implementation of a per-user control-channel for the AccountingInstance.
struct t_MixPacketPayload payload
Structure that holds all per-user payment information Included in CAFirstMixChannelList (struct fmHas...
CASignature * pPublicKey
the signature verifying instance for this user
UINT64 bytesToConfirm
The bytes the user could confirm in the last CC sent to him.
SINT32 lastHardLimitSeconds
timestamp when last HardLimit was reached
UINT8 * pstrBIID
ID of payment instance belonging to this account.
struct t_fmhashtableentry * ownerRef
SINT32 challengeSentSeconds
timestamp when last PayRequest was sent
SINT32 authTimeoutStartSeconds
UINT8 * pChallenge
we store the challenge here to verify the response later
UINT32 authFlags
Flags, see above AUTH_*.
UINT64 sessionPackets
The number of packets transfered.
UINT64 accountNumber
the user's account number
UINT64 userID
The same value as in fmHashTableEntry.
UINT64 confirmedBytes
the number of bytes that was confirmed by the account user
CAAccountingControlChannel * pControlChannel
a pointer to the user-specific control channel object
UINT64 transferredBytes
the number of bytes that was transferred (as counted by the AI) Elmar: since last CC,...
struct t_queue_entry __attribute__