IP address
This block is used to define the constant IP address data type.
The input value is an IP address written in 0.0.0.0 format. The output of the block is an internal representation of the IP address.
IPv6 address value is normalized according to RFC 5952.
In case the input value is not retypable to any IP version, then the default value of IPv4 0.0.0.0 is returned.
Value is not directly stored into database, but under a special key name created as original_key@mac.
IP structure is internally represented as a data type emulating dict. and can be subscribed as a dictionary object for reading its contained values. Subsription key names are if same names as stored values in json format with apropriate data type.
XML representation of ip block
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="ip">
<field name="IP">0.0.0.0</field>
</block>
</xml>

Block “IP address”
Value is expanded on information about location, IP address version, reverse domain name:
- city: city, where the IP address belongs by location,
- country_code: code of the country, where the IP address belongs by location,
- country_name: name of the country, where the IP address belongs by location,
- is_link_local: boolean value, whether it’s a local IP address,
- is_multicast: boolean value, whether it’s a multicast IP address,
- is_reserved: boolean value, whether it’s am IP address from reserved range,
- ptr: domain name, under which the IP address is available,
- value: normalized value of the IP address,
- version: version of the IP address (version 4 or 6).
{
"my_key": "8.8.8.8",
"my_key@ip": {
"city": "Mountain View",
"country_code": "US",
"country_name": "United States",
"is_link_local": false,
"is_multicast": false,
"is_reserved": false,
"ptr": "google-public-dns-a.google.com",
"value": "8.8.8.8",
"version": 4
}
}
{
"my_key": "fe80::",
"my_key@ip": {
"city": "Unknown",
"country_code": "Un",
"country_name": "Unknown",
"is_link_local": true,
"is_multicast": false,
"is_reserved": false,
"ptr": "fe80::",
"value": "fe80::",
"version": 6
}
}

Example of “IP address” block

Results of “IP address” block