Method NetUtils.get_network_type()
- Method
get_network_type
NetworkType
get_network_type(int
|string
ipstr
,bool
|void
separate_6
)- Description
Determine the network type of a given host
- 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
"localhost", "local", "private", "multicast", "teredo", "6to4" or "global"
"localhost" is the local computer.
"local" is the local network
"private" is a private network, such as 10.0.0.0/8 or fc00::/7 that is not also a local network.
"multicast" is a multicast address
"teredo" and "6to4" is an address in the teredo and 6to4 tunneling system, respectively.
"global" is a global address that does not match any other category