Method NetUtils.get_network_type()
- Method
get_network_type
NetworkTypeget_network_type(int|stringipstr,bool|voidseparate_6)- Description
Determine the network type of a given ip address.
- Parameter
ipstr IP address in string or numerical form
- Parameter
separate_6 Adds a 'v6' to the category for ipv6 addresses (ie, "global" and "globalv6")
- Returns
Returns one of:
"localhost"The local computer.
"local"The local network.
"linklocal"An unrouted local network (IPv6).
"private"A private network, such as 10.0.0.0/8 or fc00::/7 that is not also a local network.
"multicast"A multicast address.
"teredo"An address in the teredo or 6to4 IPv6 tunneling systems, respectively.
"6to4""global"A globally routable address that does not match any other category.