network-info-0.1.0.1: Access the local computer's basic network configuration

Network.Info

Synopsis

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 

Fields

name :: String

Interface name (e.g. "eth0", "lo", "Local Area Connection")

ipv4 :: IPv4

IPv4 address

ipv6 :: IPv6

IPv6 address

mac :: MAC

MAC address

data IPv4 Source

Represents an IPv4 address (e.g. 172.23.21.1, 127.0.0.1)

Constructors

IPv4 !Word32 

data IPv6 Source

Represents an IPv6 address (e.g. 2001:db8:85a3::8a2e:370:7334, ::1)

Constructors

IPv6 !Word32 !Word32 !Word32 !Word32 

Instances

Bounded IPv6 
Eq IPv6 
Ord IPv6 
Show IPv6

Not yet capable of collapsing groups of zeros, will still generate valid addresses however.

Storable IPv6 

data MAC Source

Represents a MAC address (e.g. 01:23:45:67:89:ab)

Constructors

MAC !Word8 !Word8 !Word8 !Word8 !Word8 !Word8