IPv4Network class

A class for representing and manipulating 32-bit IPv4 network + addresses.

Constructors

IPv4Network(String addr, {bool strict = true})
Creates a new IPv4Network. Throw ValueError when strict opstion is true and network address is not supplied.

Properties

addresses Iterable<IPv4Address>
Returns an iterator over the all address in the network.
no setter
broadcastAddress IPv4Address
The broadcast address for the network.
no setter
hashCode int
The hash code for this object.
no setterinherited
hostmask IPv4Address
The hostmask address for the network.
no setter
hosts Iterable<IPv4Address>
Returns an iterator over the usable hosts in the network.
no setter
maxPrefixlen int
The total number of bits in the address representation for this version: 32 for IPv4, 128 for IPv6.
no setterinherited
netmask IPv4Address
The netmask address for the network.
no setter
networkAddress IPv4Address
The network address for the network.
no setter
numAddresses int
The total number of addresses in the network.
no setter
prefixlen int
The prefix length of the network.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version int
The appropriate version number: 4 for IPv4, 6 for IPv6.
no setterinherited
withHostmask String
A string representation of the network, with the mask in host mask notation.
no setter
withNetmask String
A string representation of the network, with the mask in net mask notation.
no setter
withPrefixlen String
A string resresentation of the netwrok, with the mask in prefix length.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

tryParse(String addr, {bool strict = true}) IPv4Network?
Creates a new IPv4Network. Like constructor except that this function returns null.