-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from retropc/maxminddb
GEOIP: rewrite to use libmaxminddb and add ipv6 support
- Loading branch information
Showing
8 changed files
with
223 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
#define COUNTRY_MIN 0 | ||
#define COUNTRY_MAX 253 | ||
#ifndef __GEOIP_H | ||
#define __GEOIP_H | ||
|
||
extern int geoip_totals[COUNTRY_MAX + 1]; | ||
struct country; | ||
|
||
int geoip_lookupcode(char *code); | ||
typedef int (*GeoIP_LookupCode)(char *); | ||
/* "code" -> GB/FR */ | ||
/* "name" -> United Kingdom/France */ | ||
|
||
struct country *geoip_lookup_code(const char *); | ||
struct country *geoip_lookup_nick(nick *); | ||
|
||
struct country *geoip_next(struct country *); | ||
|
||
const char *geoip_code(struct country *c); | ||
const char *geoip_name(struct country *c); | ||
int geoip_total(struct country *c); | ||
|
||
#endif |
Oops, something went wrong.