ipFamily | R Documentation |
Given an IP address, this checks whether it is an IPv4 or IPv6 address.
ipFamily(ip)
ip |
A single string representing an IP address. |
For IPv4 addresses, 4
; for IPv6 addresses, 6
. If the address is
neither, -1
.
ipFamily("127.0.0.1") # 4
ipFamily("500.0.0.500") # -1
ipFamily("500.0.0.500") # -1
ipFamily("::") # 6
ipFamily("::1") # 6
ipFamily("fe80::1ff:fe23:4567:890a") # 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.