Main Page | Modules | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

mod_log_forensic.c File Reference

#include "httpd.h"
#include "http_config.h"
#include "http_log.h"
#include "apr_strings.h"
#include "apr_atomic.h"
#include "http_protocol.h"
#include "test_char.h"

Include dependency graph for mod_log_forensic.c:

Go to the source code of this file.

Typedefs

typedef fcfg fcfg
typedef hlog hlog

Functions

static void * make_forensic_log_scfg (apr_pool_t *p, server_rec *s)
static void * merge_forensic_log_scfg (apr_pool_t *p, void *parent, void *new)
static int open_log (server_rec *s, apr_pool_t *p)
static int log_init (apr_pool_t *pc, apr_pool_t *p, apr_pool_t *pt, server_rec *s)
static char * log_escape (char *q, const char *e, const char *p)
static int count_string (const char *p)
static int count_headers (void *h_, const char *key, const char *value)
static int log_headers (void *h_, const char *key, const char *value)
static int log_before (request_rec *r)
static int log_after (request_rec *r)
static const char * set_forensic_log (cmd_parms *cmd, void *dummy, const char *fn)
static void register_hooks (apr_pool_t *p)

Variables

module AP_MODULE_DECLARE_DATA log_forensic_module
static const command_rec forensic_log_cmds []


Typedef Documentation

typedef struct fcfg fcfg
 

typedef struct hlog hlog
 


Function Documentation

static int count_headers void *  h_,
const char *  key,
const char *  value
[static]
 

Definition at line 156 of file mod_log_forensic.c.

References hlog::count, count_string(), and h.

Referenced by log_before().

Here is the call graph for this function:

static int count_string const char *  p  )  [static]
 

Definition at line 146 of file mod_log_forensic.c.

References n, and T_ESCAPE_FORENSIC.

Referenced by count_headers(), and log_before().

static int log_after request_rec r  )  [static]
 

Definition at line 231 of file mod_log_forensic.c.

References ap_assert, ap_get_module_config, APR_SUCCESS, DECLINED, fcfg::fd, log_forensic_module, server_rec::module_config, n, NULL, OK, request_rec::pool, request_rec::request_config, s, and request_rec::server.

Referenced by register_hooks().

static int log_before request_rec r  )  [static]
 

Definition at line 179 of file mod_log_forensic.c.

References ap_assert, ap_get_module_config, ap_set_module_config, APLOG_ERR, APLOG_MARK, APR_SUCCESS, hlog::count, count_headers(), count_string(), DECLINED, hlog::end, fcfg::fd, h, request_rec::headers_in, hlog::log, log_escape(), log_forensic_module, log_headers(), server_rec::module_config, n, request_rec::notes, NULL, OK, hlog::p, request_rec::pool, hlog::pos, request_rec::prev, request_rec::request_config, request_rec::server, request_rec::subprocess_env, and request_rec::the_request.

Referenced by register_hooks().

Here is the call graph for this function:

static char* log_escape char *  q,
const char *  e,
const char *  p
[static]
 

Definition at line 119 of file mod_log_forensic.c.

References ap_assert, and T_ESCAPE_FORENSIC.

Referenced by log_before(), and log_headers().

static int log_headers void *  h_,
const char *  key,
const char *  value
[static]
 

Definition at line 165 of file mod_log_forensic.c.

References hlog::end, h, log_escape(), and hlog::pos.

Referenced by log_before().

Here is the call graph for this function:

static int log_init apr_pool_t pc,
apr_pool_t p,
apr_pool_t pt,
server_rec s
[static]
 

Definition at line 103 of file mod_log_forensic.c.

References HTTP_INTERNAL_SERVER_ERROR, server_rec::next, OK, and open_log().

Referenced by register_hooks().

Here is the call graph for this function:

static void* make_forensic_log_scfg apr_pool_t p,
server_rec s
[static]
 

Definition at line 46 of file mod_log_forensic.c.

References apr_pcalloc, and NULL.

static void* merge_forensic_log_scfg apr_pool_t p,
void *  parent,
void *  new
[static]
 

Definition at line 56 of file mod_log_forensic.c.

References apr_pcalloc, fcfg::logname, and NULL.

static int open_log server_rec s,
apr_pool_t p
[static]
 

Definition at line 68 of file mod_log_forensic.c.

References ap_get_module_config, ap_piped_log_write_fd, APLOG_ERR, APLOG_MARK, APR_APPEND, APR_CREATE, APR_OS_DEFAULT, APR_SUCCESS, APR_WRITE, fcfg::fd, fname, log_forensic_module, fcfg::logname, server_rec::module_config, and NULL.

Referenced by log_init().

static void register_hooks apr_pool_t p  )  [static]
 

Definition at line 269 of file mod_log_forensic.c.

References APR_HOOK_MIDDLE, APR_HOOK_REALLY_FIRST, APR_HOOK_REALLY_LAST, log_after(), log_before(), log_init(), and NULL.

Here is the call graph for this function:

static const char* set_forensic_log cmd_parms cmd,
void *  dummy,
const char *  fn
[static]
 

Definition at line 253 of file mod_log_forensic.c.

References ap_get_module_config, log_forensic_module, fcfg::logname, server_rec::module_config, NULL, and cmd_parms_struct::server.


Variable Documentation

const command_rec forensic_log_cmds[] [static]
 

Initial value:

{
    AP_INIT_TAKE1("ForensicLog",  set_forensic_log,  NULL,  RSRC_CONF,
                  "the filename of the forensic log"),
    { NULL }
}

Definition at line 262 of file mod_log_forensic.c.

module AP_MODULE_DECLARE_DATA log_forensic_module
 

Initial value:

Definition at line 278 of file mod_log_forensic.c.

Referenced by log_after(), log_before(), open_log(), and set_forensic_log().