Std.Ip
36 public declarations
- Address
An internet address.
- compare
&Std.Ip.Address -> &Std.Ip.Address -> IntOrdering of addresses: every IPv4 address before every IPv6 one, then by
- contains
&Std.Ip.Network -> &Std.Ip.Address -> BoolWhether the network holds the address. An address of the other family is
- explain
&Std.Ip.IpError -> StrA sentence saying what was wrong with the text.
- Family
Which of the two address families an address belongs to.
- first
&Std.Ip.Network -> Std.Ip.AddressThe first address of the network.
- fromBytes
&Bytes -> Result[Std.Ip.Address, Std.Ip.IpError]The address held in 4 or 16 bytes in network order, as a socket reports it.
- hostBits
&Std.Ip.Network -> IntHow many bits of an address the network leaves free: 8 for an IPv4
/24. - IpError
Why text does not name an address or a network.
- isDocumentation
&Std.Ip.Address -> BoolWhether the address is reserved for documentation:
192.0.2.0/24, - isLinkLocal
&Std.Ip.Address -> BoolWhether the address is link-local:
169.254.0.0/16orfe80::/10. - isLoopback
&Std.Ip.Address -> BoolWhether the address is the loopback:
127.0.0.0/8or::1. - isMulticast
&Std.Ip.Address -> BoolWhether the address is multicast:
224.0.0.0/4orff00::/8. - isPrivate
&Std.Ip.Address -> BoolWhether the address is in a private range:
10.0.0.0/8,172.16.0.0/12, - isPublic
&Std.Ip.Address -> BoolWhether the address may be reached across the public internet: none of the
- isShared
&Std.Ip.Address -> BoolWhether the address is in the carrier-grade shared range
100.64.0.0/10. - isUnspecified
&Std.Ip.Address -> BoolWhether the address is the unspecified one:
0.0.0.0or::. - isV4
&Std.Ip.Address -> BoolWhether the address is an IPv4 address.
- isV6
&Std.Ip.Address -> BoolWhether the address is an IPv6 address.
- last
&Std.Ip.Network -> Std.Ip.AddressThe last address of the network, which for IPv4 is its broadcast address.
- mapToV6
&Std.Ip.Address -> Std.Ip.AddressThe IPv4-mapped IPv6 form of an IPv4 address, and an IPv6 address
- netmask
&Std.Ip.Network -> Std.Ip.AddressThe network's mask written as an address:
255.255.255.0for a/24. - Network
A network: an address whose host bits are zero, and how many leading bits
- networkOf
&Std.Ip.Address -> Int -> Option[Std.Ip.Network]The network of the given prefix length that holds the address, with its
- next
&Std.Ip.Address -> Option[Std.Ip.Address]The address after this one, or
Nonepast the last address of the family. - overlaps
&Std.Ip.Network -> &Std.Ip.Network -> BoolWhether two networks share any address. Networks either nest or are
- parse
Str -> Result[Std.Ip.Address, Std.Ip.IpError]Read an address in either family.
- parseNetwork
Str -> Result[Std.Ip.Network, Std.Ip.IpError]Read a network written as
address/prefix. - previous
&Std.Ip.Address -> Option[Std.Ip.Address]The address before this one, or
Nonebefore the first. - render
&Std.Ip.Address -> StrAn address written in its canonical form, which
parsereads back as the - renderNetwork
&Std.Ip.Network -> StrA network written as
address/prefix, whichparseNetworkreads back. - toBytes
&Std.Ip.Address -> BytesThe address as bytes in network order: 4 for IPv4, 16 for IPv6.
- unmap
&Std.Ip.Address -> Std.Ip.AddressThe IPv4 address an IPv4-mapped IPv6 address carries, and any other address
- v4
Int -> Int -> Int -> Int -> Std.Ip.AddressThe IPv4 address with the four given octets, each taken modulo 256.
- width
&Std.Ip.Address -> IntHow many bits an address of this family has: 32 or 128.
- within
&Array[Std.Ip.Network] -> &Std.Ip.Address -> BoolWhether any of the networks holds the address, which is the question an
