Mixes for Privacy and Anonymity in the Internet
Classes | Macros | Functions
CAAccountingInstance.hpp File Reference

Classes

struct  AccountLoginHashEntry
 
struct  SettleEntry
 
class  CAAccountingInstance
 This is the AI (accounting instance or abrechnungsinstanz in german) class. More...
 
struct  CAAccountingInstance::t_aiqueueitem
 

Macros

#define CHALLENGE_TIMEOUT   15
 
#define HARD_LIMIT_TIMEOUT   30
 
#define AUTH_TIMEOUT   15
 
#define CRITICAL_SUBSEQUENT_BI_CONN_ERRORS   5
 
#define CLIENT_VERSION_STR_LEN   20
 
#define PREPAID_PROTO_CLIENT_VERSION   "00.10.057"
 
#define CRITICAL_SETTLE_FLAGS    (AUTH_INVALID_ACCOUNT | AUTH_ACCOUNT_EMPTY | AUTH_BLOCKED | AUTH_UNKNOWN)
 

Functions

bool testAndSetLoginOwner (struct AccountLoginHashEntry *loginEntry, struct t_fmhashtableentry *ownerRef)
 if the current login entry isn't locked by a login thread the calling login-thread obtains ownership More...
 
bool resetLoginOngoing (struct AccountLoginHashEntry *loginEntry, struct t_fmhashtableentry *ownerRef)
 indicates that the ongoing login process for this entry is finished but doesn't reset ownership. More...
 
bool testLoginEntryOwner (struct AccountLoginHashEntry *loginEntry, fmHashTableEntry *ownerRef)
 tests whether the corresponding ownerEntry owns this loginEntry. More...
 
bool isLoginOngoing (struct AccountLoginHashEntry *loginEntry, struct t_fmhashtableentry *ownerRef)
 test whether this entry is currently resrved by an ongoing login process. More...
 
bool testLoginEntryOwner_internal (struct AccountLoginHashEntry *loginEntry, struct t_fmhashtableentry *ownerRef)
 

Macro Definition Documentation

◆ AUTH_TIMEOUT

#define AUTH_TIMEOUT   15

◆ CHALLENGE_TIMEOUT

#define CHALLENGE_TIMEOUT   15

◆ CLIENT_VERSION_STR_LEN

#define CLIENT_VERSION_STR_LEN   20

◆ CRITICAL_SETTLE_FLAGS

#define CRITICAL_SETTLE_FLAGS    (AUTH_INVALID_ACCOUNT | AUTH_ACCOUNT_EMPTY | AUTH_BLOCKED | AUTH_UNKNOWN)

◆ CRITICAL_SUBSEQUENT_BI_CONN_ERRORS

#define CRITICAL_SUBSEQUENT_BI_CONN_ERRORS   5

◆ HARD_LIMIT_TIMEOUT

#define HARD_LIMIT_TIMEOUT   30

◆ PREPAID_PROTO_CLIENT_VERSION

#define PREPAID_PROTO_CLIENT_VERSION   "00.10.057"

Function Documentation

◆ isLoginOngoing()

bool isLoginOngoing ( struct AccountLoginHashEntry loginEntry,
struct t_fmhashtableentry ownerRef 
)

test whether this entry is currently resrved by an ongoing login process.

References CAMutex::lock(), AccountLoginHashEntry::loginOngoing, AccountLoginHashEntry::ownerLock, and CAMutex::unlock().

Referenced by CAAccountingInstance::cleanupTableEntry().

◆ resetLoginOngoing()

bool resetLoginOngoing ( struct AccountLoginHashEntry loginEntry,
struct t_fmhashtableentry ownerRef 
)

indicates that the ongoing login process for this entry is finished but doesn't reset ownership.

References CAMutex::lock(), AccountLoginHashEntry::loginOngoing, AccountLoginHashEntry::ownerLock, testLoginEntryOwner_internal(), and CAMutex::unlock().

Referenced by CAAccountingInstance::unlockLogin().

◆ testAndSetLoginOwner()

bool testAndSetLoginOwner ( struct AccountLoginHashEntry loginEntry,
struct t_fmhashtableentry ownerRef 
)

if the current login entry isn't locked by a login thread the calling login-thread obtains ownership

References CAMutex::lock(), AccountLoginHashEntry::loginOngoing, AccountLoginHashEntry::ownerLock, AccountLoginHashEntry::ownerRef, and CAMutex::unlock().

Referenced by CAAccountingInstance::handleChallengeResponse_internal().

◆ testLoginEntryOwner()

bool testLoginEntryOwner ( struct AccountLoginHashEntry loginEntry,
fmHashTableEntry ownerRef 
)

tests whether the corresponding ownerEntry owns this loginEntry.

References CAMutex::lock(), AccountLoginHashEntry::ownerLock, testLoginEntryOwner_internal(), and CAMutex::unlock().

Referenced by CAAccountingInstance::cleanupTableEntry().

◆ testLoginEntryOwner_internal()

bool testLoginEntryOwner_internal ( struct AccountLoginHashEntry loginEntry,
struct t_fmhashtableentry ownerRef 
)