| 1 | #MIT License | ||||||||||||||||||||||||||||||||||||||||||
| 2 | # | ||||||||||||||||||||||||||||||||||||||||||
| 3 | #Copyright (c) 2025 IP2Location.com | ||||||||||||||||||||||||||||||||||||||||||
| 4 | # | ||||||||||||||||||||||||||||||||||||||||||
| 5 | #Permission is hereby granted, free of charge, to any person obtaining a copy | ||||||||||||||||||||||||||||||||||||||||||
| 6 | #of this software and associated documentation files (the "Software"), to deal | ||||||||||||||||||||||||||||||||||||||||||
| 7 | #in the Software without restriction, including without limitation the rights | ||||||||||||||||||||||||||||||||||||||||||
| 8 | #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||||||||||||||||||||||||||||||||||||||||
| 9 | #copies of the Software, and to permit persons to whom the Software is | ||||||||||||||||||||||||||||||||||||||||||
| 10 | #furnished to do so, subject to the following conditions: | ||||||||||||||||||||||||||||||||||||||||||
| 11 | # | ||||||||||||||||||||||||||||||||||||||||||
| 12 | #The above copyright notice and this permission notice shall be included in all | ||||||||||||||||||||||||||||||||||||||||||
| 13 | #copies or substantial portions of the Software. | ||||||||||||||||||||||||||||||||||||||||||
| 14 | # | ||||||||||||||||||||||||||||||||||||||||||
| 15 | #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||||||||||||||||||||||||||||||||||||||||
| 16 | #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||||||||||||||||||||||||||||||||||||||||
| 17 | #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||||||||||||||||||||||||||||||||||||||||
| 18 | #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||||||||||||||||||||||||||||||||||||||||
| 19 | #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||||||||||||||||||||||||||||||||||||||||
| 20 | #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||||||||||||||||||||||||||||||||||||||||
| 21 | #SOFTWARE. | ||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | package Geo::IP2Location; | ||||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||
| 25 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | 3 | ▶ | use vars qw(@ISA $VERSION @EXPORT); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 27 | 3 | ▶ | use Math::BigInt; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 28 | 3 | ▶ | use bigint; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | 3 | $VERSION = '8.80'; | |||||||||||||||||||||||||||||||||||||||||
| 31 | 3 | require Exporter; | |||||||||||||||||||||||||||||||||||||||||
| 32 | 3 | @ISA = qw(Exporter); | |||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||
| 34 | 3 | ▶ | use constant UNKNOWN => "UNKNOWN IP ADDRESS"; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 35 | 3 | ▶ | use constant IPV6_ADDRESS_IN_IPV4_BIN => "IPV6 ADDRESS MISSING IN IPV4 BIN"; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 36 | 3 | ▶ | use constant NO_IP => "MISSING IP ADDRESS"; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 37 | 3 | ▶ | use constant INVALID_IPV6_ADDRESS => "INVALID IPV6 ADDRESS"; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 38 | 3 | ▶ | use constant INVALID_IPV4_ADDRESS => "INVALID IPV4 ADDRESS"; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 39 | 3 | ▶ | use constant INVALID_IP_ADDRESS => "INVALID IP ADDRESS"; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 40 | 3 | ▶ | use constant INVALID_BIN_DATABASE => "Incorrect IP2Location BIN file format. Please make sure that you are using the latest IP2Location BIN file."; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 41 | 3 | ▶ | use constant NOT_SUPPORTED => "This parameter is unavailable in selected .BIN data file. Please upgrade data file."; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 42 | 3 | ▶ | use constant MAX_IPV4_RANGE => 4294967295; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 43 | 3 | ▶ | use constant MAX_IPV6_RANGE => 340282366920938463463374607431768211455; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 44 | 3 | ▶ | use constant IP_COUNTRY => 1; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 45 | 3 | ▶ | use constant IP_COUNTRY_ISP => 2; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 46 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY => 3; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 47 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_ISP => 4; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 48 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE => 5; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 49 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ISP => 6; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 50 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_ISP_DOMAIN => 7; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 51 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ISP_DOMAIN => 8; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 52 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE => 9; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 53 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_ISP_DOMAIN => 10; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 54 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE => 11; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 55 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN => 12; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 56 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_TIMEZONE_NETSPEED => 13; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 57 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED => 14; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 58 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_AREACODE => 15; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 59 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE => 16; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 60 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_TIMEZONE_NETSPEED_WEATHER => 17; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 61 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE_WEATHER => 18; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 62 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ISP_DOMAIN_MOBILE => 19; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 63 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE_WEATHER_MOBILE => 20; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 64 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_AREACODE_ELEVATION => 21; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 65 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE_WEATHER_MOBILE_ELEVATION => 22; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 66 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ISP_DOMAIN_MOBILE_USAGETYPE => 23; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 67 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE_WEATHER_MOBILE_ELEVATION_USAGETYPE => 24; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 68 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE_WEATHER_MOBILE_ELEVATION_USAGETYPE_ADDRESSTYPE_CATEGORY => 25; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 69 | 3 | ▶ | use constant IP_COUNTRY_REGION_CITY_LATITUDE_LONGITUDE_ZIPCODE_TIMEZONE_ISP_DOMAIN_NETSPEED_AREACODE_WEATHER_MOBILE_ELEVATION_USAGETYPE_ADDRESSTYPE_CATEGORY_DISTRICT_ASN => 26; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||
| 71 | 3 | ▶ | use constant COUNTRYSHORT => 1; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 72 | 3 | ▶ | use constant COUNTRYLONG => 2; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 73 | 3 | ▶ | use constant REGION => 3; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 74 | 3 | ▶ | use constant CITY => 4; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 75 | 3 | ▶ | use constant ISP => 5; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 76 | 3 | ▶ | use constant LATITUDE => 6; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 77 | 3 | ▶ | use constant LONGITUDE => 7; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 78 | 3 | ▶ | use constant DOMAIN => 8; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 79 | 3 | ▶ | use constant ZIPCODE => 9; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 80 | 3 | ▶ | use constant TIMEZONE => 10; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 81 | 3 | ▶ | use constant NETSPEED => 11; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 82 | 3 | ▶ | use constant IDDCODE => 12; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 83 | 3 | ▶ | use constant AREACODE => 13; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 84 | 3 | ▶ | use constant WEATHERSTATIONCODE => 14; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 85 | 3 | ▶ | use constant WEATHERSTATIONNAME => 15; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 86 | 3 | ▶ | use constant MCC => 16; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 87 | 3 | ▶ | use constant MNC => 17; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 88 | 3 | ▶ | use constant MOBILEBRAND => 18; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 89 | 3 | ▶ | use constant ELEVATION => 19; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 90 | 3 | ▶ | use constant USAGETYPE => 20; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 91 | 3 | ▶ | use constant ADDRESSTYPE => 21; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 92 | 3 | ▶ | use constant CATEGORY => 22; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 93 | 3 | ▶ | use constant DISTRICT => 23; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 94 | 3 | ▶ | use constant ASN => 24; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 95 | 3 | ▶ | use constant AS => 25; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 96 | 3 | ▶ | use constant ASDOMAIN => 26; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 97 | 3 | ▶ | use constant ASUSAGETYPE => 27; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 98 | 3 | ▶ | use constant ASCIDR => 28; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||||||||||||
| 100 | 3 | ▶ | use constant ALL => 100; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 101 | 3 | ▶ | use constant IPV4 => 0; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 102 | 3 | ▶ | use constant IPV6 => 1; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||
| 104 | 3 | my @COUNTRY_POSITION = (0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2); | |||||||||||||||||||||||||||||||||||||||||
| 105 | 3 | my @REGION_POSITION = (0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3); | |||||||||||||||||||||||||||||||||||||||||
| 106 | 3 | my @CITY_POSITION = (0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4); | |||||||||||||||||||||||||||||||||||||||||
| 107 | 3 | my @LATITUDE_POSITION = (0, 0, 0, 0, 0, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5); | |||||||||||||||||||||||||||||||||||||||||
| 108 | 3 | my @LONGITUDE_POSITION = (0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6); | |||||||||||||||||||||||||||||||||||||||||
| 109 | 3 | my @ZIPCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 0, 7, 7, 7, 0, 7, 0, 7, 7, 7, 0, 7, 7, 7); | |||||||||||||||||||||||||||||||||||||||||
| 110 | 3 | my @TIMEZONE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 7, 8, 8, 8, 7, 8, 0, 8, 8, 8, 0, 8, 8, 8); | |||||||||||||||||||||||||||||||||||||||||
| 111 | 3 | my @ISP_POSITION = (0, 0, 3, 0, 5, 0, 7, 5, 7, 0, 8, 0, 9, 0, 9, 0, 9, 0, 9, 7, 9, 0, 9, 7, 9, 9, 9); | |||||||||||||||||||||||||||||||||||||||||
| 112 | 3 | my @DOMAIN_POSITION = (0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 9, 0, 10, 0, 10, 0, 10, 0, 10, 8, 10, 0, 10, 8, 10, 10, 10); | |||||||||||||||||||||||||||||||||||||||||
| 113 | 3 | my @NETSPEED_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 11, 0, 11, 8, 11, 0, 11, 0, 11, 0, 11, 11, 11); | |||||||||||||||||||||||||||||||||||||||||
| 114 | 3 | my @IDDCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 12, 0, 12, 0, 12, 9, 12, 0, 12, 12, 12); | |||||||||||||||||||||||||||||||||||||||||
| 115 | 3 | my @AREACODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 13, 0, 13, 0, 13, 10, 13, 0, 13, 13, 13); | |||||||||||||||||||||||||||||||||||||||||
| 116 | 3 | my @WEATHERSTATIONCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 14, 0, 14, 0, 14, 0, 14, 14, 14); | |||||||||||||||||||||||||||||||||||||||||
| 117 | 3 | my @WEATHERSTATIONNAME_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 15, 0, 15, 0, 15, 0, 15, 15, 15); | |||||||||||||||||||||||||||||||||||||||||
| 118 | 3 | my @MCC_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 16, 0, 16, 9, 16, 16, 16); | |||||||||||||||||||||||||||||||||||||||||
| 119 | 3 | my @MNC_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 17, 0, 17, 10, 17, 17, 17); | |||||||||||||||||||||||||||||||||||||||||
| 120 | 3 | my @MOBILEBRAND_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 18, 0, 18, 11, 18, 18, 18); | |||||||||||||||||||||||||||||||||||||||||
| 121 | 3 | my @ELEVATION_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 19, 0, 19, 19, 19); | |||||||||||||||||||||||||||||||||||||||||
| 122 | 3 | my @USAGETYPE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 20, 20, 20); | |||||||||||||||||||||||||||||||||||||||||
| 123 | 3 | my @ADDRESSTYPE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21); | |||||||||||||||||||||||||||||||||||||||||
| 124 | 3 | my @CATEGORY_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 22); | |||||||||||||||||||||||||||||||||||||||||
| 125 | 3 | my @DISTRICT_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23); | |||||||||||||||||||||||||||||||||||||||||
| 126 | 3 | my @ASN_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24); | |||||||||||||||||||||||||||||||||||||||||
| 127 | 3 | my @AS_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25); | |||||||||||||||||||||||||||||||||||||||||
| 128 | 3 | my @AS_DOMAIN_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26); | |||||||||||||||||||||||||||||||||||||||||
| 129 | 3 | my @AS_USAGETYPE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27); | |||||||||||||||||||||||||||||||||||||||||
| 130 | 3 | my @AS_CIDR_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28); | |||||||||||||||||||||||||||||||||||||||||
| 131 | 3 | my @COLUMN_SIZE = (0, 2, 3, 4, 5, 6, 7, 6, 8, 7, 9, 8, 10, 8, 11, 10, 13, 10, 15, 11, 18, 11, 19, 12, 20, 22, 28); | |||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||
| 133 | 3 | my @IPV6_COUNTRY_POSITION = (0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2); | |||||||||||||||||||||||||||||||||||||||||
| 134 | 3 | my @IPV6_REGION_POSITION = (0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3); | |||||||||||||||||||||||||||||||||||||||||
| 135 | 3 | my @IPV6_CITY_POSITION = (0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4); | |||||||||||||||||||||||||||||||||||||||||
| 136 | 3 | my @IPV6_LATITUDE_POSITION = (0, 0, 0, 0, 0, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5); | |||||||||||||||||||||||||||||||||||||||||
| 137 | 3 | my @IPV6_LONGITUDE_POSITION = (0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6); | |||||||||||||||||||||||||||||||||||||||||
| 138 | 3 | my @IPV6_ZIPCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 0, 7, 7, 7, 0, 7, 0, 7, 7, 7, 0, 7, 7, 7); | |||||||||||||||||||||||||||||||||||||||||
| 139 | 3 | my @IPV6_TIMEZONE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 7, 8, 8, 8, 7, 8, 0, 8, 8, 8, 0, 8, 8, 8); | |||||||||||||||||||||||||||||||||||||||||
| 140 | 3 | my @IPV6_ISP_POSITION = (0, 0, 3, 0, 5, 0, 7, 5, 7, 0, 8, 0, 9, 0, 9, 0, 9, 0, 9, 7, 9, 0, 9, 7, 9, 9, 9); | |||||||||||||||||||||||||||||||||||||||||
| 141 | 3 | my @IPV6_DOMAIN_POSITION = (0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 9, 0, 10, 0, 10, 0, 10, 0, 10, 8, 10, 0, 10, 8, 10, 10, 10); | |||||||||||||||||||||||||||||||||||||||||
| 142 | 3 | my @IPV6_NETSPEED_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 11, 0, 11, 8, 11, 0, 11, 0, 11, 0, 11, 11, 11); | |||||||||||||||||||||||||||||||||||||||||
| 143 | 3 | my @IPV6_IDDCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 12, 0, 12, 0, 12, 9, 12, 0, 12, 12, 12); | |||||||||||||||||||||||||||||||||||||||||
| 144 | 3 | my @IPV6_AREACODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 13, 0, 13, 0, 13, 10, 13, 0, 13, 13, 13); | |||||||||||||||||||||||||||||||||||||||||
| 145 | 3 | my @IPV6_WEATHERSTATIONCODE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 14, 0, 14, 0, 14, 0, 14, 14, 14); | |||||||||||||||||||||||||||||||||||||||||
| 146 | 3 | my @IPV6_WEATHERSTATIONNAME_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 15, 0, 15, 0, 15, 0, 15, 15, 15); | |||||||||||||||||||||||||||||||||||||||||
| 147 | 3 | my @IPV6_MCC_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 16, 0, 16, 9, 16, 16, 16); | |||||||||||||||||||||||||||||||||||||||||
| 148 | 3 | my @IPV6_MNC_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 17, 0, 17, 10, 17, 17, 17); | |||||||||||||||||||||||||||||||||||||||||
| 149 | 3 | my @IPV6_MOBILEBRAND_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 18, 0, 18, 11, 18, 18, 18); | |||||||||||||||||||||||||||||||||||||||||
| 150 | 3 | my @IPV6_ELEVATION_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 19, 0, 19, 19, 19); | |||||||||||||||||||||||||||||||||||||||||
| 151 | 3 | my @IPV6_USAGETYPE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 20, 20, 20); | |||||||||||||||||||||||||||||||||||||||||
| 152 | 3 | my @IPV6_ADDRESSTYPE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21); | |||||||||||||||||||||||||||||||||||||||||
| 153 | 3 | my @IPV6_CATEGORY_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 22); | |||||||||||||||||||||||||||||||||||||||||
| 154 | 3 | my @IPV6_DISTRICT_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23); | |||||||||||||||||||||||||||||||||||||||||
| 155 | 3 | my @IPV6_ASN_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24); | |||||||||||||||||||||||||||||||||||||||||
| 156 | 3 | my @IPV6_AS_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25); | |||||||||||||||||||||||||||||||||||||||||
| 157 | 3 | my @IPV6_AS_DOMAIN_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26); | |||||||||||||||||||||||||||||||||||||||||
| 158 | 3 | my @IPV6_AS_USAGETYPE_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27); | |||||||||||||||||||||||||||||||||||||||||
| 159 | 3 | my @IPV6_AS_CIDR_POSITION = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28); | |||||||||||||||||||||||||||||||||||||||||
| 160 | 3 | my @IPV6_COLUMN_SIZE = (0, 2, 3, 4, 5, 6, 7, 6, 8, 7, 9, 8, 10, 8, 11, 10, 13, 10, 15, 11, 18, 11, 19, 12, 20, 22, 28); | |||||||||||||||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||||||||||||||||
| 162 | 3 | my $IPv6_re = qr/:(?::[0-9a-fA-F]{1,4}){0,5}(?:(?::[0-9a-fA-F]{1,4}){1,2}|:(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})))|[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}:(?:[0-9a-fA-F]{1,4}|:)|(?::(?:[0-9a-fA-F]{1,4})?|(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))))|:(?:(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|[0-9a-fA-F]{1,4}(?::[0-9a-fA-F]{1,4})?|))|(?::(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|:[0-9a-fA-F]{1,4}(?::(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|(?::[0-9a-fA-F]{1,4}){0,2})|:))|(?:(?::[0-9a-fA-F]{1,4}){0,2}(?::(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|(?::[0-9a-fA-F]{1,4}){1,2})|:))|(?:(?::[0-9a-fA-F]{1,4}){0,3}(?::(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|(?::[0-9a-fA-F]{1,4}){1,2})|:))|(?:(?::[0-9a-fA-F]{1,4}){0,4}(?::(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))|(?::[0-9a-fA-F]{1,4}){1,2})|:))/; | |||||||||||||||||||||||||||||||||||||||||
| 163 | 3 | my $IPv4_re = qr/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/; | |||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||
| 165 | 3 | my $getLastErrorMessage = ""; | |||||||||||||||||||||||||||||||||||||||||
| 166 | |||||||||||||||||||||||||||||||||||||||||||
| 167 | 2 | ▶ | sub open { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
open: called CC=7 SCAR=25.7
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 168 | 2 | ▶ | unless( (@_ > 1) && ($_[1]) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
@_ > bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $_[1]
MC/DC0%0/2
@_ > bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $_[1]
@_ > bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$_[1]
Truth table33%1/3
A and B
A= @_ > bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $_[1]
| |||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | $getLastErrorMessage = "Geo::IP2Location::open() requires a database path name."; | |||||||||||||||||||||||||||||||||||||||||
| 170 | 0 | die "Geo::IP2Location::open() requires a database path name"; | |||||||||||||||||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||||||||||||||||
| 172 | 2 | my ($class, $db_file) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 173 | 2 | my $handle; | |||||||||||||||||||||||||||||||||||||||||
| 174 | my $obj; | ||||||||||||||||||||||||||||||||||||||||||
| 175 | 2 | ▶ | unless (CORE::open $handle, "$db_file") { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | $getLastErrorMessage = "Geo::IP2Location::open() error in opening $db_file" . "."; | |||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | die "Geo::IP2Location::open() error in opening $db_file"; | |||||||||||||||||||||||||||||||||||||||||
| 178 | } | ||||||||||||||||||||||||||||||||||||||||||
| 179 | 2 | binmode($handle); | |||||||||||||||||||||||||||||||||||||||||
| 180 | 2 | $obj = bless {filehandle => $handle}, $class; | |||||||||||||||||||||||||||||||||||||||||
| 181 | 2 | $obj->initialize(); | |||||||||||||||||||||||||||||||||||||||||
| 182 | 2 | ▶ | if ($obj->{"productcode"} == 1) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 183 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 184 | 2 | ▶ | if (($obj->{"databaseyear"} <= 20) && ($obj->{"productcode"} == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$obj->{"databaseyear"} <= bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $obj->{"productcode"} == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$obj->{"databaseyear"} <= bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $obj->{"productcode"} == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$obj->{"databaseyear"} <= bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$obj->{"productcode"} == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $obj->{"databaseyear"} <= bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $obj->{"productcode"} == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 185 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | $obj->close(); | |||||||||||||||||||||||||||||||||||||||||
| 187 | 0 | undef $obj; | |||||||||||||||||||||||||||||||||||||||||
| 188 | 0 | $getLastErrorMessage = INVALID_BIN_DATABASE; | |||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | die INVALID_BIN_DATABASE; | |||||||||||||||||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||||||||||||||||
| 192 | 2 | return $obj; | |||||||||||||||||||||||||||||||||||||||||
| 193 | } | ||||||||||||||||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||||||||||||||||
| 195 | 0 | ▶ | sub close { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
close: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | my ($class) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 197 | 0 | ▶ | if (CORE::close($class->{filehandle})) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 198 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 199 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 200 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 201 | } | ||||||||||||||||||||||||||||||||||||||||||
| 202 | } | ||||||||||||||||||||||||||||||||||||||||||
| 203 | |||||||||||||||||||||||||||||||||||||||||||
| 204 | 2 | ▶ | sub initialize { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
initialize: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 205 | 2 | my ($obj) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 206 | 2 | my @header = $obj->read512($obj->{filehandle}, 1); | |||||||||||||||||||||||||||||||||||||||||
| 207 | 2 | $obj->{"databasetype"} = unpack("C", $header[0]); | |||||||||||||||||||||||||||||||||||||||||
| 208 | 2 | $obj->{"databasecolumn"} = unpack("C", $header[1]); | |||||||||||||||||||||||||||||||||||||||||
| 209 | 2 | $obj->{"databaseyear"} = unpack("C", $header[2]); | |||||||||||||||||||||||||||||||||||||||||
| 210 | 2 | $obj->{"databasemonth"} = unpack("C", $header[3]); | |||||||||||||||||||||||||||||||||||||||||
| 211 | 2 | $obj->{"databaseday"} = unpack("C", $header[4]); | |||||||||||||||||||||||||||||||||||||||||
| 212 | 2 | $obj->{"ipv4databasecount"} = unpack("V", join('', @header[5..8])); | |||||||||||||||||||||||||||||||||||||||||
| 213 | 2 | $obj->{"ipv4databaseaddr"} = unpack("V", join('', @header[9..12])); | |||||||||||||||||||||||||||||||||||||||||
| 214 | 2 | $obj->{"ipv6databasecount"} = unpack("V", join('', @header[13..16])); | |||||||||||||||||||||||||||||||||||||||||
| 215 | 2 | $obj->{"ipv6databaseaddr"} = unpack("V", join('', @header[17..20])); | |||||||||||||||||||||||||||||||||||||||||
| 216 | 2 | $obj->{"ipv4indexbaseaddr"} = unpack("V", join('', @header[21..24])); | |||||||||||||||||||||||||||||||||||||||||
| 217 | 2 | $obj->{"ipv6indexbaseaddr"} = unpack("V", join('', @header[25..28])); | |||||||||||||||||||||||||||||||||||||||||
| 218 | 2 | $obj->{"productcode"} = unpack("C", $header[29]); | |||||||||||||||||||||||||||||||||||||||||
| 219 | 2 | $obj->{"licensecode"} = unpack("C", $header[30]); | |||||||||||||||||||||||||||||||||||||||||
| 220 | 2 | $obj->{"databasesize"} = unpack("V", join('', @header[31..34])); | |||||||||||||||||||||||||||||||||||||||||
| 221 | 2 | return $obj; | |||||||||||||||||||||||||||||||||||||||||
| 222 | } | ||||||||||||||||||||||||||||||||||||||||||
| 223 | |||||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | ▶ | sub get_last_error_message { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_last_error_message: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 225 | 0 | my $class = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 226 | 0 | return ($getLastErrorMessage); | |||||||||||||||||||||||||||||||||||||||||
| 227 | } | ||||||||||||||||||||||||||||||||||||||||||
| 228 | |||||||||||||||||||||||||||||||||||||||||||
| 229 | 0 | ▶ | sub get_module_version { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_module_version: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 230 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 231 | 0 | return $VERSION; | |||||||||||||||||||||||||||||||||||||||||
| 232 | } | ||||||||||||||||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||||||||||||||||
| 234 | 0 | ▶ | sub get_database_version { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_database_version: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 235 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 236 | 0 | return $obj->{"databaseyear"} . "." . $obj->{"databasemonth"} . "." . $obj->{"databaseday"}; | |||||||||||||||||||||||||||||||||||||||||
| 237 | } | ||||||||||||||||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||||||||||||||||
| 239 | 20 | ▶ | sub get_country_short { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_country_short: called CC=3 SCAR=11.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 240 | 20 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 241 | 20 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 242 | 20 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 243 | 20 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 244 | 10 | return $obj->get_ipv4_record($ipnum, COUNTRYSHORT); | |||||||||||||||||||||||||||||||||||||||||
| 245 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 246 | 10 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 247 | 10 | return $obj->get_ipv6_record($ipnum, COUNTRYSHORT); | |||||||||||||||||||||||||||||||||||||||||
| 248 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 249 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 250 | } | ||||||||||||||||||||||||||||||||||||||||||
| 251 | } | ||||||||||||||||||||||||||||||||||||||||||
| 252 | } | ||||||||||||||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||||||||||||||
| 254 | 0 | ▶ | sub get_country_long { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_country_long: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 255 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 256 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 257 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 258 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 259 | 0 | return $obj->get_ipv4_record($ipnum, COUNTRYLONG); | |||||||||||||||||||||||||||||||||||||||||
| 260 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 261 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 262 | 0 | return $obj->get_ipv6_record($ipnum, COUNTRYLONG); | |||||||||||||||||||||||||||||||||||||||||
| 263 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 264 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 265 | } | ||||||||||||||||||||||||||||||||||||||||||
| 266 | } | ||||||||||||||||||||||||||||||||||||||||||
| 267 | } | ||||||||||||||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||||||||||||||
| 269 | 0 | ▶ | sub get_region { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_region: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 270 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 271 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 272 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 273 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 274 | 0 | return $obj->get_ipv4_record($ipnum, REGION); | |||||||||||||||||||||||||||||||||||||||||
| 275 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 276 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 277 | 0 | return $obj->get_ipv6_record($ipnum, REGION); | |||||||||||||||||||||||||||||||||||||||||
| 278 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 279 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 280 | } | ||||||||||||||||||||||||||||||||||||||||||
| 281 | } | ||||||||||||||||||||||||||||||||||||||||||
| 282 | } | ||||||||||||||||||||||||||||||||||||||||||
| 283 | |||||||||||||||||||||||||||||||||||||||||||
| 284 | 0 | ▶ | sub get_city { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_city: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 285 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 286 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 287 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 288 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 289 | 0 | return $obj->get_ipv4_record($ipnum, CITY); | |||||||||||||||||||||||||||||||||||||||||
| 290 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 291 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 292 | 0 | return $obj->get_ipv6_record($ipnum, CITY); | |||||||||||||||||||||||||||||||||||||||||
| 293 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 294 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 295 | } | ||||||||||||||||||||||||||||||||||||||||||
| 296 | } | ||||||||||||||||||||||||||||||||||||||||||
| 297 | } | ||||||||||||||||||||||||||||||||||||||||||
| 298 | |||||||||||||||||||||||||||||||||||||||||||
| 299 | 0 | ▶ | sub get_isp { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_isp: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 300 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 301 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 302 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 303 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 304 | 0 | return $obj->get_ipv4_record($ipnum, ISP); | |||||||||||||||||||||||||||||||||||||||||
| 305 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 307 | 0 | return $obj->get_ipv6_record($ipnum, ISP); | |||||||||||||||||||||||||||||||||||||||||
| 308 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 309 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 310 | } | ||||||||||||||||||||||||||||||||||||||||||
| 311 | } | ||||||||||||||||||||||||||||||||||||||||||
| 312 | } | ||||||||||||||||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||||||||||||||||
| 314 | 0 | ▶ | sub get_latitude { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_latitude: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 315 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 316 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 317 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 318 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 319 | 0 | return $obj->get_ipv4_record($ipnum, LATITUDE); | |||||||||||||||||||||||||||||||||||||||||
| 320 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 321 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 322 | 0 | return $obj->get_ipv6_record($ipnum, LATITUDE); | |||||||||||||||||||||||||||||||||||||||||
| 323 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 324 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 325 | } | ||||||||||||||||||||||||||||||||||||||||||
| 326 | } | ||||||||||||||||||||||||||||||||||||||||||
| 327 | } | ||||||||||||||||||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||||||||||||||||
| 329 | 0 | ▶ | sub get_zipcode { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_zipcode: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 330 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 331 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 332 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 333 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 334 | 0 | return $obj->get_ipv4_record($ipnum, ZIPCODE); | |||||||||||||||||||||||||||||||||||||||||
| 335 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 336 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 337 | 0 | return $obj->get_ipv6_record($ipnum, ZIPCODE); | |||||||||||||||||||||||||||||||||||||||||
| 338 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 339 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 340 | } | ||||||||||||||||||||||||||||||||||||||||||
| 341 | } | ||||||||||||||||||||||||||||||||||||||||||
| 342 | } | ||||||||||||||||||||||||||||||||||||||||||
| 343 | |||||||||||||||||||||||||||||||||||||||||||
| 344 | 0 | ▶ | sub get_longitude { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_longitude: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 345 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 346 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 347 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 348 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 349 | 0 | return $obj->get_ipv4_record($ipnum, LONGITUDE); | |||||||||||||||||||||||||||||||||||||||||
| 350 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 351 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 352 | 0 | return $obj->get_ipv6_record($ipnum, LONGITUDE); | |||||||||||||||||||||||||||||||||||||||||
| 353 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 354 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 355 | } | ||||||||||||||||||||||||||||||||||||||||||
| 356 | } | ||||||||||||||||||||||||||||||||||||||||||
| 357 | } | ||||||||||||||||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||||||||||||||||
| 359 | 0 | ▶ | sub get_domain { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_domain: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 360 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 361 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 362 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 363 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 364 | 0 | return $obj->get_ipv4_record($ipnum, DOMAIN); | |||||||||||||||||||||||||||||||||||||||||
| 365 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 366 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 367 | 0 | return $obj->get_ipv6_record($ipnum, DOMAIN); | |||||||||||||||||||||||||||||||||||||||||
| 368 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 369 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 370 | } | ||||||||||||||||||||||||||||||||||||||||||
| 371 | } | ||||||||||||||||||||||||||||||||||||||||||
| 372 | } | ||||||||||||||||||||||||||||||||||||||||||
| 373 | |||||||||||||||||||||||||||||||||||||||||||
| 374 | 0 | ▶ | sub get_timezone { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_timezone: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 375 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 376 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 377 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 378 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 379 | 0 | return $obj->get_ipv4_record($ipnum, TIMEZONE); | |||||||||||||||||||||||||||||||||||||||||
| 380 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 381 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 382 | 0 | return $obj->get_ipv6_record($ipnum, TIMEZONE); | |||||||||||||||||||||||||||||||||||||||||
| 383 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 384 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 385 | } | ||||||||||||||||||||||||||||||||||||||||||
| 386 | } | ||||||||||||||||||||||||||||||||||||||||||
| 387 | } | ||||||||||||||||||||||||||||||||||||||||||
| 388 | |||||||||||||||||||||||||||||||||||||||||||
| 389 | 0 | ▶ | sub get_netspeed { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_netspeed: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 390 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 391 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 392 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 393 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 394 | 0 | return $obj->get_ipv4_record($ipnum, NETSPEED); | |||||||||||||||||||||||||||||||||||||||||
| 395 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 396 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 397 | 0 | return $obj->get_ipv6_record($ipnum, NETSPEED); | |||||||||||||||||||||||||||||||||||||||||
| 398 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 399 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 400 | } | ||||||||||||||||||||||||||||||||||||||||||
| 401 | } | ||||||||||||||||||||||||||||||||||||||||||
| 402 | } | ||||||||||||||||||||||||||||||||||||||||||
| 403 | |||||||||||||||||||||||||||||||||||||||||||
| 404 | 0 | ▶ | sub get_iddcode { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_iddcode: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 405 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 406 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 407 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 408 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 409 | 0 | return $obj->get_ipv4_record($ipnum, IDDCODE); | |||||||||||||||||||||||||||||||||||||||||
| 410 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 411 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 412 | 0 | return $obj->get_ipv6_record($ipnum, IDDCODE); | |||||||||||||||||||||||||||||||||||||||||
| 413 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 414 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 415 | } | ||||||||||||||||||||||||||||||||||||||||||
| 416 | } | ||||||||||||||||||||||||||||||||||||||||||
| 417 | } | ||||||||||||||||||||||||||||||||||||||||||
| 418 | |||||||||||||||||||||||||||||||||||||||||||
| 419 | 0 | ▶ | sub get_areacode { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_areacode: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 420 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 421 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 422 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 423 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 424 | 0 | return $obj->get_ipv4_record($ipnum, AREACODE); | |||||||||||||||||||||||||||||||||||||||||
| 425 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 426 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 427 | 0 | return $obj->get_ipv6_record($ipnum, AREACODE); | |||||||||||||||||||||||||||||||||||||||||
| 428 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 429 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 430 | } | ||||||||||||||||||||||||||||||||||||||||||
| 431 | } | ||||||||||||||||||||||||||||||||||||||||||
| 432 | } | ||||||||||||||||||||||||||||||||||||||||||
| 433 | |||||||||||||||||||||||||||||||||||||||||||
| 434 | 0 | ▶ | sub get_weatherstationcode { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_weatherstationcode: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 435 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 436 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 437 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 438 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 439 | 0 | return $obj->get_ipv4_record($ipnum, WEATHERSTATIONCODE); | |||||||||||||||||||||||||||||||||||||||||
| 440 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 441 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 442 | 0 | return $obj->get_ipv6_record($ipnum, WEATHERSTATIONCODE); | |||||||||||||||||||||||||||||||||||||||||
| 443 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 444 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 445 | } | ||||||||||||||||||||||||||||||||||||||||||
| 446 | } | ||||||||||||||||||||||||||||||||||||||||||
| 447 | } | ||||||||||||||||||||||||||||||||||||||||||
| 448 | |||||||||||||||||||||||||||||||||||||||||||
| 449 | 0 | ▶ | sub get_weatherstationname { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_weatherstationname: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 450 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 451 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 452 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 453 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 454 | 0 | return $obj->get_ipv4_record($ipnum, WEATHERSTATIONNAME); | |||||||||||||||||||||||||||||||||||||||||
| 455 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 456 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 457 | 0 | return $obj->get_ipv6_record($ipnum, WEATHERSTATIONNAME); | |||||||||||||||||||||||||||||||||||||||||
| 458 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 459 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 460 | } | ||||||||||||||||||||||||||||||||||||||||||
| 461 | } | ||||||||||||||||||||||||||||||||||||||||||
| 462 | } | ||||||||||||||||||||||||||||||||||||||||||
| 463 | |||||||||||||||||||||||||||||||||||||||||||
| 464 | 0 | ▶ | sub get_mcc { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_mcc: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 465 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 466 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 467 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 468 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 469 | 0 | return $obj->get_ipv4_record($ipnum, MCC); | |||||||||||||||||||||||||||||||||||||||||
| 470 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 471 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 472 | 0 | return $obj->get_ipv6_record($ipnum, MCC); | |||||||||||||||||||||||||||||||||||||||||
| 473 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 474 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 475 | } | ||||||||||||||||||||||||||||||||||||||||||
| 476 | } | ||||||||||||||||||||||||||||||||||||||||||
| 477 | } | ||||||||||||||||||||||||||||||||||||||||||
| 478 | |||||||||||||||||||||||||||||||||||||||||||
| 479 | 0 | ▶ | sub get_mnc { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_mnc: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 480 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 481 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 482 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 483 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 484 | 0 | return $obj->get_ipv4_record($ipnum, MNC); | |||||||||||||||||||||||||||||||||||||||||
| 485 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 486 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 487 | 0 | return $obj->get_ipv6_record($ipnum, MNC); | |||||||||||||||||||||||||||||||||||||||||
| 488 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 489 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 490 | } | ||||||||||||||||||||||||||||||||||||||||||
| 491 | } | ||||||||||||||||||||||||||||||||||||||||||
| 492 | } | ||||||||||||||||||||||||||||||||||||||||||
| 493 | |||||||||||||||||||||||||||||||||||||||||||
| 494 | 0 | ▶ | sub get_mobilebrand { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_mobilebrand: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 495 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 496 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 497 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 498 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 499 | 0 | return $obj->get_ipv4_record($ipnum, MOBILEBRAND); | |||||||||||||||||||||||||||||||||||||||||
| 500 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 501 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 502 | 0 | return $obj->get_ipv6_record($ipnum, MOBILEBRAND); | |||||||||||||||||||||||||||||||||||||||||
| 503 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 504 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 505 | } | ||||||||||||||||||||||||||||||||||||||||||
| 506 | } | ||||||||||||||||||||||||||||||||||||||||||
| 507 | } | ||||||||||||||||||||||||||||||||||||||||||
| 508 | |||||||||||||||||||||||||||||||||||||||||||
| 509 | 0 | ▶ | sub get_elevation { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_elevation: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 510 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 511 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 512 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 513 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 514 | 0 | return $obj->get_ipv4_record($ipnum, ELEVATION); | |||||||||||||||||||||||||||||||||||||||||
| 515 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 516 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 517 | 0 | return $obj->get_ipv6_record($ipnum, ELEVATION); | |||||||||||||||||||||||||||||||||||||||||
| 518 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 519 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 520 | } | ||||||||||||||||||||||||||||||||||||||||||
| 521 | } | ||||||||||||||||||||||||||||||||||||||||||
| 522 | } | ||||||||||||||||||||||||||||||||||||||||||
| 523 | |||||||||||||||||||||||||||||||||||||||||||
| 524 | 0 | ▶ | sub get_usagetype { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_usagetype: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 525 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 526 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 527 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 528 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 529 | 0 | return $obj->get_ipv4_record($ipnum, USAGETYPE); | |||||||||||||||||||||||||||||||||||||||||
| 530 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 531 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 532 | 0 | return $obj->get_ipv6_record($ipnum, USAGETYPE); | |||||||||||||||||||||||||||||||||||||||||
| 533 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 534 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 535 | } | ||||||||||||||||||||||||||||||||||||||||||
| 536 | } | ||||||||||||||||||||||||||||||||||||||||||
| 537 | } | ||||||||||||||||||||||||||||||||||||||||||
| 538 | |||||||||||||||||||||||||||||||||||||||||||
| 539 | 0 | ▶ | sub get_addresstype { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_addresstype: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 540 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 541 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 542 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 543 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 544 | 0 | return $obj->get_ipv4_record($ipnum, ADDRESSTYPE); | |||||||||||||||||||||||||||||||||||||||||
| 545 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 546 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 547 | 0 | return $obj->get_ipv6_record($ipnum, ADDRESSTYPE); | |||||||||||||||||||||||||||||||||||||||||
| 548 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 549 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 550 | } | ||||||||||||||||||||||||||||||||||||||||||
| 551 | } | ||||||||||||||||||||||||||||||||||||||||||
| 552 | } | ||||||||||||||||||||||||||||||||||||||||||
| 553 | |||||||||||||||||||||||||||||||||||||||||||
| 554 | 0 | ▶ | sub get_category { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_category: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 555 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 556 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 557 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 558 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 559 | 0 | return $obj->get_ipv4_record($ipnum, CATEGORY); | |||||||||||||||||||||||||||||||||||||||||
| 560 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 561 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 562 | 0 | return $obj->get_ipv6_record($ipnum, CATEGORY); | |||||||||||||||||||||||||||||||||||||||||
| 563 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 564 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 565 | } | ||||||||||||||||||||||||||||||||||||||||||
| 566 | } | ||||||||||||||||||||||||||||||||||||||||||
| 567 | } | ||||||||||||||||||||||||||||||||||||||||||
| 568 | |||||||||||||||||||||||||||||||||||||||||||
| 569 | 0 | ▶ | sub get_district { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_district: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 570 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 571 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 572 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 573 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 574 | 0 | return $obj->get_ipv4_record($ipnum, DISTRICT); | |||||||||||||||||||||||||||||||||||||||||
| 575 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 576 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 577 | 0 | return $obj->get_ipv6_record($ipnum, DISTRICT); | |||||||||||||||||||||||||||||||||||||||||
| 578 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 579 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 580 | } | ||||||||||||||||||||||||||||||||||||||||||
| 581 | } | ||||||||||||||||||||||||||||||||||||||||||
| 582 | } | ||||||||||||||||||||||||||||||||||||||||||
| 583 | |||||||||||||||||||||||||||||||||||||||||||
| 584 | 0 | ▶ | sub get_asn { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_asn: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 585 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 586 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 587 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 588 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 589 | 0 | return $obj->get_ipv4_record($ipnum, ASN); | |||||||||||||||||||||||||||||||||||||||||
| 590 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 591 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 592 | 0 | return $obj->get_ipv6_record($ipnum, ASN); | |||||||||||||||||||||||||||||||||||||||||
| 593 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 594 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 595 | } | ||||||||||||||||||||||||||||||||||||||||||
| 596 | } | ||||||||||||||||||||||||||||||||||||||||||
| 597 | } | ||||||||||||||||||||||||||||||||||||||||||
| 598 | |||||||||||||||||||||||||||||||||||||||||||
| 599 | 0 | ▶ | sub get_as { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_as: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 600 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 601 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 602 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 603 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 604 | 0 | return $obj->get_ipv4_record($ipnum, AS); | |||||||||||||||||||||||||||||||||||||||||
| 605 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 606 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 607 | 0 | return $obj->get_ipv6_record($ipnum, AS); | |||||||||||||||||||||||||||||||||||||||||
| 608 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 609 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 610 | } | ||||||||||||||||||||||||||||||||||||||||||
| 611 | } | ||||||||||||||||||||||||||||||||||||||||||
| 612 | } | ||||||||||||||||||||||||||||||||||||||||||
| 613 | |||||||||||||||||||||||||||||||||||||||||||
| 614 | 0 | ▶ | sub get_as_domain { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_as_domain: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 615 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 616 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 617 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 618 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 619 | 0 | return $obj->get_ipv4_record($ipnum, ASDOMAIN); | |||||||||||||||||||||||||||||||||||||||||
| 620 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 621 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 622 | 0 | return $obj->get_ipv6_record($ipnum, ASDOMAIN); | |||||||||||||||||||||||||||||||||||||||||
| 623 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 624 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 625 | } | ||||||||||||||||||||||||||||||||||||||||||
| 626 | } | ||||||||||||||||||||||||||||||||||||||||||
| 627 | } | ||||||||||||||||||||||||||||||||||||||||||
| 628 | |||||||||||||||||||||||||||||||||||||||||||
| 629 | 0 | ▶ | sub get_as_usagetype { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_as_usagetype: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 630 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 631 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 632 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 633 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 634 | 0 | return $obj->get_ipv4_record($ipnum, ASUSAGETYPE); | |||||||||||||||||||||||||||||||||||||||||
| 635 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 636 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 637 | 0 | return $obj->get_ipv6_record($ipnum, ASUSAGETYPE); | |||||||||||||||||||||||||||||||||||||||||
| 638 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 639 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 640 | } | ||||||||||||||||||||||||||||||||||||||||||
| 641 | } | ||||||||||||||||||||||||||||||||||||||||||
| 642 | } | ||||||||||||||||||||||||||||||||||||||||||
| 643 | |||||||||||||||||||||||||||||||||||||||||||
| 644 | 0 | ▶ | sub get_as_cidr { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_as_cidr: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 645 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 646 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 647 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 648 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 649 | 0 | return $obj->get_ipv4_record($ipnum, ASCIDR); | |||||||||||||||||||||||||||||||||||||||||
| 650 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 651 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 652 | 0 | return $obj->get_ipv6_record($ipnum, ASCIDR); | |||||||||||||||||||||||||||||||||||||||||
| 653 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 654 | 0 | return INVALID_IP_ADDRESS; | |||||||||||||||||||||||||||||||||||||||||
| 655 | } | ||||||||||||||||||||||||||||||||||||||||||
| 656 | } | ||||||||||||||||||||||||||||||||||||||||||
| 657 | } | ||||||||||||||||||||||||||||||||||||||||||
| 658 | |||||||||||||||||||||||||||||||||||||||||||
| 659 | 0 | ▶ | sub get_all { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_all: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 660 | 0 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 661 | 0 | my $ipaddr = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 662 | 0 | my ($ipv, $ipnum) = $obj->validate_ip($ipaddr); | |||||||||||||||||||||||||||||||||||||||||
| 663 | 0 | ▶ | if ($ipv == 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 664 | 0 | return $obj->get_ipv4_record($ipnum, ALL); | |||||||||||||||||||||||||||||||||||||||||
| 665 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 666 | 0 | ▶ | if ($ipv == 6) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 667 | 0 | return $obj->get_ipv6_record($ipnum, ALL); | |||||||||||||||||||||||||||||||||||||||||
| 668 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 669 | 0 | return (INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS, INVALID_IP_ADDRESS); | |||||||||||||||||||||||||||||||||||||||||
| 670 | } | ||||||||||||||||||||||||||||||||||||||||||
| 671 | } | ||||||||||||||||||||||||||||||||||||||||||
| 672 | } | ||||||||||||||||||||||||||||||||||||||||||
| 673 | |||||||||||||||||||||||||||||||||||||||||||
| 674 | 10 | ▶ | sub get_ipv6_record { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_ipv6_record: called CC=124 SCAR=87.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 675 | 10 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 676 | 10 | my $ipnum = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 677 | 10 | my $mode = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 678 | 10 | my $dbtype = $obj->{"databasetype"}; | |||||||||||||||||||||||||||||||||||||||||
| 679 | |||||||||||||||||||||||||||||||||||||||||||
| 680 | 10 | ▶ | if ($ipnum eq "") { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 681 | 0 | ▶ | if ($mode == ALL) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 682 | 0 | return (NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP); | |||||||||||||||||||||||||||||||||||||||||
| 683 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 684 | 0 | return NO_IP; | |||||||||||||||||||||||||||||||||||||||||
| 685 | } | ||||||||||||||||||||||||||||||||||||||||||
| 686 | } | ||||||||||||||||||||||||||||||||||||||||||
| 687 | |||||||||||||||||||||||||||||||||||||||||||
| 688 | 10 | ▶ | if (($mode == COUNTRYSHORT) && ($IPV6_COUNTRY_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 689 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 690 | } | ||||||||||||||||||||||||||||||||||||||||||
| 691 | 10 | ▶ | if (($mode == COUNTRYLONG) && ($IPV6_COUNTRY_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 692 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 693 | } | ||||||||||||||||||||||||||||||||||||||||||
| 694 | 10 | ▶ | if (($mode == REGION) && ($IPV6_REGION_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 695 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 696 | } | ||||||||||||||||||||||||||||||||||||||||||
| 697 | 10 | ▶ | if (($mode == CITY) && ($IPV6_CITY_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 698 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 699 | } | ||||||||||||||||||||||||||||||||||||||||||
| 700 | 10 | ▶ | if (($mode == ISP) && ($IPV6_ISP_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 701 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 702 | } | ||||||||||||||||||||||||||||||||||||||||||
| 703 | 10 | ▶ | if (($mode == LATITUDE) && ($IPV6_LATITUDE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 704 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 705 | } | ||||||||||||||||||||||||||||||||||||||||||
| 706 | 10 | ▶ | if (($mode == LONGITUDE) && ($IPV6_LONGITUDE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 707 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 708 | } | ||||||||||||||||||||||||||||||||||||||||||
| 709 | 10 | ▶ | if (($mode == DOMAIN) && ($IPV6_DOMAIN_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 710 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 711 | } | ||||||||||||||||||||||||||||||||||||||||||
| 712 | 10 | ▶ | if (($mode == ZIPCODE) && ($IPV6_ZIPCODE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 713 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 714 | } | ||||||||||||||||||||||||||||||||||||||||||
| 715 | 10 | ▶ | if (($mode == TIMEZONE) && ($IPV6_TIMEZONE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 716 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 717 | } | ||||||||||||||||||||||||||||||||||||||||||
| 718 | 10 | ▶ | if (($mode == NETSPEED) && ($IPV6_NETSPEED_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 719 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 720 | } | ||||||||||||||||||||||||||||||||||||||||||
| 721 | 10 | ▶ | if (($mode == IDDCODE) && ($IPV6_IDDCODE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 722 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 723 | } | ||||||||||||||||||||||||||||||||||||||||||
| 724 | 10 | ▶ | if (($mode == AREACODE) && ($IPV6_AREACODE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 725 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 726 | } | ||||||||||||||||||||||||||||||||||||||||||
| 727 | 10 | ▶ | if (($mode == WEATHERSTATIONCODE) && ($IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 728 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 729 | } | ||||||||||||||||||||||||||||||||||||||||||
| 730 | 10 | ▶ | if (($mode == WEATHERSTATIONNAME) && ($IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 731 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 732 | } | ||||||||||||||||||||||||||||||||||||||||||
| 733 | 10 | ▶ | if (($mode == MCC) && ($IPV6_MCC_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 734 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 735 | } | ||||||||||||||||||||||||||||||||||||||||||
| 736 | 10 | ▶ | if (($mode == MNC) && ($IPV6_MNC_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 737 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 738 | } | ||||||||||||||||||||||||||||||||||||||||||
| 739 | 10 | ▶ | if (($mode == MOBILEBRAND) && ($IPV6_MOBILEBRAND_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 740 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 741 | } | ||||||||||||||||||||||||||||||||||||||||||
| 742 | 10 | ▶ | if (($mode == ELEVATION) && ($IPV6_ELEVATION_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 743 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 744 | } | ||||||||||||||||||||||||||||||||||||||||||
| 745 | 10 | ▶ | if (($mode == USAGETYPE) && ($IPV6_USAGETYPE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 746 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 747 | } | ||||||||||||||||||||||||||||||||||||||||||
| 748 | 10 | ▶ | if (($mode == ADDRESSTYPE) && ($IPV6_ADDRESSTYPE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 749 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 750 | } | ||||||||||||||||||||||||||||||||||||||||||
| 751 | 10 | ▶ | if (($mode == CATEGORY) && ($IPV6_CATEGORY_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 752 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 753 | } | ||||||||||||||||||||||||||||||||||||||||||
| 754 | 10 | ▶ | if (($mode == DISTRICT) && ($IPV6_DISTRICT_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [23], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_DISTRICT_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [23], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_DISTRICT_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [23], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_DISTRICT_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [23], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_DISTRICT_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 755 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 756 | } | ||||||||||||||||||||||||||||||||||||||||||
| 757 | 10 | ▶ | if (($mode == ASN) && ($IPV6_ASN_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [24], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ASN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [24], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_ASN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [24], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_ASN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [24], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_ASN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 758 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 759 | } | ||||||||||||||||||||||||||||||||||||||||||
| 760 | 10 | ▶ | if (($mode == AS) && ($IPV6_AS_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [25], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AS_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [25], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AS_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [25], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_AS_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [25], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_AS_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 761 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 762 | } | ||||||||||||||||||||||||||||||||||||||||||
| 763 | 10 | ▶ | if (($mode == ASDOMAIN) && ($IPV6_AS_DOMAIN_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [26], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AS_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [26], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AS_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [26], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_AS_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [26], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_AS_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 764 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 765 | } | ||||||||||||||||||||||||||||||||||||||||||
| 766 | 10 | ▶ | if (($mode == ASUSAGETYPE) && ($IPV6_AS_USAGETYPE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [27], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AS_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [27], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AS_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [27], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_AS_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [27], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_AS_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 767 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 768 | } | ||||||||||||||||||||||||||||||||||||||||||
| 769 | 10 | ▶ | if (($mode == ASCIDR) && ($IPV6_AS_CIDR_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [28], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AS_CIDR_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [28], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IPV6_AS_CIDR_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [28], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IPV6_AS_CIDR_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [28], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IPV6_AS_CIDR_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 770 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 771 | } | ||||||||||||||||||||||||||||||||||||||||||
| 772 | |||||||||||||||||||||||||||||||||||||||||||
| 773 | 10 | my $realipno = $ipnum; | |||||||||||||||||||||||||||||||||||||||||
| 774 | 10 | my $handle = $obj->{"filehandle"}; | |||||||||||||||||||||||||||||||||||||||||
| 775 | 10 | my $baseaddr = $obj->{"ipv6databaseaddr"}; | |||||||||||||||||||||||||||||||||||||||||
| 776 | 10 | my $dbcount = $obj->{"ipv6databasecount"}; | |||||||||||||||||||||||||||||||||||||||||
| 777 | 10 | my $dbcolumn = $obj->{"databasecolumn"}; | |||||||||||||||||||||||||||||||||||||||||
| 778 | 10 | my $indexbaseaddr = $obj->{"ipv6indexbaseaddr"}; | |||||||||||||||||||||||||||||||||||||||||
| 779 | |||||||||||||||||||||||||||||||||||||||||||
| 780 | 10 | ▶ | if ($dbcount == 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 781 | 0 | ▶ | if ($mode == ALL) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 782 | 0 | return (IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN, IPV6_ADDRESS_IN_IPV4_BIN); | |||||||||||||||||||||||||||||||||||||||||
| 783 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 784 | 0 | return IPV6_ADDRESS_IN_IPV4_BIN; | |||||||||||||||||||||||||||||||||||||||||
| 785 | } | ||||||||||||||||||||||||||||||||||||||||||
| 786 | } | ||||||||||||||||||||||||||||||||||||||||||
| 787 | |||||||||||||||||||||||||||||||||||||||||||
| 788 | 10 | my $ipnum1_2 = new Math::BigInt($ipnum); | |||||||||||||||||||||||||||||||||||||||||
| 789 | 10 | my $remainder = 0; | |||||||||||||||||||||||||||||||||||||||||
| 790 | 10 | ($ipnum1_2, $remainder) = $ipnum1_2->bdiv(2**112); | |||||||||||||||||||||||||||||||||||||||||
| 791 | 10 | my $indexaddr = $indexbaseaddr + ($ipnum1_2 << 3); | |||||||||||||||||||||||||||||||||||||||||
| 792 | |||||||||||||||||||||||||||||||||||||||||||
| 793 | 10 | my $low = 0; | |||||||||||||||||||||||||||||||||||||||||
| 794 | 10 | my $high = $dbcount; | |||||||||||||||||||||||||||||||||||||||||
| 795 | 10 | ▶ | if ($indexbaseaddr > 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 796 | 10 | ($low, $high) = $obj->read32x2($handle, $indexaddr); | |||||||||||||||||||||||||||||||||||||||||
| 797 | } | ||||||||||||||||||||||||||||||||||||||||||
| 798 | |||||||||||||||||||||||||||||||||||||||||||
| 799 | 10 | my $mid = 0; | |||||||||||||||||||||||||||||||||||||||||
| 800 | 10 | my $ipfrom = 0; | |||||||||||||||||||||||||||||||||||||||||
| 801 | 10 | my $ipto = 0; | |||||||||||||||||||||||||||||||||||||||||
| 802 | 10 | my $ipno = 0; | |||||||||||||||||||||||||||||||||||||||||
| 803 | |||||||||||||||||||||||||||||||||||||||||||
| 804 | 10 | $ipno = $realipno; | |||||||||||||||||||||||||||||||||||||||||
| 805 | 10 | ▶ | if ($realipno == "340282366920938463463374607431768211455") { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 806 | 0 | $ipno = $ipno->bsub(1); | |||||||||||||||||||||||||||||||||||||||||
| 807 | } | ||||||||||||||||||||||||||||||||||||||||||
| 808 | |||||||||||||||||||||||||||||||||||||||||||
| 809 | 10 | my $raw_positions_row; | |||||||||||||||||||||||||||||||||||||||||
| 810 | |||||||||||||||||||||||||||||||||||||||||||
| 811 | 10 | ▶ | while ($low <= $high) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 812 | 104 | $mid = int(($low + $high)/2); | |||||||||||||||||||||||||||||||||||||||||
| 813 | 104 | ($ipfrom, $ipto, $raw_positions_row) = $obj->readRow128($handle, $baseaddr + $mid * (($dbcolumn * 4) + 12), $dbcolumn); | |||||||||||||||||||||||||||||||||||||||||
| 814 | |||||||||||||||||||||||||||||||||||||||||||
| 815 | 104 | ▶ | if (($ipno >= $ipfrom) && ($ipno < $ipto)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$ipno >= $ipfrom and $ipno < $ipto
MC/DC100%2/2
$ipno >= $ipfrom and $ipno < $ipto
$ipno >= $ipfrom
$ipno < $ipto
Truth table100%3/3
A and B
A= $ipno >= $ipfromB= $ipno < $ipto
| |||||||||||||||||||||||||||||||||||||||||||
| 816 | 10 | my $row_pointer = $baseaddr + $mid * (($dbcolumn * 4) + 12); | |||||||||||||||||||||||||||||||||||||||||
| 817 | |||||||||||||||||||||||||||||||||||||||||||
| 818 | 10 | ▶ | if ($mode == ALL) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 819 | 0 | my $country_short = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 820 | 0 | my $country_long = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 821 | 0 | my $region = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 822 | 0 | my $city = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 823 | 0 | my $isp = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 824 | 0 | my $latitude = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 825 | 0 | my $longitude = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 826 | 0 | my $domain = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 827 | 0 | my $zipcode = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 828 | 0 | my $timezone = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 829 | 0 | my $netspeed = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 830 | 0 | my $iddcode = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 831 | 0 | my $areacode = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 832 | 0 | my $weatherstationcode = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 833 | 0 | my $weatherstationname = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 834 | 0 | my $mcc = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 835 | 0 | my $mnc = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 836 | 0 | my $mobilebrand = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 837 | 0 | my $elevation = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 838 | 0 | my $usagetype = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 839 | 0 | my $addresstype = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 840 | 0 | my $category = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 841 | 0 | my $district = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 842 | 0 | my $asn = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 843 | 0 | my $as = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 844 | 0 | my $as_domain = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 845 | 0 | my $as_usagetype = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 846 | 0 | my $as_cidr = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 847 | |||||||||||||||||||||||||||||||||||||||||||
| 848 | 0 | ▶ | if ($IPV6_COUNTRY_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 849 | 0 | $country_short = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_COUNTRY_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 850 | 0 | $country_long = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_COUNTRY_POSITION[$dbtype]+2), 4)) + 3); | |||||||||||||||||||||||||||||||||||||||||
| 851 | } | ||||||||||||||||||||||||||||||||||||||||||
| 852 | 0 | ▶ | if ($IPV6_REGION_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 853 | 0 | $region = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_REGION_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 854 | } | ||||||||||||||||||||||||||||||||||||||||||
| 855 | 0 | ▶ | if ($IPV6_CITY_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 856 | 0 | $city = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_CITY_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 857 | } | ||||||||||||||||||||||||||||||||||||||||||
| 858 | 0 | ▶ | if ($IPV6_ISP_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 859 | 0 | $isp = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ISP_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 860 | } | ||||||||||||||||||||||||||||||||||||||||||
| 861 | 0 | ▶ | if ($IPV6_LATITUDE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 862 | 0 | $latitude = $obj->readFloat(substr($raw_positions_row, 4 * ($IPV6_LATITUDE_POSITION[$dbtype]+2))); | |||||||||||||||||||||||||||||||||||||||||
| 863 | 0 | $latitude = sprintf("%.6f", $latitude); | |||||||||||||||||||||||||||||||||||||||||
| 864 | } | ||||||||||||||||||||||||||||||||||||||||||
| 865 | 0 | ▶ | if ($IPV6_LONGITUDE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 866 | 0 | $longitude = $obj->readFloat(substr($raw_positions_row, 4 * ($IPV6_LONGITUDE_POSITION[$dbtype]+2))); | |||||||||||||||||||||||||||||||||||||||||
| 867 | 0 | $longitude = sprintf("%.6f", $longitude); | |||||||||||||||||||||||||||||||||||||||||
| 868 | } | ||||||||||||||||||||||||||||||||||||||||||
| 869 | 0 | ▶ | if ($IPV6_DOMAIN_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 870 | 0 | $domain = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_DOMAIN_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 871 | } | ||||||||||||||||||||||||||||||||||||||||||
| 872 | 0 | ▶ | if ($IPV6_ZIPCODE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 873 | 0 | $zipcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ZIPCODE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 874 | } | ||||||||||||||||||||||||||||||||||||||||||
| 875 | 0 | ▶ | if ($IPV6_TIMEZONE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 876 | 0 | $timezone = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_TIMEZONE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 877 | } | ||||||||||||||||||||||||||||||||||||||||||
| 878 | 0 | ▶ | if ($IPV6_NETSPEED_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 879 | 0 | $netspeed = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_NETSPEED_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 880 | } | ||||||||||||||||||||||||||||||||||||||||||
| 881 | 0 | ▶ | if ($IPV6_IDDCODE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 882 | 0 | $iddcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_IDDCODE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 883 | } | ||||||||||||||||||||||||||||||||||||||||||
| 884 | 0 | ▶ | if ($IPV6_AREACODE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 885 | 0 | $areacode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AREACODE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 886 | } | ||||||||||||||||||||||||||||||||||||||||||
| 887 | 0 | ▶ | if ($IPV6_WEATHERSTATIONCODE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 888 | 0 | $weatherstationcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_WEATHERSTATIONCODE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 889 | } | ||||||||||||||||||||||||||||||||||||||||||
| 890 | 0 | ▶ | if ($IPV6_WEATHERSTATIONNAME_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 891 | 0 | $weatherstationname = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_WEATHERSTATIONNAME_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 892 | } | ||||||||||||||||||||||||||||||||||||||||||
| 893 | 0 | ▶ | if ($IPV6_MCC_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 894 | 0 | $mcc = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MCC_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 895 | } | ||||||||||||||||||||||||||||||||||||||||||
| 896 | 0 | ▶ | if ($IPV6_MNC_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 897 | 0 | $mnc = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MNC_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 898 | } | ||||||||||||||||||||||||||||||||||||||||||
| 899 | 0 | ▶ | if ($IPV6_MOBILEBRAND_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 900 | 0 | $mobilebrand = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MOBILEBRAND_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 901 | } | ||||||||||||||||||||||||||||||||||||||||||
| 902 | 0 | ▶ | if ($IPV6_ELEVATION_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 903 | 0 | $elevation = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ELEVATION_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 904 | } | ||||||||||||||||||||||||||||||||||||||||||
| 905 | 0 | ▶ | if ($IPV6_USAGETYPE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 906 | 0 | $usagetype = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_USAGETYPE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 907 | } | ||||||||||||||||||||||||||||||||||||||||||
| 908 | 0 | ▶ | if ($IPV6_ADDRESSTYPE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 909 | 0 | $addresstype = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ADDRESSTYPE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 910 | } | ||||||||||||||||||||||||||||||||||||||||||
| 911 | 0 | ▶ | if ($IPV6_CATEGORY_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 912 | 0 | $category = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_CATEGORY_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 913 | } | ||||||||||||||||||||||||||||||||||||||||||
| 914 | 0 | ▶ | if ($IPV6_DISTRICT_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 915 | 0 | $district = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_DISTRICT_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 916 | } | ||||||||||||||||||||||||||||||||||||||||||
| 917 | 0 | ▶ | if ($IPV6_ASN_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 918 | 0 | $asn = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ASN_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 919 | } | ||||||||||||||||||||||||||||||||||||||||||
| 920 | 0 | ▶ | if ($IPV6_AS_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 921 | 0 | $as = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AS_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 922 | } | ||||||||||||||||||||||||||||||||||||||||||
| 923 | 0 | ▶ | if ($IPV6_AS_DOMAIN_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 924 | 0 | $as_domain = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AS_DOMAIN_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 925 | } | ||||||||||||||||||||||||||||||||||||||||||
| 926 | 0 | ▶ | if ($IPV6_AS_USAGETYPE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 927 | 0 | $as_usagetype = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AS_USAGETYPE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 928 | } | ||||||||||||||||||||||||||||||||||||||||||
| 929 | 0 | ▶ | if ($IPV6_AS_CIDR_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 930 | 0 | $as_cidr = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AS_CIDR_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 931 | } | ||||||||||||||||||||||||||||||||||||||||||
| 932 | 0 | return ($country_short, $country_long, $region, $city, $latitude, $longitude, $zipcode, $timezone, $isp, $domain, $netspeed, $iddcode, $areacode, $weatherstationcode, $weatherstationname, $mcc, $mnc, $mobilebrand, $elevation, $usagetype, $addresstype, $category, $district, $asn, $as, $as_domain, $as_usagetype, $as_cidr); | |||||||||||||||||||||||||||||||||||||||||
| 933 | } | ||||||||||||||||||||||||||||||||||||||||||
| 934 | 10 | ▶ | if ($mode == COUNTRYSHORT) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 935 | 10 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_COUNTRY_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 936 | } | ||||||||||||||||||||||||||||||||||||||||||
| 937 | 0 | ▶ | if ($mode == COUNTRYLONG) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 938 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_COUNTRY_POSITION[$dbtype]+2), 4)) + 3); | |||||||||||||||||||||||||||||||||||||||||
| 939 | } | ||||||||||||||||||||||||||||||||||||||||||
| 940 | 0 | ▶ | if ($mode == REGION) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 941 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_REGION_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 942 | } | ||||||||||||||||||||||||||||||||||||||||||
| 943 | 0 | ▶ | if ($mode == CITY) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 944 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_CITY_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 945 | } | ||||||||||||||||||||||||||||||||||||||||||
| 946 | 0 | ▶ | if ($mode == ISP) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 947 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ISP_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 948 | } | ||||||||||||||||||||||||||||||||||||||||||
| 949 | 0 | ▶ | if ($mode == LATITUDE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 950 | 0 | my $lat = $obj->readFloat(substr($raw_positions_row, 4 * ($IPV6_LATITUDE_POSITION[$dbtype]+2))); | |||||||||||||||||||||||||||||||||||||||||
| 951 | 0 | $lat = sprintf("%.6f", $lat); | |||||||||||||||||||||||||||||||||||||||||
| 952 | 0 | return $lat; | |||||||||||||||||||||||||||||||||||||||||
| 953 | } | ||||||||||||||||||||||||||||||||||||||||||
| 954 | 0 | ▶ | if ($mode == LONGITUDE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 955 | 0 | my $lon = $obj->readFloat(substr($raw_positions_row, 4 * ($IPV6_LONGITUDE_POSITION[$dbtype]+2))); | |||||||||||||||||||||||||||||||||||||||||
| 956 | 0 | $lon = sprintf("%.6f", $lon); | |||||||||||||||||||||||||||||||||||||||||
| 957 | 0 | return $lon; | |||||||||||||||||||||||||||||||||||||||||
| 958 | } | ||||||||||||||||||||||||||||||||||||||||||
| 959 | 0 | ▶ | if ($mode == DOMAIN) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 960 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_DOMAIN_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 961 | } | ||||||||||||||||||||||||||||||||||||||||||
| 962 | 0 | ▶ | if ($mode == ZIPCODE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 963 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ZIPCODE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 964 | } | ||||||||||||||||||||||||||||||||||||||||||
| 965 | 0 | ▶ | if ($mode == TIMEZONE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 966 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_TIMEZONE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 967 | } | ||||||||||||||||||||||||||||||||||||||||||
| 968 | 0 | ▶ | if ($mode == NETSPEED) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 969 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_NETSPEED_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 970 | } | ||||||||||||||||||||||||||||||||||||||||||
| 971 | 0 | ▶ | if ($mode == IDDCODE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 972 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_IDDCODE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 973 | } | ||||||||||||||||||||||||||||||||||||||||||
| 974 | 0 | ▶ | if ($mode == AREACODE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 975 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AREACODE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 976 | } | ||||||||||||||||||||||||||||||||||||||||||
| 977 | 0 | ▶ | if ($mode == WEATHERSTATIONCODE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 978 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_WEATHERSTATIONCODE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 979 | } | ||||||||||||||||||||||||||||||||||||||||||
| 980 | 0 | ▶ | if ($mode == WEATHERSTATIONNAME) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 981 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_WEATHERSTATIONNAME_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 982 | } | ||||||||||||||||||||||||||||||||||||||||||
| 983 | 0 | ▶ | if ($mode == MCC) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 984 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MCC_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 985 | } | ||||||||||||||||||||||||||||||||||||||||||
| 986 | 0 | ▶ | if ($mode == MNC) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 987 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MNC_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 988 | } | ||||||||||||||||||||||||||||||||||||||||||
| 989 | 0 | ▶ | if ($mode == MOBILEBRAND) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 990 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_MOBILEBRAND_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 991 | } | ||||||||||||||||||||||||||||||||||||||||||
| 992 | 0 | ▶ | if ($mode == ELEVATION) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 993 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ELEVATION_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 994 | } | ||||||||||||||||||||||||||||||||||||||||||
| 995 | 0 | ▶ | if ($mode == USAGETYPE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 996 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_USAGETYPE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 997 | } | ||||||||||||||||||||||||||||||||||||||||||
| 998 | 0 | ▶ | if ($mode == ADDRESSTYPE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 999 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ADDRESSTYPE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1000 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1001 | 0 | ▶ | if ($mode == CATEGORY) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1002 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_CATEGORY_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1003 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1004 | 0 | ▶ | if ($mode == DISTRICT) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1005 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_DISTRICT_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1006 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1007 | 0 | ▶ | if ($mode == ASN) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1008 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_ASN_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1009 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1010 | 0 | ▶ | if ($mode == AS) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1011 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AS_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1012 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1013 | 0 | ▶ | if ($mode == ASDOMAIN) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1014 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AS_DOMAIN_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1015 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1016 | 0 | ▶ | if ($mode == ASUSAGETYPE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1017 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AS_USAGETYPE_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1018 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1019 | 0 | ▶ | if ($mode == ASCIDR) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1020 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IPV6_AS_CIDR_POSITION[$dbtype]+2), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1021 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1022 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1023 | 94 | ▶ | if ($ipno < $ipfrom) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1024 | 82 | $high = $mid - 1; | |||||||||||||||||||||||||||||||||||||||||
| 1025 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1026 | 12 | $low = $mid + 1; | |||||||||||||||||||||||||||||||||||||||||
| 1027 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1028 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1029 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1030 | 0 | ▶ | if ($mode == ALL) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1031 | 0 | return (UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN); | |||||||||||||||||||||||||||||||||||||||||
| 1032 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1033 | 0 | return UNKNOWN; | |||||||||||||||||||||||||||||||||||||||||
| 1034 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1035 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1036 | |||||||||||||||||||||||||||||||||||||||||||
| 1037 | 10 | ▶ | sub get_ipv4_record { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_ipv4_record: called CC=122 SCAR=87.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1038 | 10 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1039 | 10 | my $ipnum = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1040 | 10 | my $mode = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1041 | 10 | my $dbtype= $obj->{"databasetype"}; | |||||||||||||||||||||||||||||||||||||||||
| 1042 | |||||||||||||||||||||||||||||||||||||||||||
| 1043 | 10 | ▶ | if ($ipnum eq "") { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1044 | 0 | ▶ | if ($mode == ALL) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1045 | 0 | return (NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP, NO_IP); | |||||||||||||||||||||||||||||||||||||||||
| 1046 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1047 | 0 | return NO_IP; | |||||||||||||||||||||||||||||||||||||||||
| 1048 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1049 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1050 | |||||||||||||||||||||||||||||||||||||||||||
| 1051 | 10 | ▶ | if (($mode == COUNTRYSHORT) && ($COUNTRY_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [1], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1052 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1053 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1054 | 10 | ▶ | if (($mode == COUNTRYLONG) && ($COUNTRY_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $COUNTRY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1055 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1056 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1057 | 10 | ▶ | if (($mode == REGION) && ($REGION_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [3], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $REGION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1058 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1059 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1060 | 10 | ▶ | if (($mode == CITY) && ($CITY_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $CITY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1061 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1062 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1063 | 10 | ▶ | if (($mode == ISP) && ($ISP_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [5], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ISP_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1064 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1065 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1066 | 10 | ▶ | if (($mode == LATITUDE) && ($LATITUDE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [6], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $LATITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1067 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1068 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1069 | 10 | ▶ | if (($mode == LONGITUDE) && ($LONGITUDE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [7], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $LONGITUDE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1070 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1071 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1072 | 10 | ▶ | if (($mode == DOMAIN) && ($DOMAIN_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [8], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1073 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1074 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1075 | 10 | ▶ | if (($mode == ZIPCODE) && ($ZIPCODE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ZIPCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1076 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1077 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1078 | 10 | ▶ | if (($mode == TIMEZONE) && ($TIMEZONE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [10], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $TIMEZONE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1079 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1080 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1081 | 10 | ▶ | if (($mode == NETSPEED) && ($NETSPEED_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [11], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $NETSPEED_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1082 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1083 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1084 | 10 | ▶ | if (($mode == IDDCODE) && ($IDDCODE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [12], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $IDDCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1085 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1086 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1087 | 10 | ▶ | if (($mode == AREACODE) && ($AREACODE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [13], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $AREACODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1088 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1089 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1090 | 10 | ▶ | if (($mode == WEATHERSTATIONCODE) && ($WEATHERSTATIONCODE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [14], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $WEATHERSTATIONCODE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1091 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1092 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1093 | 10 | ▶ | if (($mode == WEATHERSTATIONNAME) && ($WEATHERSTATIONNAME_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [15], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $WEATHERSTATIONNAME_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1094 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1095 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1096 | 10 | ▶ | if (($mode == MCC) && ($MCC_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [16], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $MCC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1097 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1098 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1099 | 10 | ▶ | if (($mode == MNC) && ($MNC_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [17], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $MNC_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1100 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1101 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1102 | 10 | ▶ | if (($mode == MOBILEBRAND) && ($MOBILEBRAND_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $MOBILEBRAND_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1103 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1104 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1105 | 10 | ▶ | if (($mode == ELEVATION) && ($ELEVATION_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [19], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ELEVATION_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1106 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1107 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1108 | 10 | ▶ | if (($mode == USAGETYPE) && ($USAGETYPE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [20], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1109 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1110 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1111 | 10 | ▶ | if (($mode == ADDRESSTYPE) && ($ADDRESSTYPE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [21], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ADDRESSTYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1112 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1113 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1114 | 10 | ▶ | if (($mode == CATEGORY) && ($CATEGORY_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [22], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $CATEGORY_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1115 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1116 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1117 | 10 | ▶ | if (($mode == DISTRICT) && ($DISTRICT_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [23], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $DISTRICT_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [23], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $DISTRICT_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [23], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$DISTRICT_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [23], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $DISTRICT_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1118 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1119 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1120 | 10 | ▶ | if (($mode == ASN) && ($ASN_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [24], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ASN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [24], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ASN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [24], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ASN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [24], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ASN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1121 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1122 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1123 | 10 | ▶ | if (($mode == AS) && ($AS_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [25], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AS_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [25], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AS_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [25], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$AS_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [25], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $AS_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1124 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1125 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1126 | 10 | ▶ | if (($mode == ASDOMAIN) && ($AS_DOMAIN_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [26], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AS_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [26], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AS_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [26], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$AS_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [26], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $AS_DOMAIN_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1127 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1128 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1129 | 10 | ▶ | if (($mode == ASUSAGETYPE) && ($AS_USAGETYPE_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [27], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AS_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [27], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AS_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [27], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$AS_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [27], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $AS_USAGETYPE_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1130 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1131 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1132 | 10 | ▶ | if (($mode == ASCIDR) && ($AS_CIDR_POSITION[$dbtype] == 0)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$mode == bless( {"sign" => "+","value" => bless( [28], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AS_CIDR_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$mode == bless( {"sign" => "+","value" => bless( [28], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $AS_CIDR_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$mode == bless( {"sign" => "+","value" => bless( [28], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$AS_CIDR_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $mode == bless( {"sign" => "+","value" => bless( [28], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $AS_CIDR_POSITION[$dbtype] == bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1133 | 0 | return NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1134 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1135 | |||||||||||||||||||||||||||||||||||||||||||
| 1136 | 10 | my $realipno = $ipnum; | |||||||||||||||||||||||||||||||||||||||||
| 1137 | 10 | my $handle = $obj->{"filehandle"}; | |||||||||||||||||||||||||||||||||||||||||
| 1138 | 10 | my $baseaddr = $obj->{"ipv4databaseaddr"}; | |||||||||||||||||||||||||||||||||||||||||
| 1139 | 10 | my $dbcount = $obj->{"ipv4databasecount"}; | |||||||||||||||||||||||||||||||||||||||||
| 1140 | 10 | my $dbcolumn = $obj->{"databasecolumn"}; | |||||||||||||||||||||||||||||||||||||||||
| 1141 | 10 | my $indexbaseaddr = $obj->{"ipv4indexbaseaddr"}; | |||||||||||||||||||||||||||||||||||||||||
| 1142 | |||||||||||||||||||||||||||||||||||||||||||
| 1143 | 10 | my $ipnum1_2 = int($ipnum >> 16); | |||||||||||||||||||||||||||||||||||||||||
| 1144 | 10 | my $indexaddr = $indexbaseaddr + ($ipnum1_2 << 3); | |||||||||||||||||||||||||||||||||||||||||
| 1145 | |||||||||||||||||||||||||||||||||||||||||||
| 1146 | 10 | my $low = 0; | |||||||||||||||||||||||||||||||||||||||||
| 1147 | 10 | my $high = $dbcount; | |||||||||||||||||||||||||||||||||||||||||
| 1148 | 10 | ▶ | if ($indexbaseaddr > 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1149 | 10 | ($low, $high) = $obj->read32x2($handle, $indexaddr); | |||||||||||||||||||||||||||||||||||||||||
| 1150 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1151 | 10 | my $mid = 0; | |||||||||||||||||||||||||||||||||||||||||
| 1152 | 10 | my $ipfrom = 0; | |||||||||||||||||||||||||||||||||||||||||
| 1153 | 10 | my $ipto = 0; | |||||||||||||||||||||||||||||||||||||||||
| 1154 | 10 | my $ipno = 0; | |||||||||||||||||||||||||||||||||||||||||
| 1155 | |||||||||||||||||||||||||||||||||||||||||||
| 1156 | 10 | ▶ | if ($realipno == MAX_IPV4_RANGE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1157 | 0 | $ipno = $realipno - 1; | |||||||||||||||||||||||||||||||||||||||||
| 1158 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1159 | 10 | $ipno = $realipno; | |||||||||||||||||||||||||||||||||||||||||
| 1160 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1161 | |||||||||||||||||||||||||||||||||||||||||||
| 1162 | 10 | my $raw_positions_row; | |||||||||||||||||||||||||||||||||||||||||
| 1163 | |||||||||||||||||||||||||||||||||||||||||||
| 1164 | 10 | ▶ | while ($low <= $high) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1165 | 15 | $mid = int(($low + $high) >> 1); | |||||||||||||||||||||||||||||||||||||||||
| 1166 | |||||||||||||||||||||||||||||||||||||||||||
| 1167 | 15 | ($ipfrom, $ipto, $raw_positions_row) = $obj->readRow32($handle, $baseaddr + $mid * $dbcolumn * 4, $dbcolumn); | |||||||||||||||||||||||||||||||||||||||||
| 1168 | |||||||||||||||||||||||||||||||||||||||||||
| 1169 | 15 | ▶ | if (($ipno >= $ipfrom) && ($ipno < $ipto)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$ipno >= $ipfrom and $ipno < $ipto
MC/DC100%2/2
$ipno >= $ipfrom and $ipno < $ipto
$ipno >= $ipfrom
$ipno < $ipto
Truth table100%3/3
A and B
A= $ipno >= $ipfromB= $ipno < $ipto
| |||||||||||||||||||||||||||||||||||||||||||
| 1170 | 10 | ▶ | if ($mode == ALL) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1171 | 0 | my $country_short = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1172 | 0 | my $country_long = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1173 | 0 | my $region = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1174 | 0 | my $city = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1175 | 0 | my $isp = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1176 | 0 | my $latitude = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1177 | 0 | my $longitude = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1178 | 0 | my $domain = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1179 | 0 | my $zipcode = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1180 | 0 | my $timezone = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1181 | 0 | my $netspeed = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1182 | 0 | my $iddcode = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1183 | 0 | my $areacode = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1184 | 0 | my $weatherstationcode = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1185 | 0 | my $weatherstationname = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1186 | 0 | my $mcc = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1187 | 0 | my $mnc = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1188 | 0 | my $mobilebrand = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1189 | 0 | my $elevation = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1190 | 0 | my $usagetype = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1191 | 0 | my $addresstype = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1192 | 0 | my $category = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1193 | 0 | my $district = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1194 | 0 | my $asn = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1195 | 0 | my $as = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1196 | 0 | my $as_domain = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1197 | 0 | my $as_usagetype = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1198 | 0 | my $as_cidr = NOT_SUPPORTED; | |||||||||||||||||||||||||||||||||||||||||
| 1199 | |||||||||||||||||||||||||||||||||||||||||||
| 1200 | 0 | ▶ | if ($COUNTRY_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1201 | 0 | $country_short = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($COUNTRY_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1202 | 0 | $country_long = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($COUNTRY_POSITION[$dbtype]-1), 4)) + 3); | |||||||||||||||||||||||||||||||||||||||||
| 1203 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1204 | |||||||||||||||||||||||||||||||||||||||||||
| 1205 | 0 | ▶ | if ($REGION_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1206 | 0 | $region = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($REGION_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1207 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1208 | 0 | ▶ | if ($CITY_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1209 | 0 | $city = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($CITY_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1210 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1211 | 0 | ▶ | if ($ISP_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1212 | 0 | $isp = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ISP_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1213 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1214 | 0 | ▶ | if ($LATITUDE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1215 | 0 | $latitude = $obj->readFloat(substr($raw_positions_row, 4 * ($LATITUDE_POSITION[$dbtype]-1), 4)); | |||||||||||||||||||||||||||||||||||||||||
| 1216 | 0 | $latitude = sprintf("%.6f", $latitude); | |||||||||||||||||||||||||||||||||||||||||
| 1217 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1218 | 0 | ▶ | if ($LONGITUDE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1219 | 0 | $longitude = $obj->readFloat(substr($raw_positions_row, 4 * ($LONGITUDE_POSITION[$dbtype]-1), 4)); | |||||||||||||||||||||||||||||||||||||||||
| 1220 | 0 | $longitude = sprintf("%.6f", $longitude); | |||||||||||||||||||||||||||||||||||||||||
| 1221 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1222 | 0 | ▶ | if ($DOMAIN_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1223 | 0 | $domain = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($DOMAIN_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1224 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1225 | 0 | ▶ | if ($ZIPCODE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1226 | 0 | $zipcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ZIPCODE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1227 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1228 | 0 | ▶ | if ($TIMEZONE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1229 | 0 | $timezone = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($TIMEZONE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1230 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1231 | 0 | ▶ | if ($NETSPEED_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1232 | 0 | $netspeed = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($NETSPEED_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1233 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1234 | 0 | ▶ | if ($IDDCODE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1235 | 0 | $iddcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IDDCODE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1236 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1237 | 0 | ▶ | if ($AREACODE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1238 | 0 | $areacode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AREACODE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1239 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1240 | 0 | ▶ | if ($WEATHERSTATIONCODE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1241 | 0 | $weatherstationcode = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($WEATHERSTATIONCODE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1242 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1243 | 0 | ▶ | if ($WEATHERSTATIONNAME_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1244 | 0 | $weatherstationname = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($WEATHERSTATIONNAME_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1245 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1246 | 0 | ▶ | if ($MCC_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1247 | 0 | $mcc = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MCC_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1248 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1249 | 0 | ▶ | if ($MNC_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1250 | 0 | $mnc = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MNC_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1251 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1252 | 0 | ▶ | if ($MOBILEBRAND_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1253 | 0 | $mobilebrand = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MOBILEBRAND_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1254 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1255 | 0 | ▶ | if ($ELEVATION_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1256 | 0 | $elevation = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ELEVATION_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1257 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1258 | 0 | ▶ | if ($USAGETYPE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1259 | 0 | $usagetype = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($USAGETYPE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1260 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1261 | 0 | ▶ | if ($ADDRESSTYPE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1262 | 0 | $addresstype = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ADDRESSTYPE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1263 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1264 | 0 | ▶ | if ($CATEGORY_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1265 | 0 | $category = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($CATEGORY_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1266 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1267 | 0 | ▶ | if ($DISTRICT_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1268 | 0 | $district = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($DISTRICT_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1269 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1270 | 0 | ▶ | if ($ASN_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1271 | 0 | $asn = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ASN_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1272 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1273 | 0 | ▶ | if ($AS_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1274 | 0 | $as = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AS_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1275 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1276 | 0 | ▶ | if ($AS_DOMAIN_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1277 | 0 | $as_domain = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AS_DOMAIN_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1278 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1279 | 0 | ▶ | if ($AS_USAGETYPE_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1280 | 0 | $as_usagetype = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AS_USAGETYPE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1281 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1282 | 0 | ▶ | if ($AS_CIDR_POSITION[$dbtype] != 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1283 | 0 | $as_cidr = $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AS_CIDR_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1284 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1285 | |||||||||||||||||||||||||||||||||||||||||||
| 1286 | 0 | return ($country_short, $country_long, $region, $city, $latitude, $longitude, $zipcode, $timezone, $isp, $domain, $netspeed, $iddcode, $areacode, $weatherstationcode, $weatherstationname, $mcc, $mnc, $mobilebrand, $elevation, $usagetype, $addresstype, $category, $district, $asn, $as, $as_domain, $as_usagetype, $as_cidr); | |||||||||||||||||||||||||||||||||||||||||
| 1287 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1288 | 10 | ▶ | if ($mode == COUNTRYSHORT) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1289 | 10 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($COUNTRY_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1290 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1291 | 0 | ▶ | if ($mode == COUNTRYLONG) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1292 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($COUNTRY_POSITION[$dbtype]-1), 4)) + 3); | |||||||||||||||||||||||||||||||||||||||||
| 1293 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1294 | 0 | ▶ | if ($mode == REGION) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1295 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($REGION_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1296 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1297 | 0 | ▶ | if ($mode == CITY) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1298 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($CITY_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1299 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1300 | 0 | ▶ | if ($mode == ISP) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1301 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ISP_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1302 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1303 | 0 | ▶ | if ($mode == LATITUDE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1304 | 0 | my $lat = $obj->readFloat(substr($raw_positions_row, 4 * ($LATITUDE_POSITION[$dbtype]-1), 4)); | |||||||||||||||||||||||||||||||||||||||||
| 1305 | 0 | $lat = sprintf("%.6f", $lat); | |||||||||||||||||||||||||||||||||||||||||
| 1306 | 0 | return $lat; | |||||||||||||||||||||||||||||||||||||||||
| 1307 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1308 | 0 | ▶ | if ($mode == LONGITUDE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1309 | 0 | my $lon = $obj->readFloat(substr($raw_positions_row, 4 * ($LONGITUDE_POSITION[$dbtype]-1), 4)); | |||||||||||||||||||||||||||||||||||||||||
| 1310 | 0 | $lon = sprintf("%.6f", $lon); | |||||||||||||||||||||||||||||||||||||||||
| 1311 | 0 | return $lon; | |||||||||||||||||||||||||||||||||||||||||
| 1312 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1313 | 0 | ▶ | if ($mode == DOMAIN) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1314 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($DOMAIN_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1315 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1316 | 0 | ▶ | if ($mode == ZIPCODE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1317 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ZIPCODE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1318 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1319 | 0 | ▶ | if ($mode == TIMEZONE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1320 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($TIMEZONE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1321 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1322 | 0 | ▶ | if ($mode == NETSPEED) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1323 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($NETSPEED_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1324 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1325 | 0 | ▶ | if ($mode == IDDCODE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1326 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($IDDCODE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1327 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1328 | 0 | ▶ | if ($mode == AREACODE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1329 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AREACODE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1330 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1331 | 0 | ▶ | if ($mode == WEATHERSTATIONCODE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1332 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($WEATHERSTATIONCODE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1333 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1334 | 0 | ▶ | if ($mode == WEATHERSTATIONNAME) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1335 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($WEATHERSTATIONNAME_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1336 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1337 | 0 | ▶ | if ($mode == MCC) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1338 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MCC_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1339 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1340 | 0 | ▶ | if ($mode == MNC) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1341 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MNC_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1342 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1343 | 0 | ▶ | if ($mode == MOBILEBRAND) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1344 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($MOBILEBRAND_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1345 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1346 | 0 | ▶ | if ($mode == ELEVATION) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1347 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ELEVATION_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1348 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1349 | 0 | ▶ | if ($mode == USAGETYPE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1350 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($USAGETYPE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1351 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1352 | 0 | ▶ | if ($mode == ADDRESSTYPE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1353 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ADDRESSTYPE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1354 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1355 | 0 | ▶ | if ($mode == CATEGORY) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1356 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($CATEGORY_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1357 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1358 | 0 | ▶ | if ($mode == DISTRICT) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1359 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($DISTRICT_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1360 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1361 | 0 | ▶ | if ($mode == ASN) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1362 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($ASN_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1363 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1364 | 0 | ▶ | if ($mode == AS) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1365 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AS_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1366 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1367 | 0 | ▶ | if ($mode == ASDOMAIN) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1368 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AS_DOMAIN_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1369 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1370 | 0 | ▶ | if ($mode == ASUSAGETYPE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1371 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AS_USAGETYPE_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1372 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1373 | 0 | ▶ | if ($mode == ASCIDR) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1374 | 0 | return $obj->readStr($handle, unpack("V", substr($raw_positions_row, 4 * ($AS_CIDR_POSITION[$dbtype]-1), 4))); | |||||||||||||||||||||||||||||||||||||||||
| 1375 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1376 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1377 | 5 | ▶ | if ($ipno < $ipfrom) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1378 | 4 | $high = $mid - 1; | |||||||||||||||||||||||||||||||||||||||||
| 1379 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1380 | 1 | $low = $mid + 1; | |||||||||||||||||||||||||||||||||||||||||
| 1381 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1382 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1383 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1384 | 0 | ▶ | if ($mode == ALL) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1385 | 0 | return (UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN); | |||||||||||||||||||||||||||||||||||||||||
| 1386 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1387 | 0 | return UNKNOWN; | |||||||||||||||||||||||||||||||||||||||||
| 1388 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1389 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1390 | |||||||||||||||||||||||||||||||||||||||||||
| 1391 | 15 | ▶ | sub readRow32 { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
readRow32: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1392 | 15 | my ($obj, $handle, $position, $column) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 1393 | 15 | my $data = ""; | |||||||||||||||||||||||||||||||||||||||||
| 1394 | 15 | my $data_length = $column * 4 + 4; | |||||||||||||||||||||||||||||||||||||||||
| 1395 | 15 | seek($handle, $position-1, 0); | |||||||||||||||||||||||||||||||||||||||||
| 1396 | 15 | read($handle, $data, $data_length); | |||||||||||||||||||||||||||||||||||||||||
| 1397 | 15 | my $ipfrom = substr($data, 0, 4); | |||||||||||||||||||||||||||||||||||||||||
| 1398 | 15 | my $ipfrom_next = substr($data, $data_length - 4, 4); | |||||||||||||||||||||||||||||||||||||||||
| 1399 | 15 | my $result_row = substr($data, 0, $data_length - 4); | |||||||||||||||||||||||||||||||||||||||||
| 1400 | 15 | return (unpack("V", $ipfrom), unpack("V", $ipfrom_next), $result_row); | |||||||||||||||||||||||||||||||||||||||||
| 1401 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1402 | |||||||||||||||||||||||||||||||||||||||||||
| 1403 | 104 | ▶ | sub readRow128 { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
readRow128: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1404 | 104 | my ($obj, $handle, $position, $column) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 1405 | 104 | my $data = ""; | |||||||||||||||||||||||||||||||||||||||||
| 1406 | 104 | my $data_length = $column * 4 + 12 + 16; | |||||||||||||||||||||||||||||||||||||||||
| 1407 | 104 | seek($handle, $position-1, 0); | |||||||||||||||||||||||||||||||||||||||||
| 1408 | 104 | read($handle, $data, $data_length); | |||||||||||||||||||||||||||||||||||||||||
| 1409 | 104 | my $ipfrom = substr($data, 0, 16); | |||||||||||||||||||||||||||||||||||||||||
| 1410 | 104 | my $ipfrom_next = substr($data, $data_length - 16, 16); | |||||||||||||||||||||||||||||||||||||||||
| 1411 | 104 | my $result_row = substr($data, 0, $data_length - 16); | |||||||||||||||||||||||||||||||||||||||||
| 1412 | 104 | return (&bytesInt($ipfrom), &bytesInt($ipfrom_next), $result_row); | |||||||||||||||||||||||||||||||||||||||||
| 1413 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1414 | |||||||||||||||||||||||||||||||||||||||||||
| 1415 | 2 | ▶ | sub read512 { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
read512: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1416 | 2 | my ($obj, $handle, $position) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 1417 | 2 | my $data = ""; | |||||||||||||||||||||||||||||||||||||||||
| 1418 | 2 | seek($handle, $position-1, 0); | |||||||||||||||||||||||||||||||||||||||||
| 1419 | 2 | read($handle, $data, 64); | |||||||||||||||||||||||||||||||||||||||||
| 1420 | 2 | my @data_array = split('', $data); | |||||||||||||||||||||||||||||||||||||||||
| 1421 | 2 | ▶ | while ($#data_array < 63) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1422 | 0 | $data_array[$#data_array+1] = 0x00; | |||||||||||||||||||||||||||||||||||||||||
| 1423 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1424 | 2 | return @data_array; | |||||||||||||||||||||||||||||||||||||||||
| 1425 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1426 | |||||||||||||||||||||||||||||||||||||||||||
| 1427 | 20 | ▶ | sub read32x2 { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
read32x2: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1428 | 20 | my ($obj, $handle, $position) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 1429 | 20 | my $data = ""; | |||||||||||||||||||||||||||||||||||||||||
| 1430 | 20 | seek($handle, $position-1, 0); | |||||||||||||||||||||||||||||||||||||||||
| 1431 | 20 | read($handle, $data, 8); | |||||||||||||||||||||||||||||||||||||||||
| 1432 | 20 | my $data_1 = substr($data, 0, 4); | |||||||||||||||||||||||||||||||||||||||||
| 1433 | 20 | my $data_2 = substr($data, 4, 4); | |||||||||||||||||||||||||||||||||||||||||
| 1434 | 20 | return (unpack("V", $data_1), unpack("V", $data_2)); | |||||||||||||||||||||||||||||||||||||||||
| 1435 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1436 | |||||||||||||||||||||||||||||||||||||||||||
| 1437 | 0 | ▶ | sub read128 { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
read128: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1438 | 0 | my ($obj, $handle, $position) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 1439 | 0 | my $data = ""; | |||||||||||||||||||||||||||||||||||||||||
| 1440 | 0 | seek($handle, $position-1, 0); | |||||||||||||||||||||||||||||||||||||||||
| 1441 | 0 | read($handle, $data, 16); | |||||||||||||||||||||||||||||||||||||||||
| 1442 | 0 | return &bytesInt($data); | |||||||||||||||||||||||||||||||||||||||||
| 1443 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1444 | |||||||||||||||||||||||||||||||||||||||||||
| 1445 | 0 | ▶ | sub read32 { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
read32: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1446 | 0 | my ($obj, $handle, $position) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 1447 | 0 | my $data = ""; | |||||||||||||||||||||||||||||||||||||||||
| 1448 | 0 | seek($handle, $position-1, 0); | |||||||||||||||||||||||||||||||||||||||||
| 1449 | 0 | read($handle, $data, 4); | |||||||||||||||||||||||||||||||||||||||||
| 1450 | 0 | return unpack("V", $data); | |||||||||||||||||||||||||||||||||||||||||
| 1451 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1452 | |||||||||||||||||||||||||||||||||||||||||||
| 1453 | 0 | ▶ | sub read8 { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
read8: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1454 | 0 | my ($obj, $handle, $position) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 1455 | 0 | my $data = ""; | |||||||||||||||||||||||||||||||||||||||||
| 1456 | 0 | seek($handle, $position-1, 0); | |||||||||||||||||||||||||||||||||||||||||
| 1457 | 0 | read($handle, $data, 1); | |||||||||||||||||||||||||||||||||||||||||
| 1458 | 0 | return unpack("C", $data); | |||||||||||||||||||||||||||||||||||||||||
| 1459 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1460 | |||||||||||||||||||||||||||||||||||||||||||
| 1461 | 20 | ▶ | sub readStr { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
readStr: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1462 | 20 | my ($obj, $handle, $position) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 1463 | 20 | my $data = ""; | |||||||||||||||||||||||||||||||||||||||||
| 1464 | 20 | seek($handle, $position, 0); | |||||||||||||||||||||||||||||||||||||||||
| 1465 | 20 | read($handle, $data, 257); | |||||||||||||||||||||||||||||||||||||||||
| 1466 | 20 | my $char_count = unpack("C", substr($data, 0, 1)); | |||||||||||||||||||||||||||||||||||||||||
| 1467 | 20 | my $string = substr($data, 1, $char_count); | |||||||||||||||||||||||||||||||||||||||||
| 1468 | 20 | return $string; | |||||||||||||||||||||||||||||||||||||||||
| 1469 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1470 | |||||||||||||||||||||||||||||||||||||||||||
| 1471 | 0 | ▶ | sub readFloat { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
readFloat: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1472 | 0 | my ($obj, $data) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 1473 | 0 | my $is_little_endian = unpack("h*", pack("s", 1)); | |||||||||||||||||||||||||||||||||||||||||
| 1474 | 0 | ▶ | if ($is_little_endian =~ m/^1/) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1475 | # "LITTLE ENDIAN - x86\n"; | ||||||||||||||||||||||||||||||||||||||||||
| 1476 | 0 | return unpack("f", $data); | |||||||||||||||||||||||||||||||||||||||||
| 1477 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1478 | # "BIG ENDIAN - MAC\n"; | ||||||||||||||||||||||||||||||||||||||||||
| 1479 | 0 | return unpack("f", reverse($data)); | |||||||||||||||||||||||||||||||||||||||||
| 1480 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1481 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1482 | |||||||||||||||||||||||||||||||||||||||||||
| 1483 | 208 | ▶ | sub bytesInt { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
bytesInt: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1484 | 208 | my $binip = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1485 | 208 | my @array = split(//, $binip); | |||||||||||||||||||||||||||||||||||||||||
| 1486 | 208 | ▶ | return 0 if ($#array != 15); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1487 | 208 | my $ip96_127 = unpack("V", $array[0] . $array[1] . $array[2] . $array[3]); | |||||||||||||||||||||||||||||||||||||||||
| 1488 | 208 | my $ip64_95 = unpack("V", $array[4] . $array[5] . $array[6] . $array[7]); | |||||||||||||||||||||||||||||||||||||||||
| 1489 | 208 | my $ip32_63 = unpack("V", $array[8] . $array[9] . $array[10] . $array[11]); | |||||||||||||||||||||||||||||||||||||||||
| 1490 | 208 | my $ip1_31 = unpack("V", $array[12] . $array[13] . $array[14] . $array[15]); | |||||||||||||||||||||||||||||||||||||||||
| 1491 | |||||||||||||||||||||||||||||||||||||||||||
| 1492 | 208 | my $big1 = Math::BigInt->new("$ip96_127"); | |||||||||||||||||||||||||||||||||||||||||
| 1493 | 208 | my $big2 = Math::BigInt->new("$ip64_95")->blsft(32); | |||||||||||||||||||||||||||||||||||||||||
| 1494 | 208 | my $big3 = Math::BigInt->new("$ip32_63")->blsft(64); | |||||||||||||||||||||||||||||||||||||||||
| 1495 | 208 | my $big4 = Math::BigInt->new("$ip1_31")->blsft(96); | |||||||||||||||||||||||||||||||||||||||||
| 1496 | 208 | $big1 = $big1->badd($big2)->badd($big3)->badd($big4); | |||||||||||||||||||||||||||||||||||||||||
| 1497 | |||||||||||||||||||||||||||||||||||||||||||
| 1498 | 208 | return $big1->bstr(); | |||||||||||||||||||||||||||||||||||||||||
| 1499 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1500 | |||||||||||||||||||||||||||||||||||||||||||
| 1501 | 20 | ▶ | sub validate_ip { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
validate_ip: called CC=9 SCAR=27.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1502 | 20 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1503 | 20 | my $ip = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1504 | 20 | my $ipv = -1; | |||||||||||||||||||||||||||||||||||||||||
| 1505 | 20 | my $ipnum = -1; | |||||||||||||||||||||||||||||||||||||||||
| 1506 | #name server lookup if domain name | ||||||||||||||||||||||||||||||||||||||||||
| 1507 | 20 | $ip = $obj->name2ip($ip); | |||||||||||||||||||||||||||||||||||||||||
| 1508 | |||||||||||||||||||||||||||||||||||||||||||
| 1509 | 20 | ▶ | if ($obj->ip_is_ipv4($ip)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1510 | #ipv4 address | ||||||||||||||||||||||||||||||||||||||||||
| 1511 | 10 | $ipv = 4; | |||||||||||||||||||||||||||||||||||||||||
| 1512 | 10 | $ipnum = $obj->ip2no($ip); | |||||||||||||||||||||||||||||||||||||||||
| 1513 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1514 | #expand ipv6 address | ||||||||||||||||||||||||||||||||||||||||||
| 1515 | 10 | $ip = $obj->expand_ipv6_address($ip); | |||||||||||||||||||||||||||||||||||||||||
| 1516 | 10 | ▶ | if ($obj->ip_is_ipv6($ip)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1517 | #ipv6 address | ||||||||||||||||||||||||||||||||||||||||||
| 1518 | 10 | $ipv = 6; | |||||||||||||||||||||||||||||||||||||||||
| 1519 | 10 | $ipnum = $obj->hex2int($ip); | |||||||||||||||||||||||||||||||||||||||||
| 1520 | |||||||||||||||||||||||||||||||||||||||||||
| 1521 | #reformat ipv4 address in ipv6 | ||||||||||||||||||||||||||||||||||||||||||
| 1522 | 10 | ▶ | if (($ipnum >= 281470681743360) && ($ipnum <= 281474976710655)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$ipnum >= bless( {"sign" => "+","value" => bless( [681743360,281470], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [976710655,281474], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$ipnum >= bless( {"sign" => "+","value" => bless( [681743360,281470], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [976710655,281474], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ipnum >= bless( {"sign" => "+","value" => bless( [681743360,281470], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ipnum <= bless( {"sign" => "+","value" => bless( [976710655,281474], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $ipnum >= bless( {"sign" => "+","value" => bless( [681743360,281470], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ipnum <= bless( {"sign" => "+","value" => bless( [976710655,281474], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1523 | 0 | $ipv = 4; | |||||||||||||||||||||||||||||||||||||||||
| 1524 | 0 | $ipnum = $ipnum - 281470681743360; | |||||||||||||||||||||||||||||||||||||||||
| 1525 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1526 | |||||||||||||||||||||||||||||||||||||||||||
| 1527 | #reformat 6to4 address to ipv4 address 2002:: to 2002:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF | ||||||||||||||||||||||||||||||||||||||||||
| 1528 | 10 | ▶ | if (($ipnum >= 42545680458834377588178886921629466624) && ($ipnum <= 42550872755692912415807417417958686719)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$ipnum >= bless( {"sign" => "+","value" => bless( [629466624,178886921,834377588,545680458,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [958686719,807417417,692912415,550872755,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$ipnum >= bless( {"sign" => "+","value" => bless( [629466624,178886921,834377588,545680458,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [958686719,807417417,692912415,550872755,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ipnum >= bless( {"sign" => "+","value" => bless( [629466624,178886921,834377588,545680458,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ipnum <= bless( {"sign" => "+","value" => bless( [958686719,807417417,692912415,550872755,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $ipnum >= bless( {"sign" => "+","value" => bless( [629466624,178886921,834377588,545680458,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ipnum <= bless( {"sign" => "+","value" => bless( [958686719,807417417,692912415,550872755,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1529 | 0 | $ipv = 4; | |||||||||||||||||||||||||||||||||||||||||
| 1530 | #bitshift right 80 bits | ||||||||||||||||||||||||||||||||||||||||||
| 1531 | 0 | $ipnum->brsft(80); | |||||||||||||||||||||||||||||||||||||||||
| 1532 | #bitwise modulus to get the last 32 bit | ||||||||||||||||||||||||||||||||||||||||||
| 1533 | 0 | $ipnum->bmod(4294967296); | |||||||||||||||||||||||||||||||||||||||||
| 1534 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1535 | |||||||||||||||||||||||||||||||||||||||||||
| 1536 | #reformat Teredo address to ipv4 address 2001:0000:: to 2001:0000:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF: | ||||||||||||||||||||||||||||||||||||||||||
| 1537 | 10 | ▶ | if (($ipnum >= 42540488161975842760550356425300246528) && ($ipnum <= 42540488241204005274814694018844196863)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$ipnum >= bless( {"sign" => "+","value" => bless( [300246528,550356425,975842760,540488161,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [844196863,814694018,204005274,540488241,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$ipnum >= bless( {"sign" => "+","value" => bless( [300246528,550356425,975842760,540488161,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $ipnum <= bless( {"sign" => "+","value" => bless( [844196863,814694018,204005274,540488241,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ipnum >= bless( {"sign" => "+","value" => bless( [300246528,550356425,975842760,540488161,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$ipnum <= bless( {"sign" => "+","value" => bless( [844196863,814694018,204005274,540488241,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A and B
A= $ipnum >= bless( {"sign" => "+","value" => bless( [300246528,550356425,975842760,540488161,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $ipnum <= bless( {"sign" => "+","value" => bless( [844196863,814694018,204005274,540488241,42], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1538 | 0 | $ipv = 4; | |||||||||||||||||||||||||||||||||||||||||
| 1539 | 0 | $ipnum = Math::BigInt->new($ipnum); | |||||||||||||||||||||||||||||||||||||||||
| 1540 | #bitwise not to invert binary | ||||||||||||||||||||||||||||||||||||||||||
| 1541 | 0 | $ipnum->bnot(); | |||||||||||||||||||||||||||||||||||||||||
| 1542 | #bitwise modulus to get the last 32 bit | ||||||||||||||||||||||||||||||||||||||||||
| 1543 | 0 | $ipnum->bmod(4294967296); | |||||||||||||||||||||||||||||||||||||||||
| 1544 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1545 | |||||||||||||||||||||||||||||||||||||||||||
| 1546 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1547 | #not IPv4 and IPv6 | ||||||||||||||||||||||||||||||||||||||||||
| 1548 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1549 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1550 | 20 | return ($ipv, $ipnum); | |||||||||||||||||||||||||||||||||||||||||
| 1551 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1552 | |||||||||||||||||||||||||||||||||||||||||||
| 1553 | 10 | ▶ | sub expand_ipv6_address { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
expand_ipv6_address: called CC=7 SCAR=25.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1554 | 10 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1555 | 10 | my $ip = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1556 | 10 | $ip =~ s/\:\:/\:Z\:/; | |||||||||||||||||||||||||||||||||||||||||
| 1557 | 10 | my @ip = split(/\:/, $ip); | |||||||||||||||||||||||||||||||||||||||||
| 1558 | 10 | my $num = scalar(@ip); | |||||||||||||||||||||||||||||||||||||||||
| 1559 | |||||||||||||||||||||||||||||||||||||||||||
| 1560 | 10 | my $l = 8; | |||||||||||||||||||||||||||||||||||||||||
| 1561 | 10 | ▶ | if ($ip[$#ip] =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1562 | 0 | my $a = sprintf("%x", ($1*256 + $2)); | |||||||||||||||||||||||||||||||||||||||||
| 1563 | 0 | my $b = sprintf("%x", ($3*256 + $4)); | |||||||||||||||||||||||||||||||||||||||||
| 1564 | 0 | $ip[$#ip] = $a; | |||||||||||||||||||||||||||||||||||||||||
| 1565 | 0 | $ip[$#ip+1] = $b; | |||||||||||||||||||||||||||||||||||||||||
| 1566 | 0 | $l--; | |||||||||||||||||||||||||||||||||||||||||
| 1567 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1568 | |||||||||||||||||||||||||||||||||||||||||||
| 1569 | 10 | ▶ | if ($#ip == 8) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1570 | 0 | shift(@ip); | |||||||||||||||||||||||||||||||||||||||||
| 1571 | 0 | $l++; | |||||||||||||||||||||||||||||||||||||||||
| 1572 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1573 | |||||||||||||||||||||||||||||||||||||||||||
| 1574 | 10 | foreach (0..(scalar(@ip)-1)) { | |||||||||||||||||||||||||||||||||||||||||
| 1575 | 80 | ▶ | next if (length($ip[$_]) > 3); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1576 | 0 | $ip[$_] = ('0'x(4-length($ip[$_]))).$ip[$_]; | |||||||||||||||||||||||||||||||||||||||||
| 1577 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1578 | |||||||||||||||||||||||||||||||||||||||||||
| 1579 | 10 | foreach (0..(scalar(@ip)-1)) { | |||||||||||||||||||||||||||||||||||||||||
| 1580 | 80 | ▶ | next unless ($ip[$_] eq '000Z'); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1581 | 0 | my @empty = map { $_ = '0'x4 } (0..7); | |||||||||||||||||||||||||||||||||||||||||
| 1582 | 0 | $ip[$_] = join(':', @empty[0..$l-$num]); | |||||||||||||||||||||||||||||||||||||||||
| 1583 | 0 | last; | |||||||||||||||||||||||||||||||||||||||||
| 1584 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1585 | |||||||||||||||||||||||||||||||||||||||||||
| 1586 | 10 | return (uc(join ':', @ip)); | |||||||||||||||||||||||||||||||||||||||||
| 1587 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1588 | |||||||||||||||||||||||||||||||||||||||||||
| 1589 | 10 | ▶ | sub hex2int { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
hex2int: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1590 | 10 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1591 | 10 | my $hexip = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1592 | |||||||||||||||||||||||||||||||||||||||||||
| 1593 | 10 | $hexip =~ s/\://g; | |||||||||||||||||||||||||||||||||||||||||
| 1594 | |||||||||||||||||||||||||||||||||||||||||||
| 1595 | 10 | ▶ | unless (length($hexip) == 32) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1596 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 1597 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 1598 | |||||||||||||||||||||||||||||||||||||||||||
| 1599 | 10 | my $binip = unpack('B128', pack('H32', $hexip)); | |||||||||||||||||||||||||||||||||||||||||
| 1600 | 10 | my ($n, $dec) = (Math::BigInt->new(1), Math::BigInt->new(0)); | |||||||||||||||||||||||||||||||||||||||||
| 1601 | |||||||||||||||||||||||||||||||||||||||||||
| 1602 | 10 | foreach (reverse (split('', $binip))) { | |||||||||||||||||||||||||||||||||||||||||
| 1603 | 1280 | ▶ | $_ && ($dec += $n); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1604 | 1280 | $n *= 2; | |||||||||||||||||||||||||||||||||||||||||
| 1605 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1606 | |||||||||||||||||||||||||||||||||||||||||||
| 1607 | 10 | $dec =~ s/^\+//; | |||||||||||||||||||||||||||||||||||||||||
| 1608 | 10 | return $dec; | |||||||||||||||||||||||||||||||||||||||||
| 1609 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1610 | |||||||||||||||||||||||||||||||||||||||||||
| 1611 | 10 | ▶ | sub ip2no { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
ip2no: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1612 | 10 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1613 | 10 | my $ip = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1614 | 10 | my @block = split(/\./, $ip); | |||||||||||||||||||||||||||||||||||||||||
| 1615 | 10 | my $no = 0; | |||||||||||||||||||||||||||||||||||||||||
| 1616 | 10 | $no = $block[3]; | |||||||||||||||||||||||||||||||||||||||||
| 1617 | 10 | $no = $no + $block[2] * 256; | |||||||||||||||||||||||||||||||||||||||||
| 1618 | 10 | $no = $no + $block[1] * 256 * 256; | |||||||||||||||||||||||||||||||||||||||||
| 1619 | 10 | $no = $no + $block[0] * 256 * 256 * 256; | |||||||||||||||||||||||||||||||||||||||||
| 1620 | 10 | return $no; | |||||||||||||||||||||||||||||||||||||||||
| 1621 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1622 | |||||||||||||||||||||||||||||||||||||||||||
| 1623 | 20 | ▶ | sub name2ip { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
name2ip: called CC=5 SCAR=20.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1624 | 20 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1625 | 20 | my $host = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1626 | 20 | my $ip_address = ""; | |||||||||||||||||||||||||||||||||||||||||
| 1627 | 20 | ▶ | if (($host =~ m/^$IPv4_re$/) || ($host =~ m/^$IPv6_re$/) || ($host =~ m/^\:\:$/)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
$host =~ /^$IPv4_re$/ or $host =~ /^$IPv6_re$/ or $host =~ /^\:\:$/
$host =~ /^$IPv4_re$/ or $host =~ /^$IPv6_re$/
MC/DC0%0/3
$host =~ /^$IPv4_re$/ or $host =~ /^$IPv6_re$/ or $host =~ /^\:\:$/
$host =~ /^$IPv4_re$/
$host =~ /^$IPv6_re$/
$host =~ /^\:\:$/
Truth table50%2/4
A or B or C
A= $host =~ /^$IPv4_re$/B= $host =~ /^$IPv6_re$/C= $host =~ /^\:\:$/
| |||||||||||||||||||||||||||||||||||||||||||
| 1628 | 20 | $ip_address = $host; | |||||||||||||||||||||||||||||||||||||||||
| 1629 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1630 | # TO_DO: Can we return IPv6 address too? | ||||||||||||||||||||||||||||||||||||||||||
| 1631 | 0 | my @hostname = gethostbyname($host); | |||||||||||||||||||||||||||||||||||||||||
| 1632 | 0 | ▶ | if ($#hostname < 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1633 | 0 | $ip_address = $host; | |||||||||||||||||||||||||||||||||||||||||
| 1634 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1635 | 0 | $ip_address = join('.', unpack('C4', $hostname[4])); | |||||||||||||||||||||||||||||||||||||||||
| 1636 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1637 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1638 | 20 | return $ip_address; | |||||||||||||||||||||||||||||||||||||||||
| 1639 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1640 | |||||||||||||||||||||||||||||||||||||||||||
| 1641 | 20 | ▶ | sub ip_is_ipv4 { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
ip_is_ipv4: called CC=5 SCAR=16.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1642 | 20 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1643 | 20 | my $ip = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1644 | 20 | ▶ | if ($ip =~ m/^$IPv4_re$/) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1645 | 10 | my @octet = split(/\./, $ip); | |||||||||||||||||||||||||||||||||||||||||
| 1646 | 10 | foreach my $i (0 .. $#octet) { | |||||||||||||||||||||||||||||||||||||||||
| 1647 | 40 | ▶ | return 0 if (($octet[$i] > 255) || ($octet[$i] < 0)); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$octet[$i] > bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) or $octet[$i] < bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
MC/DC0%0/2
$octet[$i] > bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) or $octet[$i] < bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$octet[$i] > bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$octet[$i] < bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table33%1/3
A or B
A= $octet[$i] > bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $octet[$i] < bless( {"sign" => "+","value" => bless( [0], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
| |||||||||||||||||||||||||||||||||||||||||||
| 1648 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1649 | 10 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 1650 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1651 | 10 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 1652 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1653 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1654 | |||||||||||||||||||||||||||||||||||||||||||
| 1655 | 10 | ▶ | sub ip_is_ipv6 { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
ip_is_ipv6: called CC=4 SCAR=17.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1656 | 10 | my $obj = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1657 | 10 | my $ip = shift(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1658 | 10 | ▶ | if (($ip =~ m/^$IPv6_re$/) || ($ip =~ m/^$IPv4_re$/) || ($ip =~ m/^\:\:$/)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
$ip =~ /^$IPv6_re$/ or $ip =~ /^$IPv4_re$/ or $ip =~ /^\:\:$/
$ip =~ /^$IPv6_re$/ or $ip =~ /^$IPv4_re$/
MC/DC0%0/3
$ip =~ /^$IPv6_re$/ or $ip =~ /^$IPv4_re$/ or $ip =~ /^\:\:$/
$ip =~ /^$IPv6_re$/
$ip =~ /^$IPv4_re$/
$ip =~ /^\:\:$/
Truth table25%1/4
A or B or C
A= $ip =~ /^$IPv6_re$/B= $ip =~ /^$IPv4_re$/C= $ip =~ /^\:\:$/
| |||||||||||||||||||||||||||||||||||||||||||
| 1659 | 10 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 1660 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 1661 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 1662 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1663 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1664 | |||||||||||||||||||||||||||||||||||||||||||
| 1665 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 1666 | __END__ | ||||||||||||||||||||||||||||||||||||||||||