#include <I_HostDBProcessor.h>
Public Member Functions | |
sockaddr * | ip () |
Internal IP address data. | |
sockaddr const * | ip () const |
char * | hostname () |
char * | srvname (HostDBRoundRobin *rr) |
HostDBRoundRobin * | rr () |
void | bad () |
Indicate that the HostDBInfo is BAD and should be deleted. | |
unsigned int | ip_interval () |
int | ip_time_remaining () |
bool | is_ip_stale () |
bool | is_ip_timeout () |
bool | is_ip_fail_timeout () |
void | refresh_ip () |
bool | serve_stale_but_revalidate () |
bool | failed () |
void | set_failed () |
void | set_deleted () |
bool | is_deleted () const |
bool | is_empty () const |
void | set_empty () |
void | set_full (uint64_t folded_md5, int buckets) |
void | reset () |
uint64_t | tag () |
bool | match (INK_MD5 &, int, int) |
int | heap_size () |
int * | heap_offset_ptr () |
Data Fields | |
HostDBApplicationInfo | app |
Application specific data. | |
union { | |
IpEndpoint ip | |
IP address / port data. | |
int hostname_offset | |
Some hostname thing. | |
SRVInfo srv | |
} | data |
unsigned int | ip_timestamp |
unsigned int | ip_timeout_interval:31 |
unsigned int | full:1 |
unsigned int | backed:1 |
unsigned int | deleted:1 |
unsigned int | hits:3 |
unsigned int | is_srv:1 |
unsigned int | round_robin:1 |
unsigned int | reverse_dns:1 |
unsigned int | md5_low_low:24 |
unsigned int | md5_low |
uint64_t | md5_high |
Definition at line 149 of file I_HostDBProcessor.h.
void HostDBInfo::bad | ( | ) | [inline] |
Indicate that the HostDBInfo is BAD and should be deleted.
Definition at line 162 of file I_HostDBProcessor.h.
References full.
bool HostDBInfo::failed | ( | ) | [inline] |
Definition at line 248 of file I_HostDBProcessor.h.
References ats_is_ip(), data, ip(), is_srv, and reverse_dns.
Referenced by HostDBProcessor::getbyname_imm(), probe(), HttpSM::process_hostdb_info(), and reply_to_cont().
int * HostDBInfo::heap_offset_ptr | ( | ) |
Definition at line 2208 of file HostDB.cc.
References app, data, HostDBApplicationInfo::application_data_rr::offset, reverse_dns, round_robin, and HostDBApplicationInfo::rr.
int HostDBInfo::heap_size | ( | ) |
Definition at line 2190 of file HostDB.cc.
References hostname(), HostDBRoundRobin::length, reverse_dns, round_robin, and rr().
char * HostDBInfo::hostname | ( | ) |
Definition at line 2164 of file HostDB.cc.
References data, MultiCacheBase::ptr(), MultiCacheBase::ptr_to_partition(), and reverse_dns.
Referenced by heap_size(), HostDBTestReverse::mainEvent(), probe(), reply_to_cont(), and ShowHostDB::showOne().
sockaddr const* HostDBInfo::ip | ( | ) | const [inline] |
Definition at line 155 of file I_HostDBProcessor.h.
References data.
sockaddr* HostDBInfo::ip | ( | ) | [inline] |
Internal IP address data.
This is at least large enough to hold an IPv6 address.
Definition at line 154 of file I_HostDBProcessor.h.
References data.
Referenced by failed(), reset(), and set_failed().
unsigned int HostDBInfo::ip_interval | ( | ) | [inline] |
Definition at line 172 of file I_HostDBProcessor.h.
References hostdb_current_interval, and ip_timestamp.
Referenced by is_ip_fail_timeout(), is_ip_stale(), is_ip_timeout(), probe(), and serve_stale_but_revalidate().
int HostDBInfo::ip_time_remaining | ( | ) | [inline] |
Definition at line 177 of file I_HostDBProcessor.h.
References hostdb_current_interval, ip_timeout_interval, and ip_timestamp.
Referenced by HostDBContinuation::make_put_message(), and ShowHostDB::showOne().
bool HostDBInfo::is_deleted | ( | ) | const [inline] |
bool HostDBInfo::is_empty | ( | ) | const [inline] |
Definition at line 263 of file I_HostDBProcessor.h.
References full.
bool HostDBInfo::is_ip_fail_timeout | ( | ) | [inline] |
Definition at line 193 of file I_HostDBProcessor.h.
References hostdb_ip_fail_timeout_interval, and ip_interval().
Referenced by probe().
bool HostDBInfo::is_ip_stale | ( | ) | [inline] |
Definition at line 182 of file I_HostDBProcessor.h.
References hostdb_ip_stale_interval, ip_interval(), and ip_timeout_interval.
Referenced by probe(), and ShowHostDB::showOne().
bool HostDBInfo::is_ip_timeout | ( | ) | [inline] |
Definition at line 189 of file I_HostDBProcessor.h.
References ip_interval(), and ip_timeout_interval.
Referenced by probe(), HostDBCache::rebuild_callout(), and ShowHostDB::showOne().
bool HostDBInfo::match | ( | INK_MD5 & | md5, | |
int | , | |||
int | buckets | |||
) |
Definition at line 2139 of file HostDB.cc.
References fold_md5(), md5_high, md5_low, and md5_low_low.
void HostDBInfo::refresh_ip | ( | ) | [inline] |
Definition at line 197 of file I_HostDBProcessor.h.
References hostdb_current_interval, and ip_timestamp.
Referenced by probe().
void HostDBInfo::reset | ( | ) | [inline] |
Definition at line 284 of file I_HostDBProcessor.h.
References HostDBApplicationInfo::allotment, app, HostDBApplicationInfo::application_data_allotment::application1, HostDBApplicationInfo::application_data_allotment::application2, ats_ip_invalidate(), backed, deleted, hits, ip(), is_srv, reverse_dns, and round_robin.
HostDBRoundRobin * HostDBInfo::rr | ( | ) |
Definition at line 2174 of file HostDB.cc.
References app, HostDBRoundRobin::good, HOST_DB_MAX_ROUND_ROBIN_INFO, ink_assert, HostDBApplicationInfo::application_data_rr::offset, MultiCacheBase::ptr(), MultiCacheBase::ptr_to_partition(), round_robin, HostDBApplicationInfo::rr, and HostDBRoundRobin::rrcount.
Referenced by HostDBContinuation::dnsEvent(), do_setby(), heap_size(), HttpTransact::OSDNSLookup(), probe(), HttpSM::process_hostdb_info(), HttpSM::process_srv_info(), remove_round_robin(), reply_to_cont(), ShowHostDB::showLookupDone(), and HttpSM::state_mark_os_down().
bool HostDBInfo::serve_stale_but_revalidate | ( | ) | [inline] |
Definition at line 202 of file I_HostDBProcessor.h.
References Debug, hostdb_serve_stale_but_revalidate, ip_interval(), and ip_timeout_interval.
Referenced by probe().
void HostDBInfo::set_deleted | ( | ) | [inline] |
Definition at line 260 of file I_HostDBProcessor.h.
References deleted.
void HostDBInfo::set_empty | ( | ) | [inline] |
Definition at line 265 of file I_HostDBProcessor.h.
References full, md5_high, md5_low, and md5_low_low.
void HostDBInfo::set_failed | ( | ) | [inline] |
Definition at line 251 of file I_HostDBProcessor.h.
References ats_ip_invalidate(), data, ip(), is_srv, and reverse_dns.
Referenced by HostDBContinuation::lookup_done().
void HostDBInfo::set_full | ( | uint64_t | folded_md5, | |
int | buckets | |||
) | [inline] |
Definition at line 273 of file I_HostDBProcessor.h.
References full, md5_low, and md5_low_low.
char * HostDBInfo::srvname | ( | HostDBRoundRobin * | rr | ) |
Definition at line 70 of file HostDB.cc.
References data, HostDBRoundRobin::info, ink_assert, is_srv, HostDBRoundRobin::length, and HostDBRoundRobin::rrcount.
Referenced by HostDBContinuation::dnsEvent(), do_setby(), and HostDBRoundRobin::select_best_srv().
uint64_t HostDBInfo::tag | ( | ) | [inline] |
Definition at line 297 of file I_HostDBProcessor.h.
References md5_low, and md5_low_low.
Application specific data.
NOTE: We need an integral number of these per block. This structure is 32 bytes. (at 200k hosts = 8 Meg). Which gives us 7 bytes of application information.
Definition at line 170 of file I_HostDBProcessor.h.
Referenced by HostDBContinuation::clusterEvent(), corrupt_debugging_callout(), HostDBContinuation::dnsEvent(), HttpSM::do_hostdb_update_if_necessary(), do_setby(), HttpTransact::get_ka_info_from_host_db(), heap_offset_ptr(), HttpTransact::is_server_negative_cached(), HostDBContinuation::make_put_message(), HttpSM::mark_host_failure(), HttpSM::process_hostdb_info(), HttpSM::process_srv_info(), HostDBCache::rebuild_callout(), reset(), restore_info(), rr(), HostDBRoundRobin::select_best_http(), HostDBRoundRobin::select_best_srv(), HttpSM::set_next_state(), HttpTransact::setup_plugin_request_intercept(), and ShowHostDB::showOne().
unsigned int HostDBInfo::backed |
Definition at line 235 of file I_HostDBProcessor.h.
Referenced by reset().
union { ... } HostDBInfo::data |
unsigned int HostDBInfo::deleted |
Definition at line 236 of file I_HostDBProcessor.h.
Referenced by is_deleted(), reset(), and set_deleted().
unsigned int HostDBInfo::full |
Definition at line 234 of file I_HostDBProcessor.h.
Referenced by bad(), HostDBContinuation::dnsEvent(), is_empty(), reply_to_cont(), set_empty(), and set_full().
unsigned int HostDBInfo::hits |
Definition at line 237 of file I_HostDBProcessor.h.
Some hostname thing.
Definition at line 226 of file I_HostDBProcessor.h.
Referenced by HostDBContinuation::lookup_done(), and HostDBCache::rebuild_callout().
IP address / port data.
Definition at line 225 of file I_HostDBProcessor.h.
Referenced by TestProxy::cacheCreateCacheFileEvent(), HostDBContinuation::dnsEvent(), HttpSM::do_hostdb_update_if_necessary(), do_setby(), HostDBContinuation::lookup_done(), HostDBContinuation::make_put_message(), HttpTransact::OSDNSLookup(), HttpTransact::PPDNSLookup(), probe(), HttpSM::process_hostdb_info(), HostDBCache::rebuild_callout(), HttpTransact::ReDNSRoundRobin(), remove_round_robin(), reply_to_cont(), restore_info(), HostDBRoundRobin::select_best_http(), HttpSM::set_next_state(), ShowHostDB::showOne(), HttpSM::state_mark_os_down(), TSHostLookupResultAddrGet(), and HttpTransact::will_this_request_self_loop().
unsigned int HostDBInfo::ip_timeout_interval |
Definition at line 232 of file I_HostDBProcessor.h.
Referenced by HostDBContinuation::insert(), ip_time_remaining(), is_ip_stale(), is_ip_timeout(), probe(), and serve_stale_but_revalidate().
unsigned int HostDBInfo::ip_timestamp |
Definition at line 230 of file I_HostDBProcessor.h.
Referenced by HostDBContinuation::insert(), ip_interval(), ip_time_remaining(), probe(), and refresh_ip().
unsigned int HostDBInfo::is_srv |
Definition at line 239 of file I_HostDBProcessor.h.
Referenced by HostDBContinuation::dnsEvent(), do_setby(), failed(), HostDBContinuation::lookup_done(), HttpSM::process_srv_info(), reply_to_cont(), reset(), set_failed(), and srvname().
uint64_t HostDBInfo::md5_high |
Definition at line 246 of file I_HostDBProcessor.h.
Referenced by HostDBContinuation::dnsEvent(), HostDBContinuation::insert(), match(), probe(), HttpSM::process_srv_info(), HostDBCache::rebuild_callout(), and set_empty().
unsigned int HostDBInfo::md5_low |
Definition at line 244 of file I_HostDBProcessor.h.
Referenced by HostDBContinuation::dnsEvent(), match(), HttpSM::process_srv_info(), HostDBCache::rebuild_callout(), set_empty(), set_full(), and tag().
unsigned int HostDBInfo::md5_low_low |
Definition at line 243 of file I_HostDBProcessor.h.
Referenced by HostDBContinuation::dnsEvent(), match(), HttpSM::process_srv_info(), HostDBCache::rebuild_callout(), set_empty(), set_full(), and tag().
unsigned int HostDBInfo::reverse_dns |
Definition at line 241 of file I_HostDBProcessor.h.
Referenced by HostDBContinuation::dnsEvent(), do_setby(), failed(), heap_offset_ptr(), heap_size(), hostname(), HostDBContinuation::lookup_done(), probe(), HttpSM::process_hostdb_info(), HostDBCache::rebuild_callout(), reply_to_cont(), reset(), set_failed(), and ShowHostDB::showOne().
unsigned int HostDBInfo::round_robin |
Definition at line 240 of file I_HostDBProcessor.h.
Referenced by HostDBContinuation::dnsEvent(), HostDBContinuation::do_put_response(), do_setby(), heap_offset_ptr(), heap_size(), HostDBContinuation::lookup_done(), HostDBContinuation::make_put_message(), HttpTransact::OSDNSLookup(), HttpTransact::PPDNSLookup(), probe(), HttpSM::process_hostdb_info(), HttpSM::process_srv_info(), HostDBCache::rebuild_callout(), HttpTransact::ReDNSRoundRobin(), remove_round_robin(), reply_to_cont(), reset(), rr(), ShowHostDB::showLookupDone(), ShowHostDB::showOne(), and HttpSM::state_mark_os_down().
Definition at line 227 of file I_HostDBProcessor.h.
Referenced by HostDBContinuation::dnsEvent(), do_setby(), HostDBRoundRobin::find_target(), HostDBContinuation::lookup_done(), HttpSM::process_srv_info(), and HostDBRoundRobin::select_best_srv().