Added experimental GeoIP code

This commit is contained in:
Michiel Broek 2007-08-21 20:56:53 +00:00
parent 7986f415f7
commit df8d4452f2

View File

@ -79,17 +79,18 @@ char *typestr(int tp)
} }
#ifdef HAVE_GEOIP_H #ifdef HAVE_GEOIP_H
extern void _GeoIP_setup_dbfilename(void);
void geoiplookup(GeoIP* gi,char *hostname,int i) void geoiplookup(GeoIP* gi,char *hostname,int i)
{ {
const char * country_code; const char * country_code;
const char * country_name; const char * country_name;
// const char * domain_name;
// int netspeed;
int country_id; int country_id;
// GeoIPRegion * region;
GeoIPRecord * gir; GeoIPRecord * gir;
// const char * org;
if (GEOIP_COUNTRY_EDITION == i) { if (GEOIP_COUNTRY_EDITION == i) {
country_id = GeoIP_id_by_name(gi, hostname); country_id = GeoIP_id_by_name(gi, hostname);
@ -118,10 +119,10 @@ void geoiplookup(GeoIP* gi,char *hostname,int i)
} }
} }
} }
#endif #endif
int session(faddr *a, node *nl, int role, int tp, char *dt) int session(faddr *a, node *nl, int role, int tp, char *dt)
{ {
int rc = MBERR_OK; int rc = MBERR_OK;