• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/GeoIP-1.5.1/libGeoIP/

Lines Matching defs:ipnum

486 int GeoIP_is_private_ipnum_v4( unsigned long ipnum ){
487 return ((ipnum >= 167772160U && ipnum <= 184549375U)
488 || (ipnum >= 2851995648U && ipnum <= 2852061183U)
489 || (ipnum >= 2886729728U && ipnum <= 2887778303U)
490 || (ipnum >= 3232235520U && ipnum <= 3232301055U)
491 || (ipnum >= 2130706432U && ipnum <= 2147483647U))? 1 : 0;
495 unsigned long ipnum = GeoIP_addr_to_num(addr);
496 return GeoIP_is_private_ipnum_v4(ipnum);
747 unsigned int _GeoIP_seek_record_v6_gl (GeoIP *gi, geoipv6_t ipnum, GeoIPLookup * gl) {
761 __GEOIP_PREPARE_TEREDO(&ipnum);
773 if (GEOIP_CHKBIT_V6(depth, ipnum.s6_addr )) {
819 _GeoIP_inet_ntop(AF_INET6, &ipnum.s6_addr[0], paddr, ADDR_STR_LEN);
820 fprintf(stderr,"Error Traversing Database for ipnum = %s - Perhaps database is corrupt?\n", paddr);
827 geoipv6_t ipnum;
828 if ( 1 == _GeoIP_inet_pton(AF_INET6, addr, &ipnum.s6_addr[0] ) )
829 return ipnum;
834 unsigned int _GeoIP_seek_record_gl (GeoIP *gi, unsigned long ipnum, GeoIPLookup *gl) {
857 if (ipnum & (1 << depth)) {
902 fprintf(stderr,"Error Traversing Database for ipnum = %lu - Perhaps database is corrupt?\n",ipnum);
910 unsigned long ipnum;
913 octet = ipnum = 0;
918 ipnum <<= 8;
919 ipnum += octet;
935 ipnum <<= 8;
936 return ipnum + octet;
1205 geoipv6_t ipnum;
1218 memcpy(ipnum.s6_addr, ((struct sockaddr_in6 *) aifirst->ai_addr)->sin6_addr.s6_addr, sizeof(geoipv6_t));
1220 /* inet_pton(AF_INET6, host, ipnum.s6_addr); */
1222 return ipnum;
1226 unsigned long ipnum;
1235 if (!(ipnum = _GeoIP_lookupaddress(name)))
1237 ret = _GeoIP_seek_record_gl(gi, ipnum, gl) - gi->databaseSegments[0];
1242 geoipv6_t ipnum;
1251 ipnum = _GeoIP_lookupaddress_v6(name);
1252 if (__GEOIP_V6_IS_NULL(ipnum))
1255 ret = _GeoIP_seek_record_v6_gl(gi, ipnum, gl) - gi->databaseSegments[0];
1295 const char *GeoIP_country_name_by_ipnum_gl (GeoIP* gi, unsigned long ipnum, GeoIPLookup * gl) {
1297 country_id = GeoIP_id_by_ipnum_gl(gi, ipnum, gl);
1301 const char *GeoIP_country_name_by_ipnum_v6_gl (GeoIP* gi, geoipv6_t ipnum, GeoIPLookup * gl) {
1303 country_id = GeoIP_id_by_ipnum_v6_gl(gi, ipnum, gl);
1307 const char *GeoIP_country_code_by_ipnum_gl (GeoIP* gi, unsigned long ipnum, GeoIPLookup * gl) {
1309 country_id = GeoIP_id_by_ipnum_gl(gi, ipnum, gl);
1313 const char *GeoIP_country_code_by_ipnum_v6_gl (GeoIP* gi, geoipv6_t ipnum, GeoIPLookup * gl) {
1315 country_id = GeoIP_id_by_ipnum_v6_gl(gi, ipnum, gl);
1319 const char *GeoIP_country_code3_by_ipnum_gl (GeoIP* gi, unsigned long ipnum, GeoIPLookup * gl) {
1321 country_id = GeoIP_id_by_ipnum_gl(gi, ipnum, gl);
1325 const char *GeoIP_country_code3_by_ipnum_v6_gl (GeoIP* gi, geoipv6_t ipnum, GeoIPLookup * gl) {
1327 country_id = GeoIP_id_by_ipnum_v6_gl(gi, ipnum, gl);
1349 geoipv6_t ipnum;
1361 ipnum = _GeoIP_addr_to_num_v6(addr);
1362 ret = _GeoIP_seek_record_v6_gl(gi, ipnum, gl) - gi->databaseSegments[0];
1368 unsigned long ipnum;
1382 ipnum = GeoIP_addr_to_num(addr);
1383 ret = _GeoIP_seek_record_gl(gi, ipnum, gl) - gi->databaseSegments[0];
1387 int GeoIP_id_by_ipnum_v6_gl (GeoIP* gi, geoipv6_t ipnum, GeoIPLookup * gl) {
1396 ret = _GeoIP_seek_record_v6_gl(gi, ipnum, gl) - gi->databaseSegments[0];
1400 int GeoIP_id_by_ipnum_gl (GeoIP* gi, unsigned long ipnum, GeoIPLookup * gl) {
1402 if (ipnum == 0) {
1414 ret = _GeoIP_seek_record_gl(gi, ipnum, gl) - gi->databaseSegments[0];
1559 GeoIPRegion * _get_region_gl(GeoIP* gi, unsigned long ipnum, GeoIPLookup * gl) {
1564 GeoIP_assign_region_by_inetaddr_gl(gi, htonl(ipnum), region, gl);
1570 GeoIPRegion * _get_region_v6_gl(GeoIP* gi, geoipv6_t ipnum, GeoIPLookup * gl) {
1575 GeoIP_assign_region_by_inetaddr_v6_gl(gi, ipnum, region, gl);
1581 unsigned long ipnum;
1590 ipnum = GeoIP_addr_to_num(addr);
1591 return _get_region_gl(gi, ipnum, gl);
1595 geoipv6_t ipnum;
1604 ipnum = _GeoIP_addr_to_num_v6(addr);
1605 return _get_region_v6_gl(gi, ipnum, gl);
1609 unsigned long ipnum;
1618 if (!(ipnum = _GeoIP_lookupaddress(name)))
1620 return _get_region_gl(gi, ipnum, gl);
1624 geoipv6_t ipnum;
1634 ipnum = _GeoIP_lookupaddress_v6(name);
1635 if (__GEOIP_V6_IS_NULL(ipnum))
1637 return _get_region_v6_gl(gi, ipnum, gl);
1640 GeoIPRegion * GeoIP_region_by_ipnum_gl (GeoIP* gi, unsigned long ipnum, GeoIPLookup * gl) {
1646 return _get_region_gl(gi, ipnum, gl);
1649 GeoIPRegion * GeoIP_region_by_ipnum_v6_gl (GeoIP* gi, geoipv6_t ipnum, GeoIPLookup * gl) {
1655 return _get_region_v6_gl(gi, ipnum, gl);
1664 char *_get_name_gl (GeoIP* gi, unsigned long ipnum, GeoIPLookup * gl) {
1690 seek_org = _GeoIP_seek_record_gl(gi, ipnum, gl);
1719 char *_get_name_v6_gl (GeoIP* gi, geoipv6_t ipnum, GeoIPLookup * gl) {
1742 seek_org = _GeoIP_seek_record_v6_gl(gi, ipnum, gl);
1770 char * GeoIP_num_to_addr (unsigned long ipnum) {
1780 octet[3 - i] = ipnum % 256;
1781 ipnum >>= 8;
1798 unsigned long ipnum;
1813 ipnum = GeoIP_addr_to_num(addr);
1814 target_value = _GeoIP_seek_record_gl(gi, ipnum, gl);
1817 left_seek = ipnum & mask;
1853 char *GeoIP_name_by_ipnum_gl (GeoIP* gi, unsigned long ipnum, GeoIPLookup * gl) {
1854 return _get_name_gl(gi,ipnum, gl);
1857 char *GeoIP_name_by_ipnum_v6_gl (GeoIP* gi, geoipv6_t ipnum, GeoIPLookup * gl) {
1858 return _get_name_v6_gl(gi,ipnum, gl);
1862 unsigned long ipnum;
1866 ipnum = GeoIP_addr_to_num(addr);
1867 return _get_name_gl(gi, ipnum, gl);
1871 geoipv6_t ipnum;
1875 ipnum = _GeoIP_addr_to_num_v6(addr);
1876 return _get_name_v6_gl(gi, ipnum, gl);
1880 unsigned long ipnum;
1884 if (!(ipnum = _GeoIP_lookupaddress(name)))
1886 return _get_name_gl(gi, ipnum, gl);
1890 geoipv6_t ipnum;
1894 ipnum = _GeoIP_lookupaddress_v6(name);
1895 if (__GEOIP_V6_IS_NULL(ipnum))
1897 return _get_name_v6_gl(gi, ipnum, gl);