| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Typedefs | Functions
maxmind_db.h File Reference
`#include <epan/prefs.h>`
`#include <wsutil/inet_addr.h>`
`#include "ws_symbol_export.h"`

Go to the source code of this file.

## Classes
struct | _mmdb_lookup_t

## Typedefs
typedef struct _mmdb_lookup_t | mmdb_lookup_t

## Functions
WS_DLL_LOCAL void | maxmind_db_pref_init (module_t *nameres)
WS_DLL_LOCAL void | maxmind_db_pref_cleanup (void)
WS_DLL_LOCAL void | maxmind_db_pref_apply (void)
WS_DLL_PUBLIC WS_RETNONNULL const mmdb_lookup_t * | maxmind_db_lookup_ipv4 (const ws_in4_addr *addr)
WS_DLL_PUBLIC WS_RETNONNULL const mmdb_lookup_t * | maxmind_db_lookup_ipv6 (const ws_in6_addr *addr)
WS_DLL_PUBLIC char * | maxmind_db_get_paths (void)
WS_DLL_LOCAL bool | maxmind_db_lookup_process (void)
WS_DLL_PUBLIC void | maxmind_db_set_synchrony (bool synchronous)

## Detailed Description

Maxmind database support

Copyright 2018, Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

## Function Documentation

## ◆ maxmind_db_get_paths()

WS_DLL_PUBLIC char * maxmind_db_get_paths | ( | void |  | ) |

Get all configured paths

Returns
  String with all paths separated by a path separator. The string must be freed.

## ◆ maxmind_db_lookup_ipv4()

WS_DLL_PUBLIC WS_RETNONNULL const mmdb_lookup_t * maxmind_db_lookup_ipv4 | ( | const ws_in4_addr * | addr | ) |

Look up an IPv4 address in a database

Parameters

  addr | IPv4 address to look up

Returns
  The database entry if found, else NULL.

## ◆ maxmind_db_lookup_ipv6()

WS_DLL_PUBLIC WS_RETNONNULL const mmdb_lookup_t * maxmind_db_lookup_ipv6 | ( | const ws_in6_addr * | addr | ) |

Look up an IPv6 address in a database

Parameters

  addr | IPv6 address to look up

Returns
  The database entry if found, else NULL.

## ◆ maxmind_db_lookup_process()

WS_DLL_LOCAL bool maxmind_db_lookup_process | ( | void |  | ) |

Process outstanding requests.

Returns
  True if any new addresses were resolved.

## ◆ maxmind_db_pref_cleanup()

WS_DLL_LOCAL void maxmind_db_pref_cleanup | ( | void |  | ) |

Cleanup function called from prefs_cleanup

## ◆ maxmind_db_pref_init()

WS_DLL_LOCAL void maxmind_db_pref_init | ( | module_t * | nameres | ) |

Init / reset function called from prefs_reset

## ◆ maxmind_db_set_synchrony()

WS_DLL_PUBLIC void maxmind_db_set_synchrony | ( | bool | synchronous | ) |

Select whether lookups should be performed synchronously. Default is asynchronous lookups.

Parameters

  synchronous | Whether maxmind lookups should be synchronous.

XXX - if we ever have per-session host name etc. information, we should probably have the "resolve synchronously or asynchronously" flag be per-session, set with an epan API.