diff options
author | Peter Wu <peter@lekensteyn.nl> | 2019-02-09 23:25:17 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-02-11 05:13:37 +0000 |
commit | 5c4458345ca686e2f34d9c0d6df257cd82dd14c5 (patch) | |
tree | 2a0c0957f01cd69e8f3f105f2e75e84364e48313 /epan/maxmind_db.h | |
parent | 426107f2b5708033e428364151b834be1dc66903 (diff) |
Change maxmind_db_lookup_ipv4 to look more like maxmind_db_lookup_ipv6
Both functions accept an address in network byte order, but
maxmind_db_lookup_ipv4 does not accept a pointer. Add an indirection and
remove unnecessary memcpy calls. This removes some confusion for me.
Change-Id: I291c54c8c55bc8048ca011b84918c8a5d3ed1398
Reviewed-on: https://code.wireshark.org/review/31951
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/maxmind_db.h')
-rw-r--r-- | epan/maxmind_db.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/maxmind_db.h b/epan/maxmind_db.h index 0bbf668a02..251bf558e8 100644 --- a/epan/maxmind_db.h +++ b/epan/maxmind_db.h @@ -17,8 +17,9 @@ extern "C" { #endif /* __cplusplus */ -#include <epan/ipv6.h> #include <epan/prefs.h> +#include <wsutil/inet_ipv4.h> +#include <wsutil/inet_ipv6.h> #include "ws_symbol_export.h" typedef struct _mmdb_lookup_t { @@ -49,7 +50,7 @@ WS_DLL_LOCAL void maxmind_db_pref_cleanup(void); * * @return The database entry if found, else NULL. */ -WS_DLL_PUBLIC WS_RETNONNULL const mmdb_lookup_t *maxmind_db_lookup_ipv4(guint32 addr); +WS_DLL_PUBLIC WS_RETNONNULL const mmdb_lookup_t *maxmind_db_lookup_ipv4(const ws_in4_addr *addr); /** * Look up an IPv6 address in a database |