MySQL 8.0.39
Source Code Documentation
Host_entry Class Reference

An entry in the hostname hash table cache. More...

#include <hostname_cache.h>

Public Member Functions

void set_error_timestamps (ulonglong now)
 

Public Attributes

char ip_key [HOST_ENTRY_KEY_SIZE]
 Client IP address. More...
 
char m_hostname [HOSTNAME_LENGTH+1]
 One of the host names for the IP address. More...
 
uint m_hostname_length
 Length in bytes of m_hostname. More...
 
bool m_host_validated
 The hostname is validated and used for authorization. More...
 
ulonglong m_first_seen
 
ulonglong m_last_seen
 
ulonglong m_first_error_seen
 
ulonglong m_last_error_seen
 
Host_errors m_errors
 Error statistics. More...
 

Detailed Description

An entry in the hostname hash table cache.

Host name cache does two things:

  • caches host names to save DNS look ups;
  • counts errors from IP.

Host name can be empty (that means DNS look up failed), but errors still are counted.

Member Function Documentation

◆ set_error_timestamps()

void Host_entry::set_error_timestamps ( ulonglong  now)
inline

Member Data Documentation

◆ ip_key

char Host_entry::ip_key[HOST_ENTRY_KEY_SIZE]

Client IP address.

This is the key used with the hash table.

The client IP address is always expressed in IPv6, even when the network IPv6 stack is not present.

This IP address is never used to connect to a socket.

◆ m_errors

Host_errors Host_entry::m_errors

Error statistics.

◆ m_first_error_seen

ulonglong Host_entry::m_first_error_seen

◆ m_first_seen

ulonglong Host_entry::m_first_seen

◆ m_host_validated

bool Host_entry::m_host_validated

The hostname is validated and used for authorization.

◆ m_hostname

char Host_entry::m_hostname[HOSTNAME_LENGTH+1]

One of the host names for the IP address.

May be a zero length string.

◆ m_hostname_length

uint Host_entry::m_hostname_length

Length in bytes of m_hostname.

◆ m_last_error_seen

ulonglong Host_entry::m_last_error_seen

◆ m_last_seen

ulonglong Host_entry::m_last_seen

The documentation for this class was generated from the following file: