Skip to content

ribs_ip

Purely functional IP address and network primitives for Dart.

Provides immutable data structures for IP addresses, CIDR representations, networks, multicast groups, and socket addresses.

Classes

ClassDescription
Cidr<A extends IpAddress>A CIDR (Classless Inter-Domain Routing) block — an IpAddress combined with a prefix length that defines a subnet.
CidrStrict<A extends IpAddress>A Cidr that is guaranteed to be in normal form: the address is the network prefix with all host bits set to zero.
DnsStatic facade for DNS operations, delegating to the platform implementation.
HostThe sealed base type for anything that can act as a network host.
HostnameAn ASCII hostname, validated per RFC 1123.
HostnameLabelA single dot-separated label within a Hostname.
IDNAn Internationalized Domain Name (IDN) — a domain name that may contain non-ASCII Unicode characters, stored alongside its Punycode-encoded Hostname representation.
IDNLabelA single label within an IDN, potentially containing Unicode characters.
IpAddressThe sealed base type for IP addresses.
Ipv4AddressA 32-bit IPv4 address stored as 4 bytes in network (big-endian) order.
Ipv6AddressA 128-bit IPv6 address stored as 16 bytes in network (big-endian) order.
MacAddressA 48-bit IEEE 802 MAC address.
Multicast<A extends IpAddress>A typed wrapper around a multicast IpAddress.
NetworkInterfaceA network interface — a named hardware or virtual adapter with one or more IP addresses expressed as CIDR blocks.
NetworkInterfacesProvides access to the host's network interfaces.
PortA TCP or UDP port number in the range MinValue, MaxValue (0–65535).
SocketAddress<A extends Host>A network socket address — a Host paired with a Port.
SourceSpecificMulticast<A extends IpAddress>A Multicast address that falls within the source-specific multicast (SSM) range, or any multicast address when constructed leniently.
SourceSpecificMulticastStrict<A extends IpAddress>A SourceSpecificMulticast whose address has been verified to be within the strict source-specific multicast range.

Enums

EnumDescription
IpVersionThe IP protocol version.