| 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
- loopbackIP4 :: IP4
- broadcastIP4 :: IP4
- data Range4
- ip4Range :: IP4 -> Range4
- 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
- loopbackIP6 :: IP6
- data Range6
- = GeneralIP6
- | AnyIP6
- | LoopbackIP6
- | IP4MappedIP6
- | IP4EmbeddedIP6
- | DiscardIP6
- | ReservedIP6
- | TeredoIP6
- | BenchmarkingIP6
- | DocumentationIP6
- | OrchidIP6
- | IP6To4IP6
- | UniqueLocalIP6
- | LinkLocalIP6
- | MulticastIP6
- ip6Range :: IP6 -> Range6
- 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)
- net4Addr :: IP4 -> Word8 -> Net4Addr
- net6Addr :: IP6 -> Word8 -> Net6Addr
- 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
- anInetAddrOf :: Proxy a -> Proxy (InetAddr a)
- anInet4Addr :: Proxy Inet4Addr
- anInet6Addr :: Proxy Inet6Addr
- anInetAddrIP :: Proxy (InetAddr IP)
Host address
IPv4 address
IPv4 address.
Instances
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.
IPv4 address 127.0.0.1.
IPv4 address 255.255.255.255.
IPv4 address range classification (per RFC6890).
Constructors
| GeneralIP4 | General IPv4 address. |
| ThisHostIP4 | This host on this network. |
| PrivateUseIP4 | Private-Use networks. |
| SharedSpaceIP4 | Shared address space. |
| LoopbackIP4 | Loopback address. |
| LinkLocalIP4 | Link local address. |
| ReservedIP4 | Reserved address. |
| DSLiteIP4 | Dual-Stack Lite. |
| DocumentationIP4 | Reserved for documentation. |
| IP6To4IP4 | 6to4. |
| BenchmarkingIP4 | Benchmark testing. |
| MulticastIP4 | Multicast address. |
| FutureUseIP4 | Future use. |
| BroadcastIP4 | Limited broadcast. |
IPv6 address
IPv6 address.
Instances
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.
IPv6 address ::1.
IPv6 address range classification (per RFC6890).
Constructors
| GeneralIP6 | General IPv6 address. |
| AnyIP6 | Unspecified address. |
| LoopbackIP6 | Loopback address. |
| IP4MappedIP6 | Mapped IPv4 address. |
| IP4EmbeddedIP6 | Embedded IPv4 address. |
| DiscardIP6 | Discard address. |
| ReservedIP6 | Reserved address. |
| TeredoIP6 | Teredo address. |
| BenchmarkingIP6 | Benchmark testing. |
| DocumentationIP6 | Reserved for documentation. |
| OrchidIP6 | ORCHID address. |
| IP6To4IP6 | 6to4. |
| UniqueLocalIP6 | Unique local address. |
| LinkLocalIP6 | Link local address. |
| MulticastIP6 | Multicast address. |
IP address
Network address
Network address.
Network address: host address + network mask length.
Instances
| Read Net6Addr | |
| Read Net4Addr | |
| Typeable1 NetAddr | |
| Binary Net6Addr | |
| Binary Net4Addr | |
| Serialize Net6Addr | |
| Serialize Net4Addr | |
| Textual Net6Addr | |
| Textual Net4Addr | |
| IsNetAddr Net6Addr | |
| IsNetAddr Net4Addr | |
| Eq a => Eq (NetAddr a) | |
| Read (NetAddr IP) | |
| Show a => Show (NetAddr a) | |
| Binary (NetAddr IP) | |
| Serialize (NetAddr IP) | |
| Printable a => Printable (NetAddr a) | |
| Textual (NetAddr IP) | |
| 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) | |
| Read a => Read (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) |
anInetAddr :: Proxy InetAddrSource
InetAddr proxy value.
anInet4Addr :: Proxy Inet4AddrSource
Inet4Addr proxy value.
anInet6Addr :: Proxy Inet6AddrSource
Inet6Addr proxy value.