Expand description
§libipinfo
IP information library for Nullnet.
It allows specifying one or more IP information providers and querying them for information about an IP address.
Providers can be of two types:
- API providers, queried by making an HTTP request to a specific URL
- MMDB providers: queried by looking up the IP address in a database
This library also exposes a way to configure the JSON schema for the responses of the API providers, and permits to download and periodically refresh MMDB databases.
The library internally uses a fallback provider (free databases from dp-ip.com) so that it’s able to return information even if the user specifies no providers.
Structs§
- ApiFields
- Struct to map the field names that can be extracted from the response of a given API provider.
- IpInfo
- Struct to hold information about an IP address.
- IpInfo
Handler - The main struct for handling IP information lookups.
- IpInfo
Provider - An IP information provider.
Functions§
- get_
ip_ to_ lookup - Returns the IP address to use for the lookup.