hans-3.0.2: Network Stack

Safe HaskellNone
LanguageHaskell2010

Hans.IP4.State

Synopsis

Documentation

data IP4State Source #

Constructors

IP4State 

Fields

data SendSource Source #

Constructors

SourceAny

Any interface that will route the message

SourceIP4 !IP4

The interface with this address

SourceDev !Device !IP4

This device with this source address

data ResponderRequest Source #

Constructors

Finish !Device !Mac [ByteString]

Finish sending these IP4 packets

Send !SendSource !IP4 !Bool !NetworkProtocol ByteString

Send this IP4 payload to this address

addRoute :: HasIP4State state => state -> Bool -> Route -> IO () Source #

lookupRoute4 :: HasIP4State state => state -> IP4 -> IO (Maybe (IP4, IP4, Device)) Source #

Lookup the source address, as well as the next hop and device.

isLocalAddr :: HasIP4State state => state -> IP4 -> IO (Maybe Route) Source #

Is this an address that's assigned to a device in the network stack?

nextIdent :: HasIP4State state => state -> IO IP4Ident Source #

Give back the result of using the random function on the internal state.

routesForDev :: HasIP4State state => state -> Device -> IO [Route] Source #

Give back the list of routing rules associated with this device.