Apache HTTPD
Classes | Macros | Functions | Variables
mod_socache_dbm.c File Reference
#include "httpd.h"
#include "http_log.h"
#include "http_request.h"
#include "http_protocol.h"
#include "http_config.h"
#include "mpm_common.h"
#include "mod_status.h"
#include "apr.h"
#include "apr_strings.h"
#include "apr_time.h"
#include "apr_want.h"
#include "apr_dbm.h"
#include "ap_socache.h"

Go to the source code of this file.

Classes

struct  ap_socache_instance_t
 

Macros

#define APR_WANT_STRFUNC
 
#define DBM_FILE_MODE   ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
 
#define DEFAULT_DBM_PREFIX   "socache-dbm-"
 
#define DBM_FILE_SUFFIX_DIR   ".dir"
 
#define DBM_FILE_SUFFIX_PAG   ".pag"
 
#define KEYMAX   1024
 

Functions

static void socache_dbm_expire (ap_socache_instance_t *ctx, server_rec *s)
 
static apr_status_t socache_dbm_remove (ap_socache_instance_t *ctx, server_rec *s, const unsigned char *id, unsigned int idlen, apr_pool_t *p)
 
static const charsocache_dbm_create (ap_socache_instance_t **context, const char *arg, apr_pool_t *tmp, apr_pool_t *p)
 
static apr_status_t socache_dbm_init (ap_socache_instance_t *ctx, const char *namespace, const struct ap_socache_hints *hints, server_rec *s, apr_pool_t *p)
 
static void socache_dbm_destroy (ap_socache_instance_t *ctx, server_rec *s)
 
static apr_status_t socache_dbm_store (ap_socache_instance_t *ctx, server_rec *s, const unsigned char *id, unsigned int idlen, apr_time_t expiry, unsigned char *ucaData, unsigned int nData, apr_pool_t *pool)
 
static apr_status_t socache_dbm_retrieve (ap_socache_instance_t *ctx, server_rec *s, const unsigned char *id, unsigned int idlen, unsigned char *dest, unsigned int *destlen, apr_pool_t *p)
 
static void socache_dbm_status (ap_socache_instance_t *ctx, request_rec *r, int flags)
 
static apr_status_t socache_dbm_iterate (ap_socache_instance_t *ctx, server_rec *s, void *userctx, ap_socache_iterator_t *iterator, apr_pool_t *pool)
 
static void register_hooks (apr_pool_t *p)
 

Variables

static const ap_socache_provider_t socache_dbm
 
static int *const aplog_module_index = &( socache_dbm_module.module_index)
 

Macro Definition Documentation

◆ APR_WANT_STRFUNC

#define APR_WANT_STRFUNC

Definition at line 28 of file mod_socache_dbm.c.

◆ DBM_FILE_MODE

#define DBM_FILE_MODE   ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )

Support for DBM library

Definition at line 55 of file mod_socache_dbm.c.

◆ DBM_FILE_SUFFIX_DIR

#define DBM_FILE_SUFFIX_DIR   ".dir"

Definition at line 68 of file mod_socache_dbm.c.

◆ DBM_FILE_SUFFIX_PAG

#define DBM_FILE_SUFFIX_PAG   ".pag"

Definition at line 69 of file mod_socache_dbm.c.

◆ DEFAULT_DBM_PREFIX

#define DEFAULT_DBM_PREFIX   "socache-dbm-"

Definition at line 57 of file mod_socache_dbm.c.

◆ KEYMAX

#define KEYMAX   1024

Function Documentation

◆ register_hooks()

static void register_hooks ( apr_pool_t p)
static

Definition at line 753 of file mod_socache_dbm.c.

◆ socache_dbm_create()

static const char * socache_dbm_create ( ap_socache_instance_t **  context,
const char arg,
apr_pool_t tmp,
apr_pool_t p 
)
static

Definition at line 79 of file mod_socache_dbm.c.

◆ socache_dbm_destroy()

static void socache_dbm_destroy ( ap_socache_instance_t ctx,
server_rec s 
)
static

Definition at line 199 of file mod_socache_dbm.c.

◆ socache_dbm_expire()

static void socache_dbm_expire ( ap_socache_instance_t ctx,
server_rec s 
)
static

< open for r/w, create if needed

< Read by user

<

Deprecated:
See also
APR_FPROT_UREAD

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Read by group

<

Deprecated:
See also
APR_FPROT_GREAD

< Read by others

<

Deprecated:
See also
APR_FPROT_WREAD

< open for r/w, create if needed

< Read by user

<

Deprecated:
See also
APR_FPROT_UREAD

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Read by group

<

Deprecated:
See also
APR_FPROT_GREAD

< Read by others

<

Deprecated:
See also
APR_FPROT_WREAD

Definition at line 443 of file mod_socache_dbm.c.

◆ socache_dbm_init()

static apr_status_t socache_dbm_init ( ap_socache_instance_t ctx,
const char namespace,
const struct ap_socache_hints hints,
server_rec s,
apr_pool_t p 
)
static

< open for r/w, create if needed

< Read by user

<

Deprecated:
See also
APR_FPROT_UREAD

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Read by group

<

Deprecated:
See also
APR_FPROT_GREAD

< Read by others

<

Deprecated:
See also
APR_FPROT_WREAD

Definition at line 119 of file mod_socache_dbm.c.

◆ socache_dbm_iterate()

static apr_status_t socache_dbm_iterate ( ap_socache_instance_t ctx,
server_rec s,
void *  userctx,
ap_socache_iterator_t iterator,
apr_pool_t pool 
)
static

< open for r/w, create if needed

< Read by user

<

Deprecated:
See also
APR_FPROT_UREAD

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Read by group

<

Deprecated:
See also
APR_FPROT_GREAD

< Read by others

<

Deprecated:
See also
APR_FPROT_WREAD

Definition at line 661 of file mod_socache_dbm.c.

◆ socache_dbm_remove()

static apr_status_t socache_dbm_remove ( ap_socache_instance_t ctx,
server_rec s,
const unsigned char id,
unsigned int  idlen,
apr_pool_t p 
)
static

< open for r/w, create if needed

< Read by user

<

Deprecated:
See also
APR_FPROT_UREAD

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Read by group

<

Deprecated:
See also
APR_FPROT_GREAD

< Read by others

<

Deprecated:
See also
APR_FPROT_WREAD

Definition at line 392 of file mod_socache_dbm.c.

◆ socache_dbm_retrieve()

static apr_status_t socache_dbm_retrieve ( ap_socache_instance_t ctx,
server_rec s,
const unsigned char id,
unsigned int  idlen,
unsigned char dest,
unsigned int destlen,
apr_pool_t p 
)
static

< open for r/w, create if needed

< Read by user

<

Deprecated:
See also
APR_FPROT_UREAD

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Read by group

<

Deprecated:
See also
APR_FPROT_GREAD

< Read by others

<

Deprecated:
See also
APR_FPROT_WREAD

Definition at line 304 of file mod_socache_dbm.c.

◆ socache_dbm_status()

static void socache_dbm_status ( ap_socache_instance_t ctx,
request_rec r,
int  flags 
)
static

< open for r/w, create if needed

< Read by user

<

Deprecated:
See also
APR_FPROT_UREAD

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Read by group

<

Deprecated:
See also
APR_FPROT_GREAD

< Read by others

<

Deprecated:
See also
APR_FPROT_WREAD

Definition at line 586 of file mod_socache_dbm.c.

◆ socache_dbm_store()

static apr_status_t socache_dbm_store ( ap_socache_instance_t ctx,
server_rec s,
const unsigned char id,
unsigned int  idlen,
apr_time_t  expiry,
unsigned char ucaData,
unsigned int  nData,
apr_pool_t pool 
)
static

< open for r/w, create if needed

< Read by user

<

Deprecated:
See also
APR_FPROT_UREAD

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Read by group

<

Deprecated:
See also
APR_FPROT_GREAD

< Read by others

<

Deprecated:
See also
APR_FPROT_WREAD

Definition at line 211 of file mod_socache_dbm.c.

Variable Documentation

◆ aplog_module_index

int* const aplog_module_index = &( socache_dbm_module.module_index)
static

Definition at line 760 of file mod_socache_dbm.c.

◆ socache_dbm

const ap_socache_provider_t socache_dbm
static
Initial value:
= {
"dbm",
(0x0001) ,
}
static apr_status_t socache_dbm_iterate(ap_socache_instance_t *ctx, server_rec *s, void *userctx, ap_socache_iterator_t *iterator, apr_pool_t *pool)
static apr_status_t socache_dbm_store(ap_socache_instance_t *ctx, server_rec *s, const unsigned char *id, unsigned int idlen, apr_time_t expiry, unsigned char *ucaData, unsigned int nData, apr_pool_t *pool)
static apr_status_t socache_dbm_retrieve(ap_socache_instance_t *ctx, server_rec *s, const unsigned char *id, unsigned int idlen, unsigned char *dest, unsigned int *destlen, apr_pool_t *p)
static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx, const char *namespace, const struct ap_socache_hints *hints, server_rec *s, apr_pool_t *p)
static void socache_dbm_destroy(ap_socache_instance_t *ctx, server_rec *s)
static const char * socache_dbm_create(ap_socache_instance_t **context, const char *arg, apr_pool_t *tmp, apr_pool_t *p)
static void socache_dbm_status(ap_socache_instance_t *ctx, request_rec *r, int flags)
static apr_status_t socache_dbm_remove(ap_socache_instance_t *ctx, server_rec *s, const unsigned char *id, unsigned int idlen, apr_pool_t *p)

Definition at line 740 of file mod_socache_dbm.c.