monky-2.1.0.0: A system state collecting library and application

PortabilityLinux
Stabilityexperimental
Maintainerongy
Safe HaskellNone

Monky.IP.Raw

Description

This may change at any time when the main IP module changes. Consider this API unstable!

Synopsis

Documentation

data IP Source

Datatype for IP addresses, abstracts over v4/v6

Constructors

IPv4 IP4 
IPv6 IP6 

Instances

Eq IP 
Show IP 

data IP4 Source

IPv4 addresses

Instances

Eq IP4 
Show IP4 
Storable IP4 

data IP6 Source

IPv6 addresses

Instances

Eq IP6 
Show IP6 
Storable IP6 

parseIP :: String -> IP4Source

Parse an IP4 from a String

ipFromBS :: ByteString -> IPSource

Read an IP from a ByteString. The type is determined by the size of the ByteString.

familyToNum :: Num a => AddressFamily -> aSource

Get the number associated with the family address. This is for interfacing with libraries

data AddressFamily Source

AddressFamilies support for libraries

Constructors

AF_UNSPEC 
AF_INET 
AF_INET6 

getAddrFamily :: IP -> AddressFamilySource

Get the address family for a given ip address