Giter Club home page Giter Club logo

libmaxminddb's Introduction

About

The libmaxminddb library provides 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 MaxMind DB format is an open format. The spec is available at https://maxmind.github.io/MaxMind-DB/. This spec is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.

See https://dev.maxmind.com/ for more details about MaxMind's GeoIP2 products.

License

This library is licensed under the Apache License, Version 2.

Installation

From a Named Release Tarball

NOTE: These instructions are for installation from the named .tar.gz tarballs on the Releases page (e.g. libmaxminddb-*.tar.gz).

This code is known to work with GCC 4.4+ and clang 3.2+. It should also work on other compilers that supports C99, POSIX.1-2001, and the -fms-extensions flag (or equivalent). The latter is needed to allow an anonymous union in a structure.

To install this code, run the following commands:

$ ./configure
$ make
$ make check
$ sudo make install
$ sudo ldconfig

You can skip the make check step but it's always good to know that tests are passing on your platform.

The configure script takes the standard options to set where files are installed such as --prefix, etc. See ./configure --help for details.

If after installing, you receive an error that libmaxminddb.so.0 is missing you may need to add the lib directory in your prefix to your library path. On most Linux distributions when using the default prefix (/usr/local), you can do this by running the following commands:

$ sudo sh -c "echo /usr/local/lib  >> /etc/ld.so.conf.d/local.conf"
$ ldconfig

From a GitHub "Source Code" Archive / Git Repo Clone (Achtung!)

NOTE: These instructions are for installation from the GitHub "Source Code" archives also available on the Releases page (e.g. X.Y.Z.zip or X.Y.Z.tar.gz), as well as installation directly from a clone of the Git repo. Installation from these sources are possible but will present challenges to users not comfortable with manual dependency resolution.

You will need automake, autoconf, and libtool installed in addition to make and a compiler.

You can clone this repository and build it by running:

$ git clone --recursive https://github.com/maxmind/libmaxminddb

After cloning, run ./bootstrap from the libmaxminddb directory and then follow the instructions for installing from a named release tarball as described above.

Using CMake

We provide a CMake build script. This is primarily targeted at Windows users, but it can be used in other circumstances where the Autotools script does not work.

$ mkdir build && cd build
$ cmake ..
$ cmake --build .
$ ctest -V .
$ cmake --build . --target install

When building with Visual Studio, you may build a multithreaded (MT/MTd) runtime library, using the MSVC_STATIC_RUNTIME setting:

$ cmake -DMSVC_STATIC_RUNTIME=ON -DBUILD_SHARED_LIBS=OFF ..

On Ubuntu via PPA

MaxMind provides a PPA for recent version of Ubuntu. To add the PPA to your APT sources, run:

$ sudo add-apt-repository ppa:maxmind/ppa

Then install the packages by running:

$ sudo apt update
$ sudo apt install libmaxminddb0 libmaxminddb-dev mmdb-bin

On macOS via Homebrew or MacPorts

You can install libmaxminddb on macOS using Homebrew:

$ brew install libmaxminddb

Or with MacPorts:

$ sudo port install libmaxminddb

Requirements

libmaxminddb requires a minimum of POSIX.1-2001 support. If not specified at compilation time, it defaults to requesting POSIX.1-2008 support.

Bug Reports

Please report bugs by filing an issue with our GitHub issue tracker at https://github.com/maxmind/libmaxminddb/issues

Creating a Release Tarball

Use make safedist to check the resulting tarball.

Copyright and License

Copyright 2013-2024 MaxMind, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

libmaxminddb's People

Contributors

autarch avatar biswa96 avatar borisz avatar bsergean avatar clwluvw avatar dependabot[bot] avatar eilara avatar fabled avatar faktas2 avatar fcelda avatar ffontaine avatar fgsch avatar fightingyy avatar geraldcombs avatar horgh avatar kurt-nj avatar lhostetler-godaddy avatar oalders avatar oschwald avatar paravoid avatar patrickcroninmm avatar piernov avatar rafael-santiago avatar rafl avatar sanjaymsh avatar shadromani avatar stoeckmann avatar stonestepsinc avatar thekindofme avatar ugexe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libmaxminddb's Issues

Round tripping problem when the description and database_type are the same

Using the Perl XS wrapper for this (to make writing the examples easier)

#!/usr/bin/perl

use strict;
use warnings;
use feature 'signatures';
use experimental 'signatures';

use MaxMind::DB::Writer::Tree;
use MaxMind::DB::Reader;
use Net::Works::Network;
use Try::Tiny qw( catch try );

write_database(10_000);
test_database();

exit 0;

########################################################################
# writing
########################################################################

sub write_database($size) {
    my $tree = MaxMind::DB::Writer::Tree->new(
        ip_version            => 6,
        record_size           => 24,
        database_type         => 'example',
        languages             => ['en'],
        description           => { en => 'example' },
        map_key_type_callback => sub {
            return 'map' if $_[0] eq 'city' || $_[0] eq 'names';
            return 'utf8_string';
        },
    );

    for my $count (1..$size+1) {
        write_record($tree, $count);
    }

    open my $fh, '>', 'foo.mmdb';
    binmode $fh, ':raw';
    $tree->write_tree($fh);
    close $fh;
}

sub write_record($tree, $number) {
    my $hex = sprintf '%08x', $number;
    substr($hex,4,0,':');
    my $ip_range = "$hex:badc:0ffe:dead:beef:badc:0ffe/32";

    my $network = Net::Works::Network->new_from_string( string => $ip_range );

    $tree->insert_network( $network, {
        city => { names => { en => "City $number" } },
    });
}

########################################################################
# reading
########################################################################

sub test_database() {
    my $filesize = -s 'foo.mmdb';
    print STDERR "Trying database (database size $filesize)";
    try {
        my $reader = MaxMind::DB::Reader->new( file => 'foo.mmdb' );
        say STDERR "...success";
    } catch {
        say STDERR "...failed: $_";
    };
}

If you change either example to something else it works. If they're the same though...

Trying database (database size 259300)...failed: MaxMind::DB::Reader::XS - Error opening database file "foo.mmdb": The MaxMind DB file contains invalid metadata at /opt/perl5.20.2/lib/site_perl/5.20.2/x86_64-linux/MaxMind/DB/Reader/XS.pm line 69.

Installing gem -v 0.1.2 complains of "Missing libmaxminddb"

Despite having libmaxminddb properly installed on my system, it still errors like:
checking for maxminddb.h... no
Missing libmaxminddb

Cannot get the gem to install.
This potentially could be an issue with libmaxminddb 1.1.4 (most recent).

Which is most reliable for locating a city

Several questions/issues.

I'm looking for the most reliable way to map an IP address to a city and I think the following is inconsistent.
(Using the GeoIP2 free version for cities)

Say you have let "69.12.169.82" as the ip. For this IP, maxminddb gives a city value of Santa Rosa, CA. This is off mark and its north of where I actually am, San Francisco. The zipcode produced, 95408, is also off mark and is about as far south of me as Santa Rosa is north of me.

So the zipcode and city are not agreeing. Is this because I'm using the free version? And even so, one would think the two would agree, zip code and city.

Also, which one is more reliable? My goal is to get the closest "big" city to the IP, I want to the functionality that websites like yelp offer when you first come to their site.

Also, I gave an IP that was from Russia but I got a postal code that looked like an American Code. Are postal codes only reliable for US based IPs?

(Coding note, I don't do too much C but I do love ocaml...which leads me to ask why aren't all the MMDB_DATA_TYPE_* just an enum rather than #defines. I want exhaustiveness from switch statements.)

MMDB_get_value() segmentation fault

Hi,

When calling MMDB_get_value() or MMDB_aget_value() I get a segmentation fault.

I also have strange behaviour when accessing an entry_data_list in a custom function.
F.e.: MMDB_dump_entry_data_list(stdout, data_list, 0); works, but if I change this line of code with a custom function I can't access data_list properly (data_list->entry_data.type gives me result 0).

Operation system: CentOS6.5
Compilation: gcc --std=c99 -O2 -g ... -lmaxminddb

libtap/tap.c:330: error: ‘MAP_ANONYMOUS’ undeclared (first use in this function)

de -O2 -g -g -fms-extensions -MT tap.lo -MD -MP -MF .deps/tap.Tpo -c libtap/tap.c -fPIC -DPIC -o .libs/tap.o
libtap/tap.c: In function ‘tap_test_died’:
libtap/tap.c:330: error: ‘MAP_ANONYMOUS’ undeclared (first use in this function)
libtap/tap.c:330: error: (Each undeclared identifier is reported only once
libtap/tap.c:330: error: for each function it appears in.)
make[2]: *** [tap.lo] Error 1
make[2]: Leaving directory /opt/distfiles/nginx/libmaxminddb/t' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/opt/distfiles/nginx/libmaxminddb'
make: *** [all] Error 2

So close to actual JSON

I am writing OCaml bindings to libmaxminddb and wondering why the library doesn't actually provide JSON. I mean dump_entry_data_list is already so close to valid JSON, so why not go the extra step and make it actual JSON.

unable to open file /kpdata/maxmind/GeoLite2-City.mmdb (IOError)

@Selenium
Scenario: Visit landing page with fake locale # features/frees_locale.feature:47
Given redis is empty # features/step_definitions/weighted_tracks_step.rb:27
Given the following organization records # features/step_definitions/administration_step.rb:7
| name | parent | id |
| klickpush | | 10 |
| rewardops | klickpush | 20 |
Given the following theme records # features/step_definitions/free_step.rb:9
| name | main_color_hex | hover_color_hex | id |
| default | #ccddff | #ddeeff | 1 |
Given the following free landing pages # features/step_definitions/free_step.rb:15
| organization_id | url_key | theme_id | email | logo | name |
| 20 | exampleoi | 1 | 1 | 0 | fake |
Given the following track records # features/step_definitions/administration_step.rb:43
| name | artist | isrc | genre | organization_id | id | status |
| hashpipe | weezer | abcd1234 | rock | 20 | 10 | ACTIVE |
Given the following track_organization_campaign records # features/step_definitions/administration_step.rb:28
| organization_id | track_id | start_date | end_date | id |
| 20 | 10 | yesterday | tomorrow | 19 |
And I visit the "exampleoi" freemium landing page with parameters "locale=fake" # features/step_definitions/taggable_step.rb:9
And I should see "Get Your Free Song" # features/step_definitions/free_step.rb:27
unable to open file /kpdata/maxmind/GeoLite2-City.mmdb (IOError)
./app/models/concerns/geo_ipable.rb:5:in locate' ./app/models/concerns/geo_ipable.rb:5:inset_user_geo_ip'
./app/controllers/frees_controller.rb:182:in record_ip' features/frees_locale.feature:66:inAnd I should see "Get Your Free Song"'

Interpreting the MMDB_lookup_result_s.netmask for IPv4

It seems when doing a lookup using an IPv4 address that the resulting netmask is incorrect. I noticed that if I subtract the database's (the city DB, at least) value of ipv4_start_node.netmask from the result I get a netmask value I expect. Here's some example code that elucidates the issue:

#include <stdio.h>
#include <stdlib.h>
#include <maxminddb.h>

int main(int argc, const char * argv[]) {
    MMDB_s *mmdb = (MMDB_s *)malloc(sizeof(MMDB_s));
    MMDB_open("/tmp/GeoIP2-City_20160105/GeoIP2-City.mmdb",
              MMDB_MODE_MMAP, mmdb);

    int gai_error = 0;
    int mmdb_error = MMDB_SUCCESS;
    MMDB_lookup_result_s res = MMDB_lookup_string(mmdb, "71.183.42.223", &gai_error, &mmdb_error);

    // Result from legacy database is:  71.183.42.223 = 24
    // The following returns:  Netmask as returned: 120, corrected: 24
    printf("Netmask as returned: %d, corrected: %d\n", res.netmask, res.netmask - mmdb->ipv4_start_node.netmask);

    return 0;
}

The question is: Should I be doing this subtraction myself or should the library be returning the netmask value already corrected as such?

autoconf check for directory whitespace is broken

040f2e7 breaks builds when the directory has an s in it and allows builds in directories with whitespace.

alien-ezekielh:; pwd
/home/ezekielh/src/libmaxminddb
alien-ezekielh:; ./configure >/dev/null
configure: error: libmaxminddb cannot be built in a directory with whitespace in its name.
alien-ezekielh:; echo $?
1

alien-ezekielh:; pwd
/home/ezekielh/lib maxminddb
alien-ezekielh:; ./configure >/dev/null
configure: WARNING: Libtool does not cope well with whitespace in pwd
alien-ezekielh:; echo $?
0

Given that there's already a warning emitted by Libtool, this check should probably just be removed completely.

Slight rework of the VS12 project

I reworked the VS12 project to minimize maintenance required by moving most settings to property pages and also to address the issue when x64 build wiped out some intermediate files for Win32 builds. This is the patch I created by merging your changes with mine (as of today). You may want to revisit your new test projects to avoid same problems.

You can reproduce the problem by rebuilding a Debug Win32 configuration and follow up with a Debug x64 rebuild and you will see that a bunch of files disappeared from Debug. I didn't notice this problem initially because I'm in the process of converting my own project to x64 and I wasn't building x64 targets at the time.

If you want to the the same with your projects, the basic logic here is to keep the main property page file (similar to libmaxminddb.props) as Debug|Win32 and override these properties for Release and x64 builds in, such as in libmaxminddb-x64.props and libmaxminddb-release.props. You will need to create three more property files for the new test projects and share them across all projects in a similar way. This will allow you to change the configuration in just one place.

Here's the patch. The test projects didn't build for m, so I'm assuming it's work in progress and didn't change anything in them. Let me know if you need any help with those.

From f2f0a093ec5efa584c6e437c68a3a1379f2702d1 Mon Sep 17 00:00:00 2001
From: Stone Steps <[email protected]>
Date: Sun, 14 Dec 2014 13:25:10 -0500
Subject: [PATCH] Added x64 and Release VS12 property pages

---
 projects/VS12/README                       | 52 ++++++++++++++++++++++++++++++
 projects/VS12/libmaxminddb-release.props   | 32 ++++++++++++++++++
 projects/VS12/libmaxminddb-x64.props       | 14 ++++++++
 projects/VS12/libmaxminddb.props           | 15 +++++++--
 projects/VS12/libmaxminddb.vcxproj         | 20 ++++--------
 projects/VS12/libmaxminddb.vcxproj.filters |  3 ++
 6 files changed, 120 insertions(+), 16 deletions(-)
 create mode 100644 projects/VS12/README
 create mode 100644 projects/VS12/libmaxminddb-release.props
 create mode 100644 projects/VS12/libmaxminddb-x64.props

diff --git a/projects/VS12/README b/projects/VS12/README
new file mode 100644
index 0000000..8be5879
--- /dev/null
+++ b/projects/VS12/README
@@ -0,0 +1,52 @@
+Project Notes
+
+DO NOT modify project settings for each configuration and/or platform
+on a per-project basis. Use property sheets to set shared configuration
+properties. The rule of thumb - if you set same value for the same 
+property in more than one configuration or platform, you did it wrong.
+
+libmaxminddb.props
+
+This is the base property sheet for libMaxMindDB project. It contains 
+settings that are shared between all configurations, such as compiler
+warning level, not using link-time code generation, etc.
+
+In order to minimize the number of property sheet files, this propery
+sheet also contains settings for Win32 and Debug configurations, which 
+are overridden by the x64 and Release property sheets described below.
+
+libmaxminddb-release.props
+
+This property sheet contains all Release settings and is shared between
+Win32 and x64 release builds. It must be located higher than the base
+property sheet in the property Manager window for each configuration
+where it's used (i.e. Release|Win32 and Release|x64).
+
+libmaxminddb-x64.props
+
+This property sheet contains all x64 settings and is shared between all 
+Debug and Release x64 configurations. It must be located higher than the 
+base property sheet in the property Manager window for each configuration
+where it's used (i.e. Debug|x64 and Release|x64).
+
+Adding More Projects
+
+If you want to add more projects into this solution, follow the same logic
+and create their own property sheets. Do not use libmaxminddb property 
+sheets in those projects because it will interfere with their intermediate 
+directories. Instead, copy and rename libmaxminddb property sheets as a
+starting point.
+
+DO NOT add libmaxminddb.lib to the Additional Dependencies box of command
+line tools or any other libraries you built, for that matter. This box is
+only for standard Windows libraries. Instead, add libmaxminddb as a reference
+to all command line tool projects. Do the same for any other library projects
+you added to this solutionn. 
+
+For external 3rd-party .lib files, create a solution folder called Libraries 
+and add Debug, Debug64, Release, Release64 subfolders, then drag and drop all 
+versinos of .lib to their respective folders and use Exclude From Build in 
+each library file's property to assign them to the proper build confguration.
+Unused libraries will be shown with a traffic stop sign in each configuration. 
+If you have a lot of projects, it might be easier to do this by editing .vcxproj 
+and .vcxproj.filters in a text editor.
diff --git a/projects/VS12/libmaxminddb-release.props b/projects/VS12/libmaxminddb-release.props
new file mode 100644
index 0000000..70f433f
--- /dev/null
+++ b/projects/VS12/libmaxminddb-release.props
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ImportGroup Label="PropertySheets" />
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup />
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <OmitFramePointers>true</OmitFramePointers>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup />
+</Project>
\ No newline at end of file
diff --git a/projects/VS12/libmaxminddb-x64.props b/projects/VS12/libmaxminddb-x64.props
new file mode 100644
index 0000000..4414c72
--- /dev/null
+++ b/projects/VS12/libmaxminddb-x64.props
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ImportGroup Label="PropertySheets" />
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <IntDir>$(SolutionDir)$(Platform)\$(Configuration)\obj\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Lib>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup />
+</Project>
\ No newline at end of file
diff --git a/projects/VS12/libmaxminddb.props b/projects/VS12/libmaxminddb.props
index 52aec44..9b67cd8 100644
--- a/projects/VS12/libmaxminddb.props
+++ b/projects/VS12/libmaxminddb.props
@@ -3,21 +3,30 @@
   <ImportGroup Label="PropertySheets" />
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
-    <IntDir>$(Configuration)\obj\</IntDir>
+    <IntDir>$(SolutionDir)$(Configuration)\obj\</IntDir>
   </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
       <AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>MMDB_UINT128_IS_BYTE_ARRAY=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <WarningLevel>Level3</WarningLevel>
-      <ExceptionHandling>Async</ExceptionHandling>
+      <ExceptionHandling>false</ExceptionHandling>
+      <ProgramDataBaseFileName>$(OutDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+      <Optimization>Disabled</Optimization>
+      <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+      <OmitFramePointers>false</OmitFramePointers>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
     </ClCompile>
     <PreBuildEvent>
       <Command>if NOT EXIST (..\..\include\maxminddb_config.h) (
 copy ..\..\include\maxminddb_config.h.in ..\..\include\maxminddb_config.h
 )</Command>
     </PreBuildEvent>
+    <Lib>
+      <TargetMachine>MachineX86</TargetMachine>
+      <LinkTimeCodeGeneration>false</LinkTimeCodeGeneration>
+    </Lib>
   </ItemDefinitionGroup>
   <ItemGroup />
 </Project>
diff --git a/projects/VS12/libmaxminddb.vcxproj b/projects/VS12/libmaxminddb.vcxproj
index 23e16c8..3a7ed7c 100644
--- a/projects/VS12/libmaxminddb.vcxproj
+++ b/projects/VS12/libmaxminddb.vcxproj
@@ -24,6 +24,9 @@
   <ItemGroup>
     <ClInclude Include="..\..\include\maxminddb.h" />
   </ItemGroup>
+  <ItemGroup>
+    <None Include="README" />
+  </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{82953BDA-2960-4ADA-A6D5-92E65CCB4A3D}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
@@ -66,14 +69,18 @@
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     <Import Project="libmaxminddb.props" />
+    <Import Project="libmaxminddb-x64.props" />
   </ImportGroup>
   <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     <Import Project="libmaxminddb.props" />
+    <Import Project="libmaxminddb-release.props" />
   </ImportGroup>
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     <Import Project="libmaxminddb.props" />
+    <Import Project="libmaxminddb-x64.props" />
+    <Import Project="libmaxminddb-release.props" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -84,7 +91,6 @@
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
@@ -93,15 +99,9 @@
     </Link>
     <PreBuildEvent />
     <Lib />
-    <PreBuildEvent>
-      <Command>if NOT EXIST (..\..\include\maxminddb_config.h) (
-copy maxminddb_config.h ..\..\include\maxminddb_config.h
-)</Command>
-    </PreBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <ClCompile>
-      <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
@@ -113,9 +113,6 @@ copy maxminddb_config.h ..\..\include\maxminddb_config.h
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
@@ -128,9 +125,6 @@ copy maxminddb_config.h ..\..\include\maxminddb_config.h
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <ClCompile>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
diff --git a/projects/VS12/libmaxminddb.vcxproj.filters b/projects/VS12/libmaxminddb.vcxproj.filters
index 61710cc..68e893f 100644
--- a/projects/VS12/libmaxminddb.vcxproj.filters
+++ b/projects/VS12/libmaxminddb.vcxproj.filters
@@ -20,4 +20,7 @@
       <Filter>Header Files</Filter>
     </ClInclude>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="README" />
+  </ItemGroup>
 </Project>
\ No newline at end of file
-- 
1.9.4.msysgit.2

libmaxminddb provides an API for getting the MMDB_entry_s associated with a given record's value

This should be added to the end of the MMDB_search_node_s struct that is populated by MMDB_read_node.

AC:

  • A new publicly accessible set of defines is created:
    • MMDB_RECORD_TYPE_SEARCH_NODE (0)
    • MMDB_RECORD_TYPE_EMPTY (2)
    • MMDB_RECORD_TYPE_DATA (2)
  • The struct should be extended by adding the following fields:
    • uint8_t right_record_type
    • uint8_t left_record_type
    • MMDB_entry_s right_record_entry
    • MMDB_entry_s left_record_entry
  • The MMDB_entry_s value is only populated if record is a data record.

Homebrew package not installing as universal

This is the other end of the problem listed in maxmind/MaxMind-DB-Reader-python#2.

On Yosemite, Homebrew appears to install a 64 bit only version of libmaxminddb. This then will cause the Python extension to fail compile. The workaround is to force a universal install of libmaxminddb through brew (brew install --universal libmaxminddb), but since this is not the default many people won't do this. The bottle is not generated with --universal either.

libmaxminddb should probably always build as universal on OS X to avoid these compatibility issues.

Installation Problem

Hi,

I'm currently receiving the following error(s) while attempting to install (same in both pip and easy_install):

easy_install maxminddb
Searching for maxminddb
Reading http://pypi.python.org/simple/maxminddb/
Best match: maxminddb 0.2.0
Downloading https://pypi.python.org/packages/source/m/maxminddb/maxminddb-0.2.0.tar.gz#md5=03a863a4ec5026ad079512d2c81506a8
Processing maxminddb-0.2.0.tar.gz
Running maxminddb-0.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-vw8jvE/maxminddb-0.2.0/egg-dist-tmp-NQaH0T
/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
warning: no files found matching 'requirements.txt'
maxminddb.c: In function ‘from_entry_data_list’:
maxminddb.c:281: error: ‘MMDB_entry_data_s’ has no member named ‘utf8_string’
maxminddb.c:286: error: ‘MMDB_entry_data_s’ has no member named ‘bytes’
maxminddb.c:289: error: ‘MMDB_entry_data_s’ has no member named ‘double_value’
maxminddb.c:291: error: ‘MMDB_entry_data_s’ has no member named ‘float_value’
maxminddb.c:293: error: ‘MMDB_entry_data_s’ has no member named ‘uint16’
maxminddb.c:295: error: ‘MMDB_entry_data_s’ has no member named ‘uint32’
maxminddb.c:297: error: ‘MMDB_entry_data_s’ has no member named ‘boolean’
maxminddb.c:300: error: ‘MMDB_entry_data_s’ has no member named ‘uint64’
maxminddb.c:304: error: ‘MMDB_entry_data_s’ has no member named ‘int32’
maxminddb.c: In function ‘from_map’:
maxminddb.c:329: error: ‘MMDB_entry_data_s’ has no member named ‘utf8_string’
maxminddb.c: In function ‘from_uint128’:
maxminddb.c:387: error: ‘MMDB_entry_data_s’ has no member named ‘uint128’
maxminddb.c:388: error: ‘MMDB_entry_data_s’ has no member named ‘uint128’
error: Setup script exited with error: command 'gcc' failed with exit status 1


I have followed the setup instructions to install https://github.com/maxmind/libmaxminddb from a git repository.

My setup is CentOS release 6.4 (Final)
Linux version 2.6.32-358.18.1.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) )

Error when installing from Github

Following the instructions in Readme.md, we get to ./bootstrap and:

ironholds@MargretWander:~/Code/libmaxminddb$ ./bootstrap
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:15: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

fatal error: 'maxminddb-compat-util.h' file not found

The current release "0.5.4" does not compile. Getting following error:

# make
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in src
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include  -I../include  -O2 -g -g  -fms-extensions -MT maxminddb.lo -MD -MP -MF .deps/maxminddb.Tpo -c -o maxminddb.lo maxminddb.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O2 -g -g -fms-extensions -MT maxminddb.lo -MD -MP -MF .deps/maxminddb.Tpo -c maxminddb.c  -fno-common -DPIC -o .libs/maxminddb.o
maxminddb.c:5:10: fatal error: 'maxminddb-compat-util.h' file not found
#include "maxminddb-compat-util.h"
         ^
1 error generated.
make[2]: *** [maxminddb.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Version 0.5.3 works fine.

Can't seem to retrieve individual country codes

Codebase (or most of it) is [here](https://github.com/Ironholds/rgeoip/blob/master/src/geolocate.cpp}: yes, it's terrible and brittle, since I'm primarily experimenting at the moment.

I can't seem to get it to output, say, the english-language name for the country. Using that code:

geolookup("174.62.175.82", "/home/ironholds/GeoIP2-Country.mmdb","country")
[1] "United StatesBesNEstados UnidosBfrKÉtats-UnisBjaUアメリカ合衆国 U#\xa7BruFСша mF美国 \xfc"A\xe3 \001 \v z\xe3 \024\xc3\023_\xf6 \x89BIN #\xe8BdeFIndienBenEIndiaBes$\034BfrDIndeBjaIインド UFÍndiaBruJИндия mF印度 \xfc$"

So it looks like it's grabbing every language name, and writing that to entry_data. What am I missing?

undefined macro: AC_PROG_LIBTOOL

Trying to install on Mac OS X 10.9.1 I get the following error:

bash-3.2$ git clone --recursive https://github.com/maxmind/libmaxminddb
bash-3.2$ cd libmaxminddb
bash-3.2$ ./bootstrap
rm: ltmain.sh: No such file or directory
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf --force
configure.ac:14: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1

What could be the issue? I had installed successfully on another machine using the bz/remove-gnu-extensions branch of the repository, but it appears this branch no longer exists, and I am installing on a separate machine. Is there another branch I should install from?

Mismatch in Metadata Variable Types

G'day,

I have successfully ported an early version of libmaxminddb to work on Sol 10 for both x86 and sparc platforms.

Updating the port to use the latest mmap version revealed some issues with the types used for the variables used in the metadata structure.

Specifically, the metadata types in the C code do not match the types used in the Perl DB generation code, e.g. the ip_version - uint_16 in Perl vs. uint_8 in C, and record_size - uint_32 in Perl vs. uint_16 in C.

This mismatch still works on a little endian x86 box, but on a 64 bit sparc box running big endian it blew up when the record_size value could not be seen by the smaller sized type.

There's also an issue with the function value_for_key_as_uint16() returning a uint_32 instead of a uint_16 atm which is probably a copy and paste error. The body of the function is fine though.

Took me a while to dig through and work out what was happening which was fun. I was worrying that it really was our db file which was corrupt which would have been a pain to rebuild as it currently takes us over nine hours to build our db file!

I will supply patches for the Sol 10 port when the lib is a bit more stable but I just thought I'd raise this with you now.

Happy holidays to all.

cheers,
Rob

possibly undefined macro: AC_PROG_LIBTOOL

Above error when running bootstrap from the root directory on master (@54e7758)

Full output:

root@playground:libmaxminddb# ./bootstrap 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:14: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

uname -a:

root@playground:libmaxminddb# uname -a
[host scrubbed] 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u1 x86_64 GNU/Linux

Let me know if you need anything else.

Example of structures for each file

Could you provide an example of the internal structure of the lookup results for each filetype? The existing documentation reveals the "cities" field, but that's about it. It'd be nice to know what keys I should be searching for to get, say, the country code, and how that varies between city-level and country-level files.

(If this already exists and I've just missed it, my apologies.)

Build instructions off - Need to git clone --recursive

The build instructions use git clone without the --recursive option which will automatically pull the submodules for users who are Installing from the Git Repository. Submodule is needed for make check to run successfully.

MMDB_get_value() failing on GeoLite2 Country database

(Fixed in the pull request from 22 oct 2013: "Fixed two pointer handling bugs...")

When calling MMDB_get_value() on an IP address (41.205.186.171), using the publicly available GeoLite2 Country database, I get the following error:

The MaxMind DB file's data section contains bad data (unknown data type or corrupt data)

Here is the relevant piece of code, simplified to remove some error checking:

        int status = MMDB_open(fname, MMDB_MODE_MMAP, &mmdb);
        char *ipstr = "41.205.186.171";
        MMDB_s mmdb;
        int gai_error, mmdb_error;
        MMDB_lookup_result_s = MMDB_lookup_string(&mmdb, ipstr, &gai_error, &mmdb_error);

        // get the country code directly
        MMDB_entry_data_s entry_data;
        int res = MMDB_get_value(&result.entry, &entry_data, "country", "iso_code", NULL);

        if (res != MMDB_SUCCESS) {
                fprintf(stderr, "%s: MMDB_get_value failure (%s).\n", ipstr, MMDB_strerror(res));
                goto end;
        }

        if (!entry_data.has_data || entry_data.type != MMDB_DATA_TYPE_UTF8_STRING) {
                fprintf(stderr, "%s: MMDB_get_value has no string data.\n", ipstr);
                goto end;
        }

        printf("Country code for %s is: ", ipstr);
        fwrite(entry_data.utf8_string, entry_data.data_size, 1, stdout);
        printf("\n");

However, calling MMDB_get_entry_data_list() and MMDB_dump_entry_data_list(), as in the example code in the documentation for this library, works and prints out a map including the "country" and then "iso_code" keys.

Does not work on Windows

It cannot compile on Windows using MinGW

In file included from maxminddb.c:4:0:
../include/maxminddb.h:9:19: fatal error: netdb.h: No such file or directory

Problem using maxminddb.h on Ubuntu 14.04

Hello!

$ uname -a
Linux inspiron 3.16.0-51-generic #69~14.04.1-Ubuntu SMP Wed Oct 7 15:32:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I installed libmaxminddb on Ubuntu via PPA:

$ sudo add-apt-repository ppa:maxmind/ppa
$ sudo apt-get update
$ sudo apt-get install libmaxminddb0 libmaxminddb-dev mmdb-bin

When I try to compile the following source file:

#include <maxminddb.h>

int main(int argc, char const* argv[])
{
    const char *fname = "GeoLite2-City.mmdb";
    MMDB_s mmdb;
    int status = MMDB_open(fname, MMDB_MODE_MMAP, &mmdb);
    return 0;
}

I get the following output:

$ gcc -v -lmaxminddb testmmdb.c -o testmmdb
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) 
COLLECT_GCC_OPTIONS='-v' '-o' 'testmmdb' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1 -quiet -v -imultiarch x86_64-linux-gnu testmmdb.c -quiet -dumpbase testmmdb.c -mtune=generic -march=x86-64 -auxbase testmmdb -version -fstack-protector -Wformat -Wformat-security -o /tmp/ccG3hkZT.s
GNU C (Ubuntu 4.8.4-2ubuntu1~14.04) version 4.8.4 (x86_64-linux-gnu)
    compiled by GNU C version 4.8.4, GMP version 5.1.3, MPFR version 3.1.2-p3, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C (Ubuntu 4.8.4-2ubuntu1~14.04) version 4.8.4 (x86_64-linux-gnu)
    compiled by GNU C version 4.8.4, GMP version 5.1.3, MPFR version 3.1.2-p3, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 8e5167dd5049e4eb768f2a6a3a56b723
COLLECT_GCC_OPTIONS='-v' '-o' 'testmmdb' '-mtune=generic' '-march=x86-64'
 as -v --64 -o /tmp/ccwgsrc2.o /tmp/ccG3hkZT.s
GNU assembler version 2.24 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.24
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'testmmdb' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/collect2 --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o testmmdb /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lmaxminddb /tmp/ccwgsrc2.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.8/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o
/tmp/ccwgsrc2.o: In function `main':
testmmdb.c:(.text+0x3a): undefined reference to `MMDB_open'
collect2: error: ld returned 1 exit status

Sample app doesn't build on OSX (10.9.4)

Building the 0.5.5 package on OSX 10.9.4 (using ./configure and make) fails with this error:

Making all in bin
gcc -DHAVE_CONFIG_H -I. -I.. -I../include  -I../include  -O2 -g -g  -fms-extensions -MT mmdblookup.o -MD -MP -MF .deps/mmdblookup.Tpo -c -o mmdblookup.o mmdblookup.c
mmdblookup.c:7:10: fatal error: 'malloc.h' file not found
#include <malloc.h>
         ^
1 error generated.
make[2]: *** [mmdblookup.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

malloc.h is an obsolete include file; this change fixes the issue:

#if !defined(__APPLE__)
#include <malloc.h>
#endif

The last argument in CreateFileMappingA is the name of the mapping object, not the file name

This call will fail because the last argument is supposed to be the name of the mapping object in case if you want to share it between multiple processes, not the name of the file you are mapping, and in this case it should be NULL because you don't need to name it.

HANDLE mmh = CreateFileMappingA(fd, NULL, PAGE_READONLY, 0, size, filename);

There's a couple of other issues, such as ssize_t and restricted are not defined in VS2013, so they need to be #ifdef'ed.

You can see the complete VS2013 patch, including the project files here:

https://stonestepswebalizer.codeplex.com/SourceControl/latest#patches/maxminddb/vs12-project.patch

libtap/tap.c:327: error: ‘MAP_ANONYMOUS’ undeclared (first use in this function)

libtap/tap.c:327: error: ‘MAP_ANONYMOUS’ undeclared (first use in this function) #77

please help, thanks!

gcc -v:
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-amazon-linux/4.8.2/lto-wrapper
Target: x86_64-amazon-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,ada,lto --enable-plugin --enable-initfini-array --disable-libgcj --without-isl --without-cloog --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-amazon-linux
Thread model: posix
gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC)

[root@iZ250swn6k1Z ext]# uname -a
Linux ip-172-31-10-100 3.14.35-28.38.amzn1.x86_64 #1 SMP Wed Mar 11 22:50:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Problem using maxminddb.h on OS X with c++

Hi,
i am trying now for hours to connect via cpp to your GeoLite2-City.mmdb but i cant get it to work.
Maybe its just some stupid mistake by me :/
According to you C API here on github i need to open the db file like this:

#include <maxminddb.h>

int main(int argc, char *argv[])
{
    const char *fname = "GeoLite2-City.mmdb";
    MMDB_s mmdb;
    int status = MMDB_open(fname, MMDB_MODE_MMAP, &mmdb);


    return 0;
}

compiling with: g++ test.cc -o testmmdb throws the following error:

g++ -v test.cc -o testmmdb
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name test.cc -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 241.9 -v -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0 -stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir /Users/test/Desktop/mmdb -ferror-limit 19 -fmessage-length 177 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /var/folders/20/zv7v7vt57qs7mpdy85wrdxv40000gn/T/test-23278f.o -x c++ test.cc
clang -cc1 version 6.0 based upon LLVM 3.5svn default target x86_64-apple-darwin13.4.0
ignoring nonexistent directory "/usr/include/c++/v1"
#include "..." search starts here:
#include <...> search starts here:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1
 /usr/local/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.9.0 -o testmmdb /var/folders/20/zv7v7vt57qs7mpdy85wrdxv40000gn/T/test-23278f.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.osx.a
Undefined symbols for architecture x86_64:
  "MMDB_open(char const*, unsigned int, MMDB_s*)", referenced from:
      _main in test-23278f.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

C++ version:

g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

Can you help me?

And i installed it via git clone -> bootstrap -> configure -> make -> install .
No errores or warnings occured. mmdblookup works fine in the terminal

install problem

Hi! Sorry for my english.
I try to install libmaxminddb on freebsd 9.2

./bootstrap
./configure
make install

Making install in src
 .././install-sh -c -d '/usr/local/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libmaxminddb.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libmaxminddb.so.0 /usr/local/lib/libmaxminddb.so.0
libtool: install: (cd /usr/local/lib && { ln -s -f libmaxminddb.so.0 libmaxminddb.so || { rm -f libmaxminddb.so && ln -s libmaxminddb.so.0 libmaxminddb.so; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libmaxminddb.so.0 libmaxminddb.so || { rm -f libmaxminddb.so && ln -s libmaxminddb.so.0 libmaxminddb.so; }; })
libtool: install: /usr/bin/install -c .libs/libmaxminddb.lai /usr/local/lib/libmaxminddb.la
libtool: install: /usr/bin/install -c .libs/libmaxminddb.a /usr/local/lib/libmaxminddb.a
libtool: install: chmod 644 /usr/local/lib/libmaxminddb.a
libtool: install: ranlib /usr/local/lib/libmaxminddb.a
 .././install-sh -c -d '/usr/local/include'
 /usr/bin/install -c -m 644 ../include/maxminddb.h '/usr/local/include'
Making install in bin
 .././install-sh -c -d '/usr/local/bin'
  /bin/sh ../libtool   --mode=install /usr/bin/install -c mmdblookup '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/mmdblookup /usr/local/bin/mmdblookup
Making install in t
 ./install-sh -c -d '/usr/local/include'
 /usr/bin/install -c -m 644 include/maxminddb_config.h '/usr/local/include'
 ./install-sh -c -d '/usr/local/include'
 /usr/bin/install -c -m 644 include/maxminddb.h src/maxminddb-compat-util.h '/usr/local/include'
 ./install-sh -c -d '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 ./man/man1/*.1 '/usr/local/share/man/man1'
install: ./man/man1/*.1: No such file or directory
*** [install-man1] Error code 71

Stop in /usr/home/3dev/data/geoip/libmaxminddb.
*** [install-am] Error code 1

Stop in /usr/home/3dev/data/geoip/libmaxminddb.
*** [install-recursive] Error code 1

make check

Making check in src
Making check in bin
Making check in t
make  bad_pointers_t basic_lookup_t  data_entry_list_t data_types_t  dump_t get_value_t  get_value_pointer_bug_t ipv4_start_cache_t  ipv6_lookup_in_ipv4_t metadata_t  no_map_get_value_t read_node_t  threads_t version_t
`bad_pointers_t' is up to date.
`basic_lookup_t' is up to date.
`data_entry_list_t' is up to date.
`data_types_t' is up to date.
`dump_t' is up to date.
`get_value_t' is up to date.
`get_value_pointer_bug_t' is up to date.
`ipv4_start_cache_t' is up to date.
`ipv6_lookup_in_ipv4_t' is up to date.
`metadata_t' is up to date.
`no_map_get_value_t' is up to date.
`read_node_t' is up to date.
`threads_t' is up to date.
`version_t' is up to date.
make  check-TESTS
ok 1 - open ./maxmind-db/test-data/MaxMind-DB-test-broken-pointers-24.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-broken-pointers-24.mmdb - mmap mode
ok 3 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.16 - MaxMind-DB-test-broken-pointers-24.mmdb - mmap mode
ok 4 - no MMDB error in call to MMDB_lookup_string for 1.1.1.16 - MaxMind-DB-test-broken-pointers-24.mmdb - mmap mode
ok 5 - MMDB_get_value returns MMDB_INVALID_DATA_ERROR for bad pointer in data section
ok 6 - MMDB_get_entry_data_list returns MMDB_INVALID_DATA_ERROR for bad pointer in data section
ok 7 - MMDB_lookup_string sets mmdb_error to MMDB_CORRUPT_SEARCH_TREE_ERROR when a search tree record points outside the data section
1..7
PASS: bad_pointers_t
ok 1 - open ./maxmind-db/test-data/MaxMind-DB-test-ipv4-24.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 3 - no getaddrinfo error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 4 - no MMDB error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 5 - no result entry struct returned for IP address not in the database (string lookup) - 2.3.4.5 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 6 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 7 - no MMDB error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 8 - no result entry struct returned for IP address not in the database (ipv4 lookup) - 2.3.4.5 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 9 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 10 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 11 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 12 - no error from call to MMDB_vget_value - result{ip}
ok 13 - got the expected data type - result{ip}
ok 14 - found expected result for ip key - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 15 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 16 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 17 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 18 - no error from call to MMDB_vget_value - result{ip}
ok 19 - got the expected data type - result{ip}
ok 20 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 21 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 22 - no MMDB error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 23 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 24 - no error from call to MMDB_vget_value - result{ip}
ok 25 - got the expected data type - result{ip}
ok 26 - found expected result for ip key - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 27 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 28 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 29 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 30 - no error from call to MMDB_vget_value - result{ip}
ok 31 - got the expected data type - result{ip}
ok 32 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 33 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 34 - no MMDB error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 35 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 36 - no error from call to MMDB_vget_value - result{ip}
ok 37 - got the expected data type - result{ip}
ok 38 - found expected result for ip key - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 39 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 40 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 41 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 42 - no error from call to MMDB_vget_value - result{ip}
ok 43 - got the expected data type - result{ip}
ok 44 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 45 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 46 - no MMDB error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 47 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 48 - no error from call to MMDB_vget_value - result{ip}
ok 49 - got the expected data type - result{ip}
ok 50 - found expected result for ip key - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 51 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 52 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 53 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 54 - no error from call to MMDB_vget_value - result{ip}
ok 55 - got the expected data type - result{ip}
ok 56 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 57 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 58 - no MMDB error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 59 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 60 - no error from call to MMDB_vget_value - result{ip}
ok 61 - got the expected data type - result{ip}
ok 62 - found expected result for ip key - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 63 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 64 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 65 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 66 - no error from call to MMDB_vget_value - result{ip}
ok 67 - got the expected data type - result{ip}
ok 68 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 69 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 70 - no MMDB error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 71 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 72 - no error from call to MMDB_vget_value - result{ip}
ok 73 - got the expected data type - result{ip}
ok 74 - found expected result for ip key - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 75 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 76 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 77 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 78 - no error from call to MMDB_vget_value - result{ip}
ok 79 - got the expected data type - result{ip}
ok 80 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 81 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 82 - no MMDB error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 83 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 84 - no error from call to MMDB_vget_value - result{ip}
ok 85 - got the expected data type - result{ip}
ok 86 - found expected result for ip key - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 87 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 88 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 89 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.17 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 90 - no error from call to MMDB_vget_value - result{ip}
ok 91 - got the expected data type - result{ip}
ok 92 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.17 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 93 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.31 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 94 - no MMDB error in call to MMDB_lookup_string for 1.1.1.31 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 95 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.31 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 96 - no error from call to MMDB_vget_value - result{ip}
ok 97 - got the expected data type - result{ip}
ok 98 - found expected result for ip key - MMDB_lookup_string - 1.1.1.31 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 99 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.31 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 100 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.31 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 101 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.31 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 102 - no error from call to MMDB_vget_value - result{ip}
ok 103 - got the expected data type - result{ip}
ok 104 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.31 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 105 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.32 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 106 - no MMDB error in call to MMDB_lookup_string for 1.1.1.32 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 107 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.32 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 108 - no error from call to MMDB_vget_value - result{ip}
ok 109 - got the expected data type - result{ip}
ok 110 - found expected result for ip key - MMDB_lookup_string - 1.1.1.32 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 111 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.32 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 112 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.32 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 113 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.32 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 114 - no error from call to MMDB_vget_value - result{ip}
ok 115 - got the expected data type - result{ip}
ok 116 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.32 - MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 117 - open ./maxmind-db/test-data/MaxMind-DB-test-ipv4-28.mmdb status is success - mmap mode
ok 118 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 119 - no getaddrinfo error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 120 - no MMDB error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 121 - no result entry struct returned for IP address not in the database (string lookup) - 2.3.4.5 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 122 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 123 - no MMDB error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 124 - no result entry struct returned for IP address not in the database (ipv4 lookup) - 2.3.4.5 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 125 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 126 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 127 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 128 - no error from call to MMDB_vget_value - result{ip}
ok 129 - got the expected data type - result{ip}
ok 130 - found expected result for ip key - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 131 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 132 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 133 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 134 - no error from call to MMDB_vget_value - result{ip}
ok 135 - got the expected data type - result{ip}
ok 136 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 137 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 138 - no MMDB error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 139 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 140 - no error from call to MMDB_vget_value - result{ip}
ok 141 - got the expected data type - result{ip}
ok 142 - found expected result for ip key - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 143 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 144 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 145 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 146 - no error from call to MMDB_vget_value - result{ip}
ok 147 - got the expected data type - result{ip}
ok 148 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 149 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 150 - no MMDB error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 151 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 152 - no error from call to MMDB_vget_value - result{ip}
ok 153 - got the expected data type - result{ip}
ok 154 - found expected result for ip key - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 155 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 156 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 157 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 158 - no error from call to MMDB_vget_value - result{ip}
ok 159 - got the expected data type - result{ip}
ok 160 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 161 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 162 - no MMDB error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 163 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 164 - no error from call to MMDB_vget_value - result{ip}
ok 165 - got the expected data type - result{ip}
ok 166 - found expected result for ip key - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 167 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 168 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 169 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 170 - no error from call to MMDB_vget_value - result{ip}
ok 171 - got the expected data type - result{ip}
ok 172 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 173 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 174 - no MMDB error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 175 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 176 - no error from call to MMDB_vget_value - result{ip}
ok 177 - got the expected data type - result{ip}
ok 178 - found expected result for ip key - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 179 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 180 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 181 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 182 - no error from call to MMDB_vget_value - result{ip}
ok 183 - got the expected data type - result{ip}
ok 184 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 185 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 186 - no MMDB error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 187 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 188 - no error from call to MMDB_vget_value - result{ip}
ok 189 - got the expected data type - result{ip}
ok 190 - found expected result for ip key - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 191 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 192 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 193 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 194 - no error from call to MMDB_vget_value - result{ip}
ok 195 - got the expected data type - result{ip}
ok 196 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 197 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 198 - no MMDB error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 199 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 200 - no error from call to MMDB_vget_value - result{ip}
ok 201 - got the expected data type - result{ip}
ok 202 - found expected result for ip key - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 203 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 204 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 205 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.17 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 206 - no error from call to MMDB_vget_value - result{ip}
ok 207 - got the expected data type - result{ip}
ok 208 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.17 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 209 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.31 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 210 - no MMDB error in call to MMDB_lookup_string for 1.1.1.31 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 211 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.31 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 212 - no error from call to MMDB_vget_value - result{ip}
ok 213 - got the expected data type - result{ip}
ok 214 - found expected result for ip key - MMDB_lookup_string - 1.1.1.31 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 215 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.31 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 216 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.31 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 217 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.31 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 218 - no error from call to MMDB_vget_value - result{ip}
ok 219 - got the expected data type - result{ip}
ok 220 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.31 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 221 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.32 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 222 - no MMDB error in call to MMDB_lookup_string for 1.1.1.32 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 223 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.32 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 224 - no error from call to MMDB_vget_value - result{ip}
ok 225 - got the expected data type - result{ip}
ok 226 - found expected result for ip key - MMDB_lookup_string - 1.1.1.32 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 227 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.32 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 228 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.32 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 229 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.32 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 230 - no error from call to MMDB_vget_value - result{ip}
ok 231 - got the expected data type - result{ip}
ok 232 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.32 - MaxMind-DB-test-ipv4-28.mmdb - mmap mode
ok 233 - open ./maxmind-db/test-data/MaxMind-DB-test-ipv4-32.mmdb status is success - mmap mode
ok 234 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 235 - no getaddrinfo error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 236 - no MMDB error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 237 - no result entry struct returned for IP address not in the database (string lookup) - 2.3.4.5 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 238 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 239 - no MMDB error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 240 - no result entry struct returned for IP address not in the database (ipv4 lookup) - 2.3.4.5 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 241 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 242 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 243 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 244 - no error from call to MMDB_vget_value - result{ip}
ok 245 - got the expected data type - result{ip}
ok 246 - found expected result for ip key - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 247 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 248 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 249 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 250 - no error from call to MMDB_vget_value - result{ip}
ok 251 - got the expected data type - result{ip}
ok 252 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 253 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 254 - no MMDB error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 255 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 256 - no error from call to MMDB_vget_value - result{ip}
ok 257 - got the expected data type - result{ip}
ok 258 - found expected result for ip key - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 259 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 260 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 261 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 262 - no error from call to MMDB_vget_value - result{ip}
ok 263 - got the expected data type - result{ip}
ok 264 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 265 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 266 - no MMDB error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 267 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 268 - no error from call to MMDB_vget_value - result{ip}
ok 269 - got the expected data type - result{ip}
ok 270 - found expected result for ip key - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 271 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 272 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 273 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 274 - no error from call to MMDB_vget_value - result{ip}
ok 275 - got the expected data type - result{ip}
ok 276 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 277 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 278 - no MMDB error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 279 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 280 - no error from call to MMDB_vget_value - result{ip}
ok 281 - got the expected data type - result{ip}
ok 282 - found expected result for ip key - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 283 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 284 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 285 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 286 - no error from call to MMDB_vget_value - result{ip}
ok 287 - got the expected data type - result{ip}
ok 288 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 289 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 290 - no MMDB error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 291 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 292 - no error from call to MMDB_vget_value - result{ip}
ok 293 - got the expected data type - result{ip}
ok 294 - found expected result for ip key - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 295 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 296 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 297 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 298 - no error from call to MMDB_vget_value - result{ip}
ok 299 - got the expected data type - result{ip}
ok 300 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 301 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 302 - no MMDB error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 303 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 304 - no error from call to MMDB_vget_value - result{ip}
ok 305 - got the expected data type - result{ip}
ok 306 - found expected result for ip key - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 307 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 308 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 309 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 310 - no error from call to MMDB_vget_value - result{ip}
ok 311 - got the expected data type - result{ip}
ok 312 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 313 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 314 - no MMDB error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 315 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 316 - no error from call to MMDB_vget_value - result{ip}
ok 317 - got the expected data type - result{ip}
ok 318 - found expected result for ip key - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 319 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 320 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 321 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.17 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 322 - no error from call to MMDB_vget_value - result{ip}
ok 323 - got the expected data type - result{ip}
ok 324 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.17 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 325 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.31 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 326 - no MMDB error in call to MMDB_lookup_string for 1.1.1.31 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 327 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.31 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 328 - no error from call to MMDB_vget_value - result{ip}
ok 329 - got the expected data type - result{ip}
ok 330 - found expected result for ip key - MMDB_lookup_string - 1.1.1.31 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 331 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.31 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 332 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.31 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 333 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.31 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 334 - no error from call to MMDB_vget_value - result{ip}
ok 335 - got the expected data type - result{ip}
ok 336 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.31 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 337 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.32 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 338 - no MMDB error in call to MMDB_lookup_string for 1.1.1.32 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 339 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.32 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 340 - no error from call to MMDB_vget_value - result{ip}
ok 341 - got the expected data type - result{ip}
ok 342 - found expected result for ip key - MMDB_lookup_string - 1.1.1.32 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 343 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.32 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 344 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.32 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 345 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.32 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 346 - no error from call to MMDB_vget_value - result{ip}
ok 347 - got the expected data type - result{ip}
ok 348 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.32 - MaxMind-DB-test-ipv4-32.mmdb - mmap mode
ok 349 - open ./maxmind-db/test-data/MaxMind-DB-test-mixed-24.mmdb status is success - mmap mode
ok 350 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 351 - no getaddrinfo error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 352 - no MMDB error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 353 - no result entry struct returned for IP address not in the database (string lookup) - 2.3.4.5 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 354 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 355 - no MMDB error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 356 - no result entry struct returned for IP address not in the database (ipv4 lookup) - 2.3.4.5 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 357 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 358 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 359 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 360 - no error from call to MMDB_vget_value - result{ip}
ok 361 - got the expected data type - result{ip}
ok 362 - found expected result for ip key - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 363 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 364 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 365 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 366 - no error from call to MMDB_vget_value - result{ip}
ok 367 - got the expected data type - result{ip}
ok 368 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 369 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 370 - no MMDB error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 371 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 372 - no error from call to MMDB_vget_value - result{ip}
ok 373 - got the expected data type - result{ip}
ok 374 - found expected result for ip key - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 375 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 376 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 377 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 378 - no error from call to MMDB_vget_value - result{ip}
ok 379 - got the expected data type - result{ip}
ok 380 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 381 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 382 - no MMDB error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 383 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 384 - no error from call to MMDB_vget_value - result{ip}
ok 385 - got the expected data type - result{ip}
ok 386 - found expected result for ip key - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 387 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 388 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 389 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 390 - no error from call to MMDB_vget_value - result{ip}
ok 391 - got the expected data type - result{ip}
ok 392 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 393 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 394 - no MMDB error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 395 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 396 - no error from call to MMDB_vget_value - result{ip}
ok 397 - got the expected data type - result{ip}
ok 398 - found expected result for ip key - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 399 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 400 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 401 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 402 - no error from call to MMDB_vget_value - result{ip}
ok 403 - got the expected data type - result{ip}
ok 404 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 405 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 406 - no MMDB error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 407 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 408 - no error from call to MMDB_vget_value - result{ip}
ok 409 - got the expected data type - result{ip}
ok 410 - found expected result for ip key - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 411 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 412 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 413 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 414 - no error from call to MMDB_vget_value - result{ip}
ok 415 - got the expected data type - result{ip}
ok 416 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 417 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 418 - no MMDB error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 419 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 420 - no error from call to MMDB_vget_value - result{ip}
ok 421 - got the expected data type - result{ip}
ok 422 - found expected result for ip key - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 423 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 424 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 425 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 426 - no error from call to MMDB_vget_value - result{ip}
ok 427 - got the expected data type - result{ip}
ok 428 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 429 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 430 - no MMDB error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 431 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 432 - no error from call to MMDB_vget_value - result{ip}
ok 433 - got the expected data type - result{ip}
ok 434 - found expected result for ip key - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 435 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 436 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 437 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.17 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 438 - no error from call to MMDB_vget_value - result{ip}
ok 439 - got the expected data type - result{ip}
ok 440 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.17 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 441 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.31 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 442 - no MMDB error in call to MMDB_lookup_string for 1.1.1.31 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 443 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.31 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 444 - no error from call to MMDB_vget_value - result{ip}
ok 445 - got the expected data type - result{ip}
ok 446 - found expected result for ip key - MMDB_lookup_string - 1.1.1.31 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 447 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.31 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 448 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.31 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 449 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.31 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 450 - no error from call to MMDB_vget_value - result{ip}
ok 451 - got the expected data type - result{ip}
ok 452 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.31 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 453 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.32 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 454 - no MMDB error in call to MMDB_lookup_string for 1.1.1.32 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 455 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.32 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 456 - no error from call to MMDB_vget_value - result{ip}
ok 457 - got the expected data type - result{ip}
ok 458 - found expected result for ip key - MMDB_lookup_string - 1.1.1.32 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 459 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.32 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 460 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.32 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 461 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.32 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 462 - no error from call to MMDB_vget_value - result{ip}
ok 463 - got the expected data type - result{ip}
ok 464 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.32 - MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 465 - open ./maxmind-db/test-data/MaxMind-DB-test-mixed-28.mmdb status is success - mmap mode
ok 466 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 467 - no getaddrinfo error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 468 - no MMDB error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 469 - no result entry struct returned for IP address not in the database (string lookup) - 2.3.4.5 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 470 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 471 - no MMDB error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 472 - no result entry struct returned for IP address not in the database (ipv4 lookup) - 2.3.4.5 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 473 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 474 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 475 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 476 - no error from call to MMDB_vget_value - result{ip}
ok 477 - got the expected data type - result{ip}
ok 478 - found expected result for ip key - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 479 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 480 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 481 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 482 - no error from call to MMDB_vget_value - result{ip}
ok 483 - got the expected data type - result{ip}
ok 484 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 485 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 486 - no MMDB error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 487 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 488 - no error from call to MMDB_vget_value - result{ip}
ok 489 - got the expected data type - result{ip}
ok 490 - found expected result for ip key - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 491 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 492 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 493 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 494 - no error from call to MMDB_vget_value - result{ip}
ok 495 - got the expected data type - result{ip}
ok 496 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 497 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 498 - no MMDB error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 499 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 500 - no error from call to MMDB_vget_value - result{ip}
ok 501 - got the expected data type - result{ip}
ok 502 - found expected result for ip key - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 503 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 504 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 505 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 506 - no error from call to MMDB_vget_value - result{ip}
ok 507 - got the expected data type - result{ip}
ok 508 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 509 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 510 - no MMDB error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 511 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 512 - no error from call to MMDB_vget_value - result{ip}
ok 513 - got the expected data type - result{ip}
ok 514 - found expected result for ip key - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 515 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 516 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 517 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 518 - no error from call to MMDB_vget_value - result{ip}
ok 519 - got the expected data type - result{ip}
ok 520 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 521 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 522 - no MMDB error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 523 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 524 - no error from call to MMDB_vget_value - result{ip}
ok 525 - got the expected data type - result{ip}
ok 526 - found expected result for ip key - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 527 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 528 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 529 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 530 - no error from call to MMDB_vget_value - result{ip}
ok 531 - got the expected data type - result{ip}
ok 532 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 533 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 534 - no MMDB error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 535 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 536 - no error from call to MMDB_vget_value - result{ip}
ok 537 - got the expected data type - result{ip}
ok 538 - found expected result for ip key - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 539 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 540 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 541 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 542 - no error from call to MMDB_vget_value - result{ip}
ok 543 - got the expected data type - result{ip}
ok 544 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 545 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 546 - no MMDB error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 547 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 548 - no error from call to MMDB_vget_value - result{ip}
ok 549 - got the expected data type - result{ip}
ok 550 - found expected result for ip key - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 551 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 552 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 553 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.17 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 554 - no error from call to MMDB_vget_value - result{ip}
ok 555 - got the expected data type - result{ip}
ok 556 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.17 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 557 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.31 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 558 - no MMDB error in call to MMDB_lookup_string for 1.1.1.31 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 559 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.31 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 560 - no error from call to MMDB_vget_value - result{ip}
ok 561 - got the expected data type - result{ip}
ok 562 - found expected result for ip key - MMDB_lookup_string - 1.1.1.31 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 563 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.31 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 564 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.31 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 565 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.31 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 566 - no error from call to MMDB_vget_value - result{ip}
ok 567 - got the expected data type - result{ip}
ok 568 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.31 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 569 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.32 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 570 - no MMDB error in call to MMDB_lookup_string for 1.1.1.32 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 571 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.32 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 572 - no error from call to MMDB_vget_value - result{ip}
ok 573 - got the expected data type - result{ip}
ok 574 - found expected result for ip key - MMDB_lookup_string - 1.1.1.32 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 575 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.32 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 576 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.32 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 577 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.32 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 578 - no error from call to MMDB_vget_value - result{ip}
ok 579 - got the expected data type - result{ip}
ok 580 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.32 - MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 581 - open ./maxmind-db/test-data/MaxMind-DB-test-mixed-32.mmdb status is success - mmap mode
ok 582 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 583 - no getaddrinfo error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 584 - no MMDB error in call to MMDB_lookup_string for 2.3.4.5 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 585 - no result entry struct returned for IP address not in the database (string lookup) - 2.3.4.5 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 586 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 587 - no MMDB error in call to MMDB_lookup_sockaddr for 2.3.4.5 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 588 - no result entry struct returned for IP address not in the database (ipv4 lookup) - 2.3.4.5 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 589 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 590 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 591 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 592 - no error from call to MMDB_vget_value - result{ip}
ok 593 - got the expected data type - result{ip}
ok 594 - found expected result for ip key - MMDB_lookup_string - 1.1.1.1 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 595 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 596 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.1 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 597 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 598 - no error from call to MMDB_vget_value - result{ip}
ok 599 - got the expected data type - result{ip}
ok 600 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.1 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 601 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 602 - no MMDB error in call to MMDB_lookup_string for 1.1.1.2 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 603 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 604 - no error from call to MMDB_vget_value - result{ip}
ok 605 - got the expected data type - result{ip}
ok 606 - found expected result for ip key - MMDB_lookup_string - 1.1.1.2 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 607 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 608 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.2 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 609 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 610 - no error from call to MMDB_vget_value - result{ip}
ok 611 - got the expected data type - result{ip}
ok 612 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.2 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 613 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 614 - no MMDB error in call to MMDB_lookup_string for 1.1.1.3 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 615 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 616 - no error from call to MMDB_vget_value - result{ip}
ok 617 - got the expected data type - result{ip}
ok 618 - found expected result for ip key - MMDB_lookup_string - 1.1.1.3 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 619 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 620 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.3 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 621 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 622 - no error from call to MMDB_vget_value - result{ip}
ok 623 - got the expected data type - result{ip}
ok 624 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.3 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 625 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 626 - no MMDB error in call to MMDB_lookup_string for 1.1.1.7 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 627 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 628 - no error from call to MMDB_vget_value - result{ip}
ok 629 - got the expected data type - result{ip}
ok 630 - found expected result for ip key - MMDB_lookup_string - 1.1.1.7 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 631 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 632 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.7 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 633 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 634 - no error from call to MMDB_vget_value - result{ip}
ok 635 - got the expected data type - result{ip}
ok 636 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.7 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 637 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 638 - no MMDB error in call to MMDB_lookup_string for 1.1.1.9 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 639 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 640 - no error from call to MMDB_vget_value - result{ip}
ok 641 - got the expected data type - result{ip}
ok 642 - found expected result for ip key - MMDB_lookup_string - 1.1.1.9 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 643 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 644 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.9 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 645 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 646 - no error from call to MMDB_vget_value - result{ip}
ok 647 - got the expected data type - result{ip}
ok 648 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.9 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 649 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 650 - no MMDB error in call to MMDB_lookup_string for 1.1.1.15 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 651 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 652 - no error from call to MMDB_vget_value - result{ip}
ok 653 - got the expected data type - result{ip}
ok 654 - found expected result for ip key - MMDB_lookup_string - 1.1.1.15 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 655 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 656 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.15 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 657 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 658 - no error from call to MMDB_vget_value - result{ip}
ok 659 - got the expected data type - result{ip}
ok 660 - found expected result for ip key - MMDB_lookup_addrinfo - 1.1.1.15 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 661 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 662 - no MMDB error in call to MMDB_lookup_string for 1.1.1.17 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 663 - got a result for an IP in the database - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 664 - no error from call to MMDB_vget_value - result{ip}
ok 665 - got the expected data type - result{ip}
ok 666 - found expected result for ip key - MMDB_lookup_string - 1.1.1.17 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 667 - no getaddrinfo error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 668 - no MMDB error in call to MMDB_lookup_sockaddr for 1.1.1.17 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 669 - got a result for an IP in the database - MMDB_lookup_addrinfo - 1.1.1.17 - MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 670 - no error from call to MMDB_vget_value - result{ip}
ok 671 - got the expected data type - result{ip}
ok 6FAIL: basic_lookup_t
ok 1 - open ./maxmind-db/test-data/MaxMind-DB-test-decoder.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-decoder.mmdb - mmap mode
ok 3 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-decoder.mmdb - mmap mode
ok 4 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-decoder.mmdb - mmap mode
ok 5 - MMDB_get_entry_data_list succeeded
ok 6 - first entry in entry data list is a map
ok 7 - first map in entry data list has 12 k/v pairs
ok 8 - found a map key
ok 9 - 'array' key's value is an array
ok 10 - 'array' key's value has 3 elements
ok 11 - first array entry is a UINT32
ok 12 - first array entry value is 1
ok 13 - second array entry is a UINT32
ok 14 - second array entry value is 2
ok 15 - third array entry is a UINT32
ok 16 - third array entry value is 3
ok 17 - found a map key
ok 18 - 'boolean' key's value is a boolean
ok 19 - 'boolean' key's value is true
ok 20 - found a map key
ok 21 - 'bytes' key's value is bytes
ok 22 - got expected value for bytes key
ok 23 - found a map key
ok 24 - 'double' key's value is a double
ok 25 - double value was approximately 42.123456
ok 26 - found a map key
ok 27 - 'float' key's value is a float
ok 28 - float value was approximately 1.1
ok 29 - found a map key
ok 30 - 'int32' key's value is an int32
ok 31 - got expected value for int32 key
ok 32 - found a map key
ok 33 - 'map' key's value is a map
ok 34 - 'map' key's value has 1 key/value pair
ok 35 - found a map key in 'map'
ok 36 - key name is mapX
ok 37 - 'map{mapX}' key's value is a map
ok 38 - 'map' key's value has 2 key/value pairs
ok 39 - found a map key in 'map{mapX}'
ok 40 - 'map{mapX}{arrayX}' key's value is an array
ok 41 - 'map{mapX}{arrayX}' key's value has 3 elements
ok 42 - first array entry is a UINT32
ok 43 - first array entry value is 7
ok 44 - second array entry is a UINT32
ok 45 - second array entry value is 8
ok 46 - third array entry is a UINT32
ok 47 - third array entry value is 9
ok 48 - found a map key in 'map{mapX}'
ok 49 - 'map{mapX}{utf8_stringX}' type is utf8_string
ok 50 - map{mapX}{utf8_stringX} value is 'hello'
ok 51 - found a map key
ok 52 - 'uint128' key's value is an uint128
ok 53 - uint128 field is 2**120
ok 54 - found a map key
ok 55 - 'uint16' key's value is an uint16
ok 56 - uint16 field is 100
ok 57 - found a map key
ok 58 - 'uint32' key's value is an uint32
ok 59 - uint32 field is 100
ok 60 - found a map key
ok 61 - 'uint64' key's value is an uint64
ok 62 - uint64 field is 2**60
ok 63 - found a map key
ok 64 - 'utf8_string' key's value is a string
ok 65 - got expected value for utf8_string key
1..65
PASS: data_entry_list_t
FAIL: data_types_t
ok 1 - open ./maxmind-db/test-data/MaxMind-DB-test-decoder.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-decoder.mmdb - mmap mode
ok 3 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-decoder.mmdb - mmap mode
ok 4 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-decoder.mmdb - mmap mode
ok 5 - MMDB_dump_entry_data_list is successful - mmap mode
ok 6 - MMDB_dump produced output - mmap mode
ok 7 - dump output contains expected line ({) - mmap mode
ok 8 - dump output contains expected line (  "array": ) - mmap mode
ok 9 - dump output contains expected line (    [) - mmap mode
ok 10 - dump output contains expected line (      1 <uint32>) - mmap mode
ok 11 - dump output contains expected line (      2 <uint32>) - mmap mode
ok 12 - dump output contains expected line (      3 <uint32>) - mmap mode
ok 13 - dump output contains expected line (    ]) - mmap mode
ok 14 - dump output contains expected line (  "boolean": ) - mmap mode
ok 15 - dump output contains expected line (    true <boolean>) - mmap mode
ok 16 - dump output contains expected line (  "bytes": ) - mmap mode
ok 17 - dump output contains expected line (    0000002A <bytes>) - mmap mode
ok 18 - dump output contains expected line (  "double": ) - mmap mode
ok 19 - dump output contains expected line (    42.123456 <double>) - mmap mode
ok 20 - dump output contains expected line (  "float": ) - mmap mode
ok 21 - dump output contains expected line (    1.100000 <float>) - mmap mode
ok 22 - dump output contains expected line (  "int32": ) - mmap mode
ok 23 - dump output contains expected line (    -268435456 <int32>) - mmap mode
ok 24 - dump output contains expected line (  "map": ) - mmap mode
ok 25 - dump output contains expected line (    {) - mmap mode
ok 26 - dump output contains expected line (      "mapX": ) - mmap mode
ok 27 - dump output contains expected line (        {) - mmap mode
ok 28 - dump output contains expected line (          "arrayX": ) - mmap mode
ok 29 - dump output contains expected line (            [) - mmap mode
ok 30 - dump output contains expected line (              7 <uint32>) - mmap mode
ok 31 - dump output contains expected line (              8 <uint32>) - mmap mode
ok 32 - dump output contains expected line (              9 <uint32>) - mmap mode
ok 33 - dump output contains expected line (            ]) - mmap mode
ok 34 - dump output contains expected line (          "utf8_stringX": ) - mmap mode
ok 35 - dump output contains expected line (            "hello" <utf8_string>) - mmap mode
ok 36 - dump output contains expected line (        }) - mmap mode
ok 37 - dump output contains expected line (    }) - mmap mode
ok 38 - dump output contains expected line (  "uint128": ) - mmap mode
ok 39 - dump output contains expected line (    0x01000000000000000000000000000000 <uint128>) - mmap mode
ok 40 - dump output contains expected line (  "uint16": ) - mmap mode
ok 41 - dump output contains expected line (    100 <uint16>) - mmap mode
ok 42 - dump output contains expected line (  "uint32": ) - mmap mode
ok 43 - dump output contains expected line (    268435456 <uint32>) - mmap mode
ok 44 - dump output contains expected line (  "uint64": ) - mmap mode
ok 45 - dump output contains expected line (    1152921504606846976 <uint64>) - mmap mode
ok 46 - dump output contains expected line (  "utf8_string": ) - mmap mode
ok 47 - dump output contains expected line (    "unicode! ☯ - ♫" <utf8_string>) - mmap mode
ok 48 - dump output contains expected line (}) - mmap mode
1..48
PASS: dump_t
ok 1 - open ./maxmind-db/test-data/MaxMind-DB-test-decoder.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-decoder.mmdb - mmap mode
ok 3 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-decoder.mmdb - mmap mode
ok 4 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-decoder.mmdb - mmap mode
ok 5 - status for MMDB_aget_value() is MMDB_SUCCESS - array[0]
ok 6 - found a value for array[0]
ok 7 - returned entry type is uint32 - array[0]
ok 8 - entry value is 1 - array[0]
ok 9 - status for MMDB_get_value() is MMDB_SUCCESS - array[0]
ok 10 - found a value for array[0]
ok 11 - returned entry type is uint32 - array[0]
ok 12 - entry value is 1 - array[0]
ok 13 - status for MMDB_vget_value() is MMDB_SUCCESS - array[0]
ok 14 - found a value for array[0]
ok 15 - returned entry type is uint32 - array[0]
ok 16 - entry value is 1 - array[0]
ok 17 - status for MMDB_aget_value() is MMDB_SUCCESS - array[2]
ok 18 - found a value for array[2]
ok 19 - returned entry type is uint32 - array[2]
ok 20 - entry value is 3 - array[2]
ok 21 - status for MMDB_get_value() is MMDB_SUCCESS - array[2]
ok 22 - found a value for array[2]
ok 23 - returned entry type is uint32 - array[2]
ok 24 - entry value is 3 - array[2]
ok 25 - status for MMDB_vget_value() is MMDB_SUCCESS - array[2]
ok 26 - found a value for array[2]
ok 27 - returned entry type is uint32 - array[2]
ok 28 - entry value is 3 - array[2]
ok 29 - open ./maxmind-db/test-data/MaxMind-DB-test-nested.mmdb status is success - mmap mode
ok 30 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-nested.mmdb - mmap mode
ok 31 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-nested.mmdb - mmap mode
ok 32 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-test-nested.mmdb - mmap mode
ok 33 - status for MMDB_aget_value() is MMDB_SUCCESS - map1{map2}{array}[0]{map3}{a}
ok 34 - found a value for map1{map2}{array}[0]{map3}{a}
ok 35 - returned entry type is uint32 - map1{map2}{array}[0]{map3}{a}
ok 36 - entry value is 1 - map1{map2}{array}[0]{map3}{a}
ok 37 - status for MMDB_get_value() is MMDB_SUCCESS - map1{map2}{array}[0]{map3}{a}
ok 38 - found a value for map1{map2}{array}[0]{map3}{a}
ok 39 - returned entry type is uint32 - map1{map2}{array}[0]{map3}{a}
ok 40 - entry value is 1 - map1{map2}{array}[0]{map3}{a}
ok 41 - status for MMDB_vget_value() is MMDB_SUCCESS - map1{map2}{array}[0]{map3}{a}
ok 42 - found a value for map1{map2}{array}[0]{map3}{a}
ok 43 - returned entry type is uint32 - map1{map2}{array}[0]{map3}{a}
ok 44 - entry value is 1 - map1{map2}{array}[0]{map3}{a}
ok 45 - status for MMDB_aget_value() is MMDB_SUCCESS - map1{map2}{array}[0]{map3}{c}
ok 46 - found a value for map1{map2}{array}[0]{map3}{c}
ok 47 - returned entry type is uint32 - map1{map2}{array}[0]{map3}{c}
ok 48 - entry value is 3 - map1{map2}{array}[0]{map3}{c}
ok 49 - status for MMDB_get_value() is MMDB_SUCCESS - map1{map2}{array}[0]{map3}{c}
ok 50 - found a value for map1{map2}{array}[0]{map3}{c}
ok 51 - returned entry type is uint32 - map1{map2}{array}[0]{map3}{c}
ok 52 - entry value is 3 - map1{map2}{array}[0]{map3}{c}
ok 53 - status for MMDB_vget_value() is MMDB_SUCCESS - map1{map2}{array}[0]{map3}{c}
ok 54 - found a value for map1{map2}{array}[0]{map3}{c}
ok 55 - returned entry type is uint32 - map1{map2}{array}[0]{map3}{c}
ok 56 - entry value is 3 - map1{map2}{array}[0]{map3}{c}
ok 57 - status for MMDB_aget_value() is MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR - map1{map42}{array}[0]{map3}{c}
ok 58 - did not find a value for map1{map42}{array}[0]{map3}{c}
ok 59 - status for MMDB_get_value() is MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR - map1{map42}{array}[0]{map3}{c}
ok 60 - did not find a value for map1{map42}{array}[0]{map3}{c}
ok 61 - status for MMDB_vget_value() is MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR - map1{map42}{array}[0]{map3}{c}
ok 62 - did not find a value for map1{map42}{array}[0]{map3}{c}
ok 63 - status for MMDB_aget_value() is MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR - map1{map42}{array}[9]{map3}{c}
ok 64 - did not find a value for map1{map42}{array}[9]{map3}{c}
ok 65 - status for MMDB_get_value() is MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR - map1{map42}{array}[9]{map3}{c}
ok 66 - did not find a value for map1{map42}{array}[9]{map3}{c}
ok 67 - status for MMDB_vget_value() is MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR - map1{map42}{array}[9]{map3}{c}
ok 68 - did not find a value for map1{map42}{array}[9]{map3}{c}
1..68
PASS: get_value_t
ok 1 - open ./maxmind-db/test-data/GeoIP2-City-Test.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/GeoIP2-City-Test.mmdb - mmap mode
not ok 3 - no getaddrinfo error in call to MMDB_lookup_string for 2001:218:: - GeoIP2-City-Test.mmdb - mmap mode
not ok 4 - no MMDB error in call to MMDB_lookup_string for 2001:218:: - GeoIP2-City-Test.mmdb - mmap mode
not ok 5 - no error from call to MMDB_vget_value - country{iso_code}
not ok 6 - found data for country{iso_code}
ok 7 - no getaddrinfo error in call to MMDB_lookup_string for 81.2.69.160 - GeoIP2-City-Test.mmdb - mmap mode
ok 8 - no MMDB error in call to MMDB_lookup_string for 81.2.69.160 - GeoIP2-City-Test.mmdb - mmap mode
ok 9 - no error from call to MMDB_vget_value - country{iso_code}
ok 10 - got the expected data type - country{iso_code}
ok 11 - found data for country{iso_code}
ok 12 - iso_code is GB
1..12
FAIL: get_value_pointer_bug_t
ok 1 - open ./maxmind-db/test-data/MaxMind-DB-no-ipv4-search-tree.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-no-ipv4-search-tree.mmdb - mmap mode
ok 3 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-no-ipv4-search-tree.mmdb - mmap mode
ok 4 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-no-ipv4-search-tree.mmdb - mmap mode
ok 5 - got a result for an IPv4 address included in a larger-than-IPv4 subnet - 1.1.1.1 - mmap mode
ok 6 - no error from call to MMDB_vget_value - string value for IP
ok 7 - got the expected data type - string value for IP
ok 8 - no getaddrinfo error in call to MMDB_lookup_string for 255.255.255.255 - MaxMind-DB-no-ipv4-search-tree.mmdb - mmap mode
ok 9 - no MMDB error in call to MMDB_lookup_string for 255.255.255.255 - MaxMind-DB-no-ipv4-search-tree.mmdb - mmap mode
ok 10 - got a result for an IPv4 address included in a larger-than-IPv4 subnet - 255.255.255.255 - mmap mode
ok 11 - no error from call to MMDB_vget_value - string value for IP
ok 12 - got the expected data type - string value for IP
1..12
PASS: ipv4_start_cache_t
ok 1 - open ./maxmind-db/test-data/MaxMind-DB-test-ipv4-28.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-ipv4-28.mmdb - mmap mode
not ok 3 - MMDB_lookup_string sets mmdb_error to MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR when we try to look up an IPv6 address in an IPv4-only database
1..3
FAIL: ipv6_lookup_in_ipv4_t
ok 1 - open ./maxmind-db/test-data/MaxMind-DB-test-ipv4-24.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-ipv4-24.mmdb - mmap mode
ok 3 - node_count is 37 - mmap mode
ok 4 - record_size is 24 - mmap mode
ok 5 - ip_version is 4 - mmap mode
ok 6 - database_type is Test - mmap mode
ok 7 - build_epoch > 1372636800
ok 8 - binary_format_major_version is 2 - mmap mode
ok 9 - binary_format_minor_version is 0 - mmap mode
ok 10 - found 2 languages - mmap mode
ok 11 - first language is en - mmap mode
ok 12 - second language is zh - mmap mode
ok 13 - found 2 descriptions - mmap mode
ok 14 - found en description
ok 15 - en description
ok 16 - found zh description
ok 17 - zh description
ok 18 - full_record_byte_size is 6 - mmap mode
ok 19 - get metadata as data_entry_list - mmap mode
ok 20 - metadata map has 9 key/value pairs
ok 21 - found a map key
ok 22 - binary_format_major_version == 2
ok 23 - found a map key
ok 24 - binary_format_minor_version == 0
ok 25 - found a map key
ok 26 - build_epoch > 1373571901
ok 27 - found a map key
ok 28 - type == Test
ok 29 - found a map key
ok 30 - 'description' key's value is a map
ok 31 - 'description' key's value has 2 key/value pairs
ok 32 - found a map key in 'map'
ok 33 - map value is a UTF8_STRING
ok 34 - en description == 'Test Database'
ok 35 - found a map key in 'map'
ok 36 - map value is a UTF8_STRING
ok 37 - zh description == 'Test Database Chinese'
ok 38 - found a map key
ok 39 - ip_version == 4
ok 40 - found a map key
ok 41 - 'languages' key's value is an array
ok 42 - 'languages' key's value has 2 elements
ok 43 - first array entry is a UTF8_STRING
ok 44 - first language is en
ok 45 - second array entry is a UTF8_STRING
ok 46 - second language is zh
ok 47 - found a map key
ok 48 - node_count == 37
ok 49 - found a map key
ok 50 - record_size == 24
1..50
PASS: metadata_t
ok 1 - open ./maxmind-db/test-data/MaxMind-DB-string-value-entries.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-string-value-entries.mmdb - mmap mode
ok 3 - no getaddrinfo error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-string-value-entries.mmdb - mmap mode
ok 4 - no MMDB error in call to MMDB_lookup_string for 1.1.1.1 - MaxMind-DB-string-value-entries.mmdb - mmap mode
ok 5 - status for MMDB_get_value() is MMDB_SUCCESS
ok 6 - found a value when varargs list is just NULL
ok 7 - returned entry type is utf8_string
1..7
PASS: no_map_get_value_t
ok 1 - open ./maxmind-db/test-data/MaxMind-DB-test-mixed-24.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-mixed-24.mmdb - mmap mode
ok 3 - left record for node 0 is 1 - 24 bit DB
ok 4 - left record for node 0 is 242 - 24 bit DB
ok 5 - left record for node 80 is 81 - 24 bit DB
ok 6 - left record for node 80 is 197 - 24 bit DB
ok 7 - left record for node 96 is 97 - 24 bit DB
ok 8 - left record for node 96 is 242 - 24 bit DB
ok 9 - left record for node 103 is 242 - 24 bit DB
ok 10 - left record for node 103 is 104 - 24 bit DB
ok 11 - left record for node 241 is 96 - 24 bit DB
ok 12 - left record for node 241 is 242 - 24 bit DB
ok 13 - open ./maxmind-db/test-data/MaxMind-DB-test-mixed-28.mmdb status is success - mmap mode
ok 14 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-mixed-28.mmdb - mmap mode
ok 15 - left record for node 0 is 1 - 28 bit DB
ok 16 - left record for node 0 is 242 - 28 bit DB
ok 17 - left record for node 80 is 81 - 28 bit DB
ok 18 - left record for node 80 is 197 - 28 bit DB
ok 19 - left record for node 96 is 97 - 28 bit DB
ok 20 - left record for node 96 is 242 - 28 bit DB
ok 21 - left record for node 103 is 242 - 28 bit DB
ok 22 - left record for node 103 is 104 - 28 bit DB
ok 23 - left record for node 241 is 96 - 28 bit DB
ok 24 - left record for node 241 is 242 - 28 bit DB
ok 25 - open ./maxmind-db/test-data/MaxMind-DB-test-mixed-32.mmdb status is success - mmap mode
ok 26 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 27 - left record for node 0 is 1 - 32 bit DB
ok 28 - left record for node 0 is 242 - 32 bit DB
ok 29 - left record for node 80 is 81 - 32 bit DB
ok 30 - left record for node 80 is 197 - 32 bit DB
ok 31 - left record for node 96 is 97 - 32 bit DB
ok 32 - left record for node 96 is 242 - 32 bit DB
ok 33 - left record for node 103 is 242 - 32 bit DB
ok 34 - left record for node 103 is 104 - 32 bit DB
ok 35 - left record for node 241 is 96 - 32 bit DB
ok 36 - left record for node 241 is 242 - 32 bit DB
1..36
PASS: read_node_t
ok 1 - open ./maxmind-db/test-data/MaxMind-DB-test-mixed-32.mmdb status is success - mmap mode
ok 2 - returned mmdb struct is not null for ./maxmind-db/test-data/MaxMind-DB-test-mixed-32.mmdb - mmap mode
ok 3 - no getaddrinfo error for 1.1.1.1 - mmap mode
ok 4 - no mmdb error for 1.1.1.1 - mmap mode
ok 5 - got a result for 1.1.1.1 in the database - mmap mode
ok 6 - no error from MMDB_get_value for 1.1.1.1 - mmap mode
ok 7 - MMDB_get_value found a utf8_string at 'ip' key for 1.1.1.1 - mmap mode
ok 8 - found expected result for 'ip' key for 1.1.1.1 - mmap mode
ok 9 - no getaddrinfo error for 1.1.1.2 - mmap mode
ok 10 - no mmdb error for 1.1.1.2 - mmap mode
ok 11 - got a result for 1.1.1.2 in the database - mmap mode
ok 12 - no error from MMDB_get_value for 1.1.1.2 - mmap mode
ok 13 - MMDB_get_value found a utf8_string at 'ip' key for 1.1.1.2 - mmap mode
ok 14 - found expected result for 'ip' key for 1.1.1.2 - mmap mode
ok 15 - no getaddrinfo error for 1.1.1.3 - mmap mode
ok 16 - no mmdb error for 1.1.1.3 - mmap mode
ok 17 - got a result for 1.1.1.3 in the database - mmap mode
ok 18 - no error from MMDB_get_value for 1.1.1.3 - mmap mode
ok 19 - MMDB_get_value found a utf8_string at 'ip' key for 1.1.1.3 - mmap mode
ok 20 - found expected result for 'ip' key for 1.1.1.3 - mmap mode
ok 21 - no getaddrinfo error for 1.1.1.7 - mmap mode
ok 22 - no mmdb error for 1.1.1.7 - mmap mode
ok 23 - got a result for 1.1.1.7 in the database - mmap mode
ok 24 - no error from MMDB_get_value for 1.1.1.7 - mmap mode
ok 25 - MMDB_get_value found a utf8_string at 'ip' key for 1.1.1.7 - mmap mode
ok 26 - found expected result for 'ip' key for 1.1.1.7 - mmap mode
ok 27 - no getaddrinfo error for 1.1.1.9 - mmap mode
ok 28 - no mmdb error for 1.1.1.9 - mmap mode
ok 29 - got a result for 1.1.1.9 in the database - mmap mode
ok 30 - no error from MMDB_get_value for 1.1.1.9 - mmap mode
ok 31 - MMDB_get_value found a utf8_string at 'ip' key for 1.1.1.9 - mmap mode
ok 32 - found expected result for 'ip' key for 1.1.1.9 - mmap mode
ok 33 - no getaddrinfo error for 1.1.1.15 - mmap mode
ok 34 - no mmdb error for 1.1.1.15 - mmap mode
ok 35 - got a result for 1.1.1.15 in the database - mmap mode
ok 36 - no error from MMDB_get_value for 1.1.1.15 - mmap mode
ok 37 - MMDB_get_value found a utf8_string at 'ip' key for 1.1.1.15 - mmap mode
ok 38 - found expected result for 'ip' key for 1.1.1.15 - mmap mode
ok 39 - no getaddrinfo error for 1.1.1.17 - mmap mode
ok 40 - no mmdb error for 1.1.1.17 - mmap mode
ok 41 - got a result for 1.1.1.17 in the database - mmap mode
ok 42 - no error from MMDB_get_value for 1.1.1.17 - mmap mode
ok 43 - MMDB_get_value found a utf8_string at 'ip' key for 1.1.1.17 - mmap mode
ok 44 - found expected result for 'ip' key for 1.1.1.17 - mmap mode
ok 45 - no getaddrinfo error for 1.1.1.31 - mmap mode
ok 46 - no mmdb error for 1.1.1.31 - mmap mode
ok 47 - got a result for 1.1.1.31 in the database - mmap mode
ok 48 - no error from MMDB_get_value for 1.1.1.31 - mmap mode
ok 49 - MMDB_get_value found a utf8_string at 'ip' key for 1.1.1.31 - mmap mode
ok 50 - found expected result for 'ip' key for 1.1.1.31 - mmap mode
ok 51 - no getaddrinfo error for 1.1.1.32 - mmap mode
ok 52 - no mmdb error for 1.1.1.32 - mmap mode
ok 53 - got a result for 1.1.1.32 in the database - mmap mode
ok 54 - no error from MMDB_get_value for 1.1.1.32 - mmap mode
ok 55 - MMDB_get_value found a utf8_string at 'ip' key for 1.1.1.32 - mmap mode
ok 56 - found expected result for 'ip' key for 1.1.1.32 - mmap mode
not ok 57 - no getaddrinfo error for ::1:ffff:ffff - mmap mode
not ok 58 - no getaddrinfo error for ::2:0:0 - mmap mode
not ok 59 - no getaddrinfo error for ::2:0:1a - mmap mode
not ok 60 - no getaddrinfo error for ::2:0:40 - mmap mode
not ok 61 - no getaddrinfo error for ::2:0:4f - mmap mode
not ok 62 - no getaddrinfo error for ::2:0:50 - mmap mode
not ok 63 - no getaddrinfo error for ::2:0:52 - mmap mode
not ok 64 - no getaddrinfo error for ::2:0:58 - mmap mode
not ok 65 - no getaddrinfo error for ::2:0:59 - mmap mode
1..65
FAIL: threads_t
ok 1 - MMDB_lib_version exists
ok 2 - version is 0.5.5
1..2
PASS: version_t
1..0 # skip all tests skipped - these tests need the Test::More 0.88, IPC::Run3 and Test::Output modules:
Can't locate IPC/Run3.pm in @INC (@INC contains: /usr/local/lib/perl5/5.16/BSDPAN /usr/local/lib/perl5/site_perl/5.16/mach /usr/local/lib/perl5/site_perl/5.16 /usr/local/lib/perl5/5.16/mach /usr/local/lib/perl5/5.16 .) at (eval 1) line 3.
BEGIN failed--compilation aborted at (eval 1) line 3.
PASS: mmdblookup_t.pl
====================================
5 of 15 tests failed
Please report to [email protected]
====================================
*** [check-TESTS] Error code 1

Stop in /usr/home/3dev/data/geoip/libmaxminddb/t.
*** [check-am] Error code 1

Stop in /usr/home/3dev/data/geoip/libmaxminddb/t.
*** [check-recursive] Error code 1

Stop in /usr/home/3dev/data/geoip/libmaxminddb.

Thanks

MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA

Hello

For consistency, this constant;

MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA

should probably be:

MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR

Also, libmaxminddb.md has a typo, calling this error:

MMDB_LOOKUP_PATH_DOES_MATCH_DATA_ERROR

Cheers

Albert

includedir not respected for maxminddb_config.h

In Debian, for co-installation purposes across multiple architectures (a feature called "multi-arch"), it is required that the packages ship identical contents for identical filenames across different architectures.

Since maxminddb_config.h varies by architecture (MMDB_UINT128_IS_BYTE_ARRAY is set to 1 on e.g. i386 but 0 on e.g. amd64, assuming recent toolchain), the only way to do this is to ship header files to /usr/include/<architecture triplet/ which is supported by the Debian toolchain as an include path.

I attempted to do so by passing --includedir to configure, but this resulted into this:

-rw-r--r-- root/root      7069 2015-07-19 02:31 ./usr/include/x86_64-linux-gnu/maxminddb.h
-rw-r--r-- root/root      6429 2015-07-19 02:31 ./usr/include/x86_64-linux-gnu/maxminddb-compat-util.h
-rw-r--r-- root/root       507 2015-07-19 02:31 ./usr/include/maxminddb_config.h

My autoconf foo isn't great, but the above diff seems to fix this:

--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@

 include_HEADERS = include/maxminddb.h src/maxminddb-compat-util.h

-include_execdir = $(exec_prefix)/include
+include_execdir = $(includedir)

 nodist_include_exec_HEADERS = include/maxminddb_config.h

Linking libmaxminddb on Solaris needs "-lsocket"

Symbols getaddrinfo(), freeaddrinfo() and gai_strerror() must be linked with "-lsocket" on Solaris:

Excerpt from man page:

Sockets Library Functions getaddrinfo(3SOCKET)

NAME
getaddrinfo, getnameinfo, freeaddrinfo, gai_strerror -
translate between node name and address

SYNOPSIS
cc [ flag... ] file ... -lsocket -lnsl [ library ... ]
#include <sys/socket.h>
#include <netdb.h>

...

Error during "make":

Undefined first referenced
symbol in file
__xnet_getaddrinfo ../src/.libs/libmaxminddb.so
freeaddrinfo ../src/.libs/libmaxminddb.so
gai_strerror mmdblookup.o
ld: fatal: Symbol referencing errors. No output written to .libs/mmdblookup

Possible solution: add "-lsocket" to libmaxminddb_la_LIBADD in src/Makefile on Solaris. As far as I can see, "-lnsl" is not strictly needed. libsocket itself has libnsl as a dependency.

Using
AC_SEARCH_LIBS(getaddrinfo, socket)
in configure.ac would add -lsocket to LIBS like you already do for -lm testing "fabs". Note that then all shared objects, the libmaxminddb and the mmdblookup binary would be linked against the socket lib. That doesn't break mmdblookup, it's just unneeded there. But since you do currently not care about linking everything against libm, you might not care about linking anything against libsocket either.

Update maxmind-db submodule

Not really a bug but it'd be great if you can update it so I can use a single submodule instead of having to use libmaxminddb and maxmind-db separately.

Win32 version not properly releasing closed files

I found when I MMDB_close a database, I can't actually delete the file until the process completes. Looking at the code, in the cleanup: code in map_file, based on Microsoft Windows documentation, I believe you should always close the mmh handle (not just on failure). If you successfully get the mmh, and MapViewOfFile to that mmh, then I think their docs say you can close the mmh, since the view will keep the file mapped and locked. Changed lines shown below.

cleanup:;
int saved_errno = errno;

ifdef _WIN32

if (INVALID_HANDLE_VALUE != fd) {
    CloseHandle(fd);
}

if (INVALID_HANDLE_VALUE != mmh) {
CloseHandle(mmh);
}

else

Secondly, looking at the WSAStartup and WSACleanup logic, In MMDB_open, I think you should actually do the WSAStartup if map_file returns successful, and not further down in that function. The MMDB_close() calls WSACleanup() if mmdb->file_content is not NULL, so you should make sure you call WSAStartup any time you have a valid mmdb->file_content, which is as soon as map_file() returns successfully.

I.e. I moved the WSAStartup earlier in MMDB_open...

if (MMDB_SUCCESS != (status = map_file(mmdb)) ) {
    goto cleanup;
}

ifdef _WIN32

WSADATA wsa;
WSAStartup(MAKEWORD(2, 2), &wsa);

endif

Is it easier if I create a pull request to describe this?

I can also email you an updated maxminddb.c file if you would like to look at it.

Thanks.

Bly

Are the library/objects/methods thread safe.

I am writing an application using libmaxminddb and was wondering which if any functions and objects can be shared between threads.

For example can I share a MMDB_s handle between threads and do simultaneous string lookups?

Also it might be useful for this information to go into the docs

Retrieving subdivisions

Subdivisions are not stored in the same format as, say, registered countries (presumably because you can have multiple subdivisions). The output of the command-line client doesn't make clear what I'd plug in to MMDB_get_value to grab a specific subdivision - and neither do the examples in the docs.

Install how?

I'd like to install this for use with https://github.com/da4nik/geoip2

However I get this when running make check (on osx 10.8)

make check-TESTS
/bin/sh: line 1: 12611 Segmentation fault: 11 ${dir}$tst
FAIL: bad_pointers_t
/bin/sh: line 1: 12631 Segmentation fault: 11 ${dir}$tst
FAIL: basic_lookup_t
/bin/sh: line 1: 12649 Segmentation fault: 11 ${dir}$tst
FAIL: data_entry_list_t
/bin/sh: line 1: 12667 Segmentation fault: 11 ${dir}$tst
FAIL: data_types_t
1..0 # SKIP This test requires the open_memstream() function
PASS: dump_t
/bin/sh: line 1: 12701 Segmentation fault: 11 ${dir}$tst
FAIL: get_value_t
/bin/sh: line 1: 12719 Segmentation fault: 11 ${dir}$tst
FAIL: get_value_pointer_bug_t
/bin/sh: line 1: 12737 Segmentation fault: 11 ${dir}$tst
FAIL: ipv4_start_cache_t
/bin/sh: line 1: 12755 Segmentation fault: 11 ${dir}$tst
FAIL: ipv6_lookup_in_ipv4_t
/bin/sh: line 1: 12773 Segmentation fault: 11 ${dir}$tst
FAIL: metadata_t
/bin/sh: line 1: 12791 Segmentation fault: 11 ${dir}$tst
FAIL: no_map_get_value_t
/bin/sh: line 1: 12809 Segmentation fault: 11 ${dir}$tst
FAIL: read_node_t
ok 1 - MMDB_lib_version exists
ok 2 - version is 0.5.0
1..2
PASS: version_t
1..0 # skip all tests skipped - these tests need the Test::More 0.88 and Test::Output modules

PASS: mmdblookup_t.pl

11 of 14 tests failed

Please report to [email protected]

make[2]: *** [check-TESTS] Error 1
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1

lookup path error(?)

With

ip=8.8.8.8
mmdblookup --file GeoLite2-Country.mmdb --ip "$ip" names en
or
mmdblookup --file GeoLite2-City.mmdb --ip "$ip" names en

I get
"
Got an error looking up the entry data - The lookup path does not match the data (key that doesn't exist, array index bigger than the array, expected array or map where none exists)
"

eg. when trying to use "path" (cities 1 results the same)
if I leave "names en", it works fine (throwing all)

version/db used:
https://github.com/maxmind/libmaxminddb/releases/download/1.0.2/libmaxminddb-1.0.2.tar.gz
http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz

The mmdblookup binary produces unusable JSON output

Hi,

I am trying to use the mmdblookup tool from the command line and I'm having trouble parsing the output. Specifically, the output seems to be ill-formatted JSON.

I'm running the latest version of the code. Here's the command I'm running:

bin/mmdblookup -f /usr/share/GeoIP/GeoLite2-City.mmdb -i 2.2.2.2 | python -mjson.tool

The above produces:

Expecting , delimiter: line 6 column 19 (char 67)

I see that according to the libmaxminddb man page:

The output is formatted in a JSON-ish fashion, but values are marked with their data type (except for maps and arrays which are shown with "{}" and "[]" respectively).

The specific output format may change in future releases, so you should not rely on the specific formatting produced by this function. It is intended to be used to show data to users in a readable way and for debugging purposes.

I can get further by replacing the data type tags with commas using sed, e.g.:

bin/mmdblookup -f /usr/share/GeoIP/GeoLite2-City.mmdb -i 2.2.2.2 | sed -e 's|<[^>]*>|,|g' | python -mjson.tool

but still no joy:

Expecting property name: line 13 column 11 (char 203)

I'm in the process of writing a Perl script to clean up this output so that it can then be reliably parsed by JSON...but I feel like this would be easier/better if it the JSON was fixed by whatever produced it in the first place. Of course, that may not be the goal of this tool, but that's what I'm after, anyway.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.