ip-0.8: Library for IP and MAC addresses

Safe HaskellNone
LanguageHaskell2010

Net.Types

Synopsis

Documentation

newtype IPv4 Source #

A 32-bit Internet Protocol address.

Constructors

IPv4 

Fields

Instances

Bounded IPv4 Source # 
Enum IPv4 Source # 

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] #

Eq IPv4 Source # 

Methods

(==) :: IPv4 -> IPv4 -> Bool #

(/=) :: IPv4 -> IPv4 -> Bool #

Ord IPv4 Source # 

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 #

Read IPv4 Source # 
Show IPv4 Source # 

Methods

showsPrec :: Int -> IPv4 -> ShowS #

show :: IPv4 -> String #

showList :: [IPv4] -> ShowS #

Generic IPv4 Source # 

Associated Types

type Rep IPv4 :: * -> * #

Methods

from :: IPv4 -> Rep IPv4 x #

to :: Rep IPv4 x -> IPv4 #

ToJSON IPv4 Source # 
FromJSON IPv4 Source # 

Methods

parseJSON :: Value -> Parser IPv4 #

Hashable IPv4 Source # 

Methods

hashWithSalt :: Int -> IPv4 -> Int #

hash :: IPv4 -> Int #

type Rep IPv4 Source # 
type Rep IPv4 = D1 (MetaData "IPv4" "Net.Types" "ip-0.8-LJXdXTyY61NBe8am8VEL4I" True) (C1 (MetaCons "IPv4" PrefixI True) (S1 (MetaSel (Just Symbol "getIPv4") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word32)))

data IPv4Range Source #

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 

Instances

Eq IPv4Range Source # 
Ord IPv4Range Source # 
Read IPv4Range Source # 
Show IPv4Range Source # 
Generic IPv4Range Source # 

Associated Types

type Rep IPv4Range :: * -> * #

ToJSON IPv4Range Source # 
FromJSON IPv4Range Source # 
Hashable IPv4Range Source # 
type Rep IPv4Range Source # 
type Rep IPv4Range = D1 (MetaData "IPv4Range" "Net.Types" "ip-0.8-LJXdXTyY61NBe8am8VEL4I" False) (C1 (MetaCons "IPv4Range" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "ipv4RangeBase") SourceUnpack SourceStrict DecidedStrict) (Rec0 IPv4)) (S1 (MetaSel (Just Symbol "ipv4RangeLength") SourceUnpack SourceStrict DecidedStrict) (Rec0 Word8))))