Library for the MaxMind DB and GeoIP2 file formats (source files)
The libmaxminddb library is a C library for reading MaxMind DB files, including the GeoIP2 databases from MaxMind. This is a custom binary format designed to facilitate fast lookups of IP addresses while allowing for great flexibility in the type of data associated with an address.
The libmaxminddb library comes with a command line utility, mmdblookup, which allows to look up an IP address in a GeoIP2 or MaxMind DB file. The geoipupdate tool, available in a separate package, allows to download such files.