ip-0.8.3: 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 #

Prim IPv4 Source # 
Unbox IPv4 Source # 
Vector Vector IPv4 Source # 
MVector MVector IPv4 Source # 
type Rep IPv4 Source # 
type Rep IPv4 = D1 (MetaData "IPv4" "Net.Types" "ip-0.8.3-8yY8nhdaPGh2mxXutmaMWu" True) (C1 (MetaCons "IPv4" PrefixI True) (S1 (MetaSel (Just Symbol "getIPv4") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word32)))
data Vector IPv4 Source # 
data MVector s IPv4 Source # 

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 # 
Unbox IPv4Range Source # 
Vector Vector IPv4Range Source # 
MVector MVector IPv4Range Source # 
type Rep IPv4Range Source # 
type Rep IPv4Range = D1 (MetaData "IPv4Range" "Net.Types" "ip-0.8.3-8yY8nhdaPGh2mxXutmaMWu" False) (C1 (MetaCons "IPv4Range" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "ipv4RangeBase") SourceUnpack SourceStrict DecidedUnpack) (Rec0 IPv4)) (S1 (MetaSel (Just Symbol "ipv4RangeLength") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Word8))))
data Vector IPv4Range Source # 
data MVector s IPv4Range Source # 

data Mac Source #

A 48-bit MAC address.

Constructors

Mac 

Fields

Instances

Eq Mac Source # 

Methods

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

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

Ord Mac Source # 

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 #

Read Mac Source # 
Show Mac Source # 

Methods

showsPrec :: Int -> Mac -> ShowS #

show :: Mac -> String #

showList :: [Mac] -> ShowS #

Generic Mac Source # 

Associated Types

type Rep Mac :: * -> * #

Methods

from :: Mac -> Rep Mac x #

to :: Rep Mac x -> Mac #

ToJSON Mac Source # 

Methods

toJSON :: Mac -> Value #

toEncoding :: Mac -> Encoding #

FromJSON Mac Source # 

Methods

parseJSON :: Value -> Parser Mac #

Hashable Mac Source # 

Methods

hashWithSalt :: Int -> Mac -> Int #

hash :: Mac -> Int #

Unbox Mac Source # 
Vector Vector Mac Source # 
MVector MVector Mac Source # 
type Rep Mac Source # 
type Rep Mac = D1 (MetaData "Mac" "Net.Types" "ip-0.8.3-8yY8nhdaPGh2mxXutmaMWu" False) (C1 (MetaCons "Mac" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "macA") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Word16)) (S1 (MetaSel (Just Symbol "macB") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Word32))))
data Vector Mac Source # 
data MVector s Mac Source # 

data MacEncoding Source #

Constructors

MacEncoding 

Fields