Data Structures | Public Types | Public Member Functions | Static Public Attributes | Friends

HostDBProcessor Struct Reference

The Host Databse access interface. More...

#include <I_HostDBProcessor.h>

Inherits Processor.

Collaboration diagram for HostDBProcessor:
Collaboration graph
[legend]

Data Structures

struct  Options
 Optional parameters for getby... More...

Public Types

enum  {
  HOSTDB_DO_NOT_FORCE_DNS = 0, HOSTDB_ROUND_ROBIN = 0, HOSTDB_FORCE_DNS_RELOAD = 1, HOSTDB_FORCE_DNS_ALWAYS = 2,
  HOSTDB_DO_NOT_ROUND_ROBIN = 4
}

Public Member Functions

 HostDBProcessor ()
inkcoreapi Actiongetbyname_re (Continuation *cont, const char *hostname, int len, Options const &opt=DEFAULT_OPTIONS)
ActiongetSRVbyname_imm (Continuation *cont, process_srv_info_pfn process_srv_info, const char *hostname, int len, Options const &opt=DEFAULT_OPTIONS)
Actiongetbyname_imm (Continuation *cont, process_hostdb_info_pfn process_hostdb_info, const char *hostname, int len, Options const &opt=DEFAULT_OPTIONS)
Actiongetbyaddr_re (Continuation *cont, sockaddr const *aip)
 Lookup Hostinfo by addr.
void setbyname_appinfo (char *hostname, int len, int port, HostDBApplicationInfo *app)
 Set the application information (fire-and-forget).
void setbyaddr_appinfo (sockaddr const *addr, HostDBApplicationInfo *app)
void setbyaddr_appinfo (in_addr_t ip, HostDBApplicationInfo *app)
int start (int no_of_additional_event_threads=0, size_t stacksize=DEFAULT_STACKSIZE)
 Starts execution of the processor.
HostDBCachecache ()
void setby (const char *hostname, int len, sockaddr const *aip, HostDBApplicationInfo *app)
 Set something.
void setby_srv (const char *hostname, int len, const char *target, HostDBApplicationInfo *app)

Static Public Attributes

static Options const DEFAULT_OPTIONS
 Default options.
static int hostdb_strict_round_robin = 0
 Configuration.
static int hostdb_timed_round_robin = 0

Friends

struct HostDBSyncer

Detailed Description

The Host Databse access interface.

Definition at line 359 of file I_HostDBProcessor.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
HOSTDB_DO_NOT_FORCE_DNS 
HOSTDB_ROUND_ROBIN 
HOSTDB_FORCE_DNS_RELOAD 
HOSTDB_FORCE_DNS_ALWAYS 
HOSTDB_DO_NOT_ROUND_ROBIN 

Definition at line 372 of file I_HostDBProcessor.h.


Constructor & Destructor Documentation

HostDBProcessor::HostDBProcessor (  )  [inline]

Definition at line 398 of file I_HostDBProcessor.h.


Member Function Documentation

HostDBCache * HostDBProcessor::cache (  ) 

Definition at line 250 of file HostDB.cc.

Referenced by cmd_clear(), and HostDBSyncer::sync_event().

Action* HostDBProcessor::getbyaddr_re ( Continuation cont,
sockaddr const *  aip 
) [inline]

Lookup Hostinfo by addr.

Definition at line 415 of file I_HostDBProcessor.h.

References HOST_RES_NONE.

Referenced by HttpSM::do_hostdb_reverse_lookup(), HostDBTestReverse::mainEvent(), and ShowHostDB::showLookup().

Action * HostDBProcessor::getbyname_imm ( Continuation cont,
process_hostdb_info_pfn  process_hostdb_info,
const char *  hostname,
int  len,
Options const &  opt = DEFAULT_OPTIONS 
)
Action * HostDBProcessor::getbyname_re ( Continuation cont,
const char *  hostname,
int  len,
Options const &  opt = DEFAULT_OPTIONS 
)
Action * HostDBProcessor::getSRVbyname_imm ( Continuation cont,
process_srv_info_pfn  process_srv_info,
const char *  hostname,
int  len,
Options const &  opt = DEFAULT_OPTIONS 
)
void HostDBProcessor::setby ( const char *  hostname,
int  len,
sockaddr const *  aip,
HostDBApplicationInfo app 
)
void HostDBProcessor::setby_srv ( const char *  hostname,
int  len,
const char *  target,
HostDBApplicationInfo app 
)
void HostDBProcessor::setbyaddr_appinfo ( in_addr_t  ip,
HostDBApplicationInfo app 
) [inline]

Definition at line 447 of file I_HostDBProcessor.h.

References ats_ip4_set(), ats_ip_sa_cast(), and setby().

void HostDBProcessor::setbyaddr_appinfo ( sockaddr const *  addr,
HostDBApplicationInfo app 
) [inline]

Definition at line 443 of file I_HostDBProcessor.h.

References setby().

void HostDBProcessor::setbyname_appinfo ( char *  hostname,
int  len,
int  port,
HostDBApplicationInfo app 
) [inline]

Set the application information (fire-and-forget).

Definition at line 436 of file I_HostDBProcessor.h.

References ats_ip4_set(), ats_ip_sa_cast(), and setby().

int HostDBProcessor::start ( int  number_of_threads = 0,
size_t  stacksize = DEFAULT_STACKSIZE 
) [virtual]

Friends And Related Function Documentation

friend struct HostDBSyncer [friend]

Definition at line 361 of file I_HostDBProcessor.h.


Field Documentation

Default options.

Definition at line 396 of file I_HostDBProcessor.h.

Configuration.

Definition at line 455 of file I_HostDBProcessor.h.

Referenced by HostDBRoundRobin::select_best_http(), and start().

Definition at line 456 of file I_HostDBProcessor.h.

Referenced by HostDBRoundRobin::select_best_http(), and start().


The documentation for this struct was generated from the following files: