Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module re-exports all of the thematic types that this library defines.
Synopsis
- newtype IPv4 = IPv4 {}
- data IPv6 = IPv6 {}
- newtype IP = IP {}
- data IPv4Range = IPv4Range {
- ipv4RangeBase :: !IPv4
- ipv4RangeLength :: !Word8
- data IPv6Range = IPv6Range {
- ipv6RangeBase :: !IPv6
- ipv6RangeLength :: !Word8
- newtype Mac = Mac Word64
- data MacCodec = MacCodec {}
- data MacGrouping
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
A 128-bit Internet Protocol version 6 address.
Instances
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.
IPv4Range | |
|
Instances
IPv6Range | |
|
Instances
Eq IPv6Range Source # | |
Ord IPv6Range Source # | |
Defined in Net.IPv6 | |
Read IPv6Range Source # | |
Show IPv6Range Source # | |
Generic IPv6Range Source # | |
NFData IPv6Range Source # | |
type Rep IPv6Range Source # | |
Defined in Net.IPv6 type Rep IPv6Range = D1 (MetaData "IPv6Range" "Net.IPv6" "ip-1.4.2.1-1kdobq8onQp8hYPnvSg0GR" False) (C1 (MetaCons "IPv6Range" PrefixI True) (S1 (MetaSel (Just "ipv6RangeBase") SourceUnpack SourceStrict DecidedStrict) (Rec0 IPv6) :*: S1 (MetaSel (Just "ipv6RangeLength") SourceUnpack SourceStrict DecidedStrict) (Rec0 Word8))) |
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
Bounded Mac Source # | |
Enum Mac Source # | |
Eq Mac Source # | |
Ord Mac Source # | |
Read Mac Source # | |
Show Mac Source # | |
Generic Mac Source # | |
Hashable Mac Source # | |
ToJSON Mac Source # | |
ToJSONKey Mac Source # | |
Defined in Net.Mac | |
FromJSON Mac Source # | |
FromJSONKey Mac Source # | |
Defined in Net.Mac | |
NFData Mac Source # | |
Prim Mac Source # | 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 |
Defined in Net.Mac alignment# :: Mac -> Int# # indexByteArray# :: ByteArray# -> Int# -> Mac # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (#State# s, Mac#) # writeByteArray# :: MutableByteArray# s -> Int# -> Mac -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> Mac -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> Mac # readOffAddr# :: Addr# -> Int# -> State# s -> (#State# s, Mac#) # writeOffAddr# :: Addr# -> Int# -> Mac -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> Mac -> State# s -> State# s # | |
type Rep Mac Source # | |
Instances
Eq MacCodec Source # | |
Ord MacCodec Source # | |
Read MacCodec Source # | |
Show MacCodec Source # | |
Generic MacCodec Source # | |
type Rep MacCodec Source # | |
Defined in Net.Mac type Rep MacCodec = D1 (MetaData "MacCodec" "Net.Mac" "ip-1.4.2.1-1kdobq8onQp8hYPnvSg0GR" False) (C1 (MetaCons "MacCodec" PrefixI True) (S1 (MetaSel (Just "macCodecGrouping") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 MacGrouping) :*: S1 (MetaSel (Just "macCodecUpperCase") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool))) |
data MacGrouping Source #
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.
MacGroupingPairs !Char | Two-character groups, |
MacGroupingTriples !Char | Three-character groups, |
MacGroupingQuadruples !Char | Four-character groups, |
MacGroupingNoSeparator | No separator, |