16 #ifndef HOSTNAME_INCLUDED
17 #define HOSTNAME_INCLUDED
19 #include "my_global.h"
21 #include "hash_filo.h"
76 bool has_error()
const
100 void sum_connect_errors()
106 void clear_connect_errors()
113 #define HOST_ENTRY_KEY_SIZE INET6_ADDRSTRLEN
129 {
return (
Host_entry*) hash_filo_element::next(); }
149 ulonglong m_first_seen;
150 ulonglong m_last_seen;
151 ulonglong m_first_error_seen;
152 ulonglong m_last_error_seen;
156 void set_error_timestamps(ulonglong now)
158 if (m_first_error_seen == 0)
159 m_first_error_seen= now;
160 m_last_error_seen= now;
168 #define RC_BLOCKED_HOST 1
170 const char *ip_string,
171 char **hostname, uint *connect_errors);
174 void reset_host_connect_errors(
const char *ip_string);
175 bool hostname_cache_init();
176 void hostname_cache_free();
177 void hostname_cache_refresh(
void);
178 uint hostname_cache_size();
179 void hostname_cache_resize(uint
size);
180 void hostname_cache_lock();
181 void hostname_cache_unlock();