diff options
author | Gerald Combs <gerald@wireshark.org> | 2011-10-05 22:27:51 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2011-10-05 22:27:51 +0000 |
commit | b9b05239f1ea9404752e74111f27117242b1431b (patch) | |
tree | f1b179a3e5bbf30b76e363c1962964779bfb60d7 /epan/geoip_db.h | |
parent | c9f750537555a97f81713c97b50b25b5481ad21e (diff) | |
download | wireshark-b9b05239f1ea9404752e74111f27117242b1431b.tar.gz |
Add GeoIP IPv6 database support. Tested with GeoIP 1.4.7, but older
versions *should* be supported.
svn path=/trunk/; revision=39280
Diffstat (limited to 'epan/geoip_db.h')
-rw-r--r-- | epan/geoip_db.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/epan/geoip_db.h b/epan/geoip_db.h index 61a69e4fae..35073b9f3e 100644 --- a/epan/geoip_db.h +++ b/epan/geoip_db.h @@ -27,11 +27,12 @@ #ifndef __GEOIP_DB_H__ #define __GEOIP_DB_H__ +#include <epan/ipv6-utils.h> /* Fake databases to make lat/lon values available */ /* XXX - find a better way to interface */ -#define WS_LAT_FAKE_EDITION 12 -#define WS_LON_FAKE_EDITION 13 +#define WS_LAT_FAKE_EDITION (NUM_DB_TYPES+1) +#define WS_LON_FAKE_EDITION (NUM_DB_TYPES+2) /** @@ -73,6 +74,16 @@ extern int geoip_db_type(guint dbnum); extern const char *geoip_db_lookup_ipv4(guint dbnum, guint32 addr, char *not_found); /** + * Look up an IPv6 address in a database + * + * @param dbnum Database index + * @param addr IPv6 address to look up + * @param not_found The string to return if the lookup fails. May be NULL. + * @return The database entry if found, else not_found + */ +extern const char *geoip_db_lookup_ipv6(guint dbnum, struct e_in6_addr addr, char *not_found); + +/** * Get all configured paths * * @return String with all paths separated by a path separator |