GeoIPRecord * GeoIP_record_by_name (GeoIP* gi, const char *name) { unsigned long ipnum; if (name == NULL) { return 0; } ipnum = _GeoIP_lookupaddress(name); return _get_record(gi, ipnum); }
GeoIPRecord * GeoIP_record_by_addr (GeoIP* gi, const char *addr) { unsigned long ipnum; if (addr == NULL) { return 0; } ipnum = _GeoIP_addr_to_num(addr); return _get_record(gi, ipnum); }
UCHAR * FileRecordNumber :: get_record( int recno, UINT32& magic ) { frn_record * x; x = _get_record( recno ); magic = (UINT32)x; return x->dat; }
GeoIPRecord * GeoIP_record_by_name (GeoIP* gi, const char *name) { unsigned long ipnum; struct hostent * host; if (name == NULL) { return 0; } host = gethostbyname(name); if (host == NULL) { return 0; } ipnum = ntohl(*((uint32_t*)host->h_addr_list[0])); return _get_record(gi, ipnum); }
GeoIPRecord * GeoIP_record_by_ipnum (GeoIP* gi, unsigned long ipnum) { return _get_record(gi, ipnum); }