"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/maxminddb.h" between
libmaxminddb-1.5.0.tar.gz and libmaxminddb-1.5.2.tar.gz

About: libmaxminddb is a library that provides functions for working with MaxMind DB files (free GeoLite 2 or commercial GeoIP2).

maxminddb.h  (libmaxminddb-1.5.0):maxminddb.h  (libmaxminddb-1.5.2)
skipping to change at line 31 skipping to change at line 31
#include <stdarg.h> #include <stdarg.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#ifdef _WIN32 #ifdef _WIN32
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
/* libmaxminddb package version from configure */ /* libmaxminddb package version from configure */
#define PACKAGE_VERSION "1.5.0" #define PACKAGE_VERSION "1.5.2"
typedef ADDRESS_FAMILY sa_family_t; typedef ADDRESS_FAMILY sa_family_t;
#if defined(_MSC_VER) #if defined(_MSC_VER)
/* MSVC doesn't define signed size_t, copy it from configure */ /* MSVC doesn't define signed size_t, copy it from configure */
#define ssize_t SSIZE_T #define ssize_t SSIZE_T
/* MSVC doesn't support restricted pointers */ /* MSVC doesn't support restricted pointers */
#define restrict #define restrict
#endif #endif
skipping to change at line 90 skipping to change at line 90
#define MMDB_OUT_OF_MEMORY_ERROR (5) #define MMDB_OUT_OF_MEMORY_ERROR (5)
#define MMDB_UNKNOWN_DATABASE_FORMAT_ERROR (6) #define MMDB_UNKNOWN_DATABASE_FORMAT_ERROR (6)
#define MMDB_INVALID_DATA_ERROR (7) #define MMDB_INVALID_DATA_ERROR (7)
#define MMDB_INVALID_LOOKUP_PATH_ERROR (8) #define MMDB_INVALID_LOOKUP_PATH_ERROR (8)
#define MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR (9) #define MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR (9)
#define MMDB_INVALID_NODE_NUMBER_ERROR (10) #define MMDB_INVALID_NODE_NUMBER_ERROR (10)
#define MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR (11) #define MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR (11)
#if !(MMDB_UINT128_IS_BYTE_ARRAY) #if !(MMDB_UINT128_IS_BYTE_ARRAY)
#if MMDB_UINT128_USING_MODE #if MMDB_UINT128_USING_MODE
typedef unsigned int mmdb_uint128_t __attribute__ ((__mode__(TI))); typedef unsigned int mmdb_uint128_t __attribute__((__mode__(TI)));
#else #else
typedef unsigned __int128 mmdb_uint128_t; typedef unsigned __int128 mmdb_uint128_t;
#endif #endif
#endif #endif
/* This is a pointer into the data section for a given IP address lookup */ /* This is a pointer into the data section for a given IP address lookup */
typedef struct MMDB_entry_s { typedef struct MMDB_entry_s {
const struct MMDB_s *mmdb; const struct MMDB_s *mmdb;
uint32_t offset; uint32_t offset;
} MMDB_entry_s; } MMDB_entry_s;
skipping to change at line 142 skipping to change at line 142
* relevant for entries that part of a larger map or array * relevant for entries that part of a larger map or array
* struct. There's no good reason for an end user to look at this * struct. There's no good reason for an end user to look at this
* directly. */ * directly. */
uint32_t offset_to_next; uint32_t offset_to_next;
/* This is only valid for strings, utf8_strings or binary data */ /* This is only valid for strings, utf8_strings or binary data */
uint32_t data_size; uint32_t data_size;
/* This is an MMDB_DATA_TYPE_* constant */ /* This is an MMDB_DATA_TYPE_* constant */
uint32_t type; uint32_t type;
} MMDB_entry_data_s; } MMDB_entry_data_s;
/* This is the return type when someone asks for all the entry data in a map or /* This is the return type when someone asks for all the entry data in a map or
array */ * array */
typedef struct MMDB_entry_data_list_s { typedef struct MMDB_entry_data_list_s {
MMDB_entry_data_s entry_data; MMDB_entry_data_s entry_data;
struct MMDB_entry_data_list_s *next; struct MMDB_entry_data_list_s *next;
void *pool; void *pool;
} MMDB_entry_data_list_s; } MMDB_entry_data_list_s;
typedef struct MMDB_description_s { typedef struct MMDB_description_s {
const char *language; const char *language;
const char *description; const char *description;
} MMDB_description_s; } MMDB_description_s;
skipping to change at line 216 skipping to change at line 217
typedef struct MMDB_search_node_s { typedef struct MMDB_search_node_s {
uint64_t left_record; uint64_t left_record;
uint64_t right_record; uint64_t right_record;
uint8_t left_record_type; uint8_t left_record_type;
uint8_t right_record_type; uint8_t right_record_type;
MMDB_entry_s left_record_entry; MMDB_entry_s left_record_entry;
MMDB_entry_s right_record_entry; MMDB_entry_s right_record_entry;
} MMDB_search_node_s; } MMDB_search_node_s;
extern int MMDB_open(const char *const filename, uint32_t flags, extern int
MMDB_s *const mmdb); MMDB_open(const char *const filename, uint32_t flags, MMDB_s *const mmdb);
extern MMDB_lookup_result_s MMDB_lookup_string(const MMDB_s *const mmdb, extern MMDB_lookup_result_s MMDB_lookup_string(const MMDB_s *const mmdb,
const char *const ipstr, const char *const ipstr,
int *const gai_error, int *const gai_error,
int *const mmdb_error); int *const mmdb_error);
extern MMDB_lookup_result_s MMDB_lookup_sockaddr( extern MMDB_lookup_result_s
const MMDB_s *const mmdb, MMDB_lookup_sockaddr(const MMDB_s *const mmdb,
const struct sockaddr *const sockaddr, const struct sockaddr *const sockaddr,
int *const mmdb_error); int *const mmdb_error);
extern int MMDB_read_node(const MMDB_s *const mmdb, extern int MMDB_read_node(const MMDB_s *const mmdb,
uint32_t node_number, uint32_t node_number,
MMDB_search_node_s *const node); MMDB_search_node_s *const node);
extern int MMDB_get_value(MMDB_entry_s *const start, extern int MMDB_get_value(MMDB_entry_s *const start,
MMDB_entry_data_s *const entry_data, MMDB_entry_data_s *const entry_data,
...); ...);
extern int MMDB_vget_value(MMDB_entry_s *const start, extern int MMDB_vget_value(MMDB_entry_s *const start,
MMDB_entry_data_s *const entry_data, MMDB_entry_data_s *const entry_data,
va_list va_path); va_list va_path);
extern int MMDB_aget_value(MMDB_entry_s *const start, extern int MMDB_aget_value(MMDB_entry_s *const start,
MMDB_entry_data_s *const entry_data, MMDB_entry_data_s *const entry_data,
const char *const *const path); const char *const *const path);
extern int MMDB_get_metadata_as_entry_data_list( extern int MMDB_get_metadata_as_entry_data_list(
const MMDB_s *const mmdb, MMDB_entry_data_list_s **const entry_data_list); const MMDB_s *const mmdb, MMDB_entry_data_list_s **const entry_data_list);
extern int MMDB_get_entry_data_list( extern int
MMDB_entry_s *start, MMDB_entry_data_list_s **const entry_data_list); MMDB_get_entry_data_list(MMDB_entry_s *start,
extern void MMDB_free_entry_data_list( MMDB_entry_data_list_s **const entry_data_list);
MMDB_entry_data_list_s *const entry_data_list); extern void
MMDB_free_entry_data_list(MMDB_entry_data_list_s *const entry_data_list);
extern void MMDB_close(MMDB_s *const mmdb); extern void MMDB_close(MMDB_s *const mmdb);
extern const char *MMDB_lib_version(void); extern const char *MMDB_lib_version(void);
extern int MMDB_dump_entry_data_list(FILE *const stream, extern int
MMDB_entry_data_list_s *const entry_data_li MMDB_dump_entry_data_list(FILE *const stream,
st, MMDB_entry_data_list_s *const entry_data_list,
int indent); int indent);
extern const char *MMDB_strerror(int error_code); extern const char *MMDB_strerror(int error_code);
#endif /* MAXMINDDB_H */ #endif /* MAXMINDDB_H */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 8 change blocks. 
19 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)