Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Network.Info
Synopsis
- getNetworkInterfaces :: IO [NetworkInterface]
- data NetworkInterface = NetworkInterface {}
- data IPv4 = IPv4 !Word32
- data IPv6 = IPv6 !Word32 !Word32 !Word32 !Word32
- data MAC = MAC !Word8 !Word8 !Word8 !Word8 !Word8 !Word8
Documentation
getNetworkInterfaces :: IO [NetworkInterface] Source #
Gets the address information for each of the network interfaces on the local computer.
data NetworkInterface Source #
Describes the basic configuration of a network interface. This definition is currently limited to just one address per family.
Constructors
NetworkInterface | |
Instances
Show NetworkInterface Source # | |
Defined in Network.Info Methods showsPrec :: Int -> NetworkInterface -> ShowS show :: NetworkInterface -> String showList :: [NetworkInterface] -> ShowS | |
Storable NetworkInterface Source # | |
Defined in Network.Info Methods sizeOf :: NetworkInterface -> Int alignment :: NetworkInterface -> Int peekElemOff :: Ptr NetworkInterface -> Int -> IO NetworkInterface pokeElemOff :: Ptr NetworkInterface -> Int -> NetworkInterface -> IO () peekByteOff :: Ptr b -> Int -> IO NetworkInterface pokeByteOff :: Ptr b -> Int -> NetworkInterface -> IO () peek :: Ptr NetworkInterface -> IO NetworkInterface poke :: Ptr NetworkInterface -> NetworkInterface -> IO () |
Represents an IPv4 address (e.g. 172.23.21.1
, 127.0.0.1
)
Constructors
IPv4 !Word32 |
Instances
Bounded IPv4 Source # | |
Defined in Network.Info | |
Eq IPv4 Source # | |
Ord IPv4 Source # | |
Show IPv4 Source # | |
Storable IPv4 Source # | |
Defined in Network.Info Methods peekElemOff :: Ptr IPv4 -> Int -> IO IPv4 pokeElemOff :: Ptr IPv4 -> Int -> IPv4 -> IO () peekByteOff :: Ptr b -> Int -> IO IPv4 pokeByteOff :: Ptr b -> Int -> IPv4 -> IO () |
Represents an IPv6 address (e.g. 2001:db8:85a3::8a2e:370:7334
, ::1
)
Constructors
IPv6 !Word32 !Word32 !Word32 !Word32 |
Instances
Bounded IPv6 Source # | |
Defined in Network.Info | |
Eq IPv6 Source # | |
Ord IPv6 Source # | |
Show IPv6 Source # | Not yet capable of collapsing groups of zeros, will still generate valid addresses however. |
Storable IPv6 Source # | |
Defined in Network.Info Methods peekElemOff :: Ptr IPv6 -> Int -> IO IPv6 pokeElemOff :: Ptr IPv6 -> Int -> IPv6 -> IO () peekByteOff :: Ptr b -> Int -> IO IPv6 pokeByteOff :: Ptr b -> Int -> IPv6 -> IO () |
Represents a MAC address (e.g. 01:23:45:67:89:ab
)
Constructors
MAC !Word8 !Word8 !Word8 !Word8 !Word8 !Word8 |
Instances
Bounded MAC Source # | |
Defined in Network.Info | |
Eq MAC Source # | |
Ord MAC Source # | |
Show MAC Source # | |
Storable MAC Source # | |
Defined in Network.Info Methods peekElemOff :: Ptr MAC -> Int -> IO MAC pokeElemOff :: Ptr MAC -> Int -> MAC -> IO () peekByteOff :: Ptr b -> Int -> IO MAC pokeByteOff :: Ptr b -> Int -> MAC -> IO () |