-- 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 10.10,
--   FreeBSD 9.0, Mac OS X 10.6.4 and Windows XP/7. It probably works on
--   other flavours of Linux, OS X, FreeBSD and Windows as well.
@package network-info
@version 0.2.0.8

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. <i>This</i>
--   <i>definition is currently limited to just one address per family.</i>
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. <tt>172.23.21.1</tt>,
--   <tt>127.0.0.1</tt>)
data IPv4
IPv4 :: {-# UNPACK #-} !Word32 -> IPv4

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

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