![]()  | 
  
    MySQL 8.0.44
    
   Source Code Documentation 
   | 
 
#include "xcom/xcom_profile.h"#include <netdb.h>#include <sys/socket.h>#include <assert.h>#include <errno.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include "xcom/simset.h"#include "xcom/task.h"#include "xcom/task_debug.h"#include "xcom/task_os.h"#include "xcom/x_platform.h"#include "xcom/xcom_memory.h"#include "xdr_gen/xcom_vp.h"Classes | |
| struct | infonode | 
Macros | |
| #define | STRING_PORT_SIZE 6 | 
| #define | NR_GETADDRINFO_ATTEMPTS 10 | 
Typedefs | |
| typedef struct infonode | infonode | 
Functions | |
| int | checked_getaddrinfo (const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res) | 
| Wrapper function which retries and checks errors from getaddrinfo.  More... | |
| int | checked_getaddrinfo_port (const char *nodename, xcom_port port, const struct addrinfo *hints, struct addrinfo **res) | 
| Wrapper function to checked_getaddrinfo that accepts a numeric port.  More... | |
| void | deinit_network_cache () | 
| int | init_net () | 
| int | deinit_net () | 
| #define NR_GETADDRINFO_ATTEMPTS 10 | 
| #define STRING_PORT_SIZE 6 | 
| int checked_getaddrinfo | ( | const char * | nodename, | 
| const char * | servname, | ||
| const struct addrinfo * | hints, | ||
| struct addrinfo ** | res | ||
| ) | 
Wrapper function which retries and checks errors from getaddrinfo.
We have observed that getaddrinfo returns EAI_AGAIN when called with an unresolvable hostname on systems using systemd-resolved for DNS resolution. Therefore, we only attempt to resolve nodename up to NR_GETADDRINFO_ATTEMPTS times, to avoid getting stuck in an infinite loop.
| int checked_getaddrinfo_port | ( | const char * | nodename, | 
| xcom_port | port, | ||
| const struct addrinfo * | hints, | ||
| struct addrinfo ** | res | ||
| ) | 
Wrapper function to checked_getaddrinfo that accepts a numeric port.
| int deinit_net | ( | ) | 
| void deinit_network_cache | ( | ) | 
| int init_net | ( | ) |