Logmanager documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

IP address

Block is used to define constant IP address data type.

Input value is IP address written in 0.0.0.0 format. Output of the block is internal representation of the IP address.

IPv6 address value is normalized according to RFC 5952.

In case of input value is not retypable to any IP version then default value of IPv4 0.0.0.0 is returned.

Value is not directly stored into database, but under special key name created as original_key@mac.

IP structure is internally represented as an 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.

Block XML representation

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>

Example of visual representation

Block "IP address"

Block “IP address”

Example of stored representation

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, if it’s local IP address,
  • is_multicast: boolean value, if it’s multicast IP address,
  • is_reserved: boolean value, if it’s IP address from reserved range,
  • ptr: domain name, under which is the IP address 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 block usage

Example of "IP address" block

Example of “IP address” block

Processing result

Results of "IP address" block

Results of “IP address” block