-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Access the local computer's basic network configuration
--   
--   This library provides simple read-only access to the local computer's
--   networking configuration. It is currently capable of getting a list of
--   all the network interfaces and their respective IPv4, IPv6 and MAC
--   addresses.
--   
--   network-info has been tested and is known to work on Ubuntu, FreeBSD,
--   NetBSD, Mac OS and Windows.
@package network-info
@version 0.2.1

module Network.Info

-- | Gets the address information for each of the network interfaces on the
--   local computer.
getNetworkInterfaces :: IO [NetworkInterface]

-- | Describes the basic configuration of a network interface. This
--   definition is currently limited to just one address per family.
data NetworkInterface
NetworkInterface :: String -> IPv4 -> IPv6 -> MAC -> NetworkInterface

-- | Interface name (e.g. "eth0", "lo", "Local Area Connection")
[name] :: NetworkInterface -> String

-- | IPv4 address
[ipv4] :: NetworkInterface -> IPv4

-- | IPv6 address
[ipv6] :: NetworkInterface -> IPv6

-- | MAC address
[mac] :: NetworkInterface -> MAC

-- | Represents an IPv4 address (e.g. 172.23.21.1,
--   127.0.0.1)
data IPv4
IPv4 :: {-# UNPACK #-} !Word32 -> IPv4

-- | Represents an IPv6 address (e.g.
--   2001:db8:85a3::8a2e:370:7334, ::1)
data IPv6
IPv6 :: {-# UNPACK #-} !Word32 -> {-# UNPACK #-} !Word32 -> {-# UNPACK #-} !Word32 -> {-# UNPACK #-} !Word32 -> IPv6

-- | Represents a MAC address (e.g. 01:23:45:67:89:ab)
data MAC
MAC :: {-# UNPACK #-} !Word8 -> {-# UNPACK #-} !Word8 -> {-# UNPACK #-} !Word8 -> {-# UNPACK #-} !Word8 -> {-# UNPACK #-} !Word8 -> {-# UNPACK #-} !Word8 -> MAC
instance GHC.Internal.Enum.Bounded Network.Info.IPv4
instance GHC.Internal.Enum.Bounded Network.Info.IPv6
instance GHC.Internal.Enum.Bounded Network.Info.MAC
instance GHC.Classes.Eq Network.Info.IPv4
instance GHC.Classes.Eq Network.Info.IPv6
instance GHC.Classes.Eq Network.Info.MAC
instance GHC.Classes.Ord Network.Info.IPv4
instance GHC.Classes.Ord Network.Info.IPv6
instance GHC.Classes.Ord Network.Info.MAC
instance GHC.Internal.Show.Show Network.Info.IPv4
instance GHC.Internal.Show.Show Network.Info.IPv6
instance GHC.Internal.Show.Show Network.Info.MAC
instance GHC.Internal.Show.Show Network.Info.NetworkInterface
instance GHC.Internal.Foreign.Storable.Storable Network.Info.IPv4
instance GHC.Internal.Foreign.Storable.Storable Network.Info.IPv6
instance GHC.Internal.Foreign.Storable.Storable Network.Info.MAC
instance GHC.Internal.Foreign.Storable.Storable Network.Info.NetworkInterface
