aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-02-08 17:20:26 -0800
committerGerald Combs <gerald@wireshark.org>2018-03-06 18:02:21 +0000
commita1da75c554881667dd92e11f098630f2d604872b (patch)
treeb1d6a60a663bf93f1eede809a0c383544508d6e2 /CMakeLists.txt
parentb2d3680558d19998c55b48e9807a26e145756eba (diff)
Transition from GeoIP Legacy to MaxMindDB.
MaxMind is discontinuing its legacy databases in April in favor of GeoIP2, which use a newer database format (MaxMind DB). The reference C library (libmaxminddb) is available under the Apache 2.0 license which isn't quite compatible with ours. Add mmdbresolve, a utility that reads IPv4 and IPv6 addresses on stdin and prints resolved information on stdout. Place it under a liberal license (MIT) so that we can keep libmaxminddb at arm's length. Add epan/maxmind_db.[ch], which spawns mmdbresolve and communicates with it via stdio. Migrate the preferences and documentation to MaxMindDB. Change the IPv4 and IPv6 asnum fields to FT_UINT32s. Change the geographic coordinate fields to FT_DOUBLEs. Bug: 10658 Change-Id: I24aeed637bea1b41d173270bda413af230f4425f Reviewed-on: https://code.wireshark.org/review/26214 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt34
1 files changed, 26 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 747223adf6..96b013892a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -923,6 +923,11 @@ if(BUILD_wireshark)
endif()
endif()
+# MaxMind DB address resolution
+if(BUILD_mmdbresolve)
+ set(PACKAGELIST ${PACKAGELIST} MaxMindDB)
+endif()
+
# SMI SNMP
if(ENABLE_SMI)
set(PACKAGELIST ${PACKAGELIST} SMI)
@@ -991,11 +996,6 @@ if(ENABLE_LUA)
set(PACKAGELIST ${PACKAGELIST} LUA)
endif()
-# GeoIP address resolving
-if(ENABLE_GEOIP)
- set(PACKAGELIST ${PACKAGELIST} GEOIP)
-endif()
-
if(ENABLE_NETLINK)
set(PACKAGELIST ${PACKAGELIST} NL)
endif()
@@ -1117,8 +1117,8 @@ endif()
if(HAVE_LIBKERBEROS)
set(HAVE_KERBEROS 1)
endif()
-if(HAVE_LIBGEOIP)
- set(HAVE_GEOIP 1)
+if(MAXMINDDB_FOUND)
+ set(HAVE_MAXMINDDB 1)
endif()
if(LIBSSH_FOUND)
set(HAVE_LIBSSH 1)
@@ -1648,6 +1648,10 @@ set(INSTALL_FILES
${CMAKE_BINARY_DIR}/doc/wireshark-filter.html
)
+if(MAXMINDDB_FOUND)
+ list(APPEND INSTALL_FILES ${CMAKE_BINARY_DIR}/doc/mmdbresolve.html)
+endif()
+
if (BUILD_corbaidl2wrs)
list(APPEND INSTALL_FILES ${CMAKE_BINARY_DIR}/doc/idl2wrs.html)
endif()
@@ -2919,6 +2923,20 @@ if(BUILD_randpktdump)
add_dependencies(extcaps randpktdump)
endif()
+if (MAXMINDDB_FOUND)
+ set(mmdbresolve_LIBS
+ # Note: libmaxminddb is not GPL-2 compatible.
+ ${MAXMINDDB_LIBRARY}
+ )
+ set(mmdbresolve_FILES
+ mmdbresolve.c
+ )
+ add_executable(mmdbresolve ${mmdbresolve_FILES})
+ set_extra_executable_properties(mmdbresolve "Executables")
+ target_link_libraries(mmdbresolve ${mmdbresolve_LIBS})
+ install(TARGETS mmdbresolve RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+endif()
+
if(ENABLE_APPLICATION_BUNDLE)
add_custom_target(app_bundle)
set_target_properties(app_bundle PROPERTIES FOLDER "Copy Tasks")
@@ -2990,7 +3008,7 @@ set(CLEAN_C_FILES
${androiddump_FILES}
${sshdump_FILES}
${ciscodump_FILES}
- ${udpdump_FILES}
+ ${mmdbresolve_FILES}
)
# Make sure we don't pass /WX to rc.exe. Rc doesn't have a /WX flag,