This method takes a string parameter and an optional version parameter. The string parameter should be a string representation of an IP address subnet, e.g., "192.0.2.0/24".

The version parameter should be either 4 or 6, but you don't really need this unless you're trying to force a dotted quad to be interpreted as an IPv6 network or to a force an IPv6 address colon-separated hex number to be interpreted as an IPv4 network.

If you pass an IPv4 network but specify the version as 6 then we will add 96 to the netmask.

This method takes an integer parameter, prefix_length parameter, and an optional version parameter. The integer parameter should be an integer representation of an IP within the subnet. The prefix_length parameter should be an integer between 0 and 32 for IPv4 or 0 and 128 for IPv6. The version parameter should be either 4 or 6.

Note that if you are passing an IPv4 address that you want treated as an IPv6 address you need to manually add 96 to the prefix_length yourself.

This method accepts a single Net::Works::Address or Net::Works::Network object. It returns true if the given address or network is contained by the network it is called on. Note that a network always contains itself.

This method works with both IPv4 and IPv6 addresses. You can pass an explicit version as the final argument. If you don't, we check whether either address contains a colon (:). If either of them does, we assume you want IPv6 subnets.

When given an IPv6 range that includes the first 32 bits of addresses (the IPv4 space), both IPv4 and IPv6 reserved networks are removed from the range.

Prior to version 0.17, this package referred to the prefix length as mask length. The mask_length() and max_mask_length() methods are deprecated, and will probably start warning in a future release. In addition, passing a mask_length key to the new_from_integer() constructor has been replaced by prefix_length. The old key will continue to work for now but may start warning in a future release.