Reference Type: Supported, Category: IP Address Functions, ICR#:
5844
The $$FORCEIP4^XLFIPV extrinsic function converts an IP address (either IPv4 or IPv6) into an IPv6 address in a standardized format consisting of eight groups of hexadecimal numbers separated by colons. For example:
2001:0DB8:85A3:0042:0000:8A2E:0370:7334
$$FORCEIP6^XLFIPV(ip)
ip:
|
(required) IPv4 or IPv6 address (string; in quotes) to be converted.
|
returns:
|
Returns:
-
An IPv6 address in “hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh” notation if the input address is valid and has an IPv6 equivalent.
-
The NULL address “0000:0000:0000:0000:0000:0000:0000:0000” if the input address is invalid.
|
Examples
>S X=$$FORCEIP6^XLFIPV("10.126.3.1")
>W X
0000:0000:0000:0000:0000:FFFF:0A7E:0301
|
Example 2
>S X=$$FORCEIP6^XLFIPV("10.999.3.1")
>W X
0000:0000:0000:0000:0000:0000:0000:0000
|
Example 3
>S X=$$FORCEIP6^XLFIPV("2001:db8::8a2e:370:7334")
>W X
2001:0DB8:0000:0000:0000:8A2E:0370:7334
|
Example 4
>S X=$$FORCEIP6^XLFIPV("::ffff:10.126.3.1")
>W X
0000:0000:0000:0000:0000:FFFF:0A7E:0301
|
Example 5
>S X=$$FORCEIP6^XLFIPV("127.0.0.1")
>W X
0000:0000:0000:0000:0000:0000:0000:0001
|