15#include "ws_symbol_export.h"
92static inline bool maxmind_db_has_coords(
const mmdb_lookup_t *result)
94 return result && result->
found &&
uint32_t ws_in4_addr
Represents a 32-bit IPv4 address in network byte order.
Definition inet_addr.h:22
WS_DLL_LOCAL void maxmind_db_pref_apply(void)
Apply preferences for MaxMind database resolution.
Definition maxmind_db.c:869
WS_DLL_PUBLIC WS_RETNONNULL const mmdb_lookup_t * maxmind_db_lookup_ipv6(const ws_in6_addr *addr)
Look up an IPv6 address in a database.
WS_DLL_LOCAL void maxmind_db_pref_init(module_t *nameres)
Init / reset function called from prefs_reset.
WS_DLL_PUBLIC WS_RETNONNULL const mmdb_lookup_t * maxmind_db_lookup_ipv4(const ws_in4_addr *addr)
Look up an IPv4 address in a database.
struct _mmdb_lookup_t mmdb_lookup_t
Holds the result of a MaxMind database (MMDB) geolocation and ASN lookup for a single IP address.
WS_DLL_LOCAL void maxmind_db_pref_cleanup(void)
Cleanup function called from prefs_cleanup.
Definition maxmind_db.c:866
WS_DLL_LOCAL bool maxmind_db_lookup_process(void)
Process outstanding requests.
Definition maxmind_db.c:872
WS_DLL_PUBLIC void maxmind_db_set_synchrony(bool synchronous)
Select whether lookups should be performed synchronously.
Definition maxmind_db.c:893
WS_DLL_PUBLIC char * maxmind_db_get_paths(void)
Get all configured paths.
Definition maxmind_db.c:888
Holds the result of a MaxMind database (MMDB) geolocation and ASN lookup for a single IP address.
Definition maxmind_db.h:24
uint32_t as_number
Definition maxmind_db.h:29
const char * country_iso
Definition maxmind_db.h:27
uint16_t accuracy
Definition maxmind_db.h:33
bool found
Definition maxmind_db.h:25
double latitude
Definition maxmind_db.h:31
const char * as_org
Definition maxmind_db.h:30
const char * country
Definition maxmind_db.h:26
double longitude
Definition maxmind_db.h:32
const char * city
Definition maxmind_db.h:28
Represents a 128-bit IPv6 address.
Definition inet_addr.h:27
Represents a preference module grouping related preferences under a named, hierarchical entry in the ...
Definition prefs-int.h:27