Safe Haskell | None |
---|---|
Language | Haskell2010 |
Net.Types
Documentation
A 32-bit Internet Protocol version 4 address. To use this with the
network
library, it is necessary to use Network.Socket.htonl
to
convert the underlying Word32
from host byte order to network byte
order.
Instances
Bounded IPv4 # | |
Enum IPv4 # | |
Eq IPv4 # | |
Ord IPv4 # | |
Read IPv4 # | |
Show IPv4 # | |
Generic IPv4 # | |
Hashable IPv4 # | |
ToJSON IPv4 # | |
ToJSONKey IPv4 # | |
FromJSON IPv4 # | |
FromJSONKey IPv4 # | |
Storable IPv4 # | |
Bits IPv4 # | Note: we use network order (big endian) as opposed to host order (little endian) which differs from the underlying IPv4 type representation. |
FiniteBits IPv4 # | |
Prim IPv4 # | |
Unbox IPv4 # | |
Vector Vector IPv4 # | |
MVector MVector IPv4 # | |
type Rep IPv4 # | |
data Vector IPv4 # | |
data MVector s IPv4 # | |
A 128-bit Internet Protocol version 6 address.
A 32-bit IPv4
address or a 128-bit IPv6
address. Internally, this
is just represented as an IPv6
address. The functions provided
in Net.IP
help simulate constructing and pattern matching on values
of this type. All functions and typeclass methods that convert
IP
values to text will display it as an IPv4
address if possible.
The length should be between 0 and 32. These bounds are inclusive. This expectation is not in any way enforced by this library because it does not cause errors. A mask length greater than 32 will be treated as if it were 32.
Constructors
IPv4Range | |
Fields
|
Instances
Eq IPv4Range # | |
Ord IPv4Range # | |
Read IPv4Range # | |
Show IPv4Range # | |
Generic IPv4Range # | |
Hashable IPv4Range # | |
ToJSON IPv4Range # | |
FromJSON IPv4Range # | |
Bits IPv4Range # | Notes:
|
FiniteBits IPv4Range # | Note: the size is determined by the range length |
Unbox IPv4Range # | |
Vector Vector IPv4Range # | |
MVector MVector IPv4Range # | |
type Rep IPv4Range # | |
data Vector IPv4Range # | |
data MVector s IPv4Range # | |
A 48-bit MAC address. Do not use the data constructor for this type. It is not considered part of the stable API, and it allows you to construct invalid MAC addresses.
Instances
Eq Mac # | |
Ord Mac # | |
Read Mac # | |
Show Mac # | |
Generic Mac # | |
Hashable Mac # | |
ToJSON Mac # | |
ToJSONKey Mac # | |
FromJSON Mac # | |
FromJSONKey Mac # | |
Prim Mac # | This only preserves the lower 6 bytes of the 8-byte word that backs a mac address.
It runs slower than it would if it used a full 8-byte word, but it consumes less
space. When storing millions of mac addresses, this is a good trade to make. When
storing a small number of mac address, it might be preferable to make a primitive
array of |
type Rep Mac # | |
Constructors
MacCodec | |
Fields |
data MacGrouping #
The format expected by the mac address parser. The Word8
taken
by some of these constructors is the ascii value of the character
to be used as the separator. This is typically a colon, a hyphen, or
a space character. All decoding functions are case insensitive.
Constructors
MacGroupingPairs !Char | Two-character groups, |
MacGroupingTriples !Char | Three-character groups, |
MacGroupingQuadruples !Char | Four-character groups, |
MacGroupingNoSeparator | No separator, |
Instances