fred-mod-eppd
|
#include "mod_eppd.h"
#include "epp-client.h"
#include "epp_common.h"
#include "epp_gen.h"
#include "epp_parser.h"
#include "logd-client.h"
#include "xml-in-out-log.h"
#include "xml-in-out-log-details.h"
#include <http_core.h>
#include <http_log.h>
#include <httpd.h>
#include <http_config.h>
#include <http_connection.h>
#include <mod_ssl.h>
#include <apr_buckets.h>
#include <apr_file_io.h>
#include <apr_want.h>
#include <apr_general.h>
#include <apr_global_mutex.h>
#include <apr_hash.h>
#include <apr_lib.h>
#include <apr_pools.h>
#include <apr_strings.h>
#include <apr_time.h>
#include <scoreboard.h>
#include <util_filter.h>
#include <unixd.h>
#include <openssl/bio.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
#include <unistd.h>
#include <stddef.h>
Macros | |
#define | APR_WANT_BYTEFUNC |
#define | APR_WANT_STRFUNC |
#define | APR_FOPEN_READ APR_READ |
#define | client_ip(r) ((r)->remote_ip) |
#define | ap_unixd_set_global_mutex_perms unixd_set_global_mutex_perms |
#define | DEFER_MIN 0 |
#define | DEFER_MAX 10000 |
#define | EPP_HEADER_LENGTH 4 |
#define | MAX_FRAME_LENGTH 16000 |
#define | EPP_LOGD_ERRLVL EPP_ERROR |
#define | ap_log_cerror(mark, level, status, c, ...) ap_log_error(mark, level, status, (c)->base_server, __VA_ARGS__) |
Functions | |
void * | epp_calloc (void *pool, unsigned size) |
char * | epp_strdup (void *pool, const char *str) |
char * | epp_strcat (void *pool, const char *str1, const char *str2) |
char * | epp_sprintf (void *pool, const char *fmt,...) |
void | epplog (epp_context *epp_ctx, epp_loglevel level, const char *fmt,...) |
Variables | |
module AP_MODULE_DECLARE_DATA | eppd_module |
mod_eppd.c is a true heart of the epp module which is called mod_eppd.
The file contains typical apache-module-stuff (hooks, command table, configuration table, filters, ...) and manages other components which are used to parse/generate xml and call corba functions. There are good reasons for parting the module in several components:
This file uses three interfaces in order to get work done.
In addition the module uses openssl library to compute x509 certificate fingerprint which is used when authenticating client.
The task of this module is to handle any incomming request if epp engine is turned on. It is a translator from xml to corba function calls. Request processing consists of three stages:
General information concerning configuration and installation of mod_eppd module can be found in README file.
#define APR_FOPEN_READ APR_READ |
define which overcomes subtle difference between apache 2.0 and 2.2.
#define DEFER_MIN 0 |
Min and max time values (in msec) for deferring error responses
#define EPP_HEADER_LENGTH 4 |
Length of EPP header containing message size.
#define EPP_LOGD_ERRLVL EPP_ERROR |
Many errors in logging will be logged to epplog with this severity, If logging is mandatory, it should be rised much higher than EPP_DEBUG
#define MAX_FRAME_LENGTH 16000 |
If client claims in EPP header that he is sending message which is longer than this number of bytes, the message is omitted. It is also a limit for maximal xml document length sent to CR to be saved.
void epplog | ( | epp_context * | epp_ctx, |
epp_loglevel | level, | ||
const char * | fmt, | ||
... | |||
) |
Write a log message to eppd log file.
epp_ctx | EPP context structure (connection, pool and session id). |
level | Log level. |
fmt | Printf-style format string. |
module AP_MODULE_DECLARE_DATA eppd_module |
eppd_module definition.