WL500gPLib-0.3.1: A simple library to access to the WL 500gP router from the Haskell code

Network.Asus.WL500gP

Synopsis

Documentation

data Connection Source

Connection - stores the connection credentials

Constructors

Connection 

Fields

user :: String

user name

password :: String

user password

hostname :: String

hostname (ip address)

data Status Source

Status - return the complete connection information

Constructors

Status 

Fields

connectionStatus :: ConnectionStatus

connection status (connected, disconnected)

ip :: String

given ip address

subnetMask :: String

subnet mask

defaultGateway :: String

gefault gateway

dnsServers :: [String]

list of ip addresses of DNS servers

Instances

type Log = [String]Source

Log - router log representation

type Conn a = ReaderT Connection IO aSource

Conn is the Reader monad over IO. It holds credentials to sequence actions with router

withConnection :: Connection -> Conn a -> IO aSource

Runs the Conn monad, logouts before exit

readStatus :: Conn (Either String Status)Source

Reads the router status. Left is error

readLog :: Conn (Either String Log)Source

Reads the router log

connectWan :: Conn ()Source

Connects to the WAN. Similary to disconnecting, doesn't wait for result. It is useful to check the log after some time elapsed

disconnectWan :: Conn ()Source

Send disconnect signal. Doesn't wait for response and doesn't checks the result.

clearLog :: Conn ()Source

Clears log. It seems, that it allways succeeded