Apache HTTPD
Classes | Macros | Typedefs | Functions | Variables
mod_example_hooks.c File Reference
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#include "http_log.h"
#include "http_main.h"
#include "http_protocol.h"
#include "http_request.h"
#include "util_script.h"
#include "http_connection.h"
#include "scoreboard.h"
#include "mpm_common.h"
#include "apr_strings.h"
#include <stdio.h>

Go to the source code of this file.

Classes

struct  x_cfg
 

Macros

#define CONFIG_MODE_SERVER   1
 
#define CONFIG_MODE_DIRECTORY   2
 
#define CONFIG_MODE_COMBO   3 /* Shouldn't ever happen. */
 
#define EXAMPLE_LOG_EACH   0
 
#define TRACE_NOTE   "example-hooks-trace"
 
#define CONN_NOTE   "example-hooks-connection"
 

Typedefs

typedef struct x_cfg x_cfg
 

Functions

static x_cfgour_dconfig (const request_rec *r)
 
static x_cfgour_cconfig (const conn_rec *c)
 
static void trace_startup (apr_pool_t *p, server_rec *s, x_cfg *mconfig, const char *note)
 
static void trace_request (const request_rec *r, const char *note)
 
static void trace_connection (conn_rec *c, const char *note)
 
static void trace_nocontext (apr_pool_t *p, const char *file, int line, const char *note)
 
static const charcmd_example (cmd_parms *cmd, void *mconfig)
 
static void * x_create_dir_config (apr_pool_t *p, char *dirspec)
 
static void * x_merge_dir_config (apr_pool_t *p, void *parent_conf, void *newloc_conf)
 
static void * x_create_server_config (apr_pool_t *p, server_rec *s)
 
static void * x_merge_server_config (apr_pool_t *p, void *server1_conf, void *server2_conf)
 
static int x_pre_config (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
 
static int x_check_config (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 
static void x_test_config (apr_pool_t *pconf, server_rec *s)
 
static int x_open_logs (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 
static int x_post_config (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 
static apr_status_t x_child_exit (void *data)
 
static void x_child_init (apr_pool_t *p, server_rec *s)
 
static const charx_http_scheme (const request_rec *r)
 
static apr_port_t x_default_port (const request_rec *r)
 
static void x_insert_filter (request_rec *r)
 
static void x_insert_error_filter (request_rec *r)
 
static int x_handler (request_rec *r)
 
static int x_quick_handler (request_rec *r, int lookup_uri)
 
static int x_pre_connection (conn_rec *c, void *csd)
 
static int x_process_connection (conn_rec *c)
 
static void x_pre_read_request (request_rec *r, conn_rec *c)
 
static int x_post_read_request (request_rec *r)
 
static int x_pre_translate_name (request_rec *r)
 
static int x_translate_name (request_rec *r)
 
static int x_map_to_storage (request_rec *r)
 
static int x_header_parser (request_rec *r)
 
static int x_check_access (request_rec *r)
 
static int x_check_authn (request_rec *r)
 
static int x_check_authz (request_rec *r)
 
static int x_type_checker (request_rec *r)
 
static int x_fixups (request_rec *r)
 
static int x_log_transaction (request_rec *r)
 
static conn_recx_create_connection (apr_pool_t *p, server_rec *server, apr_socket_t *csd, long conn_id, void *sbh, apr_bucket_alloc_t *alloc)
 
static int x_get_mgmt_items (apr_pool_t *p, const char *val, apr_hash_t *ht)
 
static int x_create_request (request_rec *r)
 
static int x_pre_mpm (apr_pool_t *p, ap_scoreboard_e sb_type)
 
static int x_monitor (apr_pool_t *p, server_rec *s)
 
static void x_register_hooks (apr_pool_t *p)
 

Variables

static const chartrace = NULL
 
static const command_rec x_cmds []
 
static int *const aplog_module_index = &( example_hooks_module.module_index)
 

Macro Definition Documentation

◆ CONFIG_MODE_COMBO

#define CONFIG_MODE_COMBO   3 /* Shouldn't ever happen. */

Definition at line 113 of file mod_example_hooks.c.

◆ CONFIG_MODE_DIRECTORY

#define CONFIG_MODE_DIRECTORY   2

Definition at line 112 of file mod_example_hooks.c.

◆ CONFIG_MODE_SERVER

#define CONFIG_MODE_SERVER   1

Definition at line 111 of file mod_example_hooks.c.

◆ CONN_NOTE

#define CONN_NOTE   "example-hooks-connection"

Definition at line 438 of file mod_example_hooks.c.

◆ EXAMPLE_LOG_EACH

#define EXAMPLE_LOG_EACH   0

Definition at line 324 of file mod_example_hooks.c.

◆ TRACE_NOTE

#define TRACE_NOTE   "example-hooks-trace"

Definition at line 392 of file mod_example_hooks.c.

Typedef Documentation

◆ x_cfg

Function Documentation

◆ cmd_example()

static const char * cmd_example ( cmd_parms cmd,
void *  mconfig 
)
static

Definition at line 523 of file mod_example_hooks.c.

◆ our_cconfig()

static x_cfg * our_cconfig ( const conn_rec c)
static

Definition at line 312 of file mod_example_hooks.c.

◆ our_dconfig()

static x_cfg * our_dconfig ( const request_rec r)
static

Definition at line 281 of file mod_example_hooks.c.

◆ trace_connection()

static void trace_connection ( conn_rec c,
const char note 
)
static

Definition at line 440 of file mod_example_hooks.c.

◆ trace_nocontext()

static void trace_nocontext ( apr_pool_t p,
const char file,
int  line,
const char note 
)
static

Definition at line 484 of file mod_example_hooks.c.

◆ trace_request()

static void trace_request ( const request_rec r,
const char note 
)
static

Definition at line 394 of file mod_example_hooks.c.

◆ trace_startup()

static void trace_startup ( apr_pool_t p,
server_rec s,
x_cfg mconfig,
const char note 
)
static

Definition at line 349 of file mod_example_hooks.c.

◆ x_check_access()

static int x_check_access ( request_rec r)
static

< Module declines to handle

Definition at line 1255 of file mod_example_hooks.c.

◆ x_check_authn()

static int x_check_authn ( request_rec r)
static

< Module declines to handle

Definition at line 1269 of file mod_example_hooks.c.

◆ x_check_authz()

static int x_check_authz ( request_rec r)
static

< Module declines to handle

Definition at line 1289 of file mod_example_hooks.c.

◆ x_check_config()

static int x_check_config ( apr_pool_t pconf,
apr_pool_t plog,
apr_pool_t ptemp,
server_rec s 
)
static

< Module has handled this stage.

Definition at line 760 of file mod_example_hooks.c.

◆ x_child_exit()

static apr_status_t x_child_exit ( void *  data)
static

Definition at line 830 of file mod_example_hooks.c.

◆ x_child_init()

static void x_child_init ( apr_pool_t p,
server_rec s 
)
static

Definition at line 851 of file mod_example_hooks.c.

◆ x_create_connection()

static conn_rec * x_create_connection ( apr_pool_t p,
server_rec server,
apr_socket_t csd,
long  conn_id,
void *  sbh,
apr_bucket_alloc_t alloc 
)
static

Definition at line 1369 of file mod_example_hooks.c.

◆ x_create_dir_config()

static void * x_create_dir_config ( apr_pool_t p,
char dirspec 
)
static

Definition at line 547 of file mod_example_hooks.c.

◆ x_create_request()

static int x_create_request ( request_rec r)
static

< Module declines to handle

Definition at line 1399 of file mod_example_hooks.c.

◆ x_create_server_config()

static void * x_create_server_config ( apr_pool_t p,
server_rec s 
)
static

Definition at line 636 of file mod_example_hooks.c.

◆ x_default_port()

static apr_port_t x_default_port ( const request_rec r)
static

Definition at line 903 of file mod_example_hooks.c.

◆ x_fixups()

static int x_fixups ( request_rec r)
static

< Module declines to handle

Definition at line 1322 of file mod_example_hooks.c.

◆ x_get_mgmt_items()

static int x_get_mgmt_items ( apr_pool_t p,
const char val,
apr_hash_t ht 
)
static

< Module declines to handle

Definition at line 1383 of file mod_example_hooks.c.

◆ x_handler()

static int x_handler ( request_rec r)
static

< Module declines to handle

< Module has handled this stage.

< Module has handled this stage.

Definition at line 971 of file mod_example_hooks.c.

◆ x_header_parser()

static int x_header_parser ( request_rec r)
static

< Module declines to handle

Definition at line 1236 of file mod_example_hooks.c.

◆ x_http_scheme()

static const char * x_http_scheme ( const request_rec r)
static

Definition at line 880 of file mod_example_hooks.c.

◆ x_insert_error_filter()

static void x_insert_error_filter ( request_rec r)
static

Definition at line 938 of file mod_example_hooks.c.

◆ x_insert_filter()

static void x_insert_filter ( request_rec r)
static

Definition at line 921 of file mod_example_hooks.c.

◆ x_log_transaction()

static int x_log_transaction ( request_rec r)
static

< Module declines to handle

Definition at line 1337 of file mod_example_hooks.c.

◆ x_map_to_storage()

static int x_map_to_storage ( request_rec r)
static

< Module declines to handle

Definition at line 1216 of file mod_example_hooks.c.

◆ x_merge_dir_config()

static void * x_merge_dir_config ( apr_pool_t p,
void *  parent_conf,
void *  newloc_conf 
)
static

Definition at line 590 of file mod_example_hooks.c.

◆ x_merge_server_config()

static void * x_merge_server_config ( apr_pool_t p,
void *  server1_conf,
void *  server2_conf 
)
static

Definition at line 672 of file mod_example_hooks.c.

◆ x_monitor()

static int x_monitor ( apr_pool_t p,
server_rec s 
)
static

< Module declines to handle

Definition at line 1427 of file mod_example_hooks.c.

◆ x_open_logs()

static int x_open_logs ( apr_pool_t pconf,
apr_pool_t plog,
apr_pool_t ptemp,
server_rec s 
)
static

< Module has handled this stage.

Definition at line 797 of file mod_example_hooks.c.

◆ x_post_config()

static int x_post_config ( apr_pool_t pconf,
apr_pool_t plog,
apr_pool_t ptemp,
server_rec s 
)
static

< Module has handled this stage.

Definition at line 817 of file mod_example_hooks.c.

◆ x_post_read_request()

static int x_post_read_request ( request_rec r)
static

< Module declines to handle

Definition at line 1166 of file mod_example_hooks.c.

◆ x_pre_config()

static int x_pre_config ( apr_pool_t pconf,
apr_pool_t plog,
apr_pool_t ptemp 
)
static

< Module has handled this stage.

Definition at line 739 of file mod_example_hooks.c.

◆ x_pre_connection()

static int x_pre_connection ( conn_rec c,
void *  csd 
)
static

< Module has handled this stage.

Definition at line 1115 of file mod_example_hooks.c.

◆ x_pre_mpm()

static int x_pre_mpm ( apr_pool_t p,
ap_scoreboard_e  sb_type 
)
static

< Module declines to handle

Definition at line 1415 of file mod_example_hooks.c.

◆ x_pre_read_request()

static void x_pre_read_request ( request_rec r,
conn_rec c 
)
static

Definition at line 1150 of file mod_example_hooks.c.

◆ x_pre_translate_name()

static int x_pre_translate_name ( request_rec r)
static

< Module declines to handle

Definition at line 1182 of file mod_example_hooks.c.

◆ x_process_connection()

static int x_process_connection ( conn_rec c)
static

< Module declines to handle

Definition at line 1137 of file mod_example_hooks.c.

◆ x_quick_handler()

static int x_quick_handler ( request_rec r,
int  lookup_uri 
)
static

< Module declines to handle

Definition at line 1097 of file mod_example_hooks.c.

◆ x_register_hooks()

static void x_register_hooks ( apr_pool_t p)
static

< Run access control hooks only on internal requests with configurations distinct from that of initial request

< Run access control hooks only on internal requests with configurations distinct from that of initial request

< Run access control hooks only on internal requests with configurations distinct from that of initial request

Definition at line 1465 of file mod_example_hooks.c.

◆ x_test_config()

static void x_test_config ( apr_pool_t pconf,
server_rec s 
)
static

Definition at line 778 of file mod_example_hooks.c.

◆ x_translate_name()

static int x_translate_name ( request_rec r)
static

< Module declines to handle

Definition at line 1199 of file mod_example_hooks.c.

◆ x_type_checker()

static int x_type_checker ( request_rec r)
static

< Module declines to handle

Definition at line 1306 of file mod_example_hooks.c.

Variable Documentation

◆ aplog_module_index

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

Definition at line 1543 of file mod_example_hooks.c.

◆ trace

const char* trace = NULL
static

Definition at line 126 of file mod_example_hooks.c.

◆ x_cmds

const command_rec x_cmds[]
static
Initial value:
=
{
{ "Example" , cmd_example , NULL , 2 , RAW_ARGS, "Example directive - no arguments" },
{NULL}
}
@ RAW_ARGS
Definition http_config.h:50
static const char * cmd_example(cmd_parms *cmd, void *mconfig)
return NULL
Definition mod_so.c:359

Definition at line 1522 of file mod_example_hooks.c.