fred-mod-whoisd
Classes | Macros | Typedefs | Functions | Variables
/build/mod-whoisd-3.15.0/mod_whoisd.c File Reference
#include "httpd.h"
#include "http_log.h"
#include "http_config.h"
#include "http_connection.h"
#include "apr.h"
#include "apr_buckets.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_lib.h"
#include "apr_pools.h"
#include "apr_strings.h"
#include "apr_time.h"
#include "apr_hash.h"
#include "apr_getopt.h"
#include "apr_want.h"
#include "scoreboard.h"
#include "util_filter.h"
#include "whois-client.h"
#include <assert.h>
Include dependency graph for mod_whoisd.c:

Classes

struct  KeyValueList
 
struct  whoisd_server_conf
 

Macros

#define CORE_PRIVATE
 
#define APR_FOPEN_READ   APR_READ
 
#define APR_WANT_STRFUNC
 
#define client_ip(r)   ((r)->remote_ip)
 
#define ap_unixd_set_global_mutex_perms   unixd_set_global_mutex_perms
 
#define DEFAULT_DISCLAIMER   "Domain Information over Whois protocol\n"
 
#define INT_ERROR_MSG   "Internal error occured when processing your \request.\nPlease try again later.\n"
 
#define MAXARGS   20
 
#define MAXTYPELEN   15
 
#define MAXAXELEN   15
 
#define MAXQPARLEN   15
 
#define MIN_WHOIS_REQUEST_LENGTH   1
 
#define MAX_WHOIS_REQUEST_LENGTH   1000
 
#define BLACKLIST_BLOCK_REQUESTED_BY_MESSAGES_MAX   100
 
#define ap_log_cerror(mark, level, status, c, ...)   ap_log_error(mark, level, status, (c)->base_server, __VA_ARGS__)
 
#define IS_SEARCH_SET(wr)   ((wr)->axe || (wr)->norecursion || (wr)->type)
 
#define SAFE_PRINTF(fmt, str)   if (str != NULL) apr_brigade_printf(bb, NULL, NULL, fmt, str);
 
#define SAFE_PRINTF(fmt, str)   if (str != NULL) apr_brigade_printf(bb, NULL, NULL, fmt, str);
 
#define SAFE_PRINTF(fmt, str)   if (str != NULL) apr_brigade_printf(bb, NULL, NULL, fmt, str);
 
#define SAFE_PRINTF(fmt, str)   if (str != NULL) apr_brigade_printf(bb, NULL, NULL, fmt, str);
 
#define SAFE_PRINTF(fmt, str)   if (str != NULL) apr_brigade_printf(bb, NULL, NULL, fmt, str);
 

Typedefs

typedef struct KeyValueList KeyValueList
 

Functions

KeyValueListkey_value_list_create (apr_pool_t *p, const char *key, const char *value)
 
void key_value_list_append (KeyValueList *list, KeyValueList *tail)
 
void whois_log_status (conn_rec *c, service_Logger service, const char *content, ccReg_RequestProperties *properties, ccReg_TID log_entry_id, CORBA_long result_code)
 

Variables

module AP_MODULE_DECLARE_DATA whoisd_module
 

Detailed Description

Module implementing whois service.

Whois daemon accepts requests containing object name and returns information about that object. The only object, which this server serves information about, is currently a domain.

The module serves only as a proxy, translating whois requests to CORBA requests and back. CORBA functionality is implemented in whois-client.c.

Macro Definition Documentation

◆ ap_log_cerror

#define ap_log_cerror (   mark,
  level,
  status,
  c,
  ... 
)    ap_log_error(mark, level, status, (c)->base_server, __VA_ARGS__)

This is wrapper function for compatibility reason. Apache 2.0 does not have ap_log_cerror, instead we will use ap_log_error.

◆ DEFAULT_DISCLAIMER

#define DEFAULT_DISCLAIMER   "Domain Information over Whois protocol\n"

This default disclaimer should never be used in production release.

◆ INT_ERROR_MSG

#define INT_ERROR_MSG   "Internal error occured when processing your \request.\nPlease try again later.\n"

Message displayed bellow disclaimer when query cannot be answered becauseof an error.

◆ IS_SEARCH_SET

#define IS_SEARCH_SET (   wr)    ((wr)->axe || (wr)->norecursion || (wr)->type)

checks if there is any kind of search set in the query

◆ MAX_WHOIS_REQUEST_LENGTH

#define MAX_WHOIS_REQUEST_LENGTH   1000

Maximal length of input line.

◆ MAXARGS

#define MAXARGS   20

Maximal number of whois arguments.

◆ MAXAXELEN

#define MAXAXELEN   15

Maximal length of search axe identifier.

◆ MAXQPARLEN

#define MAXQPARLEN   15

Maximal length of -q parameter.

◆ MAXTYPELEN

#define MAXTYPELEN   15

Maximal length of object type identifier.

◆ MIN_WHOIS_REQUEST_LENGTH

#define MIN_WHOIS_REQUEST_LENGTH   1

Minimal length of input line.

Variable Documentation

◆ whoisd_module

module AP_MODULE_DECLARE_DATA whoisd_module
Initial value:
= {
STANDARD20_MODULE_STUFF,
NULL,
NULL,
create_whoisd_config,
NULL,
whoisd_cmds,
register_hooks,
0
}

Whois module declaration.

Definition of whoisd module.