IP Protocol (ipprotocol)
Converts an IP protocol name to its protocol code or vice versa. Learn more about IP protocol values here.
How does it work in the search window?
Select Create column in the search window toolbar, then select the IP Protocol operation. This operation needs only one argument. You can choose a column that contains protocol names (string) or protocol codes (integer).
|String to convert (mandatory)||integer, string|
The data type of the new column is string if the input was integer, or integer if the input was string.
Let's use the operation to get the protocol codes that correspond to the protocol name values we use as the input argument. With the my.lookuplist.ipvalues table open in the search window, we click Create column and select the IP Protocol operation. Select the Keyword column as the argument and assign a name to the new column - let's call it protocolCode.
Click Create column and you'll see the new protocolCode column containing float values.
How does it work in LINQ?
Use the operator
as... to apply the Create column operation. These are the valid formats of the operation:
Copy the following LINQ script and use it to replicate the previous example if you have uploaded the lookup.
Copy the following LINQ script and use it to perform the opposite transformation; from protocol code to protocol name.