ext_session_acl.cc File Reference
#include "helper/protocol_defines.h"
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
Include dependency graph for ext_session_acl.cc:

Go to the source code of this file.

Macros

#define __BIT_TYPES_DEFINED__
 

Functions

static void shutdown_db ()
 
static void init_db (void)
 
static size_t dataSize (DB_ENTRY *data)
 
static bool fetchKey (DB_ENTRY &key, DB_ENTRY *data)
 
static void deleteEntry (DB_ENTRY &key)
 
static void copyValue (void *dst, const DB_ENTRY *src, size_t sz)
 
static int session_active (const char *details, size_t len)
 
static void session_login (char *details, size_t len)
 
static void session_logout (char *details, size_t len)
 
static void usage (void)
 
int main (int argc, char **argv)
 

Variables

static int session_ttl = 3600
 
static int fixed_timeout = 0
 
char * db_path = NULL
 
const char * program_name
 
int session_is_active = 0
 

Macro Definition Documentation

◆ __BIT_TYPES_DEFINED__

#define __BIT_TYPES_DEFINED__

Definition at line 58 of file ext_session_acl.cc.

Function Documentation

◆ copyValue()

static void copyValue ( void *  dst,
const DB_ENTRY *  src,
size_t  sz 
)
static

Definition at line 184 of file ext_session_acl.cc.

Referenced by session_active().

◆ dataSize()

static size_t dataSize ( DB_ENTRY *  data)
static

Definition at line 152 of file ext_session_acl.cc.

Referenced by cbdataInternalInitType(), and session_active().

◆ deleteEntry()

static void deleteEntry ( DB_ENTRY &  key)
static

Definition at line 174 of file ext_session_acl.cc.

References db.

Referenced by session_active(), and session_logout().

◆ fetchKey()

static bool fetchKey ( DB_ENTRY &  key,
DB_ENTRY *  data 
)
static

Definition at line 162 of file ext_session_acl.cc.

References db.

Referenced by session_active().

◆ init_db()

static void init_db ( void  )
static

Definition at line 99 of file ext_session_acl.cc.

References db, db_path, NULL, program_name, shutdown_db(), and xstrdup.

Referenced by main().

◆ main()

◆ session_active()

static int session_active ( const char *  details,
size_t  len 
)
static

Definition at line 193 of file ext_session_acl.cc.

References copyValue(), data, dataSize(), deleteEntry(), fetchKey(), len, NULL, program_name, and session_ttl.

Referenced by main().

◆ session_login()

static void session_login ( char *  details,
size_t  len 
)
static

Definition at line 219 of file ext_session_acl.cc.

References data, db, len, now, and NULL.

Referenced by main().

◆ session_logout()

static void session_logout ( char *  details,
size_t  len 
)
static

Definition at line 240 of file ext_session_acl.cc.

References data, deleteEntry(), and len.

Referenced by main().

◆ shutdown_db()

static void shutdown_db ( void  )
static

Definition at line 80 of file ext_session_acl.cc.

References db, db_path, program_name, and xfree.

Referenced by init_db(), and main().

◆ usage()

static void usage ( void  )
static

Definition at line 253 of file ext_session_acl.cc.

References program_name.

Referenced by main().

Variable Documentation

◆ db_path

char* db_path = NULL

Definition at line 63 of file ext_session_acl.cc.

Referenced by init_db(), main(), and shutdown_db().

◆ fixed_timeout

int fixed_timeout = 0
static

Definition at line 62 of file ext_session_acl.cc.

Referenced by main().

◆ program_name

const char* program_name

Definition at line 64 of file ext_session_acl.cc.

Referenced by init_db(), main(), session_active(), shutdown_db(), and usage().

◆ session_is_active

int session_is_active = 0

Definition at line 149 of file ext_session_acl.cc.

◆ session_ttl

int session_ttl = 3600
static

Definition at line 61 of file ext_session_acl.cc.

Referenced by main(), and session_active().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors