ip-1.7.8: Library for IP and MAC addresses

Safe Haskell | None
Language | Haskell2010

Net.Types

Description

This module re-exports all of the thematic types that this library defines.

Synopsis

- newtype IPv4 = IPv4 {
  - getIPv4 :: Word32
  }
- newtype IPv6 = IPv6 {
  - getIPv6 :: Word128
  }
- newtype IP = IP {
  - getIP :: IPv6
  }
- data IPv4Range = IPv4Range {
  - ipv4RangeBase :: !IPv4
  - ipv4RangeLength :: !Word8
  }
- data IPv6Range = IPv6Range {
  - ipv6RangeBase :: !IPv6
  - ipv6RangeLength :: !Word8
  }
- newtype Mac = Mac Word64
- data MacCodec = MacCodec {
  - macCodecGrouping :: !MacGrouping
  - macCodecUpperCase :: !Bool
  }
- data MacGrouping
  - = MacGroupingPairs !Char
  - | MacGroupingTriples !Char
  - | MacGroupingQuadruples !Char
  - | MacGroupingNoSeparator

# Documentation

newtype IPv4 #

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.

Constructors

IPv4 |

Fields

- getIPv4 :: Word32

#### Instances

Instances details

FromJSON IPv4 # |
Instance details Defined in Net.IPv4 Methods parseJSON :: Value -> Parser IPv4 # parseJSONList :: Value -> Parser [IPv4] # omittedField :: Maybe IPv4 #
FromJSONKey IPv4 # |
Instance details Defined in Net.IPv4 Methods fromJSONKey :: FromJSONKeyFunction IPv4 # fromJSONKeyList :: FromJSONKeyFunction [IPv4] #
ToJSON IPv4 # |
Instance details Defined in Net.IPv4 Methods toJSON :: IPv4 -> Value # toEncoding :: IPv4 -> Encoding # toJSONList :: [IPv4] -> Value # toEncodingList :: [IPv4] -> Encoding # omitField :: IPv4 -> Bool #
ToJSONKey IPv4 # |
Instance details Defined in Net.IPv4 Methods toJSONKey :: ToJSONKeyFunction IPv4 # toJSONKeyList :: ToJSONKeyFunction [IPv4] #
NFData IPv4 # |
Instance details Defined in Net.IPv4 Methods rnf :: IPv4 -> () #
Bits IPv4 # |

Instance details

Defined in Net.IPv4

Methods

(.&.) :: IPv4 -> IPv4 -> IPv4 #

(.|.) :: IPv4 -> IPv4 -> IPv4 #

xor :: IPv4 -> IPv4 -> IPv4 #

complement :: IPv4 -> IPv4 #

shift :: IPv4 -> Int -> IPv4 #

rotate :: IPv4 -> Int -> IPv4 #

zeroBits :: IPv4 #

bit :: Int -> IPv4 #

setBit :: IPv4 -> Int -> IPv4 #

clearBit :: IPv4 -> Int -> IPv4 #

complementBit :: IPv4 -> Int -> IPv4 #

testBit :: IPv4 -> Int -> Bool #

bitSizeMaybe :: IPv4 -> Maybe Int #

bitSize :: IPv4 -> Int #

isSigned :: IPv4 -> Bool #

shiftL :: IPv4 -> Int -> IPv4 #

unsafeShiftL :: IPv4 -> Int -> IPv4 #

shiftR :: IPv4 -> Int -> IPv4 #

unsafeShiftR :: IPv4 -> Int -> IPv4 #

rotateL :: IPv4 -> Int -> IPv4 #

rotateR :: IPv4 -> Int -> IPv4 #

popCount :: IPv4 -> Int #

FiniteBits IPv4 # |
Instance details Defined in Net.IPv4 Methods finiteBitSize :: IPv4 -> Int # countLeadingZeros :: IPv4 -> Int # countTrailingZeros :: IPv4 -> Int #
Data IPv4 # |

Instance details

Defined in Net.IPv4

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IPv4 -> c IPv4 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IPv4 #

toConstr :: IPv4 -> Constr #

dataTypeOf :: IPv4 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IPv4) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IPv4) #

gmapT :: (forall b. Data b => b -> b) -> IPv4 -> IPv4 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IPv4 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IPv4 -> r #

gmapQ :: (forall d. Data d => d -> u) -> IPv4 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IPv4 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IPv4 -> m IPv4 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IPv4 -> m IPv4 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IPv4 -> m IPv4 #

Bounded IPv4 # |
Instance details Defined in Net.IPv4 Methods minBound :: IPv4 # maxBound :: IPv4 #
Enum IPv4 # |
Instance details Defined in Net.IPv4 Methods succ :: IPv4 -> IPv4 # pred :: IPv4 -> IPv4 # toEnum :: Int -> IPv4 # fromEnum :: IPv4 -> Int # enumFrom :: IPv4 -> [IPv4] # enumFromThen :: IPv4 -> IPv4 -> [IPv4] # enumFromTo :: IPv4 -> IPv4 -> [IPv4] # enumFromThenTo :: IPv4 -> IPv4 -> IPv4 -> [IPv4] #
Storable IPv4 # |
Instance details Defined in Net.IPv4 Methods sizeOf :: IPv4 -> Int # alignment :: IPv4 -> Int # peekElemOff :: Ptr IPv4 -> Int -> IO IPv4 # pokeElemOff :: Ptr IPv4 -> Int -> IPv4 -> IO () # peekByteOff :: Ptr b -> Int -> IO IPv4 # pokeByteOff :: Ptr b -> Int -> IPv4 -> IO () # peek :: Ptr IPv4 -> IO IPv4 # poke :: Ptr IPv4 -> IPv4 -> IO () #
Generic IPv4 # |

Instance details

Defined in Net.IPv4

Associated Types

type Rep IPv4 |
Instance details Defined in Net.IPv4 type Rep IPv4 = D1 ('MetaData "IPv4" "Net.IPv4" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'True) (C1 ('MetaCons "IPv4" 'PrefixI 'True) (S1 ('MetaSel ('Just "getIPv4") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

Methods

from :: IPv4 -> Rep IPv4 x #

to :: Rep IPv4 x -> IPv4 #

Ix IPv4 # |
Instance details Defined in Net.IPv4 Methods range :: (IPv4, IPv4) -> [IPv4] # index :: (IPv4, IPv4) -> IPv4 -> Int # unsafeIndex :: (IPv4, IPv4) -> IPv4 -> Int # inRange :: (IPv4, IPv4) -> IPv4 -> Bool # rangeSize :: (IPv4, IPv4) -> Int # unsafeRangeSize :: (IPv4, IPv4) -> Int #
Read IPv4 # |
Instance details Defined in Net.IPv4 Methods readsPrec :: Int -> ReadS IPv4 # readList :: ReadS [IPv4] # readPrec :: ReadPrec IPv4 # readListPrec :: ReadPrec [IPv4] #
Show IPv4 # |
Instance details Defined in Net.IPv4 Methods showsPrec :: Int -> IPv4 -> ShowS # show :: IPv4 -> String # showList :: [IPv4] -> ShowS #
Eq IPv4 # |
Instance details Defined in Net.IPv4 Methods (==) :: IPv4 -> IPv4 -> Bool # (/=) :: IPv4 -> IPv4 -> Bool #
Ord IPv4 # |
Instance details Defined in Net.IPv4 Methods compare :: IPv4 -> IPv4 -> Ordering # (<) :: IPv4 -> IPv4 -> Bool # (<=) :: IPv4 -> IPv4 -> Bool # (>) :: IPv4 -> IPv4 -> Bool # (>=) :: IPv4 -> IPv4 -> Bool # max :: IPv4 -> IPv4 -> IPv4 # min :: IPv4 -> IPv4 -> IPv4 #
Hashable IPv4 # |
Instance details Defined in Net.IPv4 Methods hashWithSalt :: Int -> IPv4 -> Int # hash :: IPv4 -> Int #
Prim IPv4 # |

Instance details

Defined in Net.IPv4

Methods

sizeOfType# :: Proxy IPv4 -> Int# #

sizeOf# :: IPv4 -> Int# #

alignmentOfType# :: Proxy IPv4 -> Int# #

alignment# :: IPv4 -> Int# #

indexByteArray# :: ByteArray# -> Int# -> IPv4 #

readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, IPv4 #) #

writeByteArray# :: MutableByteArray# s -> Int# -> IPv4 -> State# s -> State# s #

setByteArray# :: MutableByteArray# s -> Int# -> Int# -> IPv4 -> State# s -> State# s #

indexOffAddr# :: Addr# -> Int# -> IPv4 #

readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, IPv4 #) #

writeOffAddr# :: Addr# -> Int# -> IPv4 -> State# s -> State# s #

setOffAddr# :: Addr# -> Int# -> Int# -> IPv4 -> State# s -> State# s #

Unbox IPv4 # |
Instance details Defined in Net.IPv4
Vector Vector IPv4 # |

Instance details

Defined in Net.IPv4

Methods

basicUnsafeFreeze :: Mutable Vector s IPv4 -> ST s (Vector IPv4)

basicUnsafeThaw :: Vector IPv4 -> ST s (Mutable Vector s IPv4)

basicLength :: Vector IPv4 -> Int

basicUnsafeSlice :: Int -> Int -> Vector IPv4 -> Vector IPv4

basicUnsafeIndexM :: Vector IPv4 -> Int -> Box IPv4

basicUnsafeCopy :: Mutable Vector s IPv4 -> Vector IPv4 -> ST s ()

elemseq :: Vector IPv4 -> IPv4 -> b -> b

MVector MVector IPv4 # |

Instance details

Defined in Net.IPv4

Methods

basicLength :: MVector s IPv4 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s IPv4 -> MVector s IPv4

basicOverlaps :: MVector s IPv4 -> MVector s IPv4 -> Bool

basicUnsafeNew :: Int -> ST s (MVector s IPv4)

basicInitialize :: MVector s IPv4 -> ST s ()

basicUnsafeReplicate :: Int -> IPv4 -> ST s (MVector s IPv4)

basicUnsafeRead :: MVector s IPv4 -> Int -> ST s IPv4

basicUnsafeWrite :: MVector s IPv4 -> Int -> IPv4 -> ST s ()

basicClear :: MVector s IPv4 -> ST s ()

basicSet :: MVector s IPv4 -> IPv4 -> ST s ()

basicUnsafeCopy :: MVector s IPv4 -> MVector s IPv4 -> ST s ()

basicUnsafeMove :: MVector s IPv4 -> MVector s IPv4 -> ST s ()

basicUnsafeGrow :: MVector s IPv4 -> Int -> ST s (MVector s IPv4)

type Rep IPv4 # |
Instance details Defined in Net.IPv4 type Rep IPv4 = D1 ('MetaData "IPv4" "Net.IPv4" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'True) (C1 ('MetaCons "IPv4" 'PrefixI 'True) (S1 ('MetaSel ('Just "getIPv4") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))
newtype Vector IPv4 # |
Instance details Defined in Net.IPv4 newtype Vector IPv4 = V_IPv4 (Vector IPv4)
newtype MVector s IPv4 # |
Instance details Defined in Net.IPv4 newtype MVector s IPv4 = MV_IPv4 (MVector s IPv4)

newtype IPv6 #

A 128-bit Internet Protocol version 6 address.

Constructors

IPv6 |

Fields

- getIPv6 :: Word128

#### Instances

Instances details

FromJSON IPv6 # |
Instance details Defined in Net.IPv6 Methods parseJSON :: Value -> Parser IPv6 # parseJSONList :: Value -> Parser [IPv6] # omittedField :: Maybe IPv6 #
ToJSON IPv6 # |
Instance details Defined in Net.IPv6 Methods toJSON :: IPv6 -> Value # toEncoding :: IPv6 -> Encoding # toJSONList :: [IPv6] -> Value # toEncodingList :: [IPv6] -> Encoding # omitField :: IPv6 -> Bool #
NFData IPv6 # |
Instance details Defined in Net.IPv6 Methods rnf :: IPv6 -> () #
Bits IPv6 # |

Instance details

Defined in Net.IPv6

Methods

(.&.) :: IPv6 -> IPv6 -> IPv6 #

(.|.) :: IPv6 -> IPv6 -> IPv6 #

xor :: IPv6 -> IPv6 -> IPv6 #

complement :: IPv6 -> IPv6 #

shift :: IPv6 -> Int -> IPv6 #

rotate :: IPv6 -> Int -> IPv6 #

zeroBits :: IPv6 #

bit :: Int -> IPv6 #

setBit :: IPv6 -> Int -> IPv6 #

clearBit :: IPv6 -> Int -> IPv6 #

complementBit :: IPv6 -> Int -> IPv6 #

testBit :: IPv6 -> Int -> Bool #

bitSizeMaybe :: IPv6 -> Maybe Int #

bitSize :: IPv6 -> Int #

isSigned :: IPv6 -> Bool #

shiftL :: IPv6 -> Int -> IPv6 #

unsafeShiftL :: IPv6 -> Int -> IPv6 #

shiftR :: IPv6 -> Int -> IPv6 #

unsafeShiftR :: IPv6 -> Int -> IPv6 #

rotateL :: IPv6 -> Int -> IPv6 #

rotateR :: IPv6 -> Int -> IPv6 #

popCount :: IPv6 -> Int #

FiniteBits IPv6 # |
Instance details Defined in Net.IPv6 Methods finiteBitSize :: IPv6 -> Int # countLeadingZeros :: IPv6 -> Int # countTrailingZeros :: IPv6 -> Int #
Data IPv6 # |

Instance details

Defined in Net.IPv6

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IPv6 -> c IPv6 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IPv6 #

toConstr :: IPv6 -> Constr #

dataTypeOf :: IPv6 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IPv6) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IPv6) #

gmapT :: (forall b. Data b => b -> b) -> IPv6 -> IPv6 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IPv6 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IPv6 -> r #

gmapQ :: (forall d. Data d => d -> u) -> IPv6 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IPv6 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IPv6 -> m IPv6 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IPv6 -> m IPv6 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IPv6 -> m IPv6 #

Bounded IPv6 # |
Instance details Defined in Net.IPv6 Methods minBound :: IPv6 # maxBound :: IPv6 #
Enum IPv6 # |
Instance details Defined in Net.IPv6 Methods succ :: IPv6 -> IPv6 # pred :: IPv6 -> IPv6 # toEnum :: Int -> IPv6 # fromEnum :: IPv6 -> Int # enumFrom :: IPv6 -> [IPv6] # enumFromThen :: IPv6 -> IPv6 -> [IPv6] # enumFromTo :: IPv6 -> IPv6 -> [IPv6] # enumFromThenTo :: IPv6 -> IPv6 -> IPv6 -> [IPv6] #
Storable IPv6 # |
Instance details Defined in Net.IPv6 Methods sizeOf :: IPv6 -> Int # alignment :: IPv6 -> Int # peekElemOff :: Ptr IPv6 -> Int -> IO IPv6 # pokeElemOff :: Ptr IPv6 -> Int -> IPv6 -> IO () # peekByteOff :: Ptr b -> Int -> IO IPv6 # pokeByteOff :: Ptr b -> Int -> IPv6 -> IO () # peek :: Ptr IPv6 -> IO IPv6 # poke :: Ptr IPv6 -> IPv6 -> IO () #
Generic IPv6 # |

Instance details

Defined in Net.IPv6

Associated Types

type Rep IPv6 |
Instance details Defined in Net.IPv6 type Rep IPv6 = D1 ('MetaData "IPv6" "Net.IPv6" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'True) (C1 ('MetaCons "IPv6" 'PrefixI 'True) (S1 ('MetaSel ('Just "getIPv6") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word128)))

Methods

from :: IPv6 -> Rep IPv6 x #

to :: Rep IPv6 x -> IPv6 #

Ix IPv6 # |
Instance details Defined in Net.IPv6 Methods range :: (IPv6, IPv6) -> [IPv6] # index :: (IPv6, IPv6) -> IPv6 -> Int # unsafeIndex :: (IPv6, IPv6) -> IPv6 -> Int # inRange :: (IPv6, IPv6) -> IPv6 -> Bool # rangeSize :: (IPv6, IPv6) -> Int # unsafeRangeSize :: (IPv6, IPv6) -> Int #
Read IPv6 # |
Instance details Defined in Net.IPv6 Methods readsPrec :: Int -> ReadS IPv6 # readList :: ReadS [IPv6] # readPrec :: ReadPrec IPv6 # readListPrec :: ReadPrec [IPv6] #
Show IPv6 # |
Instance details Defined in Net.IPv6 Methods showsPrec :: Int -> IPv6 -> ShowS # show :: IPv6 -> String # showList :: [IPv6] -> ShowS #
Eq IPv6 # |
Instance details Defined in Net.IPv6 Methods (==) :: IPv6 -> IPv6 -> Bool # (/=) :: IPv6 -> IPv6 -> Bool #
Ord IPv6 # |
Instance details Defined in Net.IPv6 Methods compare :: IPv6 -> IPv6 -> Ordering # (<) :: IPv6 -> IPv6 -> Bool # (<=) :: IPv6 -> IPv6 -> Bool # (>) :: IPv6 -> IPv6 -> Bool # (>=) :: IPv6 -> IPv6 -> Bool # max :: IPv6 -> IPv6 -> IPv6 # min :: IPv6 -> IPv6 -> IPv6 #
Hashable IPv6 # |
Instance details Defined in Net.IPv6 Methods hashWithSalt :: Int -> IPv6 -> Int # hash :: IPv6 -> Int #
Prim IPv6 # |

Instance details

Defined in Net.IPv6

Methods

sizeOfType# :: Proxy IPv6 -> Int# #

sizeOf# :: IPv6 -> Int# #

alignmentOfType# :: Proxy IPv6 -> Int# #

alignment# :: IPv6 -> Int# #

indexByteArray# :: ByteArray# -> Int# -> IPv6 #

readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, IPv6 #) #

writeByteArray# :: MutableByteArray# s -> Int# -> IPv6 -> State# s -> State# s #

setByteArray# :: MutableByteArray# s -> Int# -> Int# -> IPv6 -> State# s -> State# s #

indexOffAddr# :: Addr# -> Int# -> IPv6 #

readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, IPv6 #) #

writeOffAddr# :: Addr# -> Int# -> IPv6 -> State# s -> State# s #

setOffAddr# :: Addr# -> Int# -> Int# -> IPv6 -> State# s -> State# s #

type Rep IPv6 # |
Instance details Defined in Net.IPv6 type Rep IPv6 = D1 ('MetaData "IPv6" "Net.IPv6" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'True) (C1 ('MetaCons "IPv6" 'PrefixI 'True) (S1 ('MetaSel ('Just "getIPv6") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word128)))

newtype IP #

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.

Constructors

IP |

Fields

- getIP :: IPv6

#### Instances

Instances details

FromJSON IP # |
Instance details Defined in Net.IP Methods parseJSON :: Value -> Parser IP # parseJSONList :: Value -> Parser [IP] # omittedField :: Maybe IP #
ToJSON IP # |
Instance details Defined in Net.IP Methods toJSON :: IP -> Value # toEncoding :: IP -> Encoding # toJSONList :: [IP] -> Value # toEncodingList :: [IP] -> Encoding # omitField :: IP -> Bool #
NFData IP # |
Instance details Defined in Net.IP Methods rnf :: IP -> () #
Data IP # |

Instance details

Defined in Net.IP

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IP -> c IP #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IP #

toConstr :: IP -> Constr #

dataTypeOf :: IP -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IP) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IP) #

gmapT :: (forall b. Data b => b -> b) -> IP -> IP #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IP -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IP -> r #

gmapQ :: (forall d. Data d => d -> u) -> IP -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IP -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IP -> m IP #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IP -> m IP #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IP -> m IP #

Generic IP # |

Instance details

Defined in Net.IP

Associated Types

type Rep IP |
Instance details Defined in Net.IP type Rep IP = D1 ('MetaData "IP" "Net.IP" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'True) (C1 ('MetaCons "IP" 'PrefixI 'True) (S1 ('MetaSel ('Just "getIP") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IPv6)))

Methods

from :: IP -> Rep IP x #

to :: Rep IP x -> IP #

Ix IP # |
Instance details Defined in Net.IP Methods range :: (IP, IP) -> [IP] # index :: (IP, IP) -> IP -> Int # unsafeIndex :: (IP, IP) -> IP -> Int # inRange :: (IP, IP) -> IP -> Bool # rangeSize :: (IP, IP) -> Int # unsafeRangeSize :: (IP, IP) -> Int #
Read IP # |
Instance details Defined in Net.IP Methods readsPrec :: Int -> ReadS IP # readList :: ReadS [IP] # readPrec :: ReadPrec IP # readListPrec :: ReadPrec [IP] #
Show IP # |
Instance details Defined in Net.IP Methods showsPrec :: Int -> IP -> ShowS # show :: IP -> String # showList :: [IP] -> ShowS #
Eq IP # |
Instance details Defined in Net.IP Methods (==) :: IP -> IP -> Bool # (/=) :: IP -> IP -> Bool #
Ord IP # |
Instance details Defined in Net.IP Methods compare :: IP -> IP -> Ordering # (<) :: IP -> IP -> Bool # (<=) :: IP -> IP -> Bool # (>) :: IP -> IP -> Bool # (>=) :: IP -> IP -> Bool # max :: IP -> IP -> IP # min :: IP -> IP -> IP #
Hashable IP # |
Instance details Defined in Net.IP Methods hashWithSalt :: Int -> IP -> Int # hash :: IP -> Int #
type Rep IP # |
Instance details Defined in Net.IP type Rep IP = D1 ('MetaData "IP" "Net.IP" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'True) (C1 ('MetaCons "IP" 'PrefixI 'True) (S1 ('MetaSel ('Just "getIP") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IPv6)))

data IPv4Range #

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

- ipv4RangeBase :: !IPv4
- ipv4RangeLength :: !Word8

#### Instances

Instances details

FromJSON IPv4Range # |
Instance details Defined in Net.IPv4 Methods parseJSON :: Value -> Parser IPv4Range # parseJSONList :: Value -> Parser [IPv4Range] # omittedField :: Maybe IPv4Range #
ToJSON IPv4Range # |
Instance details Defined in Net.IPv4 Methods toJSON :: IPv4Range -> Value # toEncoding :: IPv4Range -> Encoding # toJSONList :: [IPv4Range] -> Value # toEncodingList :: [IPv4Range] -> Encoding # omitField :: IPv4Range -> Bool #
NFData IPv4Range # |
Instance details Defined in Net.IPv4 Methods rnf :: IPv4Range -> () #
Data IPv4Range # |

Instance details

Defined in Net.IPv4

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IPv4Range -> c IPv4Range #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IPv4Range #

toConstr :: IPv4Range -> Constr #

dataTypeOf :: IPv4Range -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IPv4Range) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IPv4Range) #

gmapT :: (forall b. Data b => b -> b) -> IPv4Range -> IPv4Range #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IPv4Range -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IPv4Range -> r #

gmapQ :: (forall d. Data d => d -> u) -> IPv4Range -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IPv4Range -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IPv4Range -> m IPv4Range #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IPv4Range -> m IPv4Range #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IPv4Range -> m IPv4Range #

Generic IPv4Range # |

Instance details

Defined in Net.IPv4

Associated Types

type Rep IPv4Range |
Instance details Defined in Net.IPv4 type Rep IPv4Range = D1 ('MetaData "IPv4Range" "Net.IPv4" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'False) (C1 ('MetaCons "IPv4Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "ipv4RangeBase") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 IPv4) :*: S1 ('MetaSel ('Just "ipv4RangeLength") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word8)))

Methods

from :: IPv4Range -> Rep IPv4Range x #

to :: Rep IPv4Range x -> IPv4Range #

Read IPv4Range # |
Instance details Defined in Net.IPv4 Methods readsPrec :: Int -> ReadS IPv4Range # readList :: ReadS [IPv4Range] # readPrec :: ReadPrec IPv4Range # readListPrec :: ReadPrec [IPv4Range] #
Show IPv4Range # |
Instance details Defined in Net.IPv4 Methods showsPrec :: Int -> IPv4Range -> ShowS # show :: IPv4Range -> String # showList :: [IPv4Range] -> ShowS #
Eq IPv4Range # |
Instance details Defined in Net.IPv4 Methods (==) :: IPv4Range -> IPv4Range -> Bool # (/=) :: IPv4Range -> IPv4Range -> Bool #
Ord IPv4Range # |
Instance details Defined in Net.IPv4 Methods compare :: IPv4Range -> IPv4Range -> Ordering # (<) :: IPv4Range -> IPv4Range -> Bool # (<=) :: IPv4Range -> IPv4Range -> Bool # (>) :: IPv4Range -> IPv4Range -> Bool # (>=) :: IPv4Range -> IPv4Range -> Bool # max :: IPv4Range -> IPv4Range -> IPv4Range # min :: IPv4Range -> IPv4Range -> IPv4Range #
Hashable IPv4Range # |
Instance details Defined in Net.IPv4 Methods hashWithSalt :: Int -> IPv4Range -> Int # hash :: IPv4Range -> Int #
Unbox IPv4Range # |
Instance details Defined in Net.IPv4
Vector Vector IPv4Range # |

Instance details

Defined in Net.IPv4

Methods

basicUnsafeFreeze :: Mutable Vector s IPv4Range -> ST s (Vector IPv4Range)

basicUnsafeThaw :: Vector IPv4Range -> ST s (Mutable Vector s IPv4Range)

basicLength :: Vector IPv4Range -> Int

basicUnsafeSlice :: Int -> Int -> Vector IPv4Range -> Vector IPv4Range

basicUnsafeIndexM :: Vector IPv4Range -> Int -> Box IPv4Range

basicUnsafeCopy :: Mutable Vector s IPv4Range -> Vector IPv4Range -> ST s ()

elemseq :: Vector IPv4Range -> IPv4Range -> b -> b

MVector MVector IPv4Range # |

Instance details

Defined in Net.IPv4

Methods

basicLength :: MVector s IPv4Range -> Int

basicUnsafeSlice :: Int -> Int -> MVector s IPv4Range -> MVector s IPv4Range

basicOverlaps :: MVector s IPv4Range -> MVector s IPv4Range -> Bool

basicUnsafeNew :: Int -> ST s (MVector s IPv4Range)

basicInitialize :: MVector s IPv4Range -> ST s ()

basicUnsafeReplicate :: Int -> IPv4Range -> ST s (MVector s IPv4Range)

basicUnsafeRead :: MVector s IPv4Range -> Int -> ST s IPv4Range

basicUnsafeWrite :: MVector s IPv4Range -> Int -> IPv4Range -> ST s ()

basicClear :: MVector s IPv4Range -> ST s ()

basicSet :: MVector s IPv4Range -> IPv4Range -> ST s ()

basicUnsafeCopy :: MVector s IPv4Range -> MVector s IPv4Range -> ST s ()

basicUnsafeMove :: MVector s IPv4Range -> MVector s IPv4Range -> ST s ()

basicUnsafeGrow :: MVector s IPv4Range -> Int -> ST s (MVector s IPv4Range)

type Rep IPv4Range # |
Instance details Defined in Net.IPv4 type Rep IPv4Range = D1 ('MetaData "IPv4Range" "Net.IPv4" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'False) (C1 ('MetaCons "IPv4Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "ipv4RangeBase") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 IPv4) :*: S1 ('MetaSel ('Just "ipv4RangeLength") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word8)))
data Vector IPv4Range # |
Instance details Defined in Net.IPv4 data Vector IPv4Range = V_IPv4Range !(Vector IPv4) !(Vector Word8)
data MVector s IPv4Range # |
Instance details Defined in Net.IPv4 data MVector s IPv4Range = MV_IPv4Range !(MVector s IPv4) !(MVector s Word8)

data IPv6Range #

An `IPv6Range`. It is made up of the first `IPv6` in the range and its length.

Constructors

IPv6Range |

Fields

- ipv6RangeBase :: !IPv6
- ipv6RangeLength :: !Word8

#### Instances

Instances details

FromJSON IPv6Range # |
Instance details Defined in Net.IPv6 Methods parseJSON :: Value -> Parser IPv6Range # parseJSONList :: Value -> Parser [IPv6Range] # omittedField :: Maybe IPv6Range #
ToJSON IPv6Range # |
Instance details Defined in Net.IPv6 Methods toJSON :: IPv6Range -> Value # toEncoding :: IPv6Range -> Encoding # toJSONList :: [IPv6Range] -> Value # toEncodingList :: [IPv6Range] -> Encoding # omitField :: IPv6Range -> Bool #
NFData IPv6Range # |
Instance details Defined in Net.IPv6 Methods rnf :: IPv6Range -> () #
Data IPv6Range # |

Instance details

Defined in Net.IPv6

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IPv6Range -> c IPv6Range #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IPv6Range #

toConstr :: IPv6Range -> Constr #

dataTypeOf :: IPv6Range -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IPv6Range) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IPv6Range) #

gmapT :: (forall b. Data b => b -> b) -> IPv6Range -> IPv6Range #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IPv6Range -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IPv6Range -> r #

gmapQ :: (forall d. Data d => d -> u) -> IPv6Range -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IPv6Range -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IPv6Range -> m IPv6Range #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IPv6Range -> m IPv6Range #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IPv6Range -> m IPv6Range #

Generic IPv6Range # |

Instance details

Defined in Net.IPv6

Associated Types

type Rep IPv6Range |
Instance details Defined in Net.IPv6 type Rep IPv6Range = D1 ('MetaData "IPv6Range" "Net.IPv6" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'False) (C1 ('MetaCons "IPv6Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "ipv6RangeBase") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 IPv6) :*: S1 ('MetaSel ('Just "ipv6RangeLength") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word8)))

Methods

from :: IPv6Range -> Rep IPv6Range x #

to :: Rep IPv6Range x -> IPv6Range #

Read IPv6Range # |
Instance details Defined in Net.IPv6 Methods readsPrec :: Int -> ReadS IPv6Range # readList :: ReadS [IPv6Range] # readPrec :: ReadPrec IPv6Range # readListPrec :: ReadPrec [IPv6Range] #
Show IPv6Range # |
Instance details Defined in Net.IPv6 Methods showsPrec :: Int -> IPv6Range -> ShowS # show :: IPv6Range -> String # showList :: [IPv6Range] -> ShowS #
Eq IPv6Range # |
Instance details Defined in Net.IPv6 Methods (==) :: IPv6Range -> IPv6Range -> Bool # (/=) :: IPv6Range -> IPv6Range -> Bool #
Ord IPv6Range # |
Instance details Defined in Net.IPv6 Methods compare :: IPv6Range -> IPv6Range -> Ordering # (<) :: IPv6Range -> IPv6Range -> Bool # (<=) :: IPv6Range -> IPv6Range -> Bool # (>) :: IPv6Range -> IPv6Range -> Bool # (>=) :: IPv6Range -> IPv6Range -> Bool # max :: IPv6Range -> IPv6Range -> IPv6Range # min :: IPv6Range -> IPv6Range -> IPv6Range #
type Rep IPv6Range # |
Instance details Defined in Net.IPv6 type Rep IPv6Range = D1 ('MetaData "IPv6Range" "Net.IPv6" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'False) (C1 ('MetaCons "IPv6Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "ipv6RangeBase") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 IPv6) :*: S1 ('MetaSel ('Just "ipv6RangeLength") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word8)))

newtype Mac #

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.

Constructors

Mac Word64 |

#### Instances

Instances details

FromJSON Mac # |
Instance details Defined in Net.Mac Methods parseJSON :: Value -> Parser Mac # parseJSONList :: Value -> Parser [Mac] # omittedField :: Maybe Mac #
FromJSONKey Mac # |
Instance details Defined in Net.Mac Methods fromJSONKey :: FromJSONKeyFunction Mac # fromJSONKeyList :: FromJSONKeyFunction [Mac] #
ToJSON Mac # |
Instance details Defined in Net.Mac Methods toJSON :: Mac -> Value # toEncoding :: Mac -> Encoding # toJSONList :: [Mac] -> Value # toEncodingList :: [Mac] -> Encoding # omitField :: Mac -> Bool #
ToJSONKey Mac # |
Instance details Defined in Net.Mac Methods toJSONKey :: ToJSONKeyFunction Mac # toJSONKeyList :: ToJSONKeyFunction [Mac] #
NFData Mac # |
Instance details Defined in Net.Mac Methods rnf :: Mac -> () #
Data Mac # |

Instance details

Defined in Net.Mac

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Mac -> c Mac #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Mac #

toConstr :: Mac -> Constr #

dataTypeOf :: Mac -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Mac) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Mac) #

gmapT :: (forall b. Data b => b -> b) -> Mac -> Mac #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Mac -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Mac -> r #

gmapQ :: (forall d. Data d => d -> u) -> Mac -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Mac -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Mac -> m Mac #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Mac -> m Mac #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Mac -> m Mac #

Bounded Mac # |
Instance details Defined in Net.Mac Methods minBound :: Mac # maxBound :: Mac #
Enum Mac # |
Instance details Defined in Net.Mac Methods succ :: Mac -> Mac # pred :: Mac -> Mac # toEnum :: Int -> Mac # fromEnum :: Mac -> Int # enumFrom :: Mac -> [Mac] # enumFromThen :: Mac -> Mac -> [Mac] # enumFromTo :: Mac -> Mac -> [Mac] # enumFromThenTo :: Mac -> Mac -> Mac -> [Mac] #
Generic Mac # |

Instance details

Defined in Net.Mac

Associated Types

type Rep Mac |
Instance details Defined in Net.Mac type Rep Mac = D1 ('MetaData "Mac" "Net.Mac" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'True) (C1 ('MetaCons "Mac" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

Methods

from :: Mac -> Rep Mac x #

to :: Rep Mac x -> Mac #

Ix Mac # |
Instance details Defined in Net.Mac Methods range :: (Mac, Mac) -> [Mac] # index :: (Mac, Mac) -> Mac -> Int # unsafeIndex :: (Mac, Mac) -> Mac -> Int # inRange :: (Mac, Mac) -> Mac -> Bool # rangeSize :: (Mac, Mac) -> Int # unsafeRangeSize :: (Mac, Mac) -> Int #
Read Mac # |
Instance details Defined in Net.Mac Methods readsPrec :: Int -> ReadS Mac # readList :: ReadS [Mac] # readPrec :: ReadPrec Mac # readListPrec :: ReadPrec [Mac] #
Show Mac # |
Instance details Defined in Net.Mac Methods showsPrec :: Int -> Mac -> ShowS # show :: Mac -> String # showList :: [Mac] -> ShowS #
Eq Mac # |
Instance details Defined in Net.Mac Methods (==) :: Mac -> Mac -> Bool # (/=) :: Mac -> Mac -> Bool #
Ord Mac # |
Instance details Defined in Net.Mac Methods compare :: Mac -> Mac -> Ordering # (<) :: Mac -> Mac -> Bool # (<=) :: Mac -> Mac -> Bool # (>) :: Mac -> Mac -> Bool # (>=) :: Mac -> Mac -> Bool # max :: Mac -> Mac -> Mac # min :: Mac -> Mac -> Mac #
Hashable Mac # |
Instance details Defined in Net.Mac Methods hashWithSalt :: Int -> Mac -> Int # hash :: Mac -> Int #

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 `Word64` instead and use the mac address data constructor to coerce between the two.

Instance details

Defined in Net.Mac

Methods

sizeOfType# :: Proxy Mac -> Int# #

sizeOf# :: Mac -> Int# #

alignmentOfType# :: Proxy Mac -> Int# #

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 # |
Instance details Defined in Net.Mac type Rep Mac = D1 ('MetaData "Mac" "Net.Mac" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'True) (C1 ('MetaCons "Mac" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

data MacCodec #

A `MacCodec` allows users to control the encoding/decoding of their `Mac` addresses.

Constructors

MacCodec |

Fields

- macCodecGrouping :: !MacGrouping
- macCodecUpperCase :: !Bool

#### Instances

Instances details

Data MacCodec # |

Instance details

Defined in Net.Mac

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MacCodec -> c MacCodec #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MacCodec #

toConstr :: MacCodec -> Constr #

dataTypeOf :: MacCodec -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MacCodec) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MacCodec) #

gmapT :: (forall b. Data b => b -> b) -> MacCodec -> MacCodec #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MacCodec -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MacCodec -> r #

gmapQ :: (forall d. Data d => d -> u) -> MacCodec -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MacCodec -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MacCodec -> m MacCodec #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MacCodec -> m MacCodec #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MacCodec -> m MacCodec #

Generic MacCodec # |

Instance details

Defined in Net.Mac

Associated Types

type Rep MacCodec |
Instance details Defined in Net.Mac type Rep MacCodec = D1 ('MetaData "MacCodec" "Net.Mac" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'False) (C1 ('MetaCons "MacCodec" 'PrefixI 'True) (S1 ('MetaSel ('Just "macCodecGrouping") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MacGrouping) :*: S1 ('MetaSel ('Just "macCodecUpperCase") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))

Methods

from :: MacCodec -> Rep MacCodec x #

to :: Rep MacCodec x -> MacCodec #

Read MacCodec # |
Instance details Defined in Net.Mac Methods readsPrec :: Int -> ReadS MacCodec # readList :: ReadS [MacCodec] # readPrec :: ReadPrec MacCodec # readListPrec :: ReadPrec [MacCodec] #
Show MacCodec # |
Instance details Defined in Net.Mac Methods showsPrec :: Int -> MacCodec -> ShowS # show :: MacCodec -> String # showList :: [MacCodec] -> ShowS #
Eq MacCodec # |
Instance details Defined in Net.Mac Methods (==) :: MacCodec -> MacCodec -> Bool # (/=) :: MacCodec -> MacCodec -> Bool #
Ord MacCodec # |
Instance details Defined in Net.Mac Methods compare :: MacCodec -> MacCodec -> Ordering # (<) :: MacCodec -> MacCodec -> Bool # (<=) :: MacCodec -> MacCodec -> Bool # (>) :: MacCodec -> MacCodec -> Bool # (>=) :: MacCodec -> MacCodec -> Bool # max :: MacCodec -> MacCodec -> MacCodec # min :: MacCodec -> MacCodec -> MacCodec #
type Rep MacCodec # |
Instance details Defined in Net.Mac type Rep MacCodec = D1 ('MetaData "MacCodec" "Net.Mac" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" '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 #

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, `FA:2B:40:09:8C:11`
MacGroupingTriples !Char | Three-character groups, `24B-F0A-025-829`
MacGroupingQuadruples !Char | Four-character groups, `A220.0745.CAC7`
MacGroupingNoSeparator | No separator, `24AF4B5B0780`

#### Instances

Instances details

Data MacGrouping # |

Instance details

Defined in Net.Mac

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MacGrouping -> c MacGrouping #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MacGrouping #

toConstr :: MacGrouping -> Constr #

dataTypeOf :: MacGrouping -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MacGrouping) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MacGrouping) #

gmapT :: (forall b. Data b => b -> b) -> MacGrouping -> MacGrouping #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MacGrouping -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MacGrouping -> r #

gmapQ :: (forall d. Data d => d -> u) -> MacGrouping -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MacGrouping -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MacGrouping -> m MacGrouping #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MacGrouping -> m MacGrouping #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MacGrouping -> m MacGrouping #

Generic MacGrouping # |

Instance details

Defined in Net.Mac

Associated Types

type Rep MacGrouping |

Instance details

Defined in Net.Mac

type Rep MacGrouping = D1 ('MetaData "MacGrouping" "Net.Mac" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'False) ((C1 ('MetaCons "MacGroupingPairs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)) :+: C1 ('MetaCons "MacGroupingTriples" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char))) :+: (C1 ('MetaCons "MacGroupingQuadruples" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)) :+: C1 ('MetaCons "MacGroupingNoSeparator" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: MacGrouping -> Rep MacGrouping x #

to :: Rep MacGrouping x -> MacGrouping #

Read MacGrouping # |
Instance details Defined in Net.Mac Methods readsPrec :: Int -> ReadS MacGrouping # readList :: ReadS [MacGrouping] # readPrec :: ReadPrec MacGrouping # readListPrec :: ReadPrec [MacGrouping] #
Show MacGrouping # |
Instance details Defined in Net.Mac Methods showsPrec :: Int -> MacGrouping -> ShowS # show :: MacGrouping -> String # showList :: [MacGrouping] -> ShowS #
Eq MacGrouping # |
Instance details Defined in Net.Mac Methods (==) :: MacGrouping -> MacGrouping -> Bool # (/=) :: MacGrouping -> MacGrouping -> Bool #
Ord MacGrouping # |
Instance details Defined in Net.Mac Methods compare :: MacGrouping -> MacGrouping -> Ordering # (<) :: MacGrouping -> MacGrouping -> Bool # (<=) :: MacGrouping -> MacGrouping -> Bool # (>) :: MacGrouping -> MacGrouping -> Bool # (>=) :: MacGrouping -> MacGrouping -> Bool # max :: MacGrouping -> MacGrouping -> MacGrouping # min :: MacGrouping -> MacGrouping -> MacGrouping #
type Rep MacGrouping # |

Instance details

Defined in Net.Mac

type Rep MacGrouping = D1 ('MetaData "MacGrouping" "Net.Mac" "ip-1.7.8-AipOdb0Sv1p9R8aZCz7tFh" 'False) ((C1 ('MetaCons "MacGroupingPairs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)) :+: C1 ('MetaCons "MacGroupingTriples" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char))) :+: (C1 ('MetaCons "MacGroupingQuadruples" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)) :+: C1 ('MetaCons "MacGroupingNoSeparator" 'PrefixI 'False) (U1 :: Type -> Type)))