Document toolboxDocument toolbox

IPv4 legal use (purpose)

Description

Returns the purpose or legal use of the given IPv4 address.

How does it work in the search window?

Select Create column in the search window toolbar, then select the IPv4 legal use operation. You need to specify one argument:

Argument

Data type

Argument

Data type

IP to test mandatory

ip

The data type of the values in the new column is string.

Example

In the demo.ecommerce.data table, we want to know the legal use of the IP addresses in our clientIpAddress column. To do it, we will create a new column using the IPv4 legal use operation. 

The arguments needed for the filter are:

  • IP to test - clientIpAddress column

Click Create column and you will see the following result:

How does it work in LINQ?

Use the operator select... as...  and add the operation syntax to create the new column. This is the syntax for the IPv4 legal use operation:

  • purpose(ip)

Example

You can copy the following LINQ script and try the above example on the demo.ecommerce.data table:

from demo.ecommerce.data select purpose(clientIpAddress) as usrcol1)