Safe Haskell | None |
---|
Network.IP.Addr
Contents
Description
Internet Protocol addressing.
- newtype IP4 = IP4 {}
- anIP4 :: Proxy IP4
- ip4ToOctets :: IP4 -> (Word8, Word8, Word8, Word8)
- ip4ToOctetList :: IP4 -> [Word8]
- ip4FromOctets :: Word8 -> Word8 -> Word8 -> Word8 -> IP4
- ip4FromOctetList :: [Word8] -> Maybe IP4
- anyIP4 :: IP4
- newtype IP6 = IP6 {}
- anIP6 :: Proxy IP6
- ip6ToWords :: IP6 -> (Word16, Word16, Word16, Word16, Word16, Word16, Word16, Word16)
- ip6ToWordList :: IP6 -> [Word16]
- ip6FromWords :: Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> IP6
- ip6FromWordList :: [Word16] -> Maybe IP6
- anyIP6 :: IP6
- data IP
- anIP :: Proxy IP
- class IsNetAddr n where
- type Net4Addr = NetAddr IP4
- type Net6Addr = NetAddr IP6
- data NetAddr a
- aNetAddr :: Proxy NetAddr
- aNetAddrOf :: Proxy a -> Proxy (NetAddr a)
- aNet4Addr :: Proxy Net4Addr
- aNet6Addr :: Proxy Net6Addr
- aNetAddrIP :: Proxy (NetAddr IP)
- printNetAddr :: (IsNetAddr n, Printable (NetHost n), Printer p) => n -> p
- net4Parser :: (CharParsing μ, Monad μ, IsNetAddr n, NetHost n ~ IP4) => μ n
- net6Parser :: (CharParsing μ, Monad μ, IsNetAddr n, NetHost n ~ IP6) => μ n
- netParser :: (IsNetAddr n, NetHost n ~ IP, CharParsing μ, Monad μ) => μ n
- newtype InetPort = InetPort {
- unInetPort :: Word16
- anInetPort :: Proxy InetPort
- data InetAddr a = InetAddr {}
- type Inet4Addr = InetAddr IP4
- type Inet6Addr = InetAddr IP6
- anInetAddr :: Proxy (InetAddr IP)
- anInetAddrOf :: Proxy a -> Proxy (InetAddr a)
- anInet4Addr :: Proxy Inet4Addr
- anInet6Addr :: Proxy Inet6Addr
- anInetAddrIP :: Proxy (InetAddr IP)
Host address
IPv4 address
IPv4 address.
ip4ToOctetList :: IP4 -> [Word8]Source
List the octets of an IPv4 address.
ip4FromOctets :: Word8 -> Word8 -> Word8 -> Word8 -> IP4Source
Assemble IPv4 address from the octets.
ip4FromOctetList :: [Word8] -> Maybe IP4Source
Assemble IPv4 address from the octet list.
IPv6 address
IPv6 address.
ip6ToWords :: IP6 -> (Word16, Word16, Word16, Word16, Word16, Word16, Word16, Word16)Source
The 16-bit pieces of an IPv6 address.
ip6ToWordList :: IP6 -> [Word16]Source
List the 16-bit pieces of an IPv6 address.
ip6FromWords :: Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> IP6Source
Assemble IPv6 address from the 16-bit pieces.
ip6FromWordList :: [Word16] -> Maybe IP6Source
Assemble IPv6 address from the list of 16-bit pieces.
IP address
Network address
Network address.
Network address: host address + network mask length.
Instances
Typeable1 NetAddr | |
Binary Net6Addr | |
Binary Net4Addr | |
Serialize Net6Addr | |
Serialize Net4Addr | |
IsNetAddr Net6Addr | |
IsNetAddr Net4Addr | |
Eq a => Eq (NetAddr a) | |
Show a => Show (NetAddr a) | |
Binary (NetAddr IP) | |
Serialize (NetAddr IP) | |
Printable a => Printable (NetAddr a) | |
Textual (NetAddr IP) | |
Textual (NetAddr IP6) | |
Textual (NetAddr IP4) | |
IsNetAddr (NetAddr IP) |
printNetAddr :: (IsNetAddr n, Printable (NetHost n), Printer p) => n -> pSource
Print network address (CIDR notation).
net4Parser :: (CharParsing μ, Monad μ, IsNetAddr n, NetHost n ~ IP4) => μ nSource
IPv4 network address parser (CIDR notation).
net6Parser :: (CharParsing μ, Monad μ, IsNetAddr n, NetHost n ~ IP6) => μ nSource
IPv6 network address parser (CIDR notation).
netParser :: (IsNetAddr n, NetHost n ~ IP, CharParsing μ, Monad μ) => μ nSource
IP network address parser (CIDR notation).
Port number
Port number.
Constructors
InetPort | |
Fields
|
anInetPort :: Proxy InetPortSource
InetPort
proxy value.
Socket address
Socket address: host address + port number.
Instances
Functor InetAddr | |
Typeable1 InetAddr | |
Printable Inet6Addr | |
Printable Inet4Addr | |
Textual Inet6Addr | |
Textual Inet4Addr | |
Eq a => Eq (InetAddr a) | |
Ord a => Ord (InetAddr a) | |
Show a => Show (InetAddr a) | |
Binary a => Binary (InetAddr a) | |
Serialize a => Serialize (InetAddr a) | |
Hashable a => Hashable (InetAddr a) | |
Printable (InetAddr IP) | |
Textual (InetAddr IP) |
anInet4Addr :: Proxy Inet4AddrSource
Inet4Addr
proxy value.
anInet6Addr :: Proxy Inet6AddrSource
Inet6Addr
proxy value.